0
\$\begingroup\$

I have an Arduino nano running some CAN Bus program which does certain things on my car's instrument cluster. The Arduino board is currently powered from the car's 12V cig lighter socket using a 12 to 5DC adapter. I want the arduino to execute some code when the Car's ignition is turned on , the problem i am facing here is , when the car is cranked the power supply to the board is interrupted and the ardunio gets restarted again , i want to prevent this. The simplest solution i can think of is a diode isolated capacitor to prevent arduino from losing the power when the car is cranked. Is there a better way to do this? A reference image is as shown below. I am also not sure what values of diode and capacitor to be used here. Car's 12V becomes 13 to 14.x V when the engine is on too.

enter image description here

\$\endgroup\$
5
  • \$\begingroup\$ Are you aware that integrating electronics into cars without type approval is illegal in most countries around the world? \$\endgroup\$
    – Lundin
    Commented May 7, 2021 at 10:03
  • \$\begingroup\$ Yes , this is only for testing purpose and is not going to be permanently integrated into the car :) \$\endgroup\$
    – Anil TG
    Commented May 7, 2021 at 10:11
  • \$\begingroup\$ As long as you don't use the car but keep it in a garage... \$\endgroup\$
    – Lundin
    Commented May 7, 2021 at 10:31
  • \$\begingroup\$ In our side , these things are hardly checked by the officials , there are cars with tons of aftermarket electronic and electrical mods running around without any approval :) \$\endgroup\$
    – Anil TG
    Commented May 7, 2021 at 10:51
  • \$\begingroup\$ Yeah they don't check until you are involved in an accident. After which you might end up in jail. \$\endgroup\$
    – Lundin
    Commented May 7, 2021 at 11:28

1 Answer 1

1
\$\begingroup\$

You probably are using a cig lighter plug with the DC/DC converter built-in. This is not optimum for a quickie UPS. A better way to go is this (no schematic capability for now):

12 V source

Diode in series with 12 V

Hold-up capacitor to GND

DC/DC converter

Output filter capacitor (most things run better with one)

Arduino

The hold up capacitor acts as a small rechargeable battery. It is a medium-value electrolytic capacitor, probably around 10,000 uF at 25 V. To calculate its real value, you need to know the downstream circuit (Arduino) operating current and the hold-up time.

Placing the capacitor before the DC/DC converter reduces its size for the same hold-up time. This is because a cap on the input can discharge from 14 V to 8 V -ish while maintaining the converter's output, while a capacitor directly across the Arduino power input can discharge from 5V to only 4 V -ish before the Arduino gets upset.

Another approach is a small ni-cad battery pack and a trickle-charger circuit.

\$\endgroup\$
2
  • \$\begingroup\$ Thank you , understand the basic problem with the cig lighter adapter. But can it be used after the capacitor ? since it now gets an uninterrupted power supply because of the cap? \$\endgroup\$
    – Anil TG
    Commented May 7, 2021 at 10:50
  • \$\begingroup\$ Not sure what you mean. This forum' format is very poor for back-and-forth tweaking of an idea, but you can update your first post with a sketch. \$\endgroup\$
    – AnalogKid
    Commented May 7, 2021 at 17:23

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