Could you please add a wiring diagram?
Closed this issue · 10 comments
Could you please add a wiring diagram? I'm not 100% sure where to put the capacitor and diode. Also the four wires going to the screw terminal at the top (white, black, green, brown) are not clear to me.
Thanks a lot, now I see much clearer. The diode and the capacitor are used to transfer AC to DC, right?
Yes, the AC at the input terminals alternates between positive and negative voltage. Assuming "AC Terminal 2" to be 0V or GND, the "AC Terminal 1" is positive for a half wave and then negative for the other half wave. If "AC Terminal 1" is positive current passes into the capacitor and DC/DC converter. If the "AC Terminal 1" is negative, the diode blocks the current - the DCDC converter draws current from the input capacitor during this time to provide 5V at its output. This causes the voltage at the capacitor to ripple, the DCDC converter can handle that quite well and the output is just a stable and constant DC voltage with no noteworthy ripple for this application.
Great, thanks for the explanation. Some more questions:
- why did you use a toroid transformer with 2x12VAC output and not one with 1x24VAC?
- what about the noise coming from AC? Is 2x12 VAC better than 1x24VAC in terms of noise? I have a 24VAC power supply adapter which definitely can be heard
- Did you ever thought about everything running directly with DC? I have rain bird 24VAC valves which definitely also could be run with about 20 VDC. This is what e.g. OpenSprinkler does with their DC version (AC valves driven by DC, [https://opensprinklershop.de/2020/03/24/dc-oder-ac].) In fact the valves would only need a boost of about 20 V to open, to hold them open only 10 V would be necessary.
- 12V toroid transformers were cheaper and readily available. I assume 12V transformers are manufactured in larger quantities because they are also useful for low voltage halogen lights. If your distributor has 24V, single output for a reasonable price I would prefer that.
- There should be no audible noise. If you can hear the device it could be several reasons. If you have a wall-plug-transformer it might be OK and it might stem from the layered metal sheets inside cheaper rectangular transformers (=more losses in comparison to toroid). Toroid transformers tend to not vibrate, because the core is not formed of layered metal sheets stacked on top of each other. If you ask for electrical noise from mains side: that is filtered out by the large capacitor at the input and the smaller ones on the DC-DC-converter. The ESP32 itself has another LDO on the PCB so it is unlikely that the ESP32 has issues with electrical noise coming from the mains side. Using 2x12V or a single 24V output does not affect the electrical-mains-noise.
- True: I considered DC, because AC to DC power supplies are cheaper and easier obtain nowadays and switching DC does not require bulky relays. However, I decided against directly powering the valves from DC, because you might find the correct settings for a certain brand. But if in couple of years replacements are needed, I cannot be sure if those settings are still the same. Switching brands (for instance going away from Hunter to Rainbird or Gardena) might also invalidate the settings. If the circuit does not reduce the DC from 20VDC to less, the coils turn hot because the resistance for DC is less than the resistance for AC (This is because for DC only the resistance is limiting the current, for AC the RLC-replacement-values hinder the current from flowing a bit more). So, reducing the voltage to a smaller voltage than the trigger voltage is a requirement. Doing this correctly in hardware requires more components and again it must be checked if the valves operate properly with these "uncommon" settings and no valves manufacturer assists you by giving you a guarantee to not change this in the future.
Then I thought about modulating DC with an H-Bridge, but in the end it is a lot more straight forward and thus reliable over the next years to simple give the valves the signal they are designed for. There are also nice latching valves, but the Hunter latching coils for their valves are prohibitively expensive in Germany and only few shops have them in stock. After a lot of back and forth, I settled on simply sticking to what the valve-coils are designed for.
Thanks again a lot for the explanations.
-
I mean audible noise, not electrical noise. I use this one, and it can definitely be heard, both the transformator and the valves. The sound at the valves doesn't matter, but the sound of the transformator being on the terrace is not nice. Can be heard in a distance of at least 3 meter. So with the toroid you don't have any audible noise? Not even at the valves?
-
Uh, I planned to use 20 VDC without lowering DC after the valves have opened. Good to know that this would burn the coils ... My valves open even at 12 VDC. What do you think, would this be safe? How can I find out? Simply check if they get warm?
- That is strange indeed. The toroid in my build does not make a sound, at least nothing I can hear. I think you might want to try another transformer, especially if the noise is annoying. For the valves, I did not recognize any sounds but they are buried in a box in the soil, so I even if :)
- I am not sure if it will actually "burn" the coils but I did not have a good feeling about it. Here is a good explanation of what is going on: https://rayshobby.net/wordpress/understanding-24vac-sprinkler-valves/
To figure out values for your specific valves, basically follow his measurements and try achieving the same effective power values for keeping the valve in the open-state. Problems might arise if the valve does not reliably trigger with that "weaker" 12VDC voltage, so this booster-trigger-circuit of OpenSprinkler suddenly makes a lot a sense to "force" the valve open, even if it gets a bit blocked or has more friction by residue or water pressure. Basically you must experiment if it works and if it does it is OK. Checking the temperature is also a way to approach this, I think coils are pretty robust even if treated a bit wrong. For a worry free operation I still recommend simply providing 24VAC though.
-
Here you can hear mine: Video 1 Video 2. The same sound is at the valves. My transformer delivers up to 3 A, I read somewhere the more powerful the transformer the more noise. Maybe I should have taken only 1 A or 2 A.
-
Interesting article. Unfortunately Ray doesn't explain how the booster in his OpenSprinkler DC-powered version works. My valves only draw 200 mA at 16 VDC, so this could work without booster - enough voltage to open the valves, but not too much current to destroy the solenoids. I will try ... Or I will try another AC transformator.
- Wow, thats annoying - I totally agree. My gut feeling is, that the particular transformer is bad. The metal core likely is formed by a stack of metal sheets and normally they are firmly joined by resin. In this case somehow it does not properly keep the stack of metal inside this transformer from vibrating. It even seems to change by reorienting the device, which also hints to some loose internal magnetizable material. It might be true that larger transformers even worsen this situation, but I am not sure. I would swap it out with another transformer. Ideally a toroidal one, because they have 40 times less losses in idle state. Wikipedia states "Der Leerlaufstrom von Ringkerntransformatoren ist im Vergleich zu Transformatoren mit eckigen Kernen gleicher Leistung um ca. Faktor 40 geringer." --> "The no-load current of toroidal transformers is about a factor of 40 lower than that of transformers with square cores of the same power." https://de.wikipedia.org/wiki/Ringkerntransformator.
- In this article the author does give an insight and even a schematic how the DC version of his controller works.
Wiring diagram and schematic were added so I close this issue.
Feel free to reopen or create a new issue if something is not working. Good luck with your project!