Solenoid Valve Control - Help!?

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

TriangleIL

Well-Known Member
Joined
May 6, 2010
Messages
222
Reaction score
3
Location
Chicago
I think I have control of the solenoid valves (open/close) down, however there is a third line to control the "flow". This signal requires between 2v - 10v, and for the life of me, I'm not sure how to regulate this voltage. I was thinking a PWM would work here, but from what I can tell, those are for controlling current, not voltage? Or am I wrong in my thinking?

The valves in question are
Belimo TR24-SR.


Thanks!
 
A PWM won't work - A PWM controls duty cycle over a period of time. So if your period is 2 seconds, and you set it for 50%, it's 100% on for one second, and 100% off for one second.

You need some sort of variable power supply. I'm not quite sure how you would automate that though...
 
Thanks SweetSounds, that makes sense.

I found this cool project, which could probably be used for manual control. However, I'm not sure how I would go about automated this... :cross:
 
I think I have control of the solenoid valves (open/close) down, however there is a third line to control the "flow". This signal requires between 2v - 10v, and for the life of me, I'm not sure how to regulate this voltage. I was thinking a PWM would work here, but from what I can tell, those are for controlling current, not voltage? Or am I wrong in my thinking?

The valves in question are
Belimo TR24-SR.


Thanks!

I can't help with the flow control issue, but I am wondering what it is that you are controlling. I think that valve is designed for liquid flow control. You might be facing some clogging issues if you are using it to control the flow of wort from a MT. Some particulates inevitably make it into the loop and can clog any restriction points very easily. Clear water would not be a problem, but wort certainly may be. Probably would not be suitable for gas control at all. I may have this all wrong, so as usual, YMMV etc.
 
A fairly simple resistor capacitor network will let you use the PWM output to simulate an analog output. You will need at least 12V signal from the PWM output to work with RC network to reach 10V signal.
 
Is it common practice to join the AC common line with the negative DC line? I guess I just don't understand that part.

With the LM317, would there still be a way to control the valves via automation (microcontroller)?

Sorry for the noob questions, I'm trying to wrap my head around all this prior to buying the electrical side of my rig. Gah I wish I would have learned more electrical engineering in school now .. bah! :drunk:
 
Is it common practice to join the AC common line with the negative DC line? I guess I just don't understand that part.

no its not, i didn't pick up on that untill you mentioned it
With the LM317, would there still be a way to control the valves via automation (microcontroller)?
no, that would be for a manual operation. you need some kind of d to a converter. Simplest would be what kladue suggested, but would have to be played with to get the right values and your mcu would have to use resources to make the pwm happen. (depending on your mcu some have a couple of channels built in) second option would be to use a chip dac (providing your mcu doesn't already have one built in) your program would write a value to the chip and the chip keeps the value constant.

Sorry for the noob questions, I'm trying to wrap my head around all this prior to buying the electrical side of my rig. Gah I wish I would have learned more electrical engineering in school now .. bah! :drunk:
not at all

thinking bout it more: most of the chip dacs have a max out of 5v (or at least the really cheep ones i was looking at) so that would men you would also need and op amp to boost the Vout to the 10 v. one could hand wire that but it would be better for a pcb. so if you want a quick and dirty use the switched cap method. if you are planning to etch a pcb i would go with the chip
 
There is another control method called floating control that would work well with digital signals. It is a method that is fairly easy to do and should not be difficult to program for, the main idea is to send a home command to bring valve to closed position on power up, then pulse the open direction until flow is reached, or closed if flow is too high. Proportional output with a voltage or current signal would be nice but the hardware is more expensive and programming is much more complex. If you want why dont you define what you want the brewing system to do and a budget figure, and then I can suggest hardware to look for to make it happen, and how to control it.
 
no its not, i didn't pick up on that untill you mentioned it

no, that would be for a manual operation. you need some kind of d to a converter. Simplest would be what kladue suggested, but would have to be played with to get the right values and your mcu would have to use resources to make the pwm happen. (depending on your mcu some have a couple of channels built in) second option would be to use a chip dac (providing your mcu doesn't already have one built in) your program would write a value to the chip and the chip keeps the value constant.


not at all

thinking bout it more: most of the chip dacs have a max out of 5v (or at least the really cheep ones i was looking at) so that would men you would also need and op amp to boost the Vout to the 10 v. one could hand wire that but it would be better for a pcb. so if you want a quick and dirty use the switched cap method. if you are planning to etch a pcb i would go with the chip

My mcu has 4 I2C buses on board and - I believe 2 PWM outputs. I may need to figure out a way to have 4 PWM outputs however as I need to control 2 heating elements and 2 of these proportional valves.

I've never etched a PCB, but this sounds like a good project. In fact, I'm fairly certain this is the route I will go now .... more research time....

There is another control method called floating control that would work well with digital signals. It is a method that is fairly easy to do and should not be difficult to program for, the main idea is to send a home command to bring valve to closed position on power up, then pulse the open direction until flow is reached, or closed if flow is too high. Proportional output with a voltage or current signal would be nice but the hardware is more expensive and programming is much more complex. If you want why dont you define what you want the brewing system to do and a budget figure, and then I can suggest hardware to look for to make it happen, and how to control it.

Kladue, unfortunately I'm stuck at this point as I've already purchased the proportional control valves. My original thought was the floating point control, however from guidance and reading I thought it might be harder to accurately control flow with floating control. With proportional control, I can have software 'tune' itself to determine flow rates (and/or manually tune the flow rates as constants into the system).

So basically what I am trying to accomplish in my system is to control flow through the pumps by having these proportional control valves as the first component after the pump outputs. All other valves in the system will be simple open/close valves which will strictly route the "flow controlled" water/wort mixtures.

I will update my drawings based on this design and link my build thread in a new post when I have completed the drawings.
 
one easy way to dothis with a miocrocontroller is using a data bus. if you have a few IO lines, you can use them to power up a series of resistors, not unlike this example. yeah, it'll use a few datalines, but you'll need them no matter what if you're trying to get more than just 'on off' out of them. plus, if you have more datalines, you can use them as well by extending the ladder, and get even more fine grain control of the flow.
 
Were did you get the proportional valves from and how much?
 
I am looking for an I2C board that will give either 0-10V output or 4-20 MA output so the proportional valves can be used. Most of the DAC boards top out at 4-5 volts, and an additional op amp would be needed to hit 10V. The PWM resistor/capacitor setup might be the easiest to build if you had to go that way.
 
Thanks for the help!! I will keep looking as well, unfortunately I'm still lost in the woods a bit. However, I feel like some of this is coming together.

Would it work to use a relay, feeding 12vdc into the relay, and then outputing the voltage via a duty cycle (PWM style) through an I2C component? I venture to guess this would wear out the relay fairly quickly though? *thinking out loud here as to how I will control my BK in the future also*

I guess I can tap into the PWM lines coming from my S3C2440 directly, I believe I have 4 PWM timers built in. I think I would just need an op-amp and a simple RC circuit with this design?
 
Here I found a pulse to 10VDC module http://www.atkinsonelectronics.com/product_pdfs/UPAC.pdf, this should work with the pulse outputs and drive the Belimo valves. This would be a way for the Arduino boys to get proportional control voltage outputs now, have not priced these yet but flow control would be a possibility now.

Kladue,

You are amazing! The pdf even shows an example with a belimo valve! Thank you so much for your help, I'll be sure to follow up with some pics/video.
 
I have been looking at other PWM to 0-10VDC modules as they are popular with the CNC hobbiest group for speed control. Prices seen are between $36 and $59 dollars but I am still looking for a better price but the wireless speed where I am staying sucks( dial up speed), need to pursue this at work on the faster connection.
 
If you want to control a LM317 with a microcontroller, you can use a digital potentiometer. Analog Devices makes a range of them, for example the AD5220. Operation of the 5220 is pretty simple; you just need 3 digital outputs from your uC (or two if there's nothing else on the bus; you can ground the CS input of the 5220 so its always enabled) and the interface is just increment/decrement commands.

You have to be mindful of the fact that the digipots are low current devices; the 5220 is rate for 20 mA between the legs of the voltage divider and the wiper terminal. You can calculate the current in the voltage divider from the equations in the LM317 data sheet (if memory serves). Since your valve control line is high impedance (100 kOhm), the current should be low; you just need the 2-10 V bias to actuate it.

I've found the LM317 + digipot combination to be a handy, simple way to get a variable voltage regulator controlled by a uC.

Also pay attention to the number of steps the digipot can take. Some of them are pretty low resolution, so you may not wind up with particularly fine control. The 5220 is 128-position, which isn't too bad. Over a 10V range, that would give you 78 mV steps.
 
Im looking for the same thing. The digipot setup sounds the best (and most economical). I was thinking a LM317 and MCP41010. Do you have a recommend diagram?? I can figure it out eventually but I tend to burn chips faster when I do!
 
Well, I'm finally ready to begin the electrical portion of my build (or at least gathering more parts). I am looking at building a manual PWM based on this design. That will allow me to manually control the flow rate from the pumps.

For automated control, I plan to use something similiar to the LM317 + (AD5220 or MCP41010). I haven't decided on a design for this part of the project. Is this something anyone has done before? Does anyone have a schematic or design of this process? I think I can do something like this?

Thanks!
 
I plan on doing something similar today. Ill let you know if I come up with something. Why control the heater with PWM? I was thinking of just cycling it on and off with a SSR.
 
I plan on doing something similar today. Ill let you know if I come up with something. Why control the heater with PWM? I was thinking of just cycling it on and off with a SSR.

Bixter, this is actually for flow control of the pumps... :fro:

However, this will translate nicely to control of the heaters as well, because I'll want to do the same thing to control the heater from my uC.
 
I guess I wasnt too clear. I plan on doing the same with the valve today. I saw one of those links seemed specific to the heater element, that was were my comment came from.
 
Sounds great! Let me know what you come up with and I'll do the same. BTW, if using the LM317, does this mean I wouldn't need the Red Lion control from a few posts back?
 
I got a circuit working using PWM, a filter, op-amp and lm317. Then decided to just go with a 24VAC valve. Im going to use the water level (calculate flow from that) with some logic in code to control the flow.
 
Bixter, you may be disappointed with this approach. I believe most of the solenoid valves are slow to open/close. The reason I am automating the flow control is so I can control/avoid stuck mash primarily.

If possible, can you post a diagram of how you controlled the valve via PWM? I'm hoping I can get away with controlling these valves from both the uC and the PWM manual circuit am building. Should be working on the electrical side of things in the coming weeks as I finally have the plumbing done.
 
Back
Top