Diecimila resets easily when controlling a motor

@eighthave,

did you try any of the suggestions that people made in this thread, e.g. adding a capacitor?

D

Just for comparison purposes, my FT232 loses power when I hook up a 220uf capacitor to 5v and GND and the ATmega168 also loses power.

How can I tell? The RX and TX lights flash as the computer talks to it and the pin 13 LED also goes through the boot loader routine.

So it appears relatively easy to reset the Arduino with power fluctuations.

Just for comparison purposes, my FT232 loses power when I hook up a 220uf capacitor to 5v and GND and the ATmega168 also loses power.

How can I tell? The RX and TX lights flash as the computer talks to it and the pin 13 LED also goes through the boot loader routine.

So it appears relatively easy to reset the Arduino with power fluctuations.

OK, this is a reset.
Cheater, can you provide more detailed information about your environment? Are you powering the Arduino board from USB? external power? what can you tell us about the power supply? What are you "loading" to make it reset?

Please, remember that all the posts are being read by many people and trying to learn something. If we provide more complete information, we can make every Post a better Post.

@eighthave,

did you try any of the suggestions that people made in this thread, e.g. adding a capacitor?

D

Yes, adding filter caps definitely helps. I am not troubleshooting this circuit though, what I am trying to do it map out the difference in behavior between my Diecimila and my Arduino and NG. I think it would be useful to find the exact mechanism that is causing the reset to see if there is something that can be done to make the Arduinos less sensitive to noise.

This stuff can really stump newbies since it's quite unpredictable. Also, I plan on writing an Arduino-focused tutorial about dealing with noise.

hey

I don't understand why you would want to 'map it out', as obviously the motor is injecting noise. There are only two ways for it to get in: through the base pin of the transistor (unlikely as it is a diode effectively), and through the power supply. Adding capacitors and other techniques to reduce the noise is the expected design solution. The proper way to spec this is to just say "add a capacitor". I can make my Arudino malfunction too, just by adding a large enough inductive load that contaminates the power supply. This is just a characteristic of electronic design: if you add inductive, noisy loads to low-power digital logic, you have to be prepared to have to clean up the power supply.

D

@eighthave,

did you try any of the suggestions that people made in this thread, e.g. adding a capacitor?

D

Yes, adding filter caps definitely helps. I am not troubleshooting this circuit though, what I am trying to do it map out the difference in behavior between my Diecimila and my Arduino and NG. I think it would be useful to find the exact mechanism that is causing the reset to see if there is something that can be done to make the Arduinos less sensitive to noise.

This stuff can really stump newbies since it's quite unpredictable. Also, I plan on writing an Arduino-focused tutorial about dealing with noise.

If you want to write a tutorial on what can cause noise and how to make the Arduino more noise resilient, then it is fine. If you want to see what can destroy an Arduino, then there are millions of possible ways to do it... it can be fun, but nothing else. I recommend you do the mapping to many Arduinos, because doing the map with YOUR Diecimila, with YOUR Arduino with YOUR NG, then the information is only useful to you and nobody else.

Have Fun!

Ok, here's my final testing, hopefully someone will find this interesting :). I got some other boards from Tom Igoe to test with. I added a reset count to the EEPROM so I can see whether it's actually reseting or not. It prints out the count upon restart. To eliminate brownout as a cause, I ran these from a GP-4303D bench power supply @ 12V, current turned all the way up (it never got above 0.2A).

Like I said before, running the power to the motor totally separately reduces (but does not eliminate) the resetting. Also powering the Diecimila itself from the bench supply also makes the resetting more frequent.

Here are some results of my testing:

my Diecimila

Resets with certain speed of the motor, the reset count is incremented, and reads the analogIn upon reset.

When the motor and Diecimila is powered only by USB, then is actually resets much less. The motor doesn't get going very fast ever.

my Arduino NG

doesn't reset with this circuit/motor, even when powered from USB

Tom Igoe's Diecimila #1

acts like it's resetting, the motor interrupts the built-in pin 13 flashes, but the reset count is NOT incremented, and doesn't read the analogIn upon reset. It gets caught in a loop of resets and running the motor.

Tom Igoe's Diecimila #2

Same as my diecimila, resets with certain speed of the motor, the reset count is incremented, and reads the analogIn upon reset.

Tom Igoe's Arduino NG

doesn't reset with this circuit/motor

Tom Igoe's Arduino ATMEGA8 with capacitor added between ATMEGA pin1 and X3 port #4

doesn't reset with this circuit/motor

Hmm, maybe the FTDI chip is resetting, toggling DTR, and therefore resetting the ATmega?

At this point I think we only have two options:

  • we start a new category in the forum called Hardware> Zen Speculation.
  • You could get out that oscilloscope thing, connect one channel to the reset line and the other to the +5 supply, and do some actual troubleshooting. :slight_smile:

D

I used a scope and with some serious fluctuations, the reset pin goes low and the whole board resets. But I mean "serious" fluctuations, like grabbing the motor cable and connecting it and disconnecting it by just touching the contacts. I could not make MY FREEDUINO and MY USB 2.2 board reset using the circuit presented by eighthave, or the type of reset that he shows in the video, by moving the pot and changing PWM, no way.

Eighthave: in your last comprehensive test, did you use the same circuit as you show in the video? How did you generate the "noise" or "fluctuations"?

In the absence of concrete empirical testing, I have two guesses:

  • Some of the Diecimila filter caps have been know to be poorly soldered.
  • the new FTDI "always on" design looks like the culprit. Part two of this guess would be that since the reset line is now connected to the FTDI, which is presumably more sensitive to noise, that could be causing the problem.

One engineer who contributed to the Freeduino project noted that the Arduino's use of the FTDI does not match the recommended FTDI design, as a ferrite bead, a 4.7UF capacitor and a .01Uf capacitor are missing from the Diecimila's USB power supply line. (We missed this in Freeduino 1.17 but it will be in 1.18.)

In any case, the FTDI causing the reset as a result of noise seems like the likely culprit.

We await your scope!

D

Cheater, can you provide more detailed information about your environment? Are you powering the Arduino board from USB? external power? what can you tell us about the power supply? What are you "loading" to make it reset?

Powering off USB with a standard 220uf 16v capacitor which I scavenged.
How I'm testing is waiting for the boot loader to complete then shoving it in to the 5v and GND pins.
Resets it every time.

I also did a test with a unregulated 1A supply and it still resets.

I cant easily test to see whether the FTDI chip is sending the reset or if its a brownout doing it.
It does explain whats happening rather well though.

How I'm testing is waiting for the boot loader to complete then shoving it in to the 5v and GND pins.
Resets it every time.

You mean you are shoving the 5V and GND pins together? Or you are shoving with a motor to the +5V and GND pins?

@cheater, if you put a 220UF cap with no charge across the power supply, that is equivalent to a short circuit for a few milliseconds, so it makes sense that it would reset.

D

Well as it turns out, plugging in a SD card is enough to reset it and confuse my computer big time.
It decided to ditch /dev/ttyUSB0 and start using /dev/ttyUSB1.

Oh and yes the SD card was using a decoupling capacitor.
I appear to have solved it by using the somewhat larger 220uf capacitor I mentioned before.

Well as it turns out, plugging in a SD card is enough to reset it and confuse my computer big time.
It decided to ditch /dev/ttyUSB0 and start using /dev/ttyUSB1.

Oh and yes the SD card was using a decoupling capacitor.
I appear to have solved it by using the somewhat larger 220uf capacitor I mentioned before.

As far as I know, Arduino was not designed to be hot pluggable (plug and play)... maybe the SD card supports it, but not the receiving Arduino. As I said in a previous post, you can find millions of ways to reset Arduino, and millions more to break it, but, is the analysis any useful?

I'm only saying its pretty easy to reset it and if your doing something which switches on/off or is hot pluggable, you'll need a capacitor to prevent it.

Ideally the two power filtering capacitors could just be increased a bit.

Its not like a SD card is a particularly heavy load.

if the SD has capacitors, then you can't really hot swap it, as it's goign to short the power supply. Not sure that on board caps would help that much, but I do agree they should be bigger for general filtering. The next Freeudino will have bigger caps, based on what we have been hearing in this thread.

D

if the SD has capacitors, then you can't really hot swap it, as it's goign to short the power supply.

Well SD cards are a plain chip. Nothing else. :slight_smile:
It hot swaps fine with a 220uf capacitor on the 3.3v rail.

that's interesting... is the SD card 3.3V?

That totally makes sense, as I think there's only a .1UF filter on the 3.3V, which comes from the FTDI chip. If you suddenly put a load on the 3.3V coming ffrom the FTDI, it would very likely reset, and then pull the RTS line low, in turn causing an Atmega reset....

Anyway I think this thread points to the need for

  • 10uF or more on the 3.3V line
  • additional (100uF+) on the +5 line

Wouldn't you agree?

D