Let's Make Robots!

Whisker/Touch sensor

gives an input when it is touched
100_0073.JPG3.36 MB
100_0074.JPG3.81 MB
1310_Epoxy.jpg15.26 KB
100_0075.JPG3.11 MB

first, you need a clotheshanger, a pair of pliers, some epoxy, and a leaf-spring switch

see pic 1 for materials.

chop a fair bit off of the coathanger with the cutter part of the pliers.

Pic 2.

then, you mix up some epoxy

Pic 3

and mix one end of the clotheshanger in it, then stick it to the blade of the leaf-spring

pic 4

and bolt it onto your robot. tadaa! you are dun dun doneeeee!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thanks for posting this. The only question now, is do you have to have a Picaxe chip to make it work properly?

Those are too expensive for me right now!!! 



Going to church doesn't make you a Christian any more than going to the garage makes you a car --Laurence J. Peter  

Any PIC that can detect if a pin is high or low will work.

But, I don't know what that means. I am new to this knid of 'trade' so I don't know many technical tearms. Sorry.

Going to church doesn't make you a Christian any more than going to the garage makes you a car --Laurence J. Peter  

The simplest and chaepest method is to use a guitar string. It is staong, flexible and returns to its original shape.

Here is link:


 The middle photo on the bottom shows how it works.

You can also do the same with a barrel jack. One of the normal power jacks.



any chip/board that can detect whether a signal is 0 or 1 works.

if you are new, start with the Basic Stamp 2. its great for beginners.


is where they can be found

The Basic Stamp 2 is way to expensive!!
This isn't really the place to discuss which microcontrollers are and aren't expensive - if you want to know how to interface a particular micro that you do want to use with this sensor, then you're in the right place for advice.

Since micro switches feature pretty heavily in a lot of robots - I think, as bumpers, limit indicators, toggles and all that, it might be useful to extend the discussion to debouncing too?

So I gather the problem occurs as the switch is "settling" into place - there's micro contacts made and broken over the timescale of a few to ~10ms. Such as:



Here, the time interval is about 0.2ms, the whole event takes 1.3 ms.

(from http://www.ganssle.com/debouncing.pdf)



As I understand it, there are two approaches to debouncing a switch 1. Hardware and 2. Software.

The hardware approach involves including a low-pass filter in paralell with the switch. The relative advantage of hardware debouncing is that you conserve cycles, the disadvantages include an increased component count, and some inflexibility if modifications are needed. In my opinion, the big plus for hardware is just that it's more elegant... well, I reckon anyhow. - whatever that means.


A hardware debounce circuit might be something like this on the right.  Since caps charge and discharge according to exponential function, the dis/charging rates are given by the two equations.

values of R1 and R2 re chosen depending on the triggering voltage of the IC pin. With the switch open, the cap is charging according to (R1+R2)*C, with the switch closed, the cap discharges according to R1*C. Depending on how fast you want the switch to trigger, and depending on how immune the switch is to jitter, R2 can be something like R2=20k, C = 1uF. For a threshold voltage of Vth~2.5V and a V of 5, this gives a time of t~-ln(2.5/5)*20e+3*1e-6~10 ms. It's easy to vary, with different values of R2 and C -  choosing the cap value first might be the easiset place to start (once you've chosen a delay time of a few ms or 10's of ms).


The rise time (switch released) is a funciton of R1+R2, so for a going-high trigger voltage of v/2=2.5 Vsomething like R1= 10K gives a rise time of:


Adding a schmidt trigger at the IC pin with some hysteresis will convert the exponential-shaped pulse to a step function. I'm not sure that's absolutely necessary if it's interfacing with a uC, because the uC essentially does this anyhow - the only difference is the lack of hysteresis in the uC, so you have to be more careful in choosing R1 and R2. If a schmidt trigger is used, I believe it's possible to dispense with R2 completely - I personally don't think there's much to gain in simply replacing one resistor+cap with a larger IC. 

Other debounce systems include the use of two AND gates, but that's a bit fancy and adds a big fat IC to your board that you have to pay for/power up etc..

The software alternative is to poll (or interrupt, if you like candy) the switch, then gosub a short delay routine that checks the switch again after a ~10ms delay. This has the exact effect of the circuit, except that your uC is now busy worrying about a switch, and not much else. I really don't like this option so much.

 Erm, I think that's all the detail needed from me. Feel free to correct me if I have things wrong.

if you follow those simple (not!) tips, youll never be lost in the world of touch sensors. pm me for more help if you need it