Controlling 1 to 3 RC-servos with the RCX

Ultimate ROBOLAB is continuously under development. Still beta-unreleased version 1.4.5.7 will present the following feature :

Keeping all the normal Ultimate capabilities, the user may control up to three RC-servos known from modeling. This was one of the hardest development challenge to generate the required RC-control signals with enough stability to guarantee a resolution below the servo dead-band (normally 3 - 5°) and to keep the RCX fully working for the known Ultimate flexibility.

First let's have a decent look to what has been done so far with RC-servos. Ralph Hempel, the creator of pbForth has, along with Andreas Peter, developed various add-on circuits that allow the RCX to be used with two servo motors. Hempel has provided special program commands in pbForth to drive RC-servos through the RCX, namely SERVO_INIT and SERVO_SET. (also see: Dave BAUM, Michael GASPERI, Ralph HEMPEL, Luis VILLA Extreme Mindstorms, An Advanced Guide to LEGO Mindstorms, p.313.)

Claude Baumann, the author of Ultimate ROBOLAB, has published an article in the leading European electronics journal Elektor (July/August 2004 issue) : IR Servo Motor Interface for RCX,  where he presents an interface circuit, which can control up to three servos of the type used in radio-controlled models via the IR-interface of the RCX brick.

The challenge for the present software solution evidently was to avoid building and soldering additional electronics-circuits. The result is a package of Ultimate ROBOLAB sub.vis that gives the user the possibility to very easily use those servo-motors. See the result :

The oscilloscope shows the generated signal. The test-program changes the servo-position from 10 to 100% in steps of 10. Meanwhile the background-system keeps the running man in motion, sound is active, so do sensors, battery survey and so on. A further user task controls the blinking of the lamp at RCX output port B.

Note that the servo is powered by an external battery pack. To avoid accidental short-circuits with RCX output ports, we recommend to only use the RCX for the control line of the RC-servo(s). We also suggest to add a protection resistor of 1kOhm between the RCX and the control line. The servo-ground must be connected to the output port ground.

Have a look at the following test-program that is responsible for the signal generation shown in the video :

Download this program as a firmware : test_servo_control.srec

With the servo-library the user can individually configure the RCX output to generate a 50 Hz signal with pulse width from 1..2ms with a resolution of 100 steps. Note that the single servo can be calibrated by changing the zero-point (set_new_intercept) or the sensitivity (set_new_slope).


RetourMain Page