Ross Crawford / projects / towercrane / programming |
Roscos 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 Counterweight control Ill 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. There are also two touch sensors, one at each limit of counterweight travel. They are connected in parallel, so the RCXs dont 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. Theres 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 didnt 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 its 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 Aquilas 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:
When the counterweight cradle activates either limit sensor, a few things happen:
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 its 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. Its 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 |