I have been working on a project that I'm using 7(!) Arduino boards for.
I am using 6 Nanos, each acts as an Axis controller for a Stepper driver (DM542T). This allows me to set speeds individually with code on each nano. So 2 pins from each nano are used for step and dir to the driver. 2 other pins are used as inputs from the Mega, Fwd and Rev.
Each Nano has simple code checking for an input. If its high, it runs at the set speed/accel until it goes low.
I'm using a Mega to run code for a sequence, turning outputs on for each Nano.
So- my (main) problem. I had this working, and was tweaking the "auto" sequence. All steppers were functioning, all was fairly great. But then, I burnt up the Mega, followed by all 6 Nanos (!)
I have a 10amp, 12V power supply. It supplies the DM542's with 12v, the Mega with 12v via the power jack, and I'm using a buck/boost set at 5.5v to power the nanos.
The Nanos have 100k Ohm resistors from D2-D8 to GND. They are powered and grounded from a Buck/boost set at 5.5V.
I know this isnt "all the info", but what stands out as a big mistake here? I am figuring too much current draw is what killed the arduinos, What are some things I should look into to prevent this?
Arduinos run on 5 V, not 5.5 - you'll get away with it for a while, but.
Check your buck converter, they're not all the same. I have a couple that wander from 4.75 to 5.25 depending on output current and, I suspect, the phase of the moon. If you had one of those, already tuned to 5.5, and it drifted up...
I don't see a third, unless you managed to short 12 to 5, that would vaporize the nano's little brains in short order. From the look of that rat's nest, I wouldn't rule it out.
I don't see how you could "overcurrent" the Nanos, nor the Mega, but overvoltage is a major sin.
power nothing but a nano from a nano's regulator. That's the thing that takes the raw VIN, be it via Vin pin or via barrel connector, and regulates it at 5V. The reason is, that regulator is designed for a maximum current output not much larger than the Nano itself needs.
Keep the voltage going into Vin above 7V, but the closer to 7 the better, because that reduces the voltage drop across the regulator and it runs cooler.
If you want to, and have 5 volts available, feed the Nano via the 5V pin. It's effectively an input and an output. That way, the Nano regulator's limitations don't come in to play.
Do not try to run the Nano by feeding the barrel connector 5.5V; no less than 7V. The processor gets starved (somewhere around 4V will result, IIRC), and the Nano will work...sporadically.
Yes, a nano will run off of 12V if it's powering NOTHING else. No(well, maybe a few, but...) LEDs, no LCDs. 20V? Maybe, with fan cooling, or in a freezer.
If your diagram is accurate, that's what you're doing. So either the 5.5 was too much, or ???
Wait. You are saying the Nano VIN pin should get 7v or slightly above?
My diagram depicts the nano's VIN pin getting 5.5v, which should work, but possibly "sporadic" from your reply.
The "???" is why I've come here. I don't see anything exactly wrong with my setup, and it works, until the boards burn out... My voltages seem within the required limits. What could cause the boards to burn out? Supplying too much voltage would cause them to run hot, and fail, so if I check and set voltage to the minimum, what else would shorten the lifespan so drastically?
Hi,
Have you got any fuses or current limiting components in the power feed wiring?
If you are feeding the Mega with 12V from a 10A supply, you need a fuse there to stop 10A flowing through the board to a short, hence making your Mega toast.
Tom..
PS. A fuse on each Nano circuit would be good too, and a main fuse on the output of the 12V 10A supply.
That's no reason to use 6 Nanos.
A combined step rate of more that 4000/s could be a reason, depending on library used.
6-20volt on V-in is sales talk.
I have seen several post here with people did blow up a classic Nano over 12volt.
Also, at >9volt you can't draw much current from any pin.
Never connect I/O pins directly between two processors.
That will phantom-power the board with the lowest supply.
If you must connect I/O between boards, then use a 10k resistor between,
or... also connect 5volt and ground between boards.
Leo..
The tweaking I mentioned- once I checked that all boards were working (And inputs from home switches) I have to work on the sequence and timing of the main program on the mega- to get the motor timing correct for the process to work correctly.
So I was changing when outputs did what, and uploading to the mega. I was also changing variables in the program to run "auto" or "homing", because I do not yet have an HMI configured.
"Never connect I/O pins directly between two processors.
That will phantom-power the board with the lowest supply.
If you must connect I/O between boards, then use a 10k resistor between,
or... also connect 5volt and ground between boards.
Leo.."
My pins between the meg and nano(s) have a 100k to ground on them- as shown in the great sketch. Do you see an issue with this?
I used nanos because I needed various speeds, simultaneously on my steppers. If you can describe a way to run 6 stepper motors with a single Arduino, and have them simultaneously run at different speeds, then it would be the first I've seen it.
But, regardless of how I got here being the best way, its not the main concern at this point
This is a good thought.. My circuit boards (In the "useless" pictures I posted heh) were milled from copper clad board. I did find some continuity in traces at one point during the build. I would consider the "custom" boards a key suspect at this point. I went with milling the boards because "gen 1" of this machine was all perfboard and hookup wire. I know someone was already quick to point out "rats nest" ... But gen 1 was the king of messes.
Fail. No, it should not work. No literature anywhere i know of that says feed anything less than 7V to Vin, sorry, it's just that.
Running the Nanos that way would make them prone to restarts, fits, and just plain poor running. I doubt they'd burn up, but they wouldn't work right.
That will not stop phantom power, put resistors as suggested by @Wawa, in series in the signal wires between controllers, I'd go as low as 10K for each.
A master ON/OFF switch will also make your project safer too.
So you've got 6 or 7 nanos and a Mega, all powered from your buck converter at 5.5 V? I'd say you've been very, very lucky to get this far without lots of grief.
make sure your ground is solid between all of these boards.
power each nano, and the Mega, directly to the 5V pin on the boards, or set your buck converter to 7.5 volts; you'll need a separate 5V rail for anything that needs 5V in, though.