To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 10619
10618  |  10620
Subject: 
Drive R/C Servos with the RCX and pbForth (long)
Newsgroups: 
lugnet.robotics, lugnet.robotics.rcx.pbforth, lugnet.robotics.rcx
Date: 
Sat, 12 Feb 2000 03:34:24 GMT
Viewed: 
1875 times
  
Hi again everyone!

A few days ago I announced that I had developed a nice
little circuit using easily available parts that would let
you connect servos to the RCX - with no external batteries
or microprocessors or anything!

At that time, I said that you could only control the servo
to one of two positions.

Well, after a few hours of crunching away at the problem, I
now have pbForth code to allow you to control and hold a servo
in up to 100 positions. If you only want to MOVE the servo
and not hold the position, you can drive two servos from
one RCX port!

This makes controling pneumatics really easy!!!!

Here's the URL again for anyone that missed it the first time.

<http://www.hempeldesigngroup.com/lego/servos/index.html>

Based on the deafening silence the last post was greeted with,
I have to assume nobody is really interested in driving servos
with the RCX. If so, I have lots of stuff I should be doing this
weekend like flooding my rink and making sure I pick up something
for my better half for Valentine's Day.

If there are some LUGnuts out there that really want to try to
drive servos, I can package up and release an new version of pbFORTH.

*** I'm especially looking for suggestions for applications, neat
    ideas for servo housings (John Barnes has me off to a good start)
    and discussions on hacking LEGO or how far we should go with
    non-standard parts...

Here's the minimal code to get servos working once you have pbForth
in your RCX:

RCX_INIT        \ Initialize the RCX interrupt systems
SERVO_INIT      \ Initialize the servo subsystem

50 0 SERVO_SET  \ Set the servo on port A to 50%
20 0 SERVO_SET  \ Set the servo on port A to 20%

\ If you build the circuit with a pair of rectifying diodes
missing, you can drive a second servo on the same port like so:

-50 0 SERVO_SET

\ To stop driving servos on the port and start driving motors

0 0 SERVO_SET   \ Stop driving the servo on port A
7 1 0 MOTOR_SET \ Set the motor on port A to full forward power

It really is a piece of cake. The pbForth system is interactive.
You don't compile code, you type it or let your terminal emulator
send it for you!!!!

As always, comments are welcome.

Cheers,

Ralph Hempel - P.Eng

--------------------------------------------------------
Check out pbFORTH for LEGO Mindstorms at:
<http://www.hempeldesigngroup.com/lego/pbFORTH>
--------------------------------------------------------
Reply to:      rhempel at bmts dot com
--------------------------------------------------------



Message has 2 Replies:
  Re: Drive R/C Servos with the RCX and pbForth (long)
 
(...) If you're using a custom motor driver in pbForth, why use the inverter circuit at all? Why not just generate the desired waveform directly? Is there not enough current to drive the servo that way? --Ben (25 years ago, 12-Feb-00, to lugnet.robotics, lugnet.robotics.rcx.pbforth, lugnet.robotics.rcx)
  Re: Drive R/C Servos with the RCX and pbForth (long)
 
Ralph - I'm interested in the use of servos with the RCX, but I have no interest in learning the quirks of another computer language. I'm already a bit familiar with Visual Basic,and control the RCX with it. Can your pbForth solution be duplicated (...) (25 years ago, 12-Feb-00, to lugnet.robotics, lugnet.robotics.rcx.pbforth, lugnet.robotics.rcx)

14 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
10 hours ago
Custom Search

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