I also tested the library using a boost converter circuit powered from the same battery that's being monitored so basically this is just an all around project update with some actual test footage. Either way, I have been waiting on some OLED I2C displays to actually test this library properly and they finally arrived (I plugging into the arduino and using the serial monitor interferes with the results). This project has moved pretty fast overall, not sure how long I expected this project to take. This project is still ongoing, and awaiting parts for thorough testing. Where A terms represent the ADC value returned by reading the pin.įor anyone interested the full derivations are available in the logs of this project. This library is also capable of monitoring the battery while the Arduino is powered by a boost converter for those who need 5V instead of whatever the battery happens to be at.įor anyone curious about what's happening behind the scenes the battery voltage is calculated by: See the github page for some simple circuit guidelines for this library. As a result, be sure to have the battery disconnected whenever programming. It is worth noting that as the project stands right now for Arduino boards there is no way to prevent current from the USB programmer from going into the battery and causing problems. External components are kept to an absolute minimum, requiring only the battery and a shunt resistor (which isn't needed if you don't care about current draw). From these measurements the library is able to measure the external voltage, allowing users to choose what to do in undervoltage/overvoltage/overcurrent cases within their projects. This project utilizes the ATmega328's internal 1.1V bandgap reference to allow for accurate measurements of external voltages. The Arduino library can be downloaded from the github page here:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |