More work on the Fried Circuits OLED backpack! These latest firmware improvements add the following:
- Multiscreen support: you can now use the button on the OLED backpack to cycle between 6 screens that give you various readings.
- Energy measurement: the OLED backpack now measures energy and charge in Wh and Ah.
- Interrupt-based reading: use a timer & interrupts to measure voltage & current at a fixed interval
Below are screenshots of the new multiscreen feature: you can use the button to cycle between six screens.
Similar to the unique screen in previous versions of the firmware, you get a scope-like (with autoscale from 200mA to 5A) display of current measurement.
This screen displays the following readings:
– Energy that went through the tester since power up in Wh
– Charge that went through the tester since power up in mAh – useful for battery charging
– Peak power that went through the tester since power up, and voltage & current readings at that point
Peak and Min values
This screen displays the peak current and minimum voltages measured since power up. Along with peak current and min voltage, the corresponding voltage & current readings at that point are recorded
“Big” Watts, milliamps and volts
Those three screens simply display those three readings in a larger font, actually very useful when the backpack is used for quick monitoring, as those fonts are very readable.
This is a technical but nice improvement on the firmware: rather that simply loop screen refreshes and current/voltage reading, this new firmware uses an AVR timer to read current and voltage at a fixed interval, 100ms by default. The main benefit is that it makes it possible to compute energy & charge readings since we have a fixed time base.
I did a few measurements of the accuracy of those readings: it is just as good as most charge meters out there, if not better: both current and voltage measurements are within 1% of my Fluke 289 readings around 500mA. Both the “Watt’s Up” and the “Powerlog” RC energy monitors I have in my toolbox give me less accurate readings.
If you look at the code, you will notice that I toggle PD5 at the start and end of each measurement, to check on a scope the length of this interrupt routine. Not a major concern since we only interrupt every 100ms. In practice, the interrupt barely takes 2ms, we are are completely fine:
With this latest firmware update, which you can get on Github, the OLED backpack is now becoming a fairly complete tool. Since it is entirely written using the Arduino IDE, it is also very easy to modify and extend if you want to create other screens – if you do, please share!