Fried my mega and multiple DC motor control boards. How can I prevent this?

Hey,

So I am trying to make a smart bartender. I bought a bunch of peristaltic pumps which are basically just DC motors as far as the Arduino is concerned. They are 12V. I then went out and bought a bunch of cheap little DC motor control boards.These to be precise. And I am powering everything with a generic laptop charger (Note that I am not plugging the power supply directly into the Arduino via the barrel jack, but rather the VIN pin). This is my wire diagram:

I wired a couple of them up. And things were going great! the pumps were spinning on and off as I programmed them to. So I wired up the rest. I tried turning on 10 pumps at once.

Big mistake.

I notice that when I turned the whole setup on again (by plugging in my external power supply. No USB power here). Nothing happened. I heard a faint noise at first. Like every motor tried to turn over at once, but none of them did. After a couple seconds I smell and notice smoke coming off a chip from one of my little motor control boards. I unplug the setup as fast as I could but the damage was done.

The little board I saw smoke coming off of is fried and I don't trust the rest of them. I thought maybe the Arduino was spared. I edited my code to only run 1 motor on a control board I thought was maybe spared. It seemed to be working with just USB power (the motor won't turn because the arduino wont output enough juice but I can hear it trying) but when I tried running off of the external power source again...pop fizzle + more smoke and I was definitely out at least 2 DC motor control boards.

I added some serial outputs to my code to see what was going on. Powering the Arduino with just USB I could see it outputting to the serial monitor. I then plugged the Arduino into both my PC and the external power supply at the same time. Unfortunately I am unable to see the serial output when in this configuration.

So some questions for you people that are smarter than I:

  1. Do you think my Mega is dead? I feel like you should be able to see the serial output when using an external power supply + USB on a working board. I am still able to upload code but I feel like the VIN pin at least is dead.
  2. I thought I did my math right but am I out of spec somewhere? I know the motors can handle the 12V but did I overlook something in the amp department with my DC motor control boards? Or my mega?
  3. How can I go about protecting my equipment from this happening again? new hardware? smarter code? I already went out and bought a whole new set of the same DC motor control boards and another mega because I frankly dont trust any of the old hardware except the motors. I feel like if I stagger the motors turning on (say a 1 second delay between turning on the A & B motors) that might work.

What power supply did you use?

Did you use any extra bulk decoupling on the supply?

You know the L9110 is rated for a maximum of 12V supply. This means in practice 9V is the top
voltage for reliable operation - never run at the maximum voltage of a chip, there is no lattitude left for
noise spikes and transients.

The ground connections to these boards needs to both run to the power supply and alongside the data
connections too to provide a ground-return at signal speeds. Every logic signal line needs a ground return wire
alongside it (several lines can share one ground line). If you don't do this the signals use each other as
high speed return paths, which can play mayhem if the cables are long.

I'd go find modules with nice big electrolytic capacitor on them to soak up spikes and kick-back.

For 12V motors find drivers rated at at least 18V would be my main recommendation though.

You can add 4k7 resistors in line with each data line to help protect the Mega from any driver faults.

I added a link to the generic laptop charger I am using in my parts list. I am not really sure what is in the power brick. The packaging is pretty light on details. I am looking into different driver boars but these little ones were so cheap and small I really wanted to give them another shot. Especially since they were working at one point. Is there any device I could place on the power supply inputs to the driver boards? I can't really use a resistor because that will lower the voltage right? And I need the full 12.

These driver boards seem like they could handle more voltage. They also have the ability to step down the external power supply and provide a 5v output so I could power the mega more safely as well. I might try this next if my little boards burn up again

You have not provided any data for the motors in the peristaltic pumps. I would be very surprised if their stall current is as low as 0.8 Amps. And I would expect any pump to briefly draw a large part of its stall current at startup. I would not be surprised if those motors have a stall current of 10 amps or more.

Don't go wasting money on different motor drivers until you know the specifications of the motors you want to control. The driver MUST be comfortably able to provide the stall current for the motor.

...R

You can't afford to be light on details in electronics, you need all the specs to ensure things aren't being
pushed beyond their capabilities.