Console, computer, amplifier control using a PLC

A discussion forum for anything even marginally Hauptwerk-related.
User avatar
engrssc
Member
Posts: 7283
Joined: Mon Aug 22, 2005 10:12 pm

Console, computer, amplifier control using a PLC

Post by engrssc »

Not sure exactly where to put this thread but will try here for now,

I have been looking for a while for a solution to control my Hauptwerk setup, that being, the console, the computer, the accessories and the power amplifiers with one switch. The ideal way is to control their power on and power off in sequence. I believe I've found a relatively simple (nothing's totally simple here) solution using one on/off switch and a PLC. (translated, Programmable Logic Controller). These units are miniature computers used to control everything from automatic production equipment to appliances. The PLC involved is available from several sources such as FactoryMation, B-B Electronics and a few others, made by Teco, a Chinese firm with representation in many parts of the world. The particular unit I'm using is their p/n SG2-20KR-D-LEG. It is really a bit of overkill for this project as it has among other features 8 (DC) and 2 analogue input contacts, 8 (8 - Amp) relay outputs. (I have a few future plans for it as well, hence the bigger unit. There is a smaller one, and also expansion units available).

Programming involves using either Relay Ladder Logic (LAD) or Function Block Diagram (FBD). Internal are (for instance) 15 timers, 15 counters etc. For the most part, I only was interested in the timers which can function as On-Delay, Off-Delay, One-Shot, Flash etc. The timers are program adjustable from .01 seconds to 9999 minutes. So obviously, there's plenty of choices to do a simple task as mentioned above.

Cost wise, including PLC, programming cable and a 24 volt power supply approx $120 USD. If anyone is interested in pursuing this, I worked out a small (LAD) program which covers what I needed to accomplish. You can d/l the (free) programming software here http://www.factorymation.com/s.nl/sc.2/ ... y.11443/.f if you want to "roll your own" or I can email the one I wrote. Using this software, you can simulate the program (offline) etc, before using it in the real world. The file can be saved, even labeled as to line by line function and printed out. :)

There is a whole lot more than needed here, but I found this little box to be the most cost effective situation. 8) And, yes, I used to have a day job where I needed to do this stuff.

Rgds,
Ed
User avatar
engrssc
Member
Posts: 7283
Joined: Mon Aug 22, 2005 10:12 pm

Re: Console, computer, amplifier control using a PLC

Post by engrssc »

To answer a question or two, while you use a computer to program the PLC, the program is "saved" in a non-volatile memory of the PLC making it a stand alone. The program is very small - 25 KB.

Also, the computer being used (above) needs to have a RS 232 (9 pin data) port. There are USB to RS 232 adapters available (cheap). Most older computers have one built-in.

Rgds,
Ed
Eric Sagmuller
Member
Posts: 911
Joined: Fri Apr 11, 2008 4:18 pm

Re: Console, computer, amplifier control using a PLC

Post by Eric Sagmuller »

An excellent idea Ed. They sure beat a bank of relays and external timers, although for high current switching one usually needs some external high power relays. I'll probably go this route if I keep increasing my audio channels.

Eric
User avatar
engrssc
Member
Posts: 7283
Joined: Mon Aug 22, 2005 10:12 pm

Re: Console, computer, amplifier control using a PLC

Post by engrssc »

With the 8 relay output PLC module, I have at least 4 extra output relays each with 8 amp contacts (estimated life of 100,000 cycles) that can be programmed to sequence the on (and off) of each of my power amps eliminating a high inrush (if all power amps are turned on or off at the same instant) which isn't good design anyway. So each amp can turn on (and off) individually. If you need more (for additional amps), you can add additional expansion modules (each with four additional relay outputs) to the basic PLC up to 30 or so.

I found with my computer, a momentary activation (push) of the power switch turns it on and boots it up. A second momentary (push), unloads the program and OS and shuts down the computer. I'm working on a sequence so that the computer won't accidentally be shut down at the "wrong time" due to operator/organist error. Writing sequences can be fun except at times very frustrating. :mrgreen:

Available is a full feature PLC complete with an LCD display and external programming buttons. I thought this extra "stuff" was a waste of money for a unit that is buried in a rack. In addition, programming as best done with a computer using the free software.

Rgds,
Ed
User avatar
engrssc
Member
Posts: 7283
Joined: Mon Aug 22, 2005 10:12 pm

Re: Console, computer, amplifier control using a PLC

Post by engrssc »

I was asked where to get a 24VDC power supply. Found one on eBay for $10USD plus $5USD shipping here http://cgi.ebay.com/ws/eBayISAPI.dll?Vi ... K:MEWAX:IT

Rgds,
Ed
jkinkennon
Member
Posts: 1210
Joined: Thu May 07, 2009 9:43 am

Re: Console, computer, amplifier control using a PLC

Post by jkinkennon »

Keep us posted on how this PLC works out. It looks to be perfect for the job and priced better than I would have guessed. Think I'll pick up the "blind" version soon.

I still like my idea of using the HW status indicator - whichever one I ended up using! Every time I hear my little relay click I'm reminded that I need to get it hooked to something. For now it serves as a sort of alarm clock to remind me to lean over the edge of the organ bench and turn on a couple of amps.

I'm still inclined to keep my computer on unswitched power, but it would be a different matter in a more institutional setting or if the computer were tucked away inside the console.
User avatar
engrssc
Member
Posts: 7283
Joined: Mon Aug 22, 2005 10:12 pm

Re: Console, computer, amplifier control using a PLC

Post by engrssc »

Since each of the PLC output relays are isolated, independent, you can switch various voltage from various sources. By that I mean the computer power is sourced from a UPS, while the console and amps power comes directly from the utility. I'm thinking also in terms of possibly switching an LED to indicate all is up and running, altho the screens would show that as well.

Using the simulator portion of the software is real cool as you can "play" with a program until it works as you want. I saved various parts and pieces of the program as I worked on it as different files, then assembled them into a final "package".

You can order various configurations with various input voltages other than the low voltage (24VDC) which I used. That is 100 - 240VAC units are available. Useful for users outside the USA.

Speaking of alarm clocks, a friend of mine suggested using one of the RTC (Real Time of day Clocks) to have the organ up and ready to play when he got finished with his morning coffee. :roll:

You noticed, I have the blind version of the PLC. While I haven't tried it, I would assume you could leave the programming cable attached to the computer for easy program access at least at first.

BTW, FactoryMation ships within hours of receiving an order. In addition to the PDF files on the FactoryMation site, I also downloaded specific pages on the B-B Electronics site. http://www.bb-elec.com/bb-elec/literatu ... _0707m.pdf Same material, only a little more more condensed and easier to follow.

Rgds,
Ed
rumpus
Member
Posts: 179
Joined: Wed Feb 01, 2006 8:11 pm

Re: Console, computer, amplifier control using a PLC

Post by rumpus »

Hi Ed,
that's a really neat solution. I am often prompted by Hauptwerk starting up when I forget to switch on the Audiofire. Having all devices on timer controlled power on would be a boon.
Thanks for sharing.
User avatar
wurlitzerwilly
Member
Posts: 944
Joined: Tue Mar 06, 2007 11:21 am

Re: Console, computer, amplifier control using a PLC

Post by wurlitzerwilly »

The PLCs I used for the Uckfield WurliTzer lift and platform cover were purchased through Radiospares and were around £80 each, with software and a USB interface.

It was great fun sitting underneath controlling a few tons of console and lift using the keyboard and mouse on a laptop. :D

I prefer the FDB method of programming, as you can use all of the weird boolean functions that are not easy to achieve in ladder mode.

A cheap PLC is an ideal solution for console control, especially in eliminating speaker thump in multiple amplifiers.

In view of the recent Argos payout and the quality control issues of some speaker manufacturers that have outsourced to China, I would be very wary of anything that was of that origin.
Regards,

Alan.
(Paramount Organ Works)
User avatar
engrssc
Member
Posts: 7283
Joined: Mon Aug 22, 2005 10:12 pm

Re: Console, computer, amplifier control using a PLC

Post by engrssc »

I've had a few inquiries as to how the PLC is working out, the answer - great! The computer is happy along with the amps (each turning on in sequence) and so am I. The whole start up and shut down "procedure(s)" work very well. I added to the original program the ability to turn the main organ (formerly the power) switch off at any portion of the "cycle" with no problems. By that I mean even if the sequence is not (complete), shutting off the switch only interrupts the sequence and reverses it. Just a slight programming addition.

BTW, size wise, the entire PLC is just about the size of a residential thermostat. 8) The relays have an expected life of 100,000 or so cycles. Question, will I be around after all those cycles? :roll:

Rgds,
Ed
User avatar
gingercat
Member
Posts: 971
Joined: Sun Apr 11, 2004 8:20 am

Re: Console, computer, amplifier control using a PLC

Post by gingercat »

For cheap electronic projects, I'd suggest looking into Arduino - very powerful, and very cheap (get the Freeduino clone boards).
http://www.freeduino.org/
jkinkennon
Member
Posts: 1210
Joined: Thu May 07, 2009 9:43 am

Re: Console, computer, amplifier control using a PLC

Post by jkinkennon »

We might wish to maintain a distinction between devices that initiate an organ console power on/off and those devices which actually switch the power on and off. Ed is using a simple switch to initiate the power on and a properly listed/certified device to safely perform the operation (the PLC device).

For the first purpose a switch works great and so does the Arduino device, MidiBox, etcetera. Any of these can be connected to a PLC device, a power sequencer, or simply a larger relay in the correct (certified) enclosure wired per the applicable codes. What I would not want to do would be to encourage a non-professional to do power switching with a hobby-oriented device. In other words, start with whatever switch or MCU suits your fancy, then run a set of dry contacts to a device which is designed to accept those contacts and do the actual switching.

Granted, built correctly the all-in-one device could potentially be a safe and functional switcher. Probably more expensive, though, when all the odds and ends of such a project get totalled.
User avatar
engrssc
Member
Posts: 7283
Joined: Mon Aug 22, 2005 10:12 pm

Re: Console, computer, amplifier control using a PLC

Post by engrssc »

In essence, the PLC is a remote control device having agency approvals (cUL, CE, and UL among others) and is certified safe to switch loads of 100 to 240 VAC, (but at relatively low current). In my particular case, the console is located approx 30 feet away from the rack containing the computer, the power amplifiers and the PLC itself.

All of the PLC (input) remote control (switching) functions operate at 24 VDC as does the particular (model) PLC I chose. The remote (on/off) switch in the console switches 24 VDC to initiate the sequence of the PLC. In turn, the (switched) 24 VDC from the PLC operates an (external) enclosed 24 VDC relay in the console to switch mains (120 VAC) for the console itself.

In the rack, the PLC operates 24 VDC (external) relays contained in a (modified) plug strip. (I added 1 - (10 amp rated) relay per outlet and mounted these relays inside this plug strip). I found some small, enclosed type relays that work very well for this application. The power amplifiers (and other accessory units) are plugged (each) into and receive their mains power from this plug strip. I also mounted a small 24 VDC relay inside the computer which controls the on/off functions of the computer itself.

The internal relays built into the PLC are not meant to switch large loads, but rather switch (control) power to external relays (contactors) which do the "heavy lifting" using appropriately rated contacts. The 24 VDC (conveniently from the power supply) that is used for the input control to also used to provide (switched) output from the PLC. You could use another (switching) voltage source esp if you already have some other (controlled) relays you wish to use.

I found enclosed 24 VDC relays available on eBay to be quite reasonably priced and small enough to be built into the above (modified) plug strip. This method makes everything legal and safe.

BTW, all of the external 24 VDC wiring is fuse protected.

Rgds,
Ed
Last edited by engrssc on Tue May 25, 2010 4:56 am, edited 1 time in total.
jkinkennon
Member
Posts: 1210
Joined: Thu May 07, 2009 9:43 am

Re: Console, computer, amplifier control using a PLC

Post by jkinkennon »

Hi Ed! Lest anyone misunderstand, I am totally supportive of the way you handled you project. I'm just trying to discourage anyone from going the DIY route to try and duplicate what your PLC device does using a microcontroller and some off the shelf relay. I was baffled by the post about the Arduino devices as it didn't seem relevant to the subject at hand which concerned switching mains power.
User avatar
engrssc
Member
Posts: 7283
Joined: Mon Aug 22, 2005 10:12 pm

Re: Console, computer, amplifier control using a PLC

Post by engrssc »

I totally understand. My last post merely underlined what you mentioned previously and I, too, want to make sure anyone following my suggestion has some knowledge in what they are doing. I certainly would be glad to offer suggestions and such if someone were interested. Again, this setup really works good and repeats without any glitches. 8)

Rgds,
Ed
Post Reply