How to Power my board and extra items

I am building a little Garden watering tool that is connected to the cloud for scheduling and monitoring.

v1 is to simply attach the Spark to a Solenoid valve and a Flow meter. Using the former to turn on/off the water and the later to track how much water was used.

I am considering: http://www.irrigationdirect.com/dfv075?utm_source=&utm_medium=&utm_term=&utm_content=&utm_campaign=&thissku=DFV075&site=google_base&gclid=COyxmaKVsb4CFY6RfgodwGMApg for the Solenoid

and http://www.amazon.com/External-threads-Sensor-Flowmeter-control/dp/B00EXGC6TA for the flow sensor.

I am a Web guy, and can handle the cloud side but the hardware stuff is greek to me.

How would I power all three items all the time? I assume an AC adaptor of sorts but that is where I am stuck.

Many thanks to this great community for the help.

2 Likes

Wow, cool stuff! The power requirements for you “kit” is:

  • Solenoid = 24VAC @ 350MA max
  • Water flow sensor = 5V @ 15ma
  • Opto-coupled relay to control solenoid = 3.3V/5V
  • Spark Core, 5V (USB) at 350ma max

You could use a 120VAC to 24VAC step-down transformer to power the solenoid and use a 24VAC to 5VDC or 120VAC to 5VDC converter for the rest of the hardware.

The solenoid would controlled through a opto-isolated relay. There are breakout that will work at 3.3V (on/off voltage) while the relay itself is powered by 5V. That means you can drive the relay from a pin on the Spark. The water flow sensor only works at 5V but the digital inputs on the Spark are 5V tolerant so you could connect it directly without level shifting.

You can power the 5V stuff with a simple 120VAC USB charger cube and the 24VAC transformer for the solenoid. :smile:

1 Like

Ok if I understand you right:

The flow sensor can be powered from the sparkboard which is as simple as usb cube.

For the Solenoid I need something like: http://www.grainger.com/product/4WCD3?gclid=CNyh2-ehsb4CFVGVfgodi2QA3w&cm_mmc=PPC:GooglePLA--Electrical--Transformers-_-4WCD3&ci_src=17588969&ci_sku=4WCD3&ef_id=U2bOPwAABYieOghT:20140516201813:s

Plus I’ll need a relay (https://www.sparkfun.com/products/9118) to control the solenoid from my Spark due to the difference in current required (I know thats the wrong way to say that).

Hi @ravenna

The same place that sells you the solenoid valves will likely have a transformer to drive them:

http://www.irrigationdirect.com/irrigation-products-and-supplies/controllers-and-timers/accessories-replacement-parts/rp-tran-02

Ahh, thank you. I appreciate the help very much. I’ll post notes as soon as I have them.

Hi

I’m planning a very similar thing, a cloud-connected garden controller. The cloud part would give me charts of the soil moisture and let me set thresholds and timings for the irrigation system. If it comes out good, I plan on putting it on GitHub.

I’m also a software guy, who’s venturing into hardware thanks to the Arduino first and now the Core.

I already have a 230VAC to 24VAC 750mA transformer for the solenoid valves. I could use yet another power rail, adding a 5V cell phone switching PSU to power the Core, but I was wondering if it wouldn’t be nicer to power it from the 24VAC.

Do you have any links for that?

At first I was thinking of using a 3:1, 24V~ to 8V~ transformer (rated for the Spark’s 300mA peak consumption), then a rectifier bridge, a large capacitor to smooth the wave, and then a LM7805 with its two smaller capacitors.

But I’m having trouble finding the transformer and I’m not too confident about winding it myself, without blowing up stuff.

So I thought I could use one of these small switching regulators: http://www.taydaelectronics.com/lm2576-lm2576t-5-0-5-0v-switching-voltage-regulator-ic.html
Apparently it only needs a tiny inductor, two capacitors and a “Schottky” diode. I’m still wondering whether I need to put a full wave rectifier and large capacitor in front of it, or if there are lighter configurations.

Any ideas?

@tobia, the 24VAC to 5VDC converter I had in mind was this one from eBay:

It is uses basically the same regulator you had in mind but comes complete for very cheap. :smile:

1 Like

It’s also sold with free shipping. It’s a no-brainer. Thanks!

2 Likes

I have another question related to this project.

Assuming that the GND coming out from that converter is actually the AC wave zero-point (I’m not sure how to ascertain it, but it should be so) then I should be able to use a TRIAC to switch the same 24VAC to the solenoid valves, right? Possibly with a transistor before the triac gate, in case it needs more current than an output pin can supply.

Is that right? If I can do that, it would spare me a few relays.

@tobia, using a triac to control your AC (inductive) relay will mean that you will have to use a snubber circuit to protect from inductive kickback. You may want to consider an opto-isolated relay module. That way you don’t have to worry about isolation or kickback.

I operate a small farm where we have 7 valves with the furthest valve being around 2000 feet away from the central controller–all of the valve solenoids are 24VAC. I’d love to experiment with a system just like this. Is there any way to communicate with the Spark Core over the same 2 wires that supply the 24VAC to the solenoids (kind of like powerline ethernet)? I’ve thought about using hardware from someone like Ubiquity Networks to supply wireless to each valve station but not sure that is practical as long as I have to physically trench the 24VAC lines anyway (I do not want to use DC solenoids). My flow meter is the following and has a reed switch register which I think the Spark can read?

http://www.netafimusa.com/agriculture/products/watermeters-wst-tech

I’d greatly appreciate any help!

Is there a system to control existingly?

I would love to try using a core with ufl and have an external antenna to provide greater range. :wink:

2000 feet is rather far for wifi though…

We currently use a Weathermatic Smartline controller with 8 zones total. There is an independent set of wires going to each valve from the central controller ( old standard) but they are becoming faulty due to age. Our controller can be upgraded to a 2 wire system where each valve is connected to the same pair of wires and you can add 99 valves but each valve station requires an expensive decoder at each valve box. Spark Core would be a cooler solution. We have Wifi at the central controller and there is pretty good line of site from the central controller to each valve. I still have to physically run 24VAC to each valve so being able to hard wire the Spark Core would be awesome.

Hmmm. Good stuff I’m seeing here but not really my area of know-how so let’s wait for other community members to chime in! :smiley: