Sign in to follow this  
Followers 0
scootabug

Control System...Home Automation...kind of!

22 posts in this topic

Hey Everyone, I'm very new to PLC and this is my first post to the forum. Let me apologise in advance for not understanding some of the lingo getting about! Here's my scenario... I need to set up a 24v computer-controlled system (it's going in a motorhome, don't want to use 240v) that will control lighting circuits, trigger other devices (an electric awning for instance or a projector screen), read values from thermocouples and water level sensors from diesel, water, grey water and black water tanks. It also needs to read the status of NC switches to indicate if a door is open etc. All in all, I have roughly 30 Digital Inputs, 3 Analog inputs, 2 Thermo Inputs and perhaps 12 Digital Outputs (these are questionable, keep reading ). I know I can have this many I/O with the additional modules I have ordered, just curious about their functionality. At the minute the plan is to run an AB MicroLogix 1200 PLC w/Ethernet module plus other I/O modules to support obvious digital I/O. I will be running a Windows Server with Invensys Wonderware (if their sales team would ever return my call) to be a HMI to the ML1200 via Ethernet. All I need Wonderware to do is show pretty gauges for tank levels, temperature values in text and have buttons for the light circuits with sliders/buttons to increase/decrease/on/off etc. Seems simple enough, given I know nothing. The main part of this I am concerned about is the new requirement of light dimming. I have about 10 light circuits (24v DC, LED down lights, can be dimmed by controlling voltage), that I was originally just going to switch on and off via a relay, hence the comment about questionable 12 Digital outputs. Questions: Has anyone used Wonderware with an ML1200? Am I asking too much of it? Is there anything I should know before I make an order? What is the easiest way to control the voltage to the light circuits to be able increase and decrease the voltage? Lets say each circuit operating at say 1amp at 24v (which I thinks put it over the power requirements to power it directly off an analog output of an AB Analog I/O module? Correct me if I'm wrong! Is there anything unrealistic as far as my requirements are concerned? Sorry for the seemingly long rant for what could have been summarized quite easily. I just wanted to ensure you had the full picture. I'm keen to see your response! Thanks for your time and your generous support. Scott

Share this post


Link to post
Share on other sites
I have never done light dimming myself but I would think you would need a analog output card to do that. The rest seems easy tho. you should have a pretty cool RV when your all done.

Share this post


Link to post
Share on other sites
If you want the ML1200 to control the voltage, you will need to tie the dimmer (potentiometer) to an AI card and then send the varied voltage via an AO card. Consider using the DO's to fire control relays and allowing the dimmer switches to control the voltage level to the lighting circuits, independant of the PLC. Just compare the costs of AI and AO cards versus the DI and DO cards with interposing relays. Some option cards are relay output and therefore could control various voltages and various amperage ratings. You'll need to review each card for there capabilites before configuring.

Share this post


Link to post
Share on other sites
Not sure, but I think you can use PWM for LED's, the lower the freq. the dimmer they become. Might be something to try.

Share this post


Link to post
Share on other sites
Wow, this project sounds very interesting, and very complicated. My favorites. Most analog output cards are limited in the amount of current/voltage that they can pull off of the chassis. Similarly, most analog cards support supplying an external current/voltage source to the card and managing the output to the loads. Pull up some tech notes on the analog cards you are looking at. One thing you might want to consider is a PIC programmable controller instead of the PLC. PICs are very popular in many consumer applications, such as vehicle automation systems. You can start reading up by reading www.nutsandvolts.com. This magazine has many articles every month dedicated to automation projects, and they review many of the PIC development kits out on the market. For instance, most airplane navigation systems are proprietary PIC controllers with GUI (graphical user interface) kits. If you check out Nuts and Volts mag, there are a lot of articles for 12V/24V controls. Very applicable both for mobile solutions and consumer products. The reason for considering an open (PIC and GUI) control platform, instead of an industrial PLC and computer running WonderWare, is a huge difference in price and the potential for marketing your idea to recreational vehicle companies (PIC runtime code is protected). I had a gig some years ago where we started getting into RV automation, very similar to your brainchild here, while we were developing/supplying RV solar panel charging systems. Anyway, there are PIC I/O boards with most of the features you need ready to roll, and the formfactor is more applicable for vehicle automation.

Share this post


Link to post
Share on other sites
Care to do some name dropping? As good as I am at Googling, "PIC I/O board" is a tad vague. And I'll be sure to check out the Nuts and Volts magazine web site. Thanks for all the help!

Share this post


Link to post
Share on other sites
I believe you could use a micrologix 1200 with the right type of output card. Maybe a 1762-OB8 8-point 24 Vdc triac output card. A triac is a solid state device that you could possibly tie into a (Zero-Cross) solid state relay (to handle the load) to be able to dim the lights. I've never tried this myself and am not sure what the programming would be like. I'm thinking pulse width modulation or pulse train output. http://www.solorb.com/elect/solarcirc/pwm1/ Here's a link you might be interested in also. .

Share this post


Link to post
Share on other sites
In actuality for a lot of other reasons (because that's how they actually work), the best way to control an LED in general is with current control. If you just connect an LED that doesn't have a limiting resistor to a power source, it will get really bright for all of about 2 seconds before it overheats and explodes. But for dimming purposes, this is highly nonlinear. LED "on/off" times are down in the milliseconds so it is much easier and very linear to control them via PWM (pulse width modulation) or pulse frequency modulation. This is the conventional way of doing it, and it maintains the high efficiency of the LED vs. current modulation. If you google around, you should see plenty of LED dimmer circuits based on the old venerable 555 timer circuit. For a PLC to do it directly, the timing speeds are kind of obnoxious so you are going to be stuck buying a rather expensive pulse width modulation card. To increase power if you don't want to buy a PLC card, you can wire up a MOSFET switching circuit (look for a "buffer" type circuit) and drive it from the PLC. Not going to work if that was the actual design. It's a DC system. A triac output will lock up because DC never "zero crosses". The card you mentioned is actually a DC one with some big MOSFET drivers instead (higher power capability). There are 1A output cards that would do this with no sweat, not sure what the 1200 part number is. What you don't want to do (aside from using an AC card for a DC project) is to use relay outputs (usually with the letters "OW" in the part number). Mechanical relays are designed for perhaps a million to 10 million switching cycles before they burn up, and you're talking about driving them through that many switching cycles in a few hours. Parallax is one of the companies selling lots of PIC microcontroller stuff. Another popular company is Rabbit Semiconductors. PIC is a little more low-level. Rabbit comes with more of an operating system, a compiler, etc. Another little known option is a Gumstix processor. This is a full blown Linux system embedded onto a board about the size of a stick of gum. All of them sell lots of different expansion boards and modules to make life easier. At least with the first two, you can get them from mouser.com. I believe mostly you buy Gumstix directly from the manufacturer. If you want to go all the way to a full blown PC, then look around for Mini ITX boards. Putting that term into google will get you lots of hits on manufacturers and sellers. At least the upper end ones are good enough that you can add an MPEG encoder/decoder/tuner card and use it as a home brew DVR (multimedia) system. If you go this route, there are plenty of IO cards around, too where you do it 100% in the PC. "ADAM" is one line sold by Advantech. Go to www.bb-elec.com because they have a decent list of vendors. Also, the Mini-ITX board suppliers tend to sell this same stuff as well. In this case you'd eliminate the PLC entirely since it would all be PC-based. You get the advantages of a PC development platform if you want to do high end stuff or at least work on a familiar system. As to the HMI side of things, Wonderware is very expensive for what it does. You'd be better off buying an HMI from someone. EZAutomation, CTC Parker, Red Lion, and Maple Systems all come to mind immediately, and not having any PC in the mix at all. If you want to stick with HMI's, "Lookout" is a name of one of the low end ones that does the job nicely for a whole lot less money. Similarly, you can get cut down versions of RS-View (FactoryTalk View ME). I'd mention AB's operator interface (Panelview+) but it's very expensive compared to the competitors and the hardware tends to be extremely flaky for my tastes. If you've got to have that PC, then consider the Gumstix option above and Java (use Netbeans if you're a beginner). If you don't like that, then consider doing it in VB. The learning curve for the programming environment of either one is just a little higher than Wonderware because the visual editors eliminate some of the complication. In fact, EZAutomation may be your best route because they will even sell you a decent PLC embedded directly into an HMI and the pricing isn't bad, but not as low as the microcontroller world. Edited by paulengr

Share this post


Link to post
Share on other sites
i agree with everything posted so far but i would like to add one or two points. if this is going to be DC system (mobile home) you will have to use system that is suitable for it. i am not aware of off the shelf comercial products that will do what you want but that doesn't mean they don't exist. i would suggest doing some googling to see what is out there. most compact PLCs will have PWM output and this is most convenient way of controlling DC loads. one of the problems may be number of channels you can control this way (tipical brick will do one or two) but even so you need to beef-up those outputs so they can take care of the load (power mosfet is an excellent choice, they are fast enough, this is what you want to use nowdays in such application, you can get them cheap and you can drive them directly from PLC - or with just resistor or two and this will work for either LED or incadescant lamps). if you need to control more than that, there is more options. we used some compact electronic modules with microcontroller that was all integrated and programmed, you just need to send the simple ASCII message through RS232 for example to adjust the settings - plus hang a mosfet on it's output. don't remember part number or maker but I will try to ask the guy who used it and post this info later on. be careful when googling for such devcies since most of them are used to control hobby servos. while hobby servo PWM is still PWM, the duty cycle id not changing in 0..100% range (it is more like 10..12% since the timing for those is different, they expect 2-3ms pulse every 20ms or so). if you just want to control them by analog 0..10V output and you are not afraid of soldering iron just go for simple PWM solution that will cost you some $10 per channel (including LM324, Mosfet etc.), here is an example: http://solorb.com/elect/pwm/pwm2/ Just get rid of potentiometer and use plc analog out to drive it, to power LM324 chip you can simply add 78L12 or 7812 regulator if you want to play safe, the output stage will of course be on 24V. i think same or very similar thing can be found as assembled module: http://www.bakatronics.com/shop/item.aspx?itemid=444

Share this post


Link to post
Share on other sites
The 24VDC is going to be another problem. The vast majority of industrial electronics are 24VDC. Not a whole lot is designed to work with the "other" standards (5 VDC, 12VDC, 48 VDC). However, some stuff does do "extended range" (10-30VDC). You have two choices. You can either use a DC-DC converter (check out Defender marine for some very bulletproof stuff for instance or shop Mouser/Digikey/Newark electronics for a more board-level product), or convert the vehicle electronics to 24VDC (2 batteries), and deal with all the hassles of the fact that vehicle electronics is almost exclusively 12VDC.

Share this post


Link to post
Share on other sites
This looks like the simplest solution this far Panic Mode. Thanks for the hot tip. I'd actually found that Solorb.com link in my travels but it's a little meaningless without the method for connecting it to the PLC which you've answered straight off the bat.

Share this post


Link to post
Share on other sites
What about this one on eBay? I like the fact that I don't have to desolder the pot, I can just wire it straight up (and it's already 24v). http://cgi.ebay.com.au/24-Amp-PWM-DC-Motor...ksid=p1638.m122 Edited by imaginemotocondo

Share this post


Link to post
Share on other sites
Thanks, I'm currently planning on using a VIA EPIA Mini ITX board. The PC is purely to get an easy, very aesthetically pleasing HMI (hence the expensive Wonderware...it looks more Windows Vista than it does Industrial Control) in the mean time until I get the time to program my own HMI in Dot Net. We're planning on incorporating a better UI in the future with 'gestures', remote monitoring etc, and this is the main reasoning behind having a PC to HMI/data log, but not to actually control the logics. The PC will crash eventually (despite my best efforts) however the PLC will be far more reliable and will need to operate with or without the PC. I'm looking into the other HMI's you've mention. Thank you for the pointers.

Share this post


Link to post
Share on other sites
nope, not a problem here, besides converting energy (DC/DC in this case) is pure waste and it should be avoided where possible, specially in cases where battery power is used. the most "sensitive" device is LM324 chip which is also fine with 36V (but I would still drop the voltage to 12V with small regulator or zener diode and add small capacitor). the output transistor can definitely handle more than puny 24V. most of them used in such circuits are rated for 35A, 75V or so. 30V versions are still available but most are long obsoleted - why not sincefor the same price of ... i don't know...$1.50(!) you get something that is rated for 150V. Even if you pick something for under a dollar, it should have 15-18A and be able to handle one hell of a light bulb. i was also toying with idea of automating few things at home and i was considering Panasonic because of very compact and low cost product range (FP series PLC, GT series HMI). smallest one is FP-e version which looks like regular panel mount timer but it still has three color display, few buttons and whole little PLC under the hood, which also can be networked.

Share this post


Link to post
Share on other sites
Dropped the idea of the eBay item based on your advice and have since ordered the MX066 PWM from Bakatronics (same as the MX033 you referred me to , only it can handle more load) just on the off chance I need to do more with this than I originally envisaged. Now, here's something exciting. I am keen on the idea of incorporating reversing sensors into the vehicle, and I have found something that looks like it'd connect to the PLC with ease. Would really appreciate you guys giving it a quick glance. http://www.prowave.com.tw/english/products/ups/us040.htm Signal voltage levels Input Low 0.15 * Vcc High 0.4 * Vcc Output Low 0.05 * Vcc High 0.9 * Vcc Can I wire this into an analogue i/o (or a thermocouple i/o)? Personally I find this stuff a frag confusing without having any background or experience in the field. Thanks for the help once again everyone Edited by imaginemotocondo

Share this post


Link to post
Share on other sites
I am not 100% on how this sensor works, as in what the digital input signal is supposed to be (trigger?), but I am pretty sure that the output will not work with a typical thermocouple PLC input. PLC thermocouple inputs look for very slight resistance changes of the Type J, K, whatever, thermocouple. It does appear that this sensor will have a freq ouptut that is to be read into the controller, where trip points in the controller program make a decision on what to do with the signal information (trigger an alarm, drop out a PLC output, etc.). I am guessing that this sensor is designed to be given an analog-varying input signal that is the desired distance you want the sensor to monitor (say 1.5m, the maximum); the resultant analog frequency output of the sensor will indicate how far or close an object is to the sensor. Hopefully somebody can shed light on how these sensors work, input-output wise. Keep in mind the basics of analog inputs/outputs: 1. Voltage (0-10VDC, +/- 10VDC, etc.) 2. Current (4-20 mA, 0-20 mA, etc.) 3. Sink/Source (can make a huge difference in your circuit design, if you are trying to connect a Source input/output to a Sink input/output card) 4. Thermocouple (Type J, Type K, et.c)

Share this post


Link to post
Share on other sites
Thanks for the input. It'll just be a matter of getting some and having a play with them! I'll let you know how I get on...

Share this post


Link to post
Share on other sites
This morning my delivery of MX066's arrived. I've desoldered and removed the variable resistor...now by delivering between 0VDC and 6.2VDC to the center post (or where the center post of the variable resistor was), I'm able to PWM the LED light and achieve the full range of output for perfect dimming. At 0VDC it's completely bright and at 6.2VDC it's as dim as it can be (at least for my LED downlight), beyond 6.2VDC it switches off. I've grounded the new VDC input (0-6.2VDC input) to the same ground of the main circuit, which avoided some interesting flickering that I initially had. It's an absolutely perfect solution, for my application at least. Thanks panic mode!

Share this post


Link to post
Share on other sites
i just glanced the site and it looks like sensor communication is over 1-wire bus (in and out, user is supposed to add circuit to handle it properly). i don't see much on how the sensor feedback is supposed to be interpreted. they only mention that trigger pulse should not exceed 600microseconds. this part seams straight forward (have you tried sensing pulse that is less than that using PLC output?) but receiving is unclear. i guess it would be pulse with length proportional to distance to target. have you any input on this?

Share this post


Link to post
Share on other sites
No, she's quite the mystery and won't be ready to ship for another 2 weeks, followed by a 30 day shipping timeframe (seriously, how could it take THAT long, with TNT?). It's possible that they'll be completely useless. Eek!

Share this post


Link to post
Share on other sites
http://www.prowave.com.tw/pdf/sonar.pdf This may help explain the mystery. Make sense, anyone?!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0