Are my calculations correct in my auto watering project ?

Hi, guys, i want to make an automatic watering system project powered by a solar panel for that I want to know if my calculations are correct?

I will use:

  • 2 batteries 2200mAh 3.7v in series, to get 7.4V

C/10 is the facts to charge those Batteries: 2200/10=220mAh so the max current for charging is 220mA

I calculate Iavg using this formula Iavg = (TonIon + TsleepIsleep ) / (Ton +Tsleep)

  • Barebones atmega328p and the sleep library: Ion = 14mA , Ton = 15s
    Ioff = 200uA , Toff = 30min ====> Iavg = 215uA

  • 4 x Soil hygrometer sensor : Ion 35mA , Ton = 8s
    Ioff 0 mA, Toff 30min ====> Iavg = 620uA

  • 1 LCD 1602 for set setting not showing in picture Ion 140mA , Ton = 3min
    Backlight off Ioff 0 mA, Toff = 7day ====> Iavg = 1.14A

  • 4 x Solenoid valve 12v Ion = 1A , Ton = 1min
    Ioff = 0A , Toff = 12h ====> Iavg = 580uA

I will use a boost converter effencity 95% 7.4v to 12 v , so the input current will be Iavg = 990uA
and a buck converter effencity 97% 7.4V to 5V, so the input current will be Iavg = 1.4mA

Finally, the total current is 3mA

Battery life = 2200mAh/3mA = 30days = 1month

So, i will use a solar panel 6v 1w

Did you measure the idle current of the two converters.
Leo..

I bought the pieces and still did not arrive , I only did a calculation

How many cloudy days per year have you allowed for?

Whoops I mixed two topics in my answer never mind

mauried:
How many cloudy days per year have you allowed for?

The average sun hour is 8.5H per day and the average full sun day is 4.5 days per month

How much power does the solenoid take and how long is a solenoid going to be powered

At one minute there's not much water going to pass it if you want to run a longer. Of time motorized valve might take less energy it does not require any power to stay in position it only requires power to move.
The real question is what are the real world power for the devices.
My store bought hose watering unit has an LCD display and has a small ports that opens once it opens the valve stays on until the port is closed the only Power for that operation is to open the port and closed the port which is very tiny.
Batteries last an entire growing season

The problem in the motorized valve is the price 22$ for one and the solenoid valve cost 4$ , so what do you think about the calculations?
And does the solar panel 6v 1w will work well ?

Your biggest problem will be the power consumption of the boost converters under light load.
Id try and redesign your project so you dont need them.
Boost converters are quite efficient under their maximum load, but are woeful at light loads.

aymannox:
And does the solar panel 6v 1w will work well ?

A 6volt/1watt (Chinese watts) panel produces ~4-5volt@150mA in full sun at noon (aimed at the sun),
and about 15mA on an overcast day. Depending where you live, and the season.
Now do your calculations again.
Leo..

I would think about a small (1-2Ah) 12V SLA battery for this project. You can connect a 1.5-2W 12V solar panel directly to it, SLA are fairly resistant to overcharging.

To supply the ATmega etc, it may be worth considering a regulator instead of a dc-dc convertor. Although they are obviously far less efficient at higher currents, they may be more efficient than a dc-dc convertor at very low/sleep currents, as mentioned in other posts. Given your ratio of wake/sleep times, the regulator may have the advantage. I think you will have to try both and measure the input current with dc-dc convertor Vs regulator in active & sleep modes and then calculate the daily/weekly consumption. It will be interesting to hear your findings.

I would also recommend a logic level MOSFET for driving the solenoid, e.g. irl520 or stp16nf06l. Don't forget to add a diode across the solenoid terminals for protection against reverse voltages when the solenoid is switched off.

The small boards that are supplied with those soil sensors are of little benefit as far as I can see and will only waste power. Hook the probes directly to the atmega's analog pins and ground. Also attach a 10K pull-up to each analog pin, with a digital pin providing 5V only when readings are taken. This will also minimise corrosion of the soil sensors.

mauried:
Your biggest problem will be the power consumption of the boost converters under light load.
Id try and redesign your project so you dont need them.
Boost converters are quite efficient under their maximum load, but are woeful at light loads.

No, i need to use the boost converter to get the 12v to power the solenoids

Wawa:
A 6volt/1watt (Chinese watts) panel produces ~4-5volt@150mA in full sun at noon (aimed at the sun),
and about 15mA on an overcast day. Depending where you live, and the season.
Now do your calculations again.
Leo..

150mA will be good to charge the full batteries i need 2200/150= 15h , two sunny days , so is OK

PaulRB:
I would think about a small (1-2Ah) 12V SLA battery for this project. You can connect a 1.5-2W 12V solar panel directly to it, SLA are fairly resistant to overcharging.

I think you will have to try both and measure the input current with dc-dc convertor Vs regulator in active & sleep modes and then calculate the daily/weekly consumption. It will be interesting to hear your findings.

I would also recommend a logic level MOSFET for driving the solenoid, e.g. irl520 or stp16nf06l. Don't forget to add a diode across the solenoid terminals for protection against reverse voltages when the solenoid is switched off.

The small boards that are supplied with those soil sensors are of little benefit as far as I can see and will only waste power. Hook the probes directly to the atmega's analog pins and ground. Also attach a 10K pull-up to each analog pin, with a digital pin providing 5V only when readings are taken. This will also minimise corrosion of the soil sensors.

The SLA battery is expensive and big

As you know the buck converter is better than voltage regulator(7805) because they waste energy and produce a lot of heat and the very low efficiency

I have used transistor bc337 (ic=800mA) for each solenoid because it drops just 250mA

The boards had LM393 comparator chip and a resistor to set the sensibility, so I can't remove it

aymannox:
The SLA battery is expensive and big

The SLA battery? You do realise the SLA batteries come in many shapes, sizes and capacities? They are not all the size of the one in your car. A 1.2~1.3Ah will be around 100x50x50mm, weight around 600g and cost < £10. So a little larger and heavier and around the same price (assuming you purchase good quality Li-ion batteries, not "TrustFire" and the like).

aymannox:
As you know the buck converter is better than voltage regulator(7805) because they waste energy and produce a lot of heat and the very low efficiency

You are not listening to what I am saying. YES more efficient while your circuit is awake. BUT when your circuit is in sleep, which is more efficient then? As you have already been told, dc-dc convertors are not efficient at low currents. In your circuit, the efficiency at low currents may be more important than the efficiency at higher currents. So you cannot simply say which is best without measuring and calculating.

aymannox:
The boards had LM393 comparator chip and a resistor to set the sensibility, so I can't remove it

Again, you are not listening. I am saying use the probes, don't use the boards. I can see from your picture above that the board and the probe are separate.

as a note about the soil sensors.

Soil Sensor

the capacitance ones are much better over time and the power needed is, I believe much less.
these are run for a season on a button battery.
the link above lists at 5mA.

PaulRB:
The
You are not listening to what I am saying. YES more efficient while your circuit is awake. BUT when your circuit is in sleep, which is more efficient then? As you have already been told, dc-dc convertors are not efficient at low currents. In your circuit, the efficiency at low currents may be more important than the efficiency at higher currents. So you cannot simply say which is best without measuring and calculating.

OK , I still have not received the pieces when i get it i will calculate the output current.

PaulRB:
Again, you are not listening. I am saying use the probes, don't use the boards. I can see from your picture above that the board and the probe are separate.

Like this

But how to set the sensibility without the board,Sir?

and does the Solar panel 6v 1w will work well for this project?

aymannox:
OK , I still have not received the pieces when i get it i will calculate the output current.

Thankyou. As I said, I would be interested to hear the results. But the other important measurement is the input current, in addition to the output current. Then you can measure the efficiency.

aymannox:
But how to set the sensibility without the board,Sir?

I think you mean "sensitivity". Answer: in your sketch. Instead of using a digital input to read the output of the comparator, connect "A1" in your picture to an Arduino analog input. Then, by comparing the reading with a threshold value, your sketch can decide to activate the solenoid.

PaulRB:
in your sketch. Instead of using a digital input to read the output of the comparator, connect "A1" in your picture to an Arduino analog input. Then, by comparing the reading with a threshold value, your sketch can decide to activate the solenoid.

I think that is what is in the schematic, the A1 is connected to the analog input

and i will use D7 and D6 to reduce corrosion by allowing the current to flow in the two way

int getSoilMoisture()
{
 int anaValue;
 
 digitalWrite(SMS_VCC,LOW);   // drive a current through the divider in one direction
 digitalWrite(SMS_GND,HIGH);
 delay(1000);   // wait a moment for capacitance effects to settle
 anaValue=analogRead(SOIL_MOIST_PIN);
 
 digitalWrite(SMS_VCC,HIGH);   // reverse the current
 digitalWrite(SMS_GND,LOW);
 delay(1000);   // give as much time in 'reverse' as in 'forward'
 digitalWrite(SMS_VCC,LOW);   // stop the current
 
 anaValue = map(anaValue, 1023, 0, 0, 100);
 return anaValue;
}

I will use a copper or aluminum probes , to avoid rust
You haven't answer for the last question , Sir: does 6v/1w solar panel will work fine ?

A 6V panel will not charge the 12V SLA battery I recommended.

PaulRB:
A 6V panel will not charge the 12V SLA battery I recommended.

No, i am talking about the lithium battery so the 6v 1w panel will work well?

The panel will work well probably