I’m powering the OpenLog Artemis using the USB connection alone. I wish to log data (to microSD) as long as the USB power is available, stop/sleep when there’s no power, and restart when the power is back on.
I understand the default Firmware needs a HW reset once the USB power is back. This is a limitation for me.
I’ve also found a related topic (viewtopic.php?t=53109) where a custom firmware supposedly restarts when powered through battery.
Could you please let me know how I can configure the OpenLog Artemis to automatically restart when the USB power is back on (without a HW reset / serial terminal).
It is not possible to automatically restart the OpenLog Artemis (OLA) when the power returns.
You will:
either need to create a reset over the USB communication link (e.g. by closing and re-opening your serial monitor or terminal emulator)
or add your own power-supervisor circuit which generates a reset pulse when the power returns.
We did investigate if it was possible to use the OLA battery voltage supervisor or the Watchdog Timer to do this, but it was not reliable. There is some information about this here:
You mentioned in the previous post (viewtopic.php?t=53109) that when the RTC battery is discharged, OLA restarts when power is reconnected.
So, if I were to physically remove the RTC battery connection:
Would OLA log data when powered with USB
Stop when the USB power is down
Restart when USB power is back on
I will get timestamp from GPS module so it’s not a problem if OLA time is off. Also, I will log to a new file every 10 mins, so that even if the file being written during power loss corrupts, I still retain rest of the files.
Sure, so long as you are happy with those consequences (RTC losing time and the log file not being closed correctly) then that could work for you.
As an experiment, you could try connecting a 100 Ohm resistor across (in parallel with) the battery. That will discharge the battery in a few minutes and prevent it from recharging. If you are careful, you should be able to solder one end of the resistor onto the battery +ve contact and the other end to the 0V breakout pad.
Please proceed at your own risk, but I believe this will work for you.