0

What Happened

I'm working on a project to run two peristaltic pumps from an Uno. The previous version used DC motors and L298N's, but I am attempting to upgrade it by using stepper motors and A4988's. I haven't used these motor controllers before, so was using a solderless breadboard while following some basic tutorials and was able to get one functioning how I want. During this, the Arduino was being powered through the barrel jack with a 12V/3A source; VMOT was connected to Vin; and VDD to the 5V pin. I checked the pins with a multimeter, and the voltages were all as expected, and the current limiters were set to 1A. The pump was able to run for a while with no issues.

After that, I drew up a diagram for how to lay it out on a smaller breadboard and soldered everything together.

Circuit Daigram

Once that was done, I disconnected the motors and once again checked the voltages on each pin to make sure I didn't miss soldering a connection. When doing that, one lead of the multimeter might have caused a short (smell) and I quickly unplugged the barrel jack, but saw some smoke come from the arduino just after it was unplugged.

The Question

I know that a lot of people/examples (like this and this) recommend putting a 100 uF capacitor across VMOT and GND of the A4988's as close as possible to the inputs, to smooth out voltage spikes. However, those all use a separate power supply than what is used to power the Arduino. Before I just replace the burnt out board (I have some Nanos and a Mega lying around that could also do the trick, with some rewiring or an external voltage regulator), I want to eliminate the possibility that the way I'm powering everything is the cause of the burn out, so I don't just immediately ruin another board. Is it bad practice to use the onboard voltage regulator this way? By using Vin to run the motors and 5V to control the logic?

How or Why?

(All this after is extra, and really a secondary question/curiosity)

And is there a way to salvage the board, or figure out exactly what went wrong? The board can still be powered by USB or barrel jack, but the COM port doesn't show up when connected to my laptop to upload a new sketch. I was working through this answer to try and figure out what actually burnt out.

  • With both USB and barrel jack power (12V/0.5A) the "on" LED lights up, and Vin/3V3 read correctly on a multimeter. 5V read correctly on USB power, but when on barrel jack power its actually outputting about 9V. However, for both methods of powering the board, the voltage regulator itself has a 5V difference. From this point on, I just used the USB for power while troubleshooting.
  • The power-on LED does not flash when initially connected or the reset button is pressed, and TX/RX do not light up at all. That question indicates this could be bootloader problems or a damaged main processor chip.
  • Using a Mega 2560 board to try and burn the bootloader to the Uno, the "Burn Bootloader" process fails with the error message:

avrdude: Device signature = 0x000000 avrdude: Yikes! Invalid device signature. Double check connections and try again, or use -F to override this check.

avrdude done. Thank you.

Failed chip erase: uploading error: exit status 1

  • Device signature 0x000000 seems to be a default message that indicates the board is not actually connected, which makes sense seeing as my computer wasn't able to identify that it was plugged in with the USB.
  • This leaves it at a possibly damaged Atmega328P. If I had another Uno, I would try swapping out those chips from the good and bad board to see if it fixes the issue, and if so I would just get a new Atmega instead of trashing the whole board.

But I've spent more time than its worth now trying to salvage the board, hence the main question asked previously. To rephrase that: do I need to use an external voltage regulator secondary power supply to provide 5V to the Arduino while giving 12V to the A4988's, or is it fine to give 12V to the board and run Vin to the motor controllers?

2
  • your question at the end indicates that maybe you have not learned anything from your experience Commented Oct 15, 2024 at 16:27
  • @jsotola Well, in the old configuration I mentioned using L298N's and DC motors I ran the 12V power supply through the uno and took Vin to the motor controllers for months and had no issues. So my experience has been that this is fine, and I wasn't able to find info saying to absolutely never do that, which is why I asked. Commented Oct 15, 2024 at 17:59

1 Answer 1

0

"Is it bad practice to use the onboard voltage regulator this way? By using Vin to run the motors and 5V to control the logic?"

Between the power jack socket and Vin on the Uno there is an M7 diode to prevent Vin back feeding the power jack. If you use Vin to tap the power entering at the jack socket, it goes via this diode. See schematic (D1) https://content.arduino.cc/assets/UNO-TH_Rev3e_sch.pdf . This diode is rated at 1A only and loads like motors, especially at startup, are likely to stress this. A silicon diode has a nominal voltage drop of 0.7 volts which, for example, must dissipate 1.4 watts as heat if the load is 2 amps. So, for large loads, do not use Vin as an output.

To calculate the heat dissipated by the Arduino's linear voltage regulator you multiply the voltage drop, in your case 12v - 5v = 7v, by the current drawn by the load, let's say 1 Amp which yields 7 watts. The recommendation is to power large loads separately using an appropriately dimensioned power supply. Buck converters are to be preferred over linear voltage regulators. Smaller loads in the order of say 100 mA or less for logic circuits etc. should be OK even if the Arduino is powered at 12 volts.

6
  • So then as a followup: Instead of running external power through the Arduino, and taking out from Vin and 5V, if I supply the 12V through Vin in parallel with the two VMOT pins. That way the current for the motor controllers isn't running through the arduino, but I can still use the onboard regulator to get the needed 5V supply for logic. I'm trying to avoid getting extra parts like a separated regulator/converter, since I have a limited budget. Commented Oct 14, 2024 at 20:34
  • @Vera using an arduino as a fuse is not the way to save money Commented Oct 15, 2024 at 16:23
  • @jsotola Can you explain what you mean by that? I found this answer to a similar question that indicates otherwise. Commented Oct 15, 2024 at 18:18
  • @Vera a fuse burns up when too much current flows through it ... an arduino behaves the same way Commented Oct 15, 2024 at 22:12
  • @Vera 12 volts at the barrel jack (or Vin) is OK for the standard Uno: store.arduino.cc/products/arduino-uno-rev3. Important only is that the connected peripherals do not draw too much current otherwise the regulator gets hot. If you tap the 12 volts from the barrel jack at Vin it goes through a diode (D1 here) : content.arduino.cc/assets/UNO-TH_Rev3e_sch.pdf . Your motors may stress this. A silicon diode has a nominal 0.7 volt drop so 2 amps would be 1.4 watts Commented Oct 16, 2024 at 7:22

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.