Go Down

Topic: Solar powered plant watering machine (Read 485 times) previous topic - next topic

tryptamine

Nov 03, 2019, 06:11 pm Last Edit: Nov 03, 2019, 10:54 pm by ballscrewbob
Hey guys.
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.

The layout:



Explanation:

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.

Unclaritys

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.


groundFungus

#1
Nov 03, 2019, 06:39 pm Last Edit: Nov 03, 2019, 10:54 pm by ballscrewbob
Quote
When light intensity is too low, the panel discharges the battery.
A blocking diode in series with the positive lead of the solar panel to the battery will prevent the discharge.  A Shottky diode has a lower forward voltage than a silicon diode.  See here.
You will save everyone's time if you read and follow the forum guidelines.  :)          
https://forum.arduino.cc/index.php/topic,148850.0.html
and
https://forum.arduino.cc/index.php?topic=97455.0

wvmarle

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.
You discharge through the body diode of the MOSFET - it basically switches current in only one direction, in the opposite direction current can flow through the body diode. So that's how your battery continued to discharge. You see this diode also in the MOSFET symbol.

That's why you need a regular diode between the solar panel and the battery. Indeed a Schottky type is better for less voltage drop (and power loss).

Quote
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.
Look for solar charge controller circuits. They are available off the shelf, though usually designed for much larger setups. You can also look for batteries with built-in overcharge and overdischarge circuits. That may be good enough for your small setup.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Idahowalker

Receiving partial information does not help me help you and wastes my time.

Go Up