im currently making a project that needs to be online/running as much as possible. its a self sustaining system.
in the system we have 2 batteries, the system will monitor the State of charge of the two batteries. either of the two batteries can be charge and discharge at the same time.
for example. the arduino is currently using battery1 while battery 2 is currently charging. when the arduino detects the battery is about to deplete, the arduino will switch the relay to the other battery. also, i'm starting to test the switching but there's a millisecond that the arduino and the relay will reset/shut down causing the code to reset too and will go back to the battery1 and sometime stuck
is there any module that can read the state of charge of a battery?
any circuit or anything that can fill the gap when switching the relay to prevent the resetting/shutting down of the arduino and relay?
Thanks in advance.