voltage up conversion for a solenoid

I have a water timer that connects to the water bib on the house which is used to automatically control when my lawn is watered. I would like to add an arduino for control along with wifi so that I can control my sprinkler system remotely. I took an existing system apart in order to borrow the required mechanics and generally figured out how it works but I am struggling with how to design some of the hardware. The primary system that I will borrow is the water connection to the hose bib which is controlled by a solenoid. I probed around the original board which runs on 3V and appears to charge a 2200uF cap to 12v which then discharges to trigger the solenoid. I am not sure what the technical term is but the solenoid is two way and does not require constant power to remain in any position. Meaning that if you apply momentary power the solenoid will open and if you reverse polarity the solenoid will remain closed without constant power. I will run my Arduino at 5V but I need some suggestions on a simple way to up convert the voltage to 12V for the cap. I also need to figure out a simple way of having the Arduino control the polarity reversal in order to both open and close the solenoid. If anyone can point me to some simple schematics or something to read about up converting voltage and reversing polarity I would appreciate it.

To get the polarity reversal, you need an H-bridge. You can use either a semiconductor H-bridge, or a pair of SPDT relays. What is the resistance of the solenoid? That determines how much current the solenoid needs, and hence the requirements for the H-bridge.

To generate +12V from 5V, you can use a ready-made DC-DC boost converter, a charge pump, or a flyback converter. The flyback converter is simple and efficient, but requires an inductor. The charge pump is less efficient and produces a low output current, but that is unlikely to matter in your application. The best charge pumps use ICs, however I didn't find any voltage tripler charge pump ICs, only voltage doublers (which would only give you 10V). You can make a simple voltage tripler using a PWM output pin, resistor, 4 capacitors and 4 Schottky diodes. You should be able to charge the capacitor to about 12V in around 2 seconds. Let me know if you want a schematic.

The best approach would be to use an h-bridge driver circuit to drive the solenoid. The h-bridge driver would be powered from some external 12V supply that you would need to provide, and all the Arduino would do it control it. This is commonly used to control DC motors and stepper motors, but you can use the same hardware to drive any load that is within the voltage and current ratings of the driver.

dc42, I will start reading up on the things you suggested. The design that I took the solenoid from must use a flyback convertor because I do see an inductor on the board. I have no idea what the resistance is, Is this something I can check easily on my own? If you have a simple schematic that would be fantastic!

PeterH, I appreciate the idea but I am trying not to run a second 12V battery. If at all possible I want to just up-convert the voltage so I can avoid using such a big battery.

It may be possible to reuse the electronics that were already on the timer, to generate the 12V and control the solenoid. If you could post a clear, well focused picture of the top and bottom of the original control board, then someone on the forum might be able to help.

You can measure the solenoid resistance with a multimeter (disconnect it from the circuit first). If you don't have a multimeter, get one - it's very hard to do electronics without one.

Here are a couple of schematics. The left hand one is a charge pump. It produces just a few mA of current, so it will take several seconds to charge the capacitor. Using Schottky diodes as indicated, I think you will be able to charge the capacitor to about 13V. Is you use 1N4148 diodes instead, you may just about get 12v. For the three capacitors, I suggest 1uF ceramic, but smaller is OK if you can wait longer for the output capacitor to charge. Set the Arduino pin to produce a 50% PWM signal, and increase the PWM frequency to the maximum supported by the pin.

The right hand schematic is a flyback converter. This is simpler and can charge the capacior faster, but needs an inductor. It can potentially produce a lot more than 12V, so I’ve included a voltage divider feeding an analog input, so that the microcontroller can monitor the charging process. Alternatively, you could connect a 12V zener diode across the output capacitor. Keep the digital output pin low normally. To charge the capacitor, pulse the pin high for about 10us, then low for 100us, and repeat this until the desired voltage is achieved. As the output voltage rises, you can decrease the low time and speed up the charging process.

Disclaimer: I haven’t tested either of these, although I have used circuits working on similar principles.