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 / 7111
7110  |  7112
Subject: 
Reading motor speed through an input
Newsgroups: 
lugnet.robotics
Date: 
Wed, 29 Sep 1999 23:56:54 GMT
Viewed: 
846 times
  
This message describes how to connect a motor to an input so the voltage across
it can be read through the input. In certain applications this can be used to
detect the motor's speed or direction of motion without the use of a rotation
sensor. This is good because it allows combining the input with buttons, which
is difficult to do with rotation sensors.

You have to make some kind of adapter brick or cable that has resistors in it.
I built a brick; this is the same brick I showed people at the NELUG meeting
last night at MIT.

Because my web hosting is changing, I can't post images right now, so I'll have
to describe the brick with words.

Start with a 2x8 conduting plate. On the underside there are two long strips of
metal. I start by cutting it in four places so it looks like this:

==1== ==2== ==3== ==4==


========5======== ==6==

Notice the numbers: the four pieces of the top strip are terminals 1, 2, 3, and
4 and the bottom strip is 5 and 6. Each segment is two studs long except number
5 which is 6 studs long.

Connect the following resistors:

  4.7K from 1 to 2
10.0K from 1 to 3
47.0K from 1 to 4
47.0K from 5 to 6

Then, use the contacts 4+6 to connect to a motor. This motor can also be
connected to a motor output. Connect two touch sensors to contacts 2+5 and 3+5.
Connect terminals 1+5 to the sensor input.

If you wish, you can put the 2x8 conducting plate directly across the sensor
and motor connectors on the RCX -- sensor 2 and motor B is the easiest. (If you
do sensor 1/motor A or sensor 3/motor C, you need to use 1x2 conducting plate
to lift it up a bit to avoid hitting the RCX's buttons). This saves two cables
and makes for a more compact design.

Configure the input as a raw mode input. Each of the four switch combinations
will create a different value (you should measure these to calibrate for your
resistors; I got values around 800, 500, 350 and 250). The motor will add about
+- 30 to this value (+30 in one direction, -30 in the other). If you want to
use the motor as a passive sensor you have to stop it via the Float() command
or its equivalent; if you use Off() it will just pin the motor voltage to 0 and
the motor will be very hard to turn.

- Robert Munafo                           http://www.mrob.com/
  LEGO: TC+++(8480) SW++ #+ S-- LS++ Hsp M+ A@ LM++ YB64m IC13



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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