Robinson's Robots

Hider - Touch


[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 Detection

The 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.

Hider's optical edge detector. A single assymetrical bicore (Nv1 & Nv2) generates pulses for both IR transmitters. The output signal is about 0.5% of the total cycle time so average power consumption is quite small. The bicore output is used to switch on a pair of transistors, one for each side of the robot. The transistor collectors are connected to the IR LED's through 100 ohm resistors, giving a signal current of about 40 mA to each LED. This is strong enough to produce a response in the receiver, even with plenty of background IR. Because of the short output time, the average current draw is 0.2 mA per transmitter.

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 Processor

The 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.

Hider's touch sensor processor. On the left of the diagram are two pairs of Nu neurons, one pair for the left side (Nu9 & Nu10) and the other pair for the right side (Nu7 & Nu8). I used separate neurons for obstacle and edge detection so I could have Hider turn different amounts depending on what it encountered. This has not been a useful feature and I wwill eliminate it in future designs..

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 Sensors

Hider'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.

Image of Hider's front touch sensor board.

Top view of Hider's sensors and touch circuit board.

The upper image on the left shows Hider's front circuit board which contains all the sensor elements and the Op-Amp used in the edge detectors. The yellow IR LED's are clearly visible on the outer edges of the two daughter boards (the IR Photodiodes are directly behind them on the other side of the boards.) The large multi-directional touch switches are also easy to pick out. On either side of the quad op-amp is a set of 3 sockets for the IR receiver filter and amplifier resistors (R1, R2, and R3). This arrangement makes them easy to change. The board is directly connected to the main touch board through a 7-conductor ribbon cable.

The lower image is a top view of Hider with its upper circuit boards removed. To the right is the driver board (back of robot) and to the left is the main touch circuit board. The front circuit board with the touch sensor wires installed is extended out to the very left. The arrangement of the IR LED's and PD's can be seen very clearly, with the darker PD's directly beind the yellow LED's. On the main touch circuit board, sockets are again used for resistors -- this time for the four Nu delay resistors.

Summary

I 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.

[<= Prev] [Next =>]


[Home] [Machines]
[Hider] [Design] [Motor] [Touch] [Spine] [Vision] [Hearing] [Next time ...] [Images] [Update]

Copyright © 2001 - 2003 Bruce N. Robinson. Last updated 2003-11-23.