3
\$\begingroup\$

I just burned my arduino and want to understand what happened. I tried to control 12V 4A DC motor with 5V Arduino Pro Mini, here is a PCB I made for this:

enter image description here

In the bottom part you can see arduino pins, I used Raw input to power my arduino with 12V and PWM pin 11 to control the motor.

I used IRF3205 N-channel Mosfet and 1N5817 Diode in my circuit. R1 resistor is 220 Ohms, R2 1KOhm The circuit I tried to build is something like this (picture from google): enter image description here When I turned it on my arduino smoked in 3 seconds (I believe somewhere near "Raw" pin, maybe in was built-in regulator). Are there any obvious mistakes I made? UPD: some pictures of my assembly: link to imgur.com

\$\endgroup\$
  • 2
    \$\begingroup\$ I don't see anything obvious. Was a motor attached? Was the arduino programmed to switch its pin 11? Did you connect the power supply correctly (not in reverse)? \$\endgroup\$ – marcelm Mar 24 '17 at 21:03
  • \$\begingroup\$ pics of your assembly? maybe you shorted something during soldering? \$\endgroup\$ – Wesley Lee Mar 24 '17 at 21:06
  • \$\begingroup\$ Also assuming you connected the power the right way around. \$\endgroup\$ – Trevor_G Mar 24 '17 at 21:20
  • 1
    \$\begingroup\$ Maybe you burned out your voltage regulator on the pro mini? The official specs say that the max voltage you can apply on the RAW pin is 12V. That's cutting it very close to your input voltage (any voltage fluctuations will technically mean it's operating out of spec). Maybe check that it's 12V and stays 12V? \$\endgroup\$ – tangrs Mar 24 '17 at 22:53
  • 1
    \$\begingroup\$ @Suic To add to the pile, also consider that when the drain flies to a value above +12 V, that this also pulls hard on the gate capacitance for a moment. So the gate voltage itself will be jerked up. Most I/O pins have a limitation on the peak internal protection diode current and exceeding it can cause latch-up. Given the problem, I'd probably also think about adding a BAV99 (or a pair of diodes) from rail to gate to ground. Perhaps splitting R1 into R1a and R1b, each the same value you have them now, and using the BAV99 at that new node. \$\endgroup\$ – jonk Mar 24 '17 at 23:02
6
\$\begingroup\$

The diode on your board is in the correct position, and should deal with the motor inductance, as well as wiring directly to the motor. However, there is nothing to prevent inductance in the supply wires from causing an spike in input voltage to the regulator when the MOSFET switches off abruptly. You have no capacitance and no path for the energy stored in the inductance, and little margin for error (see below).

Looking at a clone that I have kicking around, the regulator is an AMS1117 which has an absolute maximum input voltage of 15V. Yours may use a different chip. The MIC5205, used in some, can withstand 20V (discounting thermal considerations). A 78M05 can withstand a 35V spike.

If the AMS1117 or similar part is used, 12V is too close to absolute maximum to expect a TVS etc. to protect the regulator. You would be better off adding some shunt capacitance at the board (perhaps a 2.2uF 25V ceramic capacitor in parallel with 100uF/16V electrolytic across the 12V supply- right on the board) and add a pre-regulator such as an 78M08 for 'belt and suspenders' security.

Consider the below simulation. L1 and R2 represent the motor inductance and winding resistance at rest (remember there is no back-EMF with the rotor at rest, so R2 is determined by the stall current). L2/L3 represent the wire inductance- it would be less for short wires and if you twist the wires together. I have switched the (random) MOSFET with a 150 ohm gate resistor and a 5V source. So I would expect this simulation to be qualitatively similar to your circuit but not necessarily very accurate in quantitative terms.

schematic

simulate this circuit – Schematic created using CircuitLab

Here is what the regulator supply voltage sees as the MOSFET switches:

enter image description here

Yes, +165V spikes despite the relatively slow MOSFET switching.

This is an excellent example of why you have have to be very careful when you have large currents floating around that are being switched relatively quickly. It doesn't take much parasitic inductance to lead to a lot of volts, which can zap things. Even a few mm of straight wire has some (quite measurable) inductance.

TL;DR: Add some caps AT THE BOARD across the supply and hang a 78M08 before the Arduino board.

\$\endgroup\$
  • \$\begingroup\$ Thank you. I'll test it with my next circuit when I'll receive new Arduino:) Just to clarify that I understood you correctly: Should I place capacitors like this? imgur.com/a/N3UDM \$\endgroup\$ – Suic Mar 25 '17 at 15:20
  • \$\begingroup\$ Yes, that's right. You may be able to resurrect the old Arduino by swapping out the voltage regulator. Worth a try. \$\endgroup\$ – Spehro Pefhany Mar 25 '17 at 19:16
  • \$\begingroup\$ I will accept your answer as most complex and explanatory. I'll test all other answers too as soon as I can. It might take some time. Thank to everybody, I'll be back when I'll have some news \$\endgroup\$ – Suic Mar 26 '17 at 15:34
  • 1
    \$\begingroup\$ This is perhaps the worst analysis I've seen ...you will never see spikes like this. Just to start with, the Pro min schematic shows a 1 uF Ceramic is directly across the regulator (whether original Pro mini or clone). Model that and see what the potential pulse is from the wiring inductance. If there was an once of truth in the statements made here we'd have Arduino's driving large number of LEDs (high current) blowing up regularly. \$\endgroup\$ – Jack Creasey Mar 26 '17 at 18:10
  • \$\begingroup\$ @JackCreasey He is using a clone, as is clear in the comments (not necessarily in the original question). There is no such capacitor in many of the clones, including the one I have in front of me, only on the output. So nothing other than the ordinary current draw until the regulator breaks down. There is only 3V of margin before that could happen (no doubt more in practice). \$\endgroup\$ – Spehro Pefhany Mar 26 '17 at 19:42
1
\$\begingroup\$

My opinion is that the cause of self-inductance current of the motor. When MOSFET switch off increasing the voltage at the pin RAW. Power is supplied on long wires. You need to use large capacity, electrolytic shunt capacitor (from RAW pin to GND)

\$\endgroup\$
  • \$\begingroup\$ Did you notice the diode in the curcuit? It is there to avoid exactly the problem you mentioned. \$\endgroup\$ – JRE Mar 24 '17 at 22:42
  • \$\begingroup\$ The diode reduce only one polarity voltage fluctuations. \$\endgroup\$ – AltAir Mar 24 '17 at 22:47
  • \$\begingroup\$ @utu2012, the other diode is in the mosfet. \$\endgroup\$ – Trevor_G Mar 25 '17 at 5:28
  • \$\begingroup\$ @utu2012, I think you are missing my point, despite what the OPs schematic shows, the IRF3205 has a BUILT IN diode from drain to gate. \$\endgroup\$ – Trevor_G Mar 25 '17 at 6:56
  • \$\begingroup\$ @Trevor, The work fine if complex resistants of the power supply are low. But in this case, power is supplied on long wires(on the photo). Loop current: DC motor, the diode in the MOSFET, long wire, power supply, long wire, DC motor. The long wire is equivalent resistor and inductor in series. \$\endgroup\$ – AltAir Mar 25 '17 at 7:07
1
\$\begingroup\$

Well, at first I thought it looked like your ground to the Arduino was actually connected to the TXD pin.

enter image description here

But then I found out you were using a clone which has a different pin-out.

(Not REALLY a clone I guess.. more like a doppelganger.)

Anyhow, All that's left is your 12V must be exceeding the Arduinos RAW pin voltage limit.

I suggest you isolate yourself a bit by adding a diode or two between the 12V IN on your PCB and the RAW pin. It also would not hurt to add a good size bulk capacitor to the RAW pin too.

Further I would add a diode in the motor line. Reasoning is this. When the motor is up to speed the back-emf can be very close to 12V. When you turn off the FET the top of the motor will jump to ~12.7V because of the current path through the diode in the MOSFET.

schematic

simulate this circuit – Schematic created using CircuitLab

Note: Diodes and cap values shown are simply editor defaults.

\$\endgroup\$
  • 3
    \$\begingroup\$ From the layout (in particular the pins to the right) I suspect he's using another model (possibly a clone), such as this one. But yes, he should double-check his connections. \$\endgroup\$ – marcelm Mar 24 '17 at 21:11
  • \$\begingroup\$ Or he is using the clone documentation perhaps. \$\endgroup\$ – Trevor_G Mar 24 '17 at 21:13
  • 1
    \$\begingroup\$ On my board this pin marked as Gnd \$\endgroup\$ – Suic Mar 24 '17 at 21:24
  • 1
    \$\begingroup\$ @suic You should update your question to indicate which clone you are using then. \$\endgroup\$ – Trevor_G Mar 24 '17 at 21:25
  • 1
    \$\begingroup\$ @Trevor, it's a ground (I just checked it with multimeter) \$\endgroup\$ – Suic Mar 24 '17 at 21:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.