Setting priority on PID outputs so only one is on at a time.

Describe your system and processes, and post your config file.
Post Reply
clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Setting priority on PID outputs so only one is on at a time.

Post by clearwaterbrewer »

I have a design to do this externally with logic gates, but thought this may be possible inside the BCS somehow...

I want the RIMS heater (OUT2)to operate normally
I want the BK heater (OUT1)to heat ONLY if the RIMS is not firing at that exact moment in time.
I want the HLT heater (OUT0) to heat ONLY if both the RIMS and BK are not energized at that exact moment in time...

I can run a 3 element system off of a single 30A circuit... drastically reducing the cost of power cords, connectors, and increasing the number of places I can demo my brewery.. Yes, an output may miss it's pulse, but it may get the next one, the Integral will build up, and it will start doing them longer

I looked at this, but somehow, inputs and outputs of the same output on the same line seems hokey... (FYI - the symbols on the right did not change, as I did not 'apply' this..)
SSR Priority thoughts.png
SSR Priority thoughts.png (5.28 KiB) Viewed 9946 times
User avatar
ECC
Posts: 676
Joined: Fri Sep 12, 2008 12:29 pm
Bot?: No
Contact:

Re: Setting priority on PID outputs so only one is on at a t

Post by ECC »

I think you should keep with your current setup of using external hardware to force one at a time. A DPDT relay is best here. If it fails, it will either fail open or close, not both. If you want to wire more loads than are supported by the incoming wiring, you really need to be careful and understand the consequences.

Always think about the worstcase scenario if(when) a component fails. Do you really want to leave it up to the programming? What if down the road, somebody comes along and changes it without understanding the consequences? Or you're updating the firmware and for some reason all the outputs turn on randomly? Always ensure that any possible combination of the controllers outputs won't pop breakers.
clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Re: Setting priority on PID outputs so only one is on at a t

Post by clearwaterbrewer »

Sounds good... I agree with the safety concerns, but safety is built in with breaker and wire sizing

I believe protection would be 100% acceptable supplied by a 30A B-Curve supplementary breaker (the fastest one I could get) that feeds all the elements, if 2 came on, it would trip.. could also put in a fast-acting fuse if really paranoid... maybe lower to 25A or even 20A for my 4500W elements if really paranoid,

Compare to what happens when you plug in too many devices on a household circuit... say you have 4 duplex 15A outlets on a 15A breaker with 15A capable wiring, you plug in 2 toaster ovens and turn one on at a time you are fine, but if you turn on both, the breaker blows... it is nearly the same thing, as long as the wire size is capable of what the upstream breaker can provide...

DPDT sounds good, except I need switching as fast as the SSR's (or faster), so relay is out... I am happy with the reliability of TTL or CMOS logic gates...
User avatar
ECC
Posts: 676
Joined: Fri Sep 12, 2008 12:29 pm
Bot?: No
Contact:

Re: Setting priority on PID outputs so only one is on at a t

Post by ECC »

You're correct that you can't have an output feed itself, and also can't have an output controlled by two separate sources (in your case of Out1, its controlled by rung5 of ladder logic, as well as a Process). To have the ladder logic implement this for you you'll need to use a separate output. As of v3.5, each PID controller is hard coded to an output, so unfortunately you'll have to map to a 3rd output in order to gate it.

In your example, all of the contacts are correct, just change the Out0 and Out1 coils to other unused outputs (like Out4/5). The new outputs would be the gated versions.
ChuckJaxFL
Posts: 2
Joined: Tue Feb 14, 2012 7:32 pm
Bot?: No

Re: Setting priority on PID outputs so only one is on at a t

Post by ChuckJaxFL »

Could you use a third SSR, but instead of hooking up to OUT* and GND, hook it up to +5VDC and OUT*? It would be always closed, except when OUT* fired, breaking the other circuit.

Am I explaining myself well enough?

Say you wanted Element1 to have higher priority than Element2. Element1 would be controlled by OUT1, but control TWO SSR's. The SSR actually driving Element1 would connect to OUT1 & GND.

Element2 would be driven by OUT2, but would have the SSR driven by OUT1 (OUT1 & +5VDC) in series with it's own SSR.

(Edit to try to clarify.)
clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Re: Setting priority on PID outputs so only one is on at a t

Post by clearwaterbrewer »

at the power levels used to turn on and off SSR's, no advantage of an SSR over a logic gate, and many advantages ofCMOS gates: a low cost 4 gates in one CMOS chip, 2 chips does it all for a dollar or two.. and all the DCinput vs ACoutput SSR, High-Voltage output and low voltage inputs..
forkboy
Posts: 8
Joined: Thu Feb 09, 2012 4:48 am
Bot?: No

Re: Setting priority on PID outputs so only one is on at a t

Post by forkboy »

Hi all, I have a similar requirement (mash element on = HLT element off).

Would someone mind describing how to do this on the 5V side with a relay with maybe a link to the sort of relay I'd be after? I am not electronicsally gifted at all, I imagine it's pretty simple to hook up, but there's a lot of relays out there and I'm not sure what would work with the BCS. I've had the 240V side (australian) wired up by an electrician with breakers and an RCD so I don't want to mess with that side.

Thanks
clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Re: Setting priority on PID outputs so only one is on at a t

Post by clearwaterbrewer »

you do not want to use relays, as you need to switch very fast and often..

what you want is a logic circuit, you can use TTL logic chips, they run on 5V and draw very little current..

You want the mash element SSR control lead connected direct to BCS(actually through your HOA switch), and that signal(after the switch) goes to your logic circuit.

You want the HLT element SSR control lead to be switched on by the logic circuit, taking it's input from a combination of the BCSout-via-HOA and the above signal..

I suggest a quad NAND gate http://en.wikipedia.org/wiki/Negated_AND_gate

you will use 3 of the gates:
#1 will have both inputs connected to each other and tied to the MASH SSR control(this inverts its signal)
#2 will take input from #1 and from the HLT HOA switch (this says only when HLT 'on' and mash 'off')
#3 will have both leads tied together and to the output of #2 the output of this is connected to HLT MASH SSR (the above signal is inverted, so this last gate inverts it again)

-mike
clearwaterbrewer
Posts: 383
Joined: Wed Feb 09, 2011 3:43 pm
Bot?: No
Location: Clearwater, FL
Contact:

Re: Setting priority on PID outputs so only one is on at a t

Post by clearwaterbrewer »

looks like radio shack does not have the 7400 TTL chip on their page, they have the DTL(close enough for brewing beer)
http://www.radioshack.com/product/index ... d=12614297

if you have never done this.... find a local friend and buy them a 6-pack...

I suggest buying a circuit board:
http://www.radioshack.com/product/index ... Id=2103799

soldering this socket into it:
http://www.radioshack.com/product/index ... IC+sockets

soldering the wires in, and make external connections to the SSR/BCS/switches

mounting it with some standoffs like this:
http://www.radioshack.com/product/index ... Id=2102848

then insert the IC

then power up and verify

then actually connect the high-voltage
ChuckJaxFL
Posts: 2
Joined: Tue Feb 14, 2012 7:32 pm
Bot?: No

Re: Setting priority on PID outputs so only one is on at a t

Post by ChuckJaxFL »

Clearwaterbrewer,

Before your post, I'd never heard of a logic gate. I just spent about an hour so reading tutorial and "introduction to" sites.
These things are actually pretty simple. I assumed anything contained on these IC's would be so far over my head as to be useless to me. Now, looking at them, I think that I could put these to work.

I can certainly why, with even a little knowledge of these logic gates, the use of a big expensive SSR & heatsink would seem ridiculous!
Post Reply