4.8v Self watering garden system

Hi guys,
I guess like quite a few of you on here I'm looking at running an arduino in the garden to turn a tap on and off to water plants when away on holiday etc (ie when I've forgotten).

I'm looking at a 5v solar cell, through a diode into 4 serial NiMh AA's. From there splitting the output to:

A) the arduino (at the NiMh's 1.2x4, 4.8 volts)
B) through a transformer into 12v to run the solenoid for the tap.

On the arduino itself the only output would be the signal for the relay running the solenoid.
The only input would be a hygrometer.

To save power I'd like the arduino to only 'wake up' to check the hygrometer every 12 hours, and then if needed run the solenoid, and then go back to sleep for 12 hrs.

on the 'unpowered live' side of the relay I'm going to put a button switch to run the tap manually if required.

I know I've used terrible terminology, apologies, still very new to playing with electronics...

My questions are:

  1. Does 4.8v cause any problems with a 5v arduino system, or is it within tolerance for a light use project like this?
    If yes, is there an easy fix? would looking for a 12v system and transforming it down to 5v be more efficient?

  2. the transformer I'm looking at is 5v to 12v, so if its run from 4.8v it'll be more like 11.4v once transformed. Will this be a problem for the solenoid?

  3. will a 0.8W solar cell be able to run this kind of a project once battery losses etc are accounted for?

  4. Just checking the 12v gnd can be tied to the 4.8v gnd and returned to the battery without anything frying? or do i need a diode to stop anything going the wrong way?

  5. Should the solar cell be in series with the return ground line from the arduino or separated? I dont want to force current through the solar cell if it might damage it (I haven't messed around with solar before)

  6. Is there an easier way than using an external RTC to tell the arduino when to wake up?

  7. Slightly more general, if you were going to do this, from experience, what would you change?

  1. That will be fine. The ATmega328p can run (stable) at 16Mhz between 3,8V and 5,5V. As long as you stay there you're fine.

  2. Transformers are useless on DC :wink: Use a DC-DC step up converter. And because you only want it when you need it, use one with a enable line (and low shut down current) or switch before the converter.

  3. If you do remove all other stuff from the Arduino (use a Pro Mini!) it probably is. BUT, the biggest share will be for the solenoid! An Arduino is sleep can easily take 1000 times (or more) less energy than the solenoid (aka, for 1 second of solenoid action the Arduino can run 2+ hours).

And instead of a relay (which the Arduino can't drive directly!), use a mosfet. Easier, cheaper, uses less energy.

  1. GND is common, just keep it common. Looking at that drawing it's all wrong... The GND is completely floating and nothing connected to the battery except the solar...

Battery- is GND, Battery+ is Vcc of everything (Arduino, converter and solar!

  1. Solar in series??? They are just 2 separate circuits connected to the battery. See 5.

  2. Internal clock. Only ting is, it's not very accurate. How accurate does that 12h need to be? Is it fine if that happens to be 11 hours and 50 minutes?

  3. I would probably ask a lot more than you can charge based on this post :wink:

Save yourself some trouble, get a solenoid valve that runs at 4.5V like this one.

The coil resistance is 15R, so the current will be around 300mA, maybe a bit more on startup. So an ordinary npn transistor like bc337 will be able to switch it. Make sure you have a flyback diode across the coil terminals, and a large reservoir cap like 470uF to smooth the sudden current surge.

Perfect. Thanks for your help guys, very much appreciated!

  1. So, just to confirm (having not messed around with solar before), the -ve on the solar should be wired to ground line, not ground going 'through' the solar; and the +ve should be just on the -ve side of the batt? (like in this fritz drawing?)

  2. internal clock sound accurate enough. I just wanted something that won't constantly wear the valve out.

  3. I'm just a poor boy from a poor family.

In the diagram I've almost certainly got the mosfet wiring wrong, this is still the great unknown to me.

returns to googling mosfets

Image of OP:
garduino2.png

  1. No, now the cell is just shorted via the diode.
    Should look something like:
 ------>|-------------------
  |          |               |
Solar        |               |
Cell      Battery       Arduino etc
  |          |               |
  |          |               |
  ---------------------------
  1. Then the internal clock should work just fine. Depending on the sleep mode you can use millis() or for deep sleep, count sleep cycles (because the Arduino can max sleep for 8 seconds).

And indeed, google some more about mosfets and driving solenoids / motors. :slight_smile: Easiest way is to place a N-MOS (or if current is low a NPN) on the low side aka between solenoid and GND. Also add a diode in reverse over the two contacts of the solenoid.

Just like:

Only with a solenoid.

  1. Doh! Of course. Thanks.

  2. good to know!

Thanks again!

Sun I recommend switching to Ni-Cd chemistry if you can. Less capacity for the size but better in every other way and will live longer than NiMH.