It follows Ohm’s law (Current = Voltage / Resistance, I = V / R) and allows us to choose resistor values that will adjust the voltage down to whatever we want. Resistor divider for reducing our input voltage Yuck – Maths! It just so happens that we can use a neat little electronics trick called a voltage divider or resistor divider. The balance port on cell 3 can reach 12.6 V, so we need a way of reducing this to <= 3.3 V. The biggest issue is that we are running the RasPiO Duino at 3.3 V, so the maximum Voltage we can measure with the onboard analog ports is 3.3 V. It’s not intended to be part of the RasPiO Duino materials, but could be considered an extra. With this post, I’m just doing what I tend to do on RasPi.TV, which is to blog “what I’m doing right now”. If you backed the RasPiO Duino KickStarter, you will be getting a much gentler introduction than this. This project is quite complex compared to the examples that come with the RasPiO Duino. The lipo gauge I use has a tiny Atmel microcontroller on so the Duino’s ATMEGA328P-PU is more than up to the task. I’ve been working on my RasPiO Duino lately and decided it was time I got on with this little project. It can then be safely added directly to an Arduino analogue input or even to a multiplexer and only use about 21 micro amps per cell when on and close to zero when the op amp is turned off.But for a number of years I’ve had a hankering to make one of my own. The great advantage is that the output of the op amp will be ground referenced to the battery between 3.3 and 4.3 V. This is the basic circuit that I got working: With a high impedance differential amplifier I can accurately measure the voltage of each cell without and ground reference issues (I’m guessing that is what most single chip multi-cell battery monitors use). They can be used in a great number of ways but the one that suits me here is the differential amplifier ( One thing they do well is provide very high impedance on their inputs so no route to ground. Op Amps are very useful but can be a bit complex ( ). It was all fairly complex until I discovered Op Amps. In order to isolate each of the cells I came up with the following diagram using pnp and npn transistors for high and low side respectively of each cell:Īlthough this works fine to separate out the channels it still requires a method to measure the voltage without allowing a drain directly to ground (I was looking at ). I first began with a voltage divider with a single low side n-channel mosfet but I got some bad readings and could not isolate each cell of a 3 cell lipo cleanly. To reduce the battery voltages to the 1.1v reference voltage the easiest method is to use a standard voltage divider (a great page with calculators for the lazy is ). The standard reference voltage of 5v uses the VCC which can vary depending on your voltage source (such as a battery or a cheap regulator that is not exactly 5v). To remove noise I simply added 10k pulldown resistors but to improve the accuracy of the measurement was a little more complicated.Īrduinos (and other avr chips) have an internal voltage reference of 1.1v which is quite stable and provides a good reference for analog input. To actually check the voltage in the arduino you can just use one of the analog pins (lots of tutorials on it) but analog pins can also be noisy and standard voltage measurements can be inaccurate. My aim was to check the voltage while minimizing the current draw so the monitoring itself did not drain the battery. The internet should have a voltage graph for whatever lipo battery you buy and has a lot of information on the subject of how much you can safely discharge the battery. These are effected by temperature and various other factors. To solve this there are two ways: the most accurate method is to monitor current usage the other method is to check voltage.įor many purposes checking voltage is good enough.īroadly the cell voltages can be considered 4.2v full, 3.85v half and 3.3v empty (got from ). But they do have some issues (lots of details about them at ).įrom the point of operating an arduino the main issue is monitoring battery cells to identify when the battery is low or if a cell is unbalanced to the rest of the pack. Lipo batteries like the ones used for RC are wonderfully small, light and powerful and are great source of power when an external power source is not accessible or practical.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |