I am hugely interested in electronics, but have no experience except a physics bachelor.
Please correct me or help me to understand stuff, i would be grateful.
I am building Solar powered plant watering machine for my mothers birthday but i need help.
Everything is powered by a small solar panel, so power saving is an important point.
When light is shining, the Panel is charging a 9900mAh LiIon Battery with about 50mA.
A modified arduino nano is powered by the battery. It wakes up every 8s, in sleep it consumes 2mA.
Every few minutes, the Arduino checks the Soil moisture. If it is too dry, it will power a small pump for some time Interval.
The soil sensors amplifier consumes much power, so it must be disabled.
First, the solar panel was directly connected to the battery. When light intensity is too low, the panel discharges the battery. I first tried to prevent this using a MOSFETcontrolled by the Arduino to detach the panel from the battery and measure the voltage, but failed. I don’t know why anymore, was months ago and i never fully understood.
Back then i thought my problem can be solved by an optocoupler, to have two separate circuits. (6N139M)
I now continued my project and realized that even when nothing is connected to the Diode side, electricity can still charge the battery, but it will not be discharged, so i left it unconnected. (Probably i could just substitute the coupler at its current use with a Diode?)
From what i tried the soil sensor can not be powered by an optocoupler.
When i put current on pins 2 and 3 of the coupler, what happens is that Pin 6 (V0) connects to Pin 5 (GND).
Like this i can connect and disconnect ground from the soil sensor, but this does not help because power flows from + to S to A0 and powers the sensor even if GND is disconnected.
So + has to be disconnected, i did this by a relay.
I do not like this at all, because the relay is 1) audible and 2) consumes 40mA. Is there any other option? (i know that the 2nd Optocoupler is unnecesary, it will be replaced by a N-mosfet or Bipolar transistor)
Also i think i still need an option to protect the battery from overcharging. Either some resistor will generate heat or the solar panels disconnect.
To measure the battery voltage i’d have to disconnect the panels, connect the battery to an analogue pin, measure, reverse it.
I am not sure if this would work.
Maybe by another relais, but this would also falsify the measurement because of its power draw.
Isn’t there an electronic compound like a relais without that power draw?
Or maybe there is just a much smarter option.