My latest modification of the software introduced quite a lot of necessary improvements but also some complexity into the code and thus bugs occured...
The reason for these bugs were simply a lack of tests... The system was running under "normal" conditions but was critically failing when a "degraded case" occured.
So the only solution was to improve (a lot) the testing scenarii and harden the software side.
I took my inspiration from the European Space Standards (I am a space ingeneer !) and taylored the ECSS-E-ST-40C which is the "Verification Standard" for space systems !
Stop kidding, I only kept from this standard the overall philosophy consisting in documenting and testing the specifications under realistic use cases including degraded modes of the software.
Here are the testing cases that have been currently checked:
- initialization of tracker (time and location) with Bluetooth
- initialization of tracker (time, location and wifi credentials) with Bluetooth
- running the system with bad wifi credentials, no credentials, good credentials...
- initialization of tracker (time and location) with Bluetooth + Wifi
- initialization of tracker (time only) with Wifi
- initialization of tracker (test) with no Wifi nor Bluetooth
- initialization of tracker during day (with or without wifi and bluetooth)
- initialization of tracker during night (with or without wifi and bluetooth)
- system running in normal conditions with wifi
- system running in normal conditions with bluetooth
- system running in normal conditions without bluetooth and Wifi, only with the Real Time Clock of the board
- system running in normal conditions, detection of "night" and repositioning to morning next day
- system running in normal conditions, resume of operation next morning next day
- system running with a lack of power (lion battery only)
- initialization of tracker with lack of power (lion battery only)
- charging of a 1s lipo (check CV/CC algorithm and end of charge conditions)
- charging of a 2s lipo (check CV/CC algorithm and end of charge conditions)
- charging of a 3s lipo (check CV/CC algorithm and end of charge conditions)
- charging of a 4s lipo (check CV/CC algorithm)
- charging of a lead acid battery (check CV/CC algorithm and end of charge conditions)
- running in PSU mode (check constant voltage)
- running in MPPT mode (check max power produced by MPPT algorithm)
- check reverse voltage protection when no sun on the panel
- and finally: long duration test. Several days of operations in "debug mode"
Nothing fancy into this log... All these tests needed a lot of time, but they were the price to be paid to get confidence into the system.
It's now fully automatic, without any need for human intervention (initialization excepted).
It can work with or without sun, relying only on the sun angles computation and a sufficient (or not) voltage to run the motors.
All the complexity is hidden into an intensively tested software system.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.