6/22/2023 0 Comments Arduino car battery monitor![]() ![]() I'm don't use Arduinos myself (I use Forebrain boards, which are ARM Cortex-M3 microcontroller dev boards), so you'll have to ask someone else to fill you in with the Arduino-specifics and coding, but I hope this helps. I haven't included resistor values because these depend on the exact optocoupler chip used. ![]() The above example requires the GND of the Arduino to be tied with the GND of the 12V system, from what you've described of your system, this seems to be a fairly safe thing to do, however in the even that you need electrical isolation between the Arduino and the 12V side, here's a schematic that uses an optocoupler/optoisolator. here's a quick schematic for one channel. Measuring whether there is 12V on the "12V return" line is very very simple, since you only need to detect whether the 12V is switched on or not, then simply use a potential divider, this scales the 12V down to 5V, and your Arduino pin just reads this as a digital value, HIGH if 12V is on the line, and LOW if 12V is not. In this video I show you how I built a car voltage monitor using an ESP8266 wifi nodemcu module.Previous Video Car Temp Sensor. So we are going to build a 18650 battery capacity tester for a Li-Ion 18650 Cell which will discharge a fully charged 18650 cell through a resistor while measuring the current flowing through the resistor to calculate its capacity. I would have recommended an optocoupled circuit myself for safety reasons (avoids killing your arduino). One of the methods is to measure the open-circuit voltage at no load and loading but this is not at all reliable. The 1N4004 diode I think is there for protection in case you get transient spikes from the 12V car side (and the 12V car side is really noisy with all the stuff going on and spark plugs going off, etc.) Even though it's being pulled up to +5V via the resistor, it will see close to 0 volts because the resistance of that resistor is far bigger than the resistance of the wire and transistor. This project has moved pretty fast overall, not sure how long I expected this project to take. In this case, the Arduino would read a "low" signal on the pin. When the BC547 turns on, it effectively acts like the Arduino pin was connected directly to ground. The R1 resistor there is there to avoid killing the transistor (and is also necessary since the transistor is a current-controlled device, but that's not important in this circuit). When the 12V car battery is connected to the circuit, it will turn on the BC547 transistor. When the car battery is not connected, the BC547 will be "off", and so it won't let any current flow, and so the Arduino input will see +5V because it's connected to +5V through a resistor. Hmm, that a bit of a weird way of doing things for monitoring just one channel since you can just use a pair of resistors to do the same. ![]()
0 Comments
Leave a Reply. |