Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 22:20 13 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MM Inside

Author Message
ajkw
Senior Member

Joined: 29/06/2011
Location: Australia
Posts: 290
Posted: 05:36am 30 May 2020
Copy link to clipboard 
Print this post

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 States
Posts: 3470
Posted: 11:04am 30 May 2020
Copy link to clipboard 
Print this post

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: Australia
Posts: 290
Posted: 02:53am 31 May 2020
Copy link to clipboard 
Print this post

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 States
Posts: 3470
Posted: 11:45am 31 May 2020
Copy link to clipboard 
Print this post

Thanks for the explanation. Good job.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025