Robinson's Robots
[Home]
[Machines]
[Hider] [Design] [Motor] [Touch] [Spine] [Vision] [Hearing] [Next time ...] [Images] [Update] While the spinal cord is essential for higher level motor control, I built and installed the touch sensor board first. This allowed me to test the touch circuits on the robot body, using a tethered control panel to operate the robot. Even though the touch circuits could not directly affect the robot's behaviour at this point, I could run the touch outputs through the tether to indicator lights on the control panel. I wanted Hider to roam freely around the house without a lot of attention so it had to be able to detect obstacles and stairwells. Touch sensors provide a simple and effective means of detecting obstacles and they can also be used on smooth, hard surfaced floors to sense dangerous edges. In Hider's carpeted environment I needed edge detectors that didn't touch the floor so I used an InfraRed (IR) LED to shine a beam of light down at the floor. The reflected IR light is sensed using a suitable PhotoDiode. If no reflected light can be detected, then the robot is most likely at the edge of some kind of drop-off. It seemed that the best strategy for manuevering around edges and barriers (once they were detected) was to stop and then reverse the wheel furthest from the obstacle. This would simultaneously move the robot away from the obstacle in a safe manner and also point it in a new direction. The control principle was simple: trigger an Nu neuron with the sensor and use the neuron output to lock one wheel and reverse the other. When the neuron timed out, the robot would resume its travels. I used separate Nu neurons for the edge detectors and touch feelers because I wanted the robot to back and turn through different sized arcs, depending on what it encountered. In practice this didn't turn out to be useful.
Optical Edge DetectionThe biggest problem with using infrared for edge detection is that there is a lot of infrared light bouncing around in the environment. Since it's invisible we simply aren't aware of it. It is very easy for the reflected signal from an IR LED to get lost against the background. Commercial transmitter/receiver devices get around the problem by sending high frequence pulses of IR so I decided to use the same principle with Hider's edge detectors.
The receiver processes the reflected signals in five stages after it is picked up by the
IR photodiode. First a 0.1 uF capacitor filters out the background IR, allowing only the
pulse to pass through. A 120k resistor (R1) restores the capacitor output to GND
potential when there are variations in background IR. The filtered signal is very small
so the second stage (Amp) is an op-amp configured as an amplifier. The third stage (Cmp)
is a comparator which uses another op-amp to compare the amplified signal to an
adjustable threshold. The fourth stage is a Schmitt inverter (Inv3 & Inv4) which cleans
up the op-amp output and gives a high-going pulse each time an LED flash is detected.
Finally, the last stage is a conventional Nu neuron (Nu5 & Nu6). Each pulse received will
reset the Nu, maintaining a low output. If two consecutive pulses are missed the output
goes high indicating a loss of signal -- usually caused by a drop-off.
Earlier experiments showed the receiver is very sensitive to ambient light levels. It detects signals much more easily in darker conditions and can pick up a signal from a stair tread 180 mm (7") below. In other words, Hider might not recognize a stairwell as a hazard in dim light. I compensate for this by using a simple LDR (photocell) in parallel with a 1.0 uF capacitor and a trimpot to sense the ambient light level in front of the robot. This changes the trigger treshold of the two comparitors as background light levels change. It's crude, but it works. The amplifier is a critical part of the receiver. If the gain (amplification) is too small, a signal might not be detected. If it is too high, a very distant signal might be received. After some experimenting I found a gain of 30 is about right for Hider's components. This is set by resistors (R2) and (R3), and is calculated by the formula (R2 + R3)/R3.
The Sensor ProcessorThe processor circuit is very simple, but it must deal with the issue of both left and right sensors being triggered at once. The choices are to simply have the robot back up, or else to only respond to the first signal. Backing up is really not a useful response because the robot will then advance again and end up encountering the same obstacle. This design provides a "first signal" response.
The diagram shows a simple switch on each side to detect obstacles. There is really no limit to the number of switches that can be used in parallel. Hider uses one omni-directional switch on each side connected to a 1 mm diameter wire. The wire covers the whole front of the robot, but only trips the switch closest to the point of contact. The two inverters on the right of the diagram (Inv11 & Inv12) form a mutually exclusive output filter. When a neuron is tripped on one side of the robot, the output of the inverter for that side blocks any signal trying to reach the inverter on the other side. This means whichever side of the robot detects an obstacle first is the side that triggers the avoidance response. The 47 k resistors are pullup resistors and the 10k resistors prevent a direct short through two diodes if sensors are tripped on both sides of the robot at the same time.
I have added a revised version of the Sensor Processor to the
update page. It changes Hider's response to an
obstacle, reducing the chances of Hider getting stuck or slipping over an edge.
Circuit Boards and SensorsHider's complete touch system uses three IC's and some large touch sensors. Rather than try to fit all three IC's on one small circuit board, I placed the LM324 quad Op-Amp on the front circuit board which also holds the touch switches and the IR edge detection transmitters and receivers.
SummaryI used optical edge detection and touch sensors to detect physical obstacles. An output signal from the main circuit sends a signal to the spinal cord which causes one wheel to stop and the other wheel to reverse. Timing is controlled within the touch circuit itself, rather than in the spinal cord.After watching Hider negotiate its environment for a few weeks, I've concluded that a better strategy is to reverse away from the hazard for a second or so, and then back and turn. Because I put the the behaviour and timing in the touch circuit rather than the spinal cord, it will not be difficult to make this change. At the very worst, I'll have to replace the main touch circuit board with a modified design. An untested version of the modified circuit is shown on the update page.
[Home]
[Machines]
[Hider] [Design] [Motor] [Touch] [Spine] [Vision] [Hearing] [Next time ...] [Images] [Update]
|