Menu

Month: June 2015

After several months of continued development, I am excited to announce the release of the first DC powered OpenSprinkler — v2.3 DC. This version uses a 9V DC universal power adapter, and is designed to work with both standard 24V AC sprinkler solenoids as well as DC (e.g. 12V DC) non-latching solenoids. Below are two pictures.

As explained in a previous blog post, the main motivation behind this is to make it easy to source the power supply for OpenSprinkler, particularly for International customers outside of US/Canada. As you know, different countries use different mains voltage standard. In US/Canada, the mains voltage is 110V AC; but in most other countries, the mains voltage is 220V to 240V AC. Because AC adapters are not regulated, you can’t directly use a 24V AC transformer designed for the US market in, say, Germany. You will either need a 220V to 110V step-down converter, or source your own 24V AC transformer. Either case, it’s a pain. On the contrary, DC transformers are much easier to source, and work universally in any country of the world. They are usually cheaper too, because their demand is higher than AC transformers. Therefore it would be ideal to use DC power supply. This is just like how your laptop adapters can work with any mains voltage in the world, so you don’t have to worry about it wherever you travel to.

Given the above benefits of DC, why in the world are sprinkler solenoids designed to work on 24V AC? To explain this, you should read my earlier blog post entitled Understanding 24V AC Sprinkler Valves. In that blog post I analyzed the electrical properties of 24V AC solenoids. They generally require a high impulse (in-rush) current to get energized (often as high as 300 to 500mA), then they will stay on with a relatively low stable (holding) current (e.g. 150 to 250mA). With AC power, the solenoids can automatically achieve this dynamic current adaptation, thanks to the solenoid coils’ electric properties (technically, the inductor’s reactance to AC). This ensures the solenoid will both turn on solidly, and remain on at relatively low power consumption and heat dissipation. The circuit design is also quite simple and straightforward.

But there is no reason why we can’t achieve the same effect with DC. Specifically, there is nothing particular about AC solenoids that they must be driven by AC — they work just fine under DC current. However, you need a more complex circuit to alternate the voltage: it needs to produce a high in-rush voltage to ensure the solenoids are solidly energized, and then reduce the voltage down to produce a relatively low (150 to 250mA) holding current. According to my calculation, 9V DC is ideal for providing the required holding current. On top of that, we just need a boost converter to generate a high in-rush voltage (18~22V) required to energize the solenoids. That’s it — this is how a DC powered OpenSprinkler works on a high level.

If you search online, you can find plenty of people using just 12V DC to power sprinkler solenoids. In my mind, it’s not the most reliable design, as 12V is barely sufficient for producing the in-rush current, and is too much for holding current. As a result, it may not successfully energize the solenoids, and it certainly will shorten the solenoids’ lifetime due to the excessive holding current. That’s why my design uses 9V DC power instead, in conjunction with a on-board boost converter. This provides the optimal holding current as well as in-rush current.

If you still have questions or confusions, hopefully the F.A.Q. below will help you answer your questions.

How is OpenSprinkler v2.3 AC different from v2.3 DC?
OpenSprinkler v2.3 AC uses 24V AC transformer (sold separately), and triacs to drive sprinkler solenoids. OpenSprinkler v2.3 DC uses 9V DC transformer (included in the package), and MOSFETs to drive solenoids. Other than these, the two use the same microcontroller (ATmega1284p) and run the same OpenSprinkler Unified Firmware.

In addition, OpenSprinkler v2.3 DC includes a universal 9V DC power adapter that can be used worldwide. In contrast, v2.3 AC version does NOT include the transformer — US/Canada customers can purchase 24V AC transformer as an optional add-on, but customers in other countries will have to source 24V AC transformers on their own.

What types of solenoid valves can work with v2.3 DC?
Both standard 24V AC sprinkler solenoids as well as DC solenoids (e.g. 12V DC or 24V DC, non-latching type). Keep in mind that v2.3 DC is NOT compatible with latching solenoids.

What about pump start relay and multiple valves?
We’ve tested a few common pump start relays and they all work well with OpenSprinkler DC. We’ve also tested opening multiple valves simultaneously without any issue.

How can I decide which version to get: AC or DC?
We strongly recommend the DC version for anyone who doesn’t already have a 24V AC transformer, because the DC version includes the transformer. It’s particularly suitable for customers outside of US/Canada as there is no need to source your own power adapter any more.

Also, if you need to control DC solenoid valves, such as 12V DC solenoids, the DC version is your only choice.

On the other hand, if you need to use certain sensors that require 24V AC, such as wireless rain sensors, soil sensors, or solar sensors which require 24V AC, you are better off with the AC version as they can share the same 24V AC power supply.

Does OpenSprinkler v2.3 DC output AC voltage?
No, it does not. It uses completely DC voltage to drive AC sprinkler solenoids. To understand how it works, refer to the explanations above. Because the output voltage is DC, it can also work with DC solenoid valves (non-latching type).

What about expansion boards?
Keep in mind that the DC controller must use DC expansion boards; similarly, AC controller must use AC expansion boards. You should NOT mix and match the two, or your sprinkler solenoids won’t function properly. All DC controllers and DC expansion boards have the label [DC] attached at the front and back of the enclosure.

What’s the operating voltage range for v2.3 DC?
Although v2.3 DC comes with a 9V DC power adapter, you can power it with any voltage ranging from 5~24V DC.

Can you give me more details on how v2.3 DC works internally?
Below is a block diagram of the v2.3 DC circuit. All relevant parts are marked in red. The mcu controls two high-side switches (HS switches): it turns on switch 1 to engage the boost converter (based on MC34063), which generates 22V DC and stores that into a capacitor; it then turns off switch 1 but turns on switch 2 to dump the boosted voltage to the common (COM) wire, which provides the in-rush current. Finally it turns off switch 2 and the input 9V DC continues to provide the holding current through the diode.

For the past two weeks I have been traveling in China, and I spent the entire last week in Shenzhen, the city known for electronics supplies, assembly and manufacturing, among many other things. I visited Shenzhen two years ago, and had an wonderful time there. On this trip my main missions are to visit a PCB assembly factory, check out a few pick and place machines (I am considering getting a second pick and place machine), to attend the Shenzhen Maker Faire, and above all, to have great food 🙂

Wells Electronic Technology Ltd.

Earlier this year I started working with Wells Electronic Technology Ltd. to get OpenSprinkler Pi and Expansion Board manufactured there. Wells is one of the numerous companies in Shenzhen that provides professional PCB manufacturing, assembly, testing, and packaging services. I’ve already done 3 orders with them. On this trip I wanted to pay a visit to check out their facilities in person. As a client, I was treated really well. They picked me up from my hotel, showed me around the factory, treated me lunch, and dropped me back to hotel. It was a very satisfying visit. The factory is divided into three sections. The first section is SMT assembly. They have 7 SMT assembly pipelines, each consisting of a stencil printer, pick and place machine, and reflow oven. Not all pipelines are occupied at all times, and the spare times are often used to accomodate small-size orders like mine.

There is also an X-Ray machine for examining the soldering quality of BGA chips. Fancy!

The second section of the factory is through-hole soldering. The workers first insert through-hole components into circuit boards, which are then sent to wave soldering machines. The third section is testing and packaging. There are literally no less than a hundred workers, all sitting in front of testing tables with testing instruments. It’s a pretty impressive scene.

At the end of the visit, I took a few pictures with my hosts Celia and Linna. They are both very friendly and hospitable. I was even given gift boxes of sticky rice dumplings, a traditional Chinese food to be consumed on the Dragon Boat Festival.

Revisiting Pick and Place Machines

About two years ago, I bought my first desktop pick and place machine — Neoden TM-240A. This is a decent quality budget machine that’s well-known in the maker community. It’s pretty easy to use and quite reliable. Although we use professional factories to make the OpenSprinkler line of products, for small circuit boards like SquareWear, ESPToy and RFToy, it’s still much more cost effective to make them ourselves. So it’s important to have a good and reliable pick and place machine in house. The major downside of TM-240A is the lack of a mechanical or vision centering system. This is one of the reasons it’s inexpensive. As we scale up, I am now on the market to shop for a new desktop machine with a automated centering system.

Before I went to Shenzhen, I contacted Felix at the LowPowerLab and got his recommendations for the DDM Novastar LE40V that he purchased recently. It’s a US-made high-quality desktop machine that provide both mechanical centering and vision centering. I even paid a visit to DDM Novastar in Philadelphia to check it out in person. The machine is quite impressive. My main concern is the cost — the total cost with feeders would be about $45K to 50K, which is quite steep. So I decided to wait till my Shenzhen trip to check out a few comparable China-made brands.

The first choice I have in mind is the Borey T15-F30 series. It’s a desktop machine with 4 headers and up to 30 8mm component slots. I had a chance to check out a sample machine at Borey’s Shenzhen office. To be honest, this machine is quite bulky, and given its size the 30-slot limit is a bit disappointing. The sales representative took quite a while to set up an initial demo, which made me concerned about the setup overhead. The machine including feeders would cost about $8K to 10K in total, which is a very decent price even after we factor in the shipping cost.

The second choice is the new generation of Neoden’s pick and place machine. At the moment they are advertising their third-generation (TM-245P) machine. Since I’ve had two years of experience with TM-240A, I consider their machines to be well-built and fairly reliable, and their brand trustable. TM-245P is an upgrade to 240A with lots more component slots, mechanical centering, vibration feeder (suitable for components in tube packaging), and support for IC trays. The overall cost is about $6K to 7K.

During the conversations with their sale representatives, I learned that they will soon release the fourth generation with vision centering. This is a very interesting news that has come right in time. Vision centering is ultimately faster and more accurate than mechanical centering, so I’ve decided to wait for a couple of months for their fourth generation to become available. I’d like to get a sense of how it works before finalizing my decision.

Shenzhen Maker Faire 2015

I intentionally scheduled my trip to overlap with the Shenzhen Maker Faire 2015, which happened over the June 20 weekend. June 20 is also the Dragon Boat Festival, when we happily enjoyed the sticky rice dumplings of all sorts of flavors. The Chinese government has apparently decided to invest heavily in the make culture (a wise move!), and sponsored this event. As a result, it’s free to exhibit, free to attend, and even parking is free on site. The event was well organized with lots of makers. Compared to the Bay Area Maker Faire, it’s somewhat lacking in diversity, in that many exhibitions are of similar nature, and they are almost 100% for-profit companies/start-ups. I miss the days when the Maker Faire consists of mostly small but passionate makers who have the ‘I do it because I can’ spirit, not necessarily having profit-making as the primary focus. Let’s be honest, once it’s driven by profit, the focus is shifted to sales and marketing, and those are the kind of things I am neither good at nor very interested in. In any case, just my wishful thinking for future Maker Faire events.

Saturday (June 20) evening, I went to a social gathering organized by Hack A Day. Met some new friends and had a great time over there.