0
\$\begingroup\$

I wanna power my Arduino on breadboard (ATMega328PU) from a 12V car battery.

schematic

simulate this circuit – Schematic created using CircuitLab

  • Is this safe ?
  • What should I add more to make it a safer design?

The battery is attached to a generator for starting

\$\endgroup\$
  • \$\begingroup\$ is the rest of the car still attached to the car battery? How much current are you planning to draw? \$\endgroup\$ – Marcus Müller May 21 at 8:07
  • 1
    \$\begingroup\$ Add a fuse, car batteries can source hundreds of amps and will melt your circuit or cause a fire if there is a short. If you are in a car, use a fused circuit. If you are outside a car, add a fuse holder and fuse at the near the battery. \$\endgroup\$ – Mattman944 May 21 at 8:11
  • \$\begingroup\$ @MarcusMüller The battery is attached to a generator for starting. The Circuit drive an nRF24L01 Module, which acts as only receiver. So less than 15mA is drawn from the circuit. I'm not driving any motors stuff \$\endgroup\$ – Khaalidi May 21 at 8:13
  • \$\begingroup\$ Generators aren't used for starting? \$\endgroup\$ – Marcus Müller May 21 at 8:22
  • \$\begingroup\$ @MarcusMüller I presume he means that the battery is used for powering the generator's starter motor. \$\endgroup\$ – HandyHowie May 21 at 8:28
1
\$\begingroup\$
  • Is this safe ?

No. Car batteries can be used weld metal, so if anything goes wrong, for example if your 7805 fails, things will get extremely hot and might catch fire. The 7805 is pretty likely to fail due to overheating, and the fact that it's a 45 year old IC without sufficient built-in protection against overheating or overcurrent.

  • What should I add more to make it a safer design?

Add a fuse to the input, at the very least.

Since you say you have a generator in the same circuit, the choice of using electrolytic capacitors on the input (far too big, anyway!) might be critical, unless you significantly overdimension – generators can cause large positive as well as negative voltage spikes, and your capacitor won't like that.

Using a better linear voltage regulator and a power resistor in series to the fuse would help as well by mitigating large transients to increase the voltage over the capacitor.

Generally, this 7V drop is not a job for a linear voltage regulator, which will then get very hot, and hence will need a large heat sink, which is a bad idea in a vibrating car (and thus another safety issue).

Instead, use a switch-mode regulator. These can be had for a few cents more than a linear regulator like your (literally!) 45 years old LM7805, and need an external inductor, but will produce less heat, and hence won't need a large and expensive heat sink to function. In effect, going for a switch-mode regulator will reduce your cost. (Aside from making your battery last longer, which is no issue here, because your arduino will probably draw less current than a lead-acid battery has in self-discharge. Unless you need that battery for something else, using a 12 V battery with say 20 Ah to drive a linear regulator to give you 5V is no better than using the much smaller option of using a 6V battery – the 7 V voltage difference are just converted to heat.)

Ah, I just saw that you added a comment saying you won't be drawing more than 15 mA – well, in that case, even the linear regulator will be converting only 7 V · 15 mA = 105 mW to heat, and while that will heat it up, it'll probably be fine without or with a small heat sink, depending on the kind of package your LM7805 is. The rest still applies.

\$\endgroup\$
  • \$\begingroup\$ Thanks for your comprehensive answer. I'll go to switching regulator and come up with a better and safer design. \$\endgroup\$ – Khaalidi May 21 at 9:34
  • \$\begingroup\$ which brand of 7805's don't have thermal and short protections? \$\endgroup\$ – dandavis May 21 at 18:41
1
\$\begingroup\$

Instead of using a Linear Voltage Regulator like the 7805, I would recommend you to use a buck-boost module for providing a stable 5V to the Arduino as the linear regulators are inefficient and waste a lot of power in the form of heat.

As @Mattman944 said in comments, adding a fuse will prevent things from getting haywire in the case of a fault in wiring.

Also, you can just get a USB car charger (like this one).

\$\endgroup\$

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.