HW_SqueezeBall

=SqueezeBall=



Measures how hard you are squeezing. code format="c" char x = GetSqueeze; // between 0 and 255 code The aim of this is: use it in conjunction with some pointing device to make it really accurate, and easy to use.

The Orange lemon shaped thing is a dust blower, designed for clearing dust off your keyboard. I connected it to a gas pressure sensor (effectively a Wheatstone bridge). I stuck a bicycle valve in the other end to pressurise it - this makes it very responsive.

The signal is amplified (IC741 Op Amp) and put through an ADC.

I constructed the above ADC by putting the amplified signal through a 555 timer circuit to generate pulses, and to catch these pulses using an old wheelmouse. ( this is not trivial, as old wheelmice use a rotary decoder, so that the mouse knows which direction the wheel is moving. so I had to simulate a rotary encoder using logic gates.) the software is equally tricky - I needed to separate the incoming mouse signals in Windows, which involves very low level coding. a good exercise but a stupid approach.

then I discovered that ADCs are readily available and bought one!

Now, to get an analogue reading from the SqueezeBall, I used one of the ADC channels of a DLP-TILT. This piece of hardware has many functions; it connects via USB, and once you have installed the correct drivers, exposes a virtual COM port. So you simply sent the correct sequence of bytes to this virtual COM port, and you get back the reading you want. You can use Terminal. IIRC, I send 's', and get back 6 bytes. One of these is the ADC channel reading.