Construction Tips
|
||||||||||||
|
![]() |
| |
Plus a zip tie! |
Roboticists often deal with feedback and sensing in terms incremental vs. absolute information. An example of an incremental (or relative) feedback device is the clicker on the Wheel of Fortune (the actual wheel they spin). If we know a starting point, we will always know where the wheel is taking into account the number of clicks and direction. However, this method is dependent on constantly monitoring the number of clicks. If we are distracted (subtle analogy: the microprocessor is not fast enough, or over taxed), and miss some counts we will not know the exact position of the wheel. If we are distracted repeatedly, the error can accumulate. Note that missing counts is not the only potential source of error.
Absolute information solves this problem. An example of absolute feedback device is a compass. No matter which way we turn, whenever we look at it, it is pointing to magnetic north.
Each of method of sensing has advantages and disadvantages.
The good news is that potentiometers provide a cheap and reliable way of getting angle information. The bad news is that there is a non-linear relationship between the angle and the value read at an analog input port of the Handy Board. Here's the scoop:
If you look at the circuit diagram for the Handy Board analog input ports, you'll see that there are 47K resistors attaching each of the analog input ports to +5 volts. These are called "pull-up" resistors, and are used to "pull" the ports up to +5 so they don't "float" between 0 and 5V, which may cause an computational error.
By adding the potentiometer, we are creating the voltage divider circuit
shown below. The voltage out of a circuit divider is given by:
Vout = | Vin * R2 | |
R1 + R2 |
![]() Potentiometer / Pull-up Resistor Voltage Divider |
Where:
So plugging into the equation, we get:
Vout = | 5 * R2 | |
47,000 + R2 |
...and graphing Vout in terms of R2 looks like this.
More good news is that while the relationship is non-linear, it is close
to linear over the working range of the potentiometer, R2 (working range
is 0K to 25K). So, to summarize, you can model this relationship as linear
in your program.
Gear backlash is the "slop" in a joint that results from the space between the gears, and is a common problem to many mechanical systems. Think about how you can write your program so that is is immune to the (relatively large) backlash present in Lego gears. Hint: ask a machinist how backlash is dealt with when using the hand controls on an X-Y table of a milling machine.