A simple touch switch can be constructed from a momentary SPST (single-pole single-throw) switch. A wire extension can be added to the switch lever to act as an “antenna”, “feeler”, “whisker”, etc.
The switch can be wired in such a way that when the state of the switch changes, either a “high” (a digital logic 1) is sent to the micro controller or a “low” (digital logic 0) is sent to the micro controller – depending on the application. The wiring diagram for active high, and active low are shown in figures 1 and 2, respectively.
Another even simpler and cheaper method of touch sensor construction is with 2 pieces of wire. The first, the base, is L-shaped with a small loop at one end. The second wire, the whisker is passed through the loop on the end of the base wire. Under normal or inactive conditions, the whisker wire does not make contact with the loop – thus creating an open circuit. Only when the whisker wire bumps into an object, is the circuit complete. This circuit could be made to be either active-high or active-low using the schematics shown in figures 1 and 2, by simply replacing the switch contacts with the base and whisker wires.
Other types of touch sensors include simple momentary push-button switches.
- Binary – interfaces easily with all microcontrollers
- Low cost
- Simple to construct and to connect
- Simple to operate – either the switch is active, or it is not active
- Tactile – object must be “touched” to know it exists
- Low range
- Less accurate for acquiring range data – you only know that there is an object there within the motion range of the switch – not exactly how far it is, or exactly where the sensed object’s XY position is relative to the robots position