Howto: PLC Reef Controller II

I just got back from pittsburg and I think I may be slightly confused about what you are talking about, i was under the impression when you ended your program it would stop the scan and restart it, if you dont end your program it will scan every chip on th plc then restart the scan. As far as a soft start up, I dont think it would be cost effective to get a frequency drive for a few pumps. the drive would not be worth the cost of replacing a pump every 5 five years. I have been using the old school allen bradelly plc 3 and using all the outputs to controll ice cube relays so I dont burn the board up.I thinki I may have not understood something I read though. if Im not making any sense could someone pm me and reexplain it to me.
 
>>As far as a soft start up, I dont think it would be cost effective to get a frequency drive for a few pumps. <<

Not sure what you mean by this - with a uC I would just activate the digital out for 'on' only at the exact instant the zero crossing bit activates. That's no more or less cost effective than anything else, it's just software if you have the zero crossing detector. What do you mean by a frequency drive?

== John ==
 
With a frequency drive, or a flux vector drive, they use like IGBT's to programmatically totally re-work the output to typically 3 phase motors for optimal slow starting, speed control, etc. In practice, even with a VFD rated 3 phase motor, and a fanstatic drive, you seldom want to run it below 20Hz to avoid heating the windings. Many of us PLC guys are dealing with motors ranging from 1-5000 hp, and 480-13,000V where even the rotor mass at rest can be a significant factor let alone if a load is attatched.

With a PowerFlex drive for example, you can program in a startup ramp rate in 1/10 seconds, etc. They are electrically noisy as heck though you could program an output sine of 120V 5 hz if you wanted to.

In the case of the tiny single phase motors we are dealing with, I am not sure how much impact starting on the 0 cross would have, as we will still be going from 0 to 60hz inside of one cycle....

That is why I was babbling about using two outputs and 2 1/2 wave bridges....which would effectively cut the rms output by 50% for starting (IF the little motor would START on 1/2 wave!) then kicking in the other half of the wave after a delay....Probably half baked, but looking for lower cost options...
Maybe one of the analog input ssr's used for heating applications..but still pricey!??
 
Anything cheap out there that would take an analog signal and use it to pass say 0-120v or 60-120v single phase? You could probably work something there for a much softer start and even give day/night profiles...
 
Right, but if there is an interrupt on the zero crossing then it's all just software.

All this takes is 3 things:

1) a 'zero crossing' signal on a digital input
2) a way to set an interrupt
3) a way to have an 'interrupte routine' so that you can turn on whatever you want only when you get the zero crossing signal.

For output, all you need is a radio shack Triac, maybe a buck. I would use one of the optoisolated ones.

I'll hook all this up as a test IF I can figure out number one and two above.

When I was originally doing this work, I was using a 68hc11 from Wheatstone Microsystems, Inc, that had the zero point crossing and the interupt routines (I was coding in assembler) but sadly they seem to be out of business now.

So is it possible with a PLC/ladder logic to have a routine that runs 'only' when an input goes 0 or 1, AND have it do this within say a few microseconds, potentially 60 times a second?

== John ==
 
jgwinner said:

When I was originally doing this work, I was using a 68hc11 from Wheatstone Microsystems, Inc, that had the zero point crossing and the interupt routines (I was coding in assembler) but sadly they seem to be out of business now.

Was that just 68hc11 based prototype board? Or was there any special software? Sounds like the freebie MIT Handy Board if it was just a uc based board:

http://handyboard.com/
 
It was an SBC, about 8" wide by 4 or something, not any specific form factor. The nice thing was that it routed all the A/D signals and the digital out's directly to headers so you could do whatever the chip was capable of.

The handy board looks nice - motor controls even, although in this case we really just need a digital out as I would always use some kind of opto isolated outputs.

The Wheatstone board had the optoisolators on every digital out pin but they weren't big switches, really just protection for the controller itself. I think there were 24 of them. With all the sensors I was planning I think I can exhaust 8 i/o's pretty fast.

I bought it at the time as I couldn't find any proto board 52 pin sockets for the blasted 68hc11's.

The only reason I went with the hc11 was that it had A/D built in, and I had some freeware C compilers; simple, not C++ but I could live with that for what we are doing. Due to the goofed up architecture of the 8051 series, a C compiler is real money, or was at the time. I did most of this work more than 6 years ago. Man I can't believe it's been that long.

So are interupt routines available for PLC / Ladder logic devices?
 
Interrupts

Interrupts

Some models do have STI or Selectable Timed Interrupt or IO based, PII Programmable Input Interrupt. PLC's are still WAY slower than the SBC. For rapid motion control apps, high speed operations, etc other devices are generally needed that the plc simply communicates with.

Nice sounding SBC!
 
Ok, some summary info on what has recently been discussed:
1. How about the PLC output going to one of the SSR's (rated 25A!) for control of MH fixtures!
2. Rolling data buffers needed for stabilizing analog readings and possibly providing better derived accuracy.
3. PLC output to SSR to control heaters a real possibility
Points we need to clarify...
Level control...1, 2, 3 or 4 point control.
I vote for 4 inputs, LowLow (shut of pumps to save them), Low to start fill, High to stop fill, High High to again stop fill if sensor fails..
But thats JMO...
 
Stbringer said:
Ok, some summary info on what has recently been discussed:
1. How about the PLC output going to one of the SSR's (rated 25A!) for control of MH fixtures!
2. Rolling data buffers needed for stabilizing analog readings and possibly providing better derived accuracy.
3. PLC output to SSR to control heaters a real possibility
Points we need to clarify...
Level control...1, 2, 3 or 4 point control.
I vote for 4 inputs, LowLow (shut of pumps to save them), Low to start fill, High to stop fill, High High to again stop fill if sensor fails..
But thats JMO...

I've got a few questions regarding your points.

1) I'm already using 12vdc icecube relays rated for 15amps on the contacts. Every 120VAC device is using one, I feel better knowing Im not running high voltage through the plc. How is this any different from an SSR? 15A is more than enough to handle the load of a a MH.

2) I didn't see where you addressed this above, could you go a little farther indepth on this.

3) Already using an icecube relay thats in a normally open state hooked to the plc, one on each heater. If the TC's pick up a high temp it energizes the icecube and turns off the heater. I did it this way so its failsafe, if the icecube dies its going to open the circuit. With two heaters the chances of two icecubes failing at the same time are about the odds of me winning the lotto.

4) Already with you on this one, I'm also using four inputs for my top off system. Along with two water sensors on the back glass of the main tank, and on the floor at the bottom of the back stand. If there trigger it puts the main return pump into a shutdown timeout squence, and the topoff system if its running.

Glad to have you on board, I'm sure your knowledge is goign to be extremely beneficial to this project, considering you do this for a living. I've managed to learn what I know in the last months, so bear with me most of the techie terms for plc's your using are taking awhile for me to catch on, I come from the world of fire alarms.
 
Reply for gabe21804

Reply for gabe21804

Howdy Gabe!

1) I'm already using 12vdc icecube relays rated for 15amps on the contacts. Every 120VAC device is using one, I feel better knowing Im not running high voltage through the plc. How is this any different from an SSR? 15A is more than enough to handle the load of a a MH.

-The ice cube relays are JUST FINE!! Unless you were using them for temp. control. The make/break action of time proportioned control for heating would kill an ice cube quickly. (Alternatives, Mercury relays, or SSR)

2) I didn't see where you addressed this above, could you go a little farther indepth on this.

-Ah, this was my error, and should have been in another thread, but does apply here. We should make a rolling buffer to filter out reading spikes on the analog. This technique is common for flow, temperature, etc...Picture 10 contiguous integers in a file. Each scan, you shift them all down one, drop the last, and move in a new analog reading at the top. Now, using floating point, add all 10, and then divide by 10. Then scale the "debounced" value. Not always necessary, some cards do it already, etc.

3) Already using an icecube relay thats in a normally open state hooked to the plc, one on each heater. If the TC's pick up a high temp it energizes the icecube and turns off the heater. I did it this way so its failsafe, if the icecube dies its going to open the circuit. With two heaters the chances of two icecubes failing at the same time are about the odds of me winning the lotto.

-No problem here, as you are not using time proportioned CONTROL, rather you are just using the contacts as an ENABLE. Time proportioned CONTROL would involve shifting the ice cube relay thousands of times a day.

4) Already with you on this one, I'm also using four inputs for my top off system. Along with two water sensors on the back glass of the main tank, and on the floor at the bottom of the back stand. If there trigger it puts the main return pump into a shutdown timeout squence, and the topoff system if its running.

-My hat is off to you!

Glad to have you on board, I'm sure your knowledge is goign to be extremely beneficial to this project, considering you do this for a living. I've managed to learn what I know in the last months, so bear with me most of the techie terms for plc's your using are taking awhile for me to catch on, I come from the world of fire alarms.

-Many thanks, glad to be aboard! Hope to do more good than damage.

-Good field, Silent Knight, Cerberus, Gamewell, Honeywell, Simplex... Most PLC'ers would have just a much trouble with your terms PIR, Duct Detector (finds ducks!?)

Thanks again and I will do my best!
John
 
I just wanted to give you guys an update.

My ph circuit should get tested this weekend, I've been held up by getting liverock for my tank, I finally got 43lbs of tonga ultra this weekend, although I got one peice too many and need to get rid of it.

After this weekend, I'll be back in the full swing of things with this project. I'm hoping these ph transmitter circuits are accurate, Im going to test them against a pinpoint monitor.
 
I am just in the final stages of my controller Here is the link if you are interested.

http://www.reefcentral.com/forums/showthread.php?s=&threadid=556711

I have a little advice on your zero crossing cicuits. In my opinion I would not waste much time writting code to do this. You can get direct replacement Opto-Isolators that are Zero crossing. The 3041 is a direct replacement of the 3011. You should really be using an opto-Isolator anyway for protection in case you one of your Triacs fail. You do not want AC coming back to your controller or worse yet the user interface.

I connected finished my two PH probe circuits last night along with the software calibration. System has been running for a little over a week. ORP circuit is just a modified PH circuit. Rather simple.

If anyone needs any help shoot me a PM. I do this kind of stuff for a living.

Good luck Guys

R
 
R:

I agree about the zero crossing isolators, and already mentioned that in a post. I think you missed the point, however, we were speculating on throttling a powerhead by only passing 1/2 the AC into it by clipping out portions of the waveform at the zero crossing. Sort of a 'cheap frequency drive'.
 
Would it be possible to pulse a seio down to 75% or so then back to 100% by mimicing a frequency drive in software?
 
Isn't it possible to control the speed of an ac motor (like a seio) by chopping off the peaks on the ac waves?
 
slug, what your talking about is a variable frequency drive. There is a little more to it than just software. A VFD basically turns a sine wave to a square wave (chopping off the peaks), and by adjusting the frequency of them, you can speed or slow an AC motor. Well, that's the simple version of it anyway.
 
Back
Top