Solar Powered DIY Plant Watering System

Solar Powered Watering System

It’s great having fresh vegetables just a few steps away from the kitchen, but it takes work to keep those plants healthy. [Pierre] found this out the hard way after returning from vacation to find his tomato plant withering away. He decided to put an end to this problem by building his own solar-powered plant watering system (page in French, Google translation).

An Arduino serves as the brain of the system. It’s programmed to check a photo resistor every ten minutes. At 8:30PM, the Arduino will decide how much to water the plants based on the amount of sunlight it detected throughout the day. This allows the system to water the plants just the right amount. The watering is performed by triggering a 5V relay, which switches on a swimming pool pump.

[Pierre] obviously wanted a “green” green house, so he is powering the system using sunlight. A 55 watt solar panel recharges a 12V lead acid battery. The power from the battery is stepped down to the appropriate 5V required for the Arduino. Now [Pierre] can power his watering system from the very same energy source that his plants use to grow.

31 thoughts on “Solar Powered DIY Plant Watering System

      1. yeah, I was thinking…I got solar panels and the camera capacitors that made me see daylight at 11 pm no light attached….hmm is winter getting that boring again? cause the coil gun experiment hurt….

  1. The power is not step down to 5V but to 9V to power the arduino board… Not very elegant solution I think. The interesting part is how the measure of the voltage of the battery is done. Using a 7909 linear regulator to subtract 9V to the voltage to obtain a more accurate measurement of the remaining charge of the battery (More info (in french) here http://www.mon-club-elec.fr/pmwiki_mon_club_elec/pmwiki.php?n=MAIN.ProjetBatterieCalculChargeAVide )

    1. Keeper, maybe you should get a bit familiar with a resistive divider for measuring higher voltage, here is a good explanation: http://cq.cx/interface.pl
      Also, take into account that relying on regulators to determine the battery voltage is not a good idea, I suggest you use an external reference. Just imagine what would happen if your battery becomes too discharged for some reason, like to 10V.

      Here is an example from a project I made, using a TL431 as 2.5V reference and a 21:1 divider, so you can measure up to 52.5V http://www.electrobob.com/heatsink-tester/

      1. Assuming below 10.7V (number from wikipedia) the battery gets damaged, it makes no sense to measure 0 to 10V at all, software decision will be “switch off the load!” for all of these values.

        Dropout of 7909 keeps ADC voltage between 1.1 and Vbat-9V. 1.1 to 5V usable range to measure 10.1 to 14V. With 8bit ADC first 1.1/5 = 22% are lost because never used, so resultion is 5V / 256 = 20mV and useable range 56..255 = 199 values.

        With a voltage divider 0…14V down to 0…5V resolution is 55mV and useable range (for 10…14V) is 183…255 = 72 values.

        I’ve seen AA/AAA battery chargers with 8bit ADC use a similar technique to get better resolution, maybe this is why most of these chargers do not detect batteries with lower voltage?

        For precise measurements, a voltage divider with precision resistors and a good reference would be better… it all depends on what the readings are used for. In this case it is “if voltage <12.2 volts I keep energy for the brain – Arduino".

        1. jimmy, this method is problematic for the following reasons:
          1. The voltage of the regulator is specified for a certain load which is not zero, as it is in this project.
          2. The typical regulator has +/-4-5% error that means you voltage at the micro has about +/-450mV error just from the start: http://www.fairchildsemi.com/ds/LM/LM7909.pdf .Then you add the same 5% error of the regulator of the arduino(250mV) and get a total error of +/-700mV (a bit overestimated).
          So don’t claim this is more precise.
          3. because you use a regulator the voltage at the micro will depend very non linearly on the input. In fact, once the voltage will drop under something like 10-11V the regulator will cease to work and will not provide 9V drop, but less. This will cause your output to actually stay stable while the battery is discharging.
          4. I believe it is a highly flawed thinking to make the system limited to a very small range of battery voltage.

          Other: the adc resolution of the arduino is 10 bits, so even with a 20V input range you get about 20mV per count. As long as you care about a single threshold the resolution of the ADC is not that relevant, what matters is the total error in detecting the threshold.

          The better way to do it:
          1. Set the brown out detector to 4.3V – insures the micro doesnt start if the supply is under 4.3V.
          2. use a simple 1% reference like the TL431 at 2.5V which would operate properly at 4.3V
          3. use a simple divider with 1% range to measure a voltage up to the open(no load) voltage of your solar panel.
          4. make the software smarter like: battery disconnected error, arduino shut down if battery voltage too low etc.

      2. Bogdan, you are right using a voltage regulator is a false good idea, no low voltage protection.
        I think Pierre wanted to monitor the battery voltage between 12V and 13V and doesn’t need more. But with a 12V zener and a resistor, it’s possible to do the same thing with at least a low voltage protection.
        But it’s working, just need some improvements ^_^

  2. for Keeper : that exactly waht i do !
    For the adruino power down 12v to 9v
    For take the batterie voltage i have use 7909 linear regulator (from thz link that you purpose – this link is already on my tip) …

    1. Yes that what you want to do, but there is a mistake in the article.
      Yes I saw the link for the measurement of battery voltage, i said it was a good idea to use this design.
      (En français, vu que je suis français ;-) J’avais bien compris que c’était ce que tu voulais faire mais il y a une erreur dans l’article ci-dessus. Sinon pourquoi ne pas avoir utilisé un régulateur 5V et alimenté l’Arduino directement par l’entrée Vin ??
      Pour la mesure de la tension de la batterie, je disais juste que c’était une bonne idée d’avoir utilisé ce montage et j’ai remis le lien car il ne passait pas dans la version traduite par Google.)

  3. This is a pretty nice project.

    This is probably the only thing I can think of where less sun = less battery charge is not a problem since less sun means less pump energy for less water. I wonder how difficult it would be to achieve the correct sizing of the solar panel, here it appears highly over sized.

      1. Even better, just sense the conductivity of the soil with a couple of nails. Just looking at the weather and light doesn’t take into account humidity, which is an even greater factor in the soil drying up.

  4. The Arduino chip itself works on 5V (ie when it’s powered by USB). Might be better to use a 6V battery, and wire the solar panels to give 6V (if possible, you might be able to connect 2x6V halves in parallel to do that, depends on the panel, some have jumpers for this). Then use a 6V battery.

    However, since it’s all purchased, that doesn’t matter. But what you could do, is change to a switching regulator, instead of the 7809, which is a linear one. Currently your 7809 drops from 12V to 9V, converting the extra power into waste heat. Then the Arduino’s onboard regulator drops the 9V to 5V and wastes the extra as heat as well!

    This means 7V out of 12V is going straight to waste! A shame for such an expensive source of energy.

    A switching regulator should be able to slip straight into your circuit, take 12V in from the battery, and output 5V to connect straight to the Arduino, bypassing it’s regulator. Switching regulators work by charging up an inductor, then discharging it, repeatedly and very quickly. By controlling the timing of the switching, the desired output voltage is produced.

    You can get switching regulators as complete modules now, quite small and not expensive. So you don’t need to trouble yourself understanding them too deeply. A straight swap should do.

    This would save the over-50% of power you’re currently wasting. Perhaps giving you extra battery life, and powering the system on less-sunny days. You might end up with spare power all year round if you’re lucky, and use it to power other things too.

    1. I have been playing with these and have not found them useful . There seems to still be some huge power losses in them so that there is even no power output from solar panels connected . ie I have a 70 Volt panel dropped to 24 via one of these and its output is capable of 1 Amp at 70 V . At abot one third sunlight power out of the solar cell it then produces nothing at the battery end . Don’t understand why but I like your explanations here thanks.

      1. Hm, switching regulators are generally over 90% efficient.

        Are you saying you’re using a switching reg powered directly from a 70V solar panel, to charge a 24V battery? Hmm. Perhaps the switcher is trying to draw too much current, if you do that to solar panels the voltage from them can drop severely. In the case here, I was suggesting using the switching converter connected to the battery, rather than the panel itself.

        Solar panels have a high internal resistance, when you draw more currently than they can supply, the voltage plummets. Actually batteries do this too, but batteries have much more current capacity, or to put it another way, a low internal resistance.

        Is your system using a proper solar charge controller? They often use switching regulators, but they’re designed to take into account the current limitations a solar panel has. Such controllers can take in 70V and output 24V. An ordinary switching regulator, if it’s input voltage drops, will just suck harder.

        You say one third sunlight power, are you measuring that by eye? Human eyes have a non-linear perception of brightness, particularly since our pupils open and close etc. Solar panels are pretty crap in less-than-bright light, so trying to draw too much current on a dim day might explain why you get almost nothing.

        1. Of course i use a solar charge controller

          The photoresistor give a value every 10 minutes. I add this value (raz at 00:00) in var LumTotal:

          const long SeuilArrosage1 = 18000;
          const long SeuilArrosage2 = 24000;

          if (LumTotal = SeuilArrosage1 && LumTotal < SeuilArrosage2){
          DureeArrosage = DureeArrosage2;
          }else{
          DureeArrosage = DureeArrosage3;
          }
          }

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.