counting mAh
Posted: 04 Jan 2018, 11:40
Hi there,
I would like to realize a Charge/Discharge module for Li-Ion batteries with ESPEASY which can control a bunch of batteries at one time.
Setup as follows:
1. activate TP4056 with relay or mosfet in order to Charge 18650 battery
2. readout led "fully charged" with esp using a MCP23017
3. After time delay of 1min, start discharge with 1R resistor controlled by mosfet.
In order to get a precise reading of amperage I would use a INA219 and by measuring voltage via ADS1115 and current every second I can calculate mAh
From a hardware perspective this is not too complicated in my view, but I have no clue how to code it in order to write values into ram or external sd-card. There is a lot of values to be recorded and at the end mAh has to be calculated...
I thought using one ESP for a pack of 4 batteries makes sense but I would love to utilize ESP better. Maybe an ESP32 makes more sense. Is uPyEASY the better solution for that? For displaying results I could use my home Automation System Loxone or NodeRed with MQTT communication.
Does someone have an idea how to approach this and maybe there are some suggestions on hardware in order to make the setup a bit cheaper.
Looking forward to your suggestions
Karl
I would like to realize a Charge/Discharge module for Li-Ion batteries with ESPEASY which can control a bunch of batteries at one time.
Setup as follows:
1. activate TP4056 with relay or mosfet in order to Charge 18650 battery
2. readout led "fully charged" with esp using a MCP23017
3. After time delay of 1min, start discharge with 1R resistor controlled by mosfet.
In order to get a precise reading of amperage I would use a INA219 and by measuring voltage via ADS1115 and current every second I can calculate mAh
From a hardware perspective this is not too complicated in my view, but I have no clue how to code it in order to write values into ram or external sd-card. There is a lot of values to be recorded and at the end mAh has to be calculated...
I thought using one ESP for a pack of 4 batteries makes sense but I would love to utilize ESP better. Maybe an ESP32 makes more sense. Is uPyEASY the better solution for that? For displaying results I could use my home Automation System Loxone or NodeRed with MQTT communication.
Does someone have an idea how to approach this and maybe there are some suggestions on hardware in order to make the setup a bit cheaper.
Looking forward to your suggestions
Karl