Good advice on the I2C loading/pull-ups, always a thing to consider. The symptoms do sound like either a noise or a loading problem... Generally in a motor environment I use a current instead of a voltage for analog signalling to avoid just this kind of issue. Sometimes isolation is also required.
Just for kicks, try a separate supply to the pots and see if that improves things. The long lines to the pots may be picking up noise and injecting it into your mega power supply rails. The previous suggestion to use properly shielded cabling is a good one (connect the shield to ground only at one end), especially with analog voltage signalling, but also to help reduce DC rail noise injection. Be careful to not let the shield touch grounded equipment or you may accidentally create additional problems. The pot loads may be dragging down your supply rail as well, reducing noise margin just enough to cause problems - One confusing thing: your statement "Resistance between the headers measures about 1.3K - what you'd expect for 8, 10K resistors in series" seems not correct- in series it should read 80K, I assume you meant "in parallel" which would make the numbers come out about right. The suggestion to scope the situation is a good one, but be aware that simply connecting the scope leads might possibly "cure" the problem. Also, introducing the scope ground to the circuit might affect the results (or cause serious problems in some circumstances)- best to use a differential probe if you have one or if one can be borrowed (they can be kind of expensive, but there are "lower cost" ones out there for those on a budget). If you find that noise coming in on the voltage-signal lines are causing the problem, put a small series resistance in line with the signals, followed by a small cap to signal ground at the Mega end of things. Depending on the values you choose it might take care of things and perhaps make the pot adjustment response a bit more smooth, just be careful with your component calcs so you don't create unintended side effects. If you find noise injection to the supply rails is the problem, you can do a similar thing between the positive rail and the positive header and between the negative rail and the negative header (you can get away with this if you can tolerate a negative rail slightly above 0 volts and the varying pots do not cause a varying load), but you may also want some additional bypass caps right at the rails where the headers connect to the rails. You may also experiment with some ferrite beads in line with both rails and all signals, but be careful to not accidentally create a resonate tank circuit - keep it lossy in your parts choices or unnoticed ringing in the VHF/UHF frequencies may intermittently swamp your a/d inputs and cause very strange symptoms. Some less-expensive diff probe sources, in case anybody is interested: Here is the lowest-cost diff probe (only 25MHz B/W though) I could find in a google search- beware:I know nothing about this company or this product: http://www.globalmediapro.com/dp/A01LT0/Pintek-DP-25-Differential-Probe-25MHz-1000V/ "Low"-cost, some higher bandwidth models: https://www.picotech.com/accessories/active-oscilloscope-probes (They have dealers, so you might find better pricing and local sourcing) On Mon, Mar 9, 2015 at 2:10 PM, Jerry Biehler <[email protected]> wrote: > If they relied on the internal pull up in the uC it may not be good. There > are some white paper out there and it basically said the internal pullup > are not good for i2c, FWIW. > > -Jerry > > > On Mar 9, 2015, at 2:07 PM, Greg Peek <[email protected]> wrote: > > > > Have you looked at the signal quality of the I2C (working with 6 boards) > with a ~100MHz scope? 6+ loads on i2c needs a stronger pull-up than 10K. > > > > I like the antenna idea. Maybe try shielded cables to the POTs, or > "big" caps. Who cares how slow the pot voltage changes, right? > > > > > > > > Input leakage would explain the unconnected analog pins going to Vcc. > Does a 100K to ground pull them low (just as a test). > > > > On Mon, Mar 9, 2015 at 1:32 PM, Jerry Biehler <[email protected]> > wrote: > > Might put some small caps between the pot signal wire and the ground to > kill noise. They might be acting like giant antennas. > > > > You also could try stronger pull-ups on the i2c. > > > > -Jerry > > > > > On Mar 9, 2015, at 1:24 PM, Jim Larson <[email protected]> wrote: > > > > > > Following is a description of a problem I'm having in a motor control > system I'm working on down here in Sunny San Diego. Any thoughts or > insights would be most appreciated. > > > > > > I have 8, 10K linear pots. The wiper of each pot is tied to an analog > input of an Arduino Mega (Analog pins 0 to 7). One end of each pot is tied > to the 5V rail; the other to ground. The pots are located 3 to 8 feet from > the Arduino. I have a header for the power connections and another for the > grounds. A wire from each header connects them to the 5V and GND > connections on the Mega. There are 6 motor driver shields (ADFruit Motor > Shield V2) stacked on the Mega and the header connections actually plug > into the top one of these. My problem is that connecting the headers to the > Mega with all the pots connected to the headers causes the motor shields to > fail initialization. When I connect the headers with only 6 (maybe 7) pots > connected, works fine. If I connect the last one or two pots, it fails. If > the two headers are not connected, all is well. Motor boards initialize > just fine. If I connect even the ground header(!), the initialization > fails. By fails, I mean that somewher > e > > in the initialization of the very first board, the driver code hangs. I > have not yet tried to find exactly where the driver code hangs - I don't > think that's where the problem lurks. > > > > > > Voltages measure just fine. That is, the Arduino rails measure 4.99V > between them with the headers connected or not connected. Using an external > supply to drive the Arduino doesn't change anything. I'm considering an > independent 5V supply for the pots, but I'm not convinced that will solve > the problem (since I don't know what the problem is.) > > > > > > Resistance between the headers measures about 1.3K - what you'd expect > for 8, 10K resistors in series. > > > > > > One possible clue: the motor shields use I2C for all control. That > could be my "canary". > > > > > > Something that bothers me: There is a measurable voltage on the > headers when they are not connected to power and ground. (4.99V). Since the > wires only connect to each end of the pots and should not be connected to > the circuitry otherwise, I don't know why this voltage should exist. The > wipers of the pots are connected to the Analog pins of the Arduino Mega. I > am assuming that these are configured as inputs by Arduino and should not > be sourcing any voltage, right? So where is the voltage coming from? Is it > induced by voltages elsewhere in the system? The resistance measurement > does not indicate a short anywhere. > > > > > > > > > --- > > > This email has been checked for viruses by Avast antivirus software. > > > http://www.avast.com > > > > > > _______________________________________________ > > > dorkbotpdx-blabber mailing list > > > [email protected] > > > http://music.columbia.edu/mailman/listinfo/dorkbotpdx-blabber > > > > _______________________________________________ > > dorkbotpdx-blabber mailing list > > [email protected] > > http://music.columbia.edu/mailman/listinfo/dorkbotpdx-blabber > > > > _______________________________________________ > > dorkbotpdx-blabber mailing list > > [email protected] > > http://music.columbia.edu/mailman/listinfo/dorkbotpdx-blabber > > _______________________________________________ > dorkbotpdx-blabber mailing list > [email protected] > http://music.columbia.edu/mailman/listinfo/dorkbotpdx-blabber >
_______________________________________________ dorkbotpdx-blabber mailing list [email protected] http://music.columbia.edu/mailman/listinfo/dorkbotpdx-blabber
