|
Forum Index : Microcontroller and PC projects : MM Inside
| Author | Message | ||||
| ajkw Senior Member Joined: 29/06/2011 Location: AustraliaPosts: 290 |
Just a quick share of a project. There is a MM (Big Mik’s MM2) in there with a OLED screen. Pity about the 2 right hand columns on the OLED but that it a limitation of the screen and driver which results in a 2 pixel offset and you can’t address those columns. This setup is in my camper trailer. Cheers, Anthony. ![]() |
||||
| lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3470 |
Nice setup. How are you determining Amp hours, and over what time period? PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
| ajkw Senior Member Joined: 29/06/2011 Location: AustraliaPosts: 290 |
Gidday Lizby, It was a fluke that the amp draw and AH are both 3.9 abit + and -. I read the analogue voltage from the current sensor every program loop. I have a timer every second that averages those voltage readings (about 200 of them I recall) and then converts to Amps. The Amps for that second are then added to the cumulative Ah. eg. Ah = Ah + (Amps/3600). - Amps is discharge from battery and + is charging. This gives a approximate Ah position. To start I zero the Ah when the battery is float charged and so the Ah goes neg with discharge and comes back up with charging. It is rather difficult to calculate the actual Ah remaining in a battery as it will change with temp, discharge rate and heat loss when charging. For the moment Ah when discharging is calculated 1:1 but I take a small percentage off the charging/positive amps so account for the losses. I kinda gets back to zero but one problem is is that the REDARC BCDC and CTek M200 have different float voltages. I am considering automatically zeroing when float voltage is detected for a given period. For the moment the Ah gives a pretty good indication and the actual battery voltage does too. The screen is a SH1106 128x64 1.3" on I2c. Am using Matherp's driver found on the backshed. It is a CFunction so I don't know how to tinker with it and I think Pete as butted heads with this type of display but if anyone has any clues how to get to the 2 right columns that would be appreciated. Cheers, Anthony. |
||||
| lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3470 |
Thanks for the explanation. Good job. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |