Selasa, 16 Februari 2010

Boat Lift Controller with Remote

Relay logic

Before describing the PLC programming, I’ll start by describing the type of relay logic I first considered.  This will lead right into the Ladder Logic design.

The first task in this design is to convert the momentary pulsed output of the radio receiver to a steady-on output to run the lift motor.  Also needed is a way to stop the motor when the lift reaches the full up or down position.  Since a relay is needed to safely switch the 110v rectified AC power, a standard solution to the design problem is to use a relay with an extra set of contacts to latch the relay on once it is activated.  In the diagram, the Up switch is a normally open pushbutton switch or, in the case of the radio controller I’m using, a transistor momentarily switched to ground.  When activated, current flows from the battery (or power supply) through the relay coil, the normally-closed limit switch, and the pushbutton or transistor to ground, activating the relay.  As the relay activates, the second set of contacts close, in parallel with the Up switch.  The Up switch can now be released and the relay and lift motor will stay activated.  (I have not illustrated the lift motor connections for simplicity.)  When the upper limit of lift travel is reached, the limit switch opens, breaking the circuit and stopping the motor.

 Simple relay design solution for lift motor control

This circuit will work, but it has many shortcomings:
*      The only way to stop the lift is at the end of travel.  There is no way to stop it part way.
*      I’d like to be able to stop and restart the lift by remote control, in a simple, intuitive way.  For example, push the Lock (up) button the remote a second time.
*      For added safety, I’d like the lift to stop even if the Unlock (down) button is pushed.
*      The limit switches are normally closed, meaning a short in the wiring would cause the lift to keep running.

The circuit can be modified to address the shortcomings, but it would get quite complex and require lots more relays.  I leave it as an exercise to design a complete circuit to address all the shortcomings.  I decided to move to a PLC in my design.

Ladder Logic

Let’s start by taking a look at a Ladder Logic design that mimics the basic control circuit.


Simple Ladder Logic design solution for lift motor control

The normally-open Up and normally closed Limit switches are represented by the vertical parallel lines, with a slash designating the normally-closed switch.  They are designated with a “I” for input.  The Run up relay coil is indicated at far right.  A set of contacts on this relay, which is used for latching the relay on, is over at the left.  It is labeled with the same name as the relay and designated with an “o” for output.  This Ladder Logic design can be downloaded into the PLC.  The PLC simulates what a corresponding set of relays and switches would do.

Can you see the similarity between the Ladder Logic diagram and the physical circuit schematic of the same design?  This is no coincidence.  It allows Ladder Logic to be understood by those used to working with relays without a lot of extra training.  There are many sources of Ladder Logic learning readily available on the web.  In fact, Triangle Research International offers a PLC simulator for their products, which can be downloaded free of charge.  I used the simulator to design my circuit before obtain the PLC hardware, to make sure that it would do the job.  As it happens, my design uses only about ¼ the capability of the E10-npn.

Bipes lift controller PLC program

Here’s my complete PLC program:

Complete Ladder Logic design solution for lift motor control

The first two rungs of the ladder correspond to the simple circuit with a few enhancements.  The middle rungs generate states necessary for the toggling action of the remote pushbuttons (push on/push of) that is desired.  The bottom rungs control the canopy lighting.  The bottom rungs use a feature offered by many PLCs: latching relays.  Since this construct is often used, this shorthand version is made available to the designer.  I could have used this construct in the upper rungs of my design as well.

Tidak ada komentar:

Posting Komentar