Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Frying Arduino Uno boards

Status
Not open for further replies.

MrZenite

New Member
I have built a small yarn winder that uses 2 12V DC motors geared down to 100 RPM. One turns the yarn bobbin, while the second runs a jack screw that moves a traveller to level out the yarn across the bobbin. The traveller hits two limit switches at the ends of its desired travel. The limit switches send a signal to the Arduino board that then sends a signal out to a set of relays (two are electronic, the last one in the set is an old fashioned coil operated DPDT relay that does the actual DC polarity switching.) The DC motors reverse direction immediately upon receiving the polarity reversal. When I first start the unit all runs fine, but about two minutes in the signal from the left hand limit switch no longer reverses the motor, and I find the Arduino board has been fried. Replacing the board starts the cycle up again ending with another fried board. Surprisingly, none of the relays get fried, only the board. I suspect I am throwing a massive voltage spike when I reverse polarity, but that spike has to propagate back thru an electronic relay to get to the board. Surprisingly the relay is fine. I am not using any limiting resistors on the limit switch signals. Is it possible that one of them is causing the problem? If so how do I address it? Any other thoughts on what is frying my boards would be welcome.
 
Hi,
interesting setup!

Do you have a flywheel diode across the relay coil? Without that an extremely high voltage spike can be generated.

Also, if you are reversing the motor without allowing it to stop, that could be momentarily overriding the power source and forcing reverse polarity on to whatever it's connected to.

A good size capacitor across the supply feeding the motor relay may help, but I'd also add a low value resistor in series with the motor to limit the current surges as it reverses. It's possible otherwise the relay or the motor commutator could be burned out over time.

Allowing the motor to stop before reversing polarity will also reduce the surge loading.
 
Thanks for the reply. I am a Chem Engin. by training, with a strong hobby interest in electronics, but I am weak on short cut terms. What is a "flywheel diode", what does it do, and what polarity does it take. The main power switching relay I am using does have an internal diode in it that flashes on one mode of reversal, but not the other. Do I need a second diode two, if so, what kind of resistor do I need to protect it from the full 12 volts when the polarity is same as the diodes?

Thanks, again.
 
A flywheel diode is just a general rectifier diode connected across the relay coil (or any inductive load on DC), which allows the current to continue to circulate as the magnetic field collapses in the coil.

It's connected so it does not conduct normally: Cathode to positive.

Without that, the current tries to continue to flow but has nowhere to go, so extreme (reverse) voltages build up for fraction of a second; think of is as something like the electrical equivalent of "water hammer".

More info: https://progeny.co.uk/back-emf-suppression/


Do you know what current the reversing motor takes while it is running? The appropriate resistance depends on the motor current.

If you can control the power to that motor separately, just switching power off for a fraction of a second so it can stop, before reversing and switching on again, should drastically reduce the electrical and mechanical stresses on that side of things
 
Since I am reversing current (polarity) in the leads that feed the motor there is no fixed anode and cathode wires. Thus no preferred direction for the diode. Can I use a small capacitor across these leads to absorb the spike? The motor is one sixth hp running 12 volts and I believe it has fixed magnets tor the rotor, so power is only fed to the stator windings. Motor is rated 6 amps at full load. If a capacitor can work, approx what microfarad value would be apropriate. Assume I can not use an electrolytic here due to changing polarity. Thanks for your input.
 
What is a "flywheel diode", what does it do,

Have a look at this old thread:

There are a couple of scope traces which show why a flywheel diode is used.
Sometimes called "catch diodes".
Sometimes called "Back-EMF suppression diodes".

JimB
 
Since I am reversing current (polarity) in the leads that feed the motor there is no fixed anode and cathode wires.

The flywheel diode connects across the relay coil.

The motor will try to produce voltage in the same polarity it's running on, until it slows to a stop - "Back EMF".
That is why I suggest letting is stop before reversing, as otherwise it's going to take twice the usual start-up current to try and instantly reverse.

To suppress some noise from the motor (or an AC inductive load), you can use a "snubber" circuit - typically a 0.1uF capacitor and for 12V a 10 ohm resistor, in series.

For more serious spike suppression you can add a bridge rectifier, AC side connected to the motor and DC to the feed to the relay.
Again, a capacitor across the feed to the relay is a good idea.
 
I am working on a schematic and will post it this weekend. I am somewhat limited by having had surgery on one shoulder a few weeks ago, and the arm is held in fixed position to avoid injury. In the meantime I am working with only one hand (my dominant one happily) to do the sketch with. As for my nomenclature problems, when I first took college physics we talked about condensers and reactors, instead of the modern terms capacitors and inductors. I still remember my first regenerative cat's whisker radio that used an A-1 triode amplifier to provide the amplified feedback and a giant 1.5 volt battery to heat the cathode. Needless to say anything to do with semiconductors is a stretch to me.
 
Don't worry about it - folks here are more interested in getting it working and are helpful in getting across the understanding of how it is working.

I'm anxious to see a schematic, messy or not. Also, you are using an Arduino UNO?...and when it is "fried", it is not coming up at all?

The limit switches send a signal to the Arduino board that then sends a signal out to a set of relays (two are electronic, the last one in the set is an old fashioned coil operated DPDT relay that does the actual DC polarity switching.)

What are those "electronic relays"?
 
I will answer the two questions in order received: I am using a knockoff of the Arduino that I bought from Amazon it is branded "Elegoo" and is supposed to be electrically equivalent to the Arduino uno. The software compiler does recognize it as an Arduino Uno. These are 1/2 the price of the Arduino boards, and I do wonder if the chips are as tough as used in the Arduino, but I should not really be stressing the junctions in the board unless the switching spike is somehow propogating back thru the first relay. The first stage relay is also from Amazon and uses a relay that is branded "Songle". It seems to include a magnetic switch, since I can hear it clicking when activated. It is somewhat atypical in that it activates on low input not high. I use these mainly to switch from the 5 V output of the Arduino board to the 12 V input needed for the old fashioned coil DPDT switch. Is is used to invert the polarity of the 12 V supply feeding the jackscrew motor. The DPDT is an Onrom LY2N-Jrelay. I think the J simply indicates it is in a mounting socket.
 
I will answer the two questions in order received: I am using a knockoff of the Arduino that I bought from Amazon it is branded "Elegoo" and is supposed to be electrically equivalent to the Arduino uno. The software compiler does recognize it as an Arduino Uno. These are 1/2 the price of the Arduino boards, and I do wonder if the chips are as tough as used in the Arduino, but I should not really be stressing the junctions in the board unless the switching spike is somehow propogating back thru the first relay. The first stage relay is also from Amazon and uses a relay that is branded "Songle". It seems to include a magnetic switch, since I can hear it clicking when activated. It is somewhat atypical in that it activates on low input not high. I use these mainly to switch from the 5 V output of the Arduino board to the 12 V input needed for the old fashioned coil DPDT switch. Is is used to invert the polarity of the 12 V supply feeding the jackscrew motor. The DPDT is an Onrom LY2N-Jrelay. I think the J simply indicates it is in a mounting socket.

That clone is a familiar sounding one - like this? https://www.amazon.com/ELEGOO-Board...hvlocint=&hvlocphy=&hvtargid=pla-455309014075

The ATMega chip is the same as a genuine UNO. BTW: With one good UNO and a blank ATMega328 you can burn a bootloader and replace the one in your bricked board...if that is the problem and it is socketed (pretty sure it is).

Songle is a very common brand of electro-mechanical relay and is the choice of the cheap Chinese boards...something like this https://www.amazon.com/SunFounder-C...DH4P&psc=1&refRID=CV88EA1HYYYTHQ51DH4PUsually, those boards have optoisolators and typically have a low-operate as you noted. That click is a normal and that Songle relay is also an old-fashioned relay.

So, the reason I asked about the UNO (it is written in your title) is because it has a resettable fuse which does work but can be burned out (not that I have ever done that :) )With the bricked board, does it light up at all when you plug the USB cable into your computer and with nothing else connected? Does the power LED come on or absolutely nothing. I'm asking because it could be a clue.

It is hard for me to visualize the circuit from your text, but are you doing the polarity reversal something like this:

actuatorcircuit.jpg


Probably need to wait for the schematic and also, if you have links to any of the products, like the relay board, it helps.
 
Last edited:
I will get the schematic out tomorrow, but it looks like the Legoo and Songle references are pretty solid, both were purchased from Amazon. I am using a slightly different wiring diagram for the DPDT switch that involves a crossover wire, but I like your approach better, and thus will go to it. But if the Songle is an old-fashioned electromechanical relay, it would be hard to imagine any wrinkle in the 12 volt supply getting back to the Legoo board. Do I need some limiting resistors in the limit switch signal to prevent it from frying the board? These are inexpensive swiches I also bought from Amazon they are:
Cylewet 6Pcs V-156-1C25 Micro Limit Switch Long Hinge Roller Momentary SPDT Snap Action for Arduino (Pack of 6) CYT1046.
Is it possible that they are bouncing on closure and causing problems? I am using them in a normally closed manner to feed 5 volts to the arduino, and then pull it low to 0 volts when the switch is actuated. This brings the first relay high and feeds 12 volts to the DPDT switch which causes it to switch direction.
 
From what you've described so far I can't see how you could have fried a board unless an input has inadvertently been switched to output. When you post the schematic can you also post the code? Note, it's better if you post the original schematic so members can try and work out what went wrong.

Mike.
 
I will get the schematic out tomorrow, but it looks like the Legoo and Songle references are pretty solid, both were purchased from Amazon. I am using a slightly different wiring diagram for the DPDT switch that involves a crossover wire, but I like your approach better, and thus will go to it. But if the Songle is an old-fashioned electromechanical relay, it would be hard to imagine any wrinkle in the 12 volt supply getting back to the Legoo board. Do I need some limiting resistors in the limit switch signal to prevent it from frying the board? These are inexpensive swiches I also bought from Amazon they are:
Cylewet 6Pcs V-156-1C25 Micro Limit Switch Long Hinge Roller Momentary SPDT Snap Action for Arduino (Pack of 6) CYT1046.
Is it possible that they are bouncing on closure and causing problems? I am using them in a normally closed manner to feed 5 volts to the arduino, and then pull it low to 0 volts when the switch is actuated. This brings the first relay high and feeds 12 volts to the DPDT switch which causes it to switch direction.

There are a bunch of things that might be going on. Your schematic and pictures and code will likely produce an answer because what you are trying to do is entirely feasible. I think that you probably have a wiring error(s) and once we locate that, we can get this thing spinning yarn like a politician (* cracks self up with clever joke *)

To directly address your input question, Yes, you should use a resistor, like this:

Input Switch.jpg


Two other points:

When you post a problem like this, you are going to get a lot of questions. It might be hard to keep up. It is the nature of this media. Folks want to help and we don't know what you know or what each other knows. But, the schematic, some pictures, the code, the links...all that stuff is like getting a whole bunch of new eyes on the project.

It is a minor point, but try to separate your text into paragraphs (using line feeds) because it makes it much easier to read.
 
and once we locate that, we can get this thing spinning yarn like a politician (* cracks self up with clever joke *)
Can I start the silly quips by asking if MrZenite wants his Arduino fried with mushrooms in garlic butter?

JimB
(Sorry, but the devil made me say it).
 
I am a Chem Engin. by training, with a strong hobby interest in electronics, but I am weak on short cut terms.

In this case, we want to be part of the solution and not the precipitate.

if MrZenite wants his Arduino fried with mushrooms in garlic butter?

Preferences differ, but I would use olive oil, garlic, some salt and a few of these bad boys (which I have been harvesting all week) - makes any Arduino tasty.
peppers201920191010_101827_HDR.jpg


ok, I'm done...well for now ;)
 
Ok, everyboody, the schematic and INO file (the Legoo Code) are attached, The schematic is unique to me so this is the original. There is a bit more wiring to run the motor that turns the winder, but that is separated from this stuff, and the only logic to it is a start signal from the Legoo board so the winder and traveller motors start essentially together. I'm pretty sure I have some 10k resistors in house so I can easily add those to the outputs of the limit switches. Also, for those following the thread, the DPDT relays have an internal LED and resistor, but I would have to do some digging to find where they are connected. I do know the led only flashes when one of the two limit switches is hit, but that is probably because in one direction, the polarity does not activate the led. If anyone needs a word doc version of the code I can provide it.
 

Attachments

  • schematic diagram.pdf
    1.4 MB · Views: 174
  • MikeWinder.ino
    1.9 KB · Views: 166
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top