To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
To LUGNET News Traffic PageSign In (Members)
 Ross Crawford / projects / towercrane / programming


Rosco’s LugNet Page

These pages are no longer updated. You can view my LEGO related pages here.

All images hosted by Brickshelf L.L.C. but who knows how long that will last.


Tower Crane with Luffing boom

Programming

RCX connection diagram
   The crane is controlled by two RCXs. These respond to commands from the Minstorms remote control, as well as several sensors. As you can see, RCX1 controls the counterweight and the hook, RCX2 controls the boom and platform rotation.

The disgram is divided into “modules” so I don’t miss anything 8?)

Counterweight control

I’ll begin with the tricky bit - the counterweight control. Basically, the entire back half of the platform is free to tilt up & down. The front section is attached to the turntable atop the tower.

A beam (about 30 studs) extends from the front section towards the rear, and atop this beam is a construction which looks a bit like this:

A light sensor is butted up against this, but fixed to the (moveable) platform, with the sensor adjacent to the grey plate when the platform is level. In this way, the sensor can detect when the platform tilts.
   Balance sensor

There are also two touch sensors, one at each limit of counterweight travel. They are connected in parallel, so the RCXs don’t know which one is pressed. A bit of logic keeps track of what direction the counterweight was moving when a limit sensor is activated to determine which one it is.

One new (geared) motor moves the counterweight via a 24:1 + 3:1 reduction to a 16t gear driving a chain connected to the weight cradle <pauses for breath!>. This motor also turns the rotation sensor. This lets RCX2 know when the counterweight is moving, so it can take appropriate action (see below).

Hook control

This is pretty simple - one geared motor driving the single spool via a 24:1 + 1:3. I put in the speed increase, because it was moving laboriously slowly, and it was never gonna be lifting huge weights. There’s a touch sensor connected to the limit switch at the tip of the boom (see detail page).

Boom control

Again, pretty simple. The only interesting point is that it uses two motors (new geared variety) running in parallel. One just didn’t cut it. These drive two parallel spools via a 24:1 reduction. There is a limit sensor to stop it being raised too high, though it’s never reached this limit - I need to adjust the boom cables.

Rotation control

Even simpler - no sensors here. Again it uses two motors - old un-geared ones - in parallel, via 24:1 + 24:1 + 7:1 (8t driving 56t turntable). This was to overcome the friction of turning such a heavy platform. Even then I needed to lubricate it to get smooth movement!

Control logic

This is where things get interesting. The two RCXs are both running legOS 0.2.5 with Chris Aquila’s remote control patch, so I can use the remote. I also wrote a little module to make responding to remote key presses a bit easier. The “A” & “1” buttons control rotation of the platform, “B” & “2” buttons control the boom, “C” & “3” buttons control the hook. The program source is here and here. A description of the controls follows:

Non-alarm condition:

This is when no limit switches are activated, and the counterweight is not moving. In this state, you can press any direction button and the appropriate motors (see above) will respond. Motion will continue even when you release the button. To stop, press the matching number button. This is unlike the standard Lego firmware, which stops the motor when the button is released.

Counterweight moving

When an imbalance is detected, RCX1 waits about 0.5 secs, then starts the counterweight moving in the appropriate direction. The pause is to allow for small oscillations.

In this state, a couple of things happen:
  1. The hook is stopped (if it’s moving). This allows for that point when a load leaves the ground - this effectively pulles the boom down, causing an imbalance. At that point the hook stops lifting, and the counterweight moves outwards, until it’s moved far enough to lift the boom back up, effectively lifting the load off the ground. Once balance is restored, the hook continues as if nothing happened. The same happens in reverse when lowering the load.
  2. The power to the boom is reduced (it moves slower). This allows the counterweight to “catch up” without actually stopping the movement of the boom. When balance is restored, full power is also restored.
Alarm: Counterweight limit reached

When the counterweight cradle activates either limit sensor, a few things happen:
  1. The counterweight stops (well duh!).
  2. An alarm sounds. Sorry I haven’t got a sound snippet - you’ll have to use your imagination. It’s just a two-tone alternating alarm. It continues until the sensor is de-activated (by moving the counterweight).
  3. All other movement is stopped. While in this state, all motion requires the appropriate button to be held down (like standard Mindstorms operation). You can continue to “un-balance” the crane, but only at your own risk! Usually, you’ll quickly try to re-balance it.
Boom limit

When the boom limit sensor is activated, further lifting of the boom is impossible. All other operations are unaffected.

Hook limit

Likewise, when the hook reaches it’s limit, further lifting is impossible. All other operations are unaffected.

Note that neither the boom nor the hook have a lower limit - it is assumed that the operator has at least enough common sense to figure those things out for themself.

Well, thats about it. It’s pretty simple really. Note that the program source code is provided under the GNU General Public Licence, which in a nutshell means you are free to use it however you want, as long as you provide the source freely of anything you use it for.

Enjoy!

Back to the main tower crane page


Site last modified November 4, 2004 Home

Primary content in this document is © Ross Crawford. All other text, images, or trademarks in this document are the intellectual property of their respective owners.


©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR