[PD] Sensors

Johannes Taelman Johannes.Taelman at UGent.be
Sat Nov 1 23:59:45 CET 2003


On Fri, 31 Oct 2003, Chris McCormick wrote:

> Hi,
>
> An idea I had recently (though I'm sure it's not original) is to hook up
> 8 555-timer circuits with variable resistors to the parallel port and
> poll it periodically to figure out the frequency of the 8 squarewaves on
> individual parallel port pins.
> These frequencies could be used as control values in a Pd patch. The
> advantages are that 555 timer circuits with a variable resistor are
> very cheap, and simple. Your range would be from where frequency updates
> are too far between (let's say 100Hz) to the upper-range of the parallel
> port polling frequency. So if you can poll it at 8000Hz you would
> probably want to stop at nyquist to get meaningful updates let's say at
> 4000Hz (not quite certain that nyquist is relevant here though).

How about timing the pulse width (from the capacitor discharges) directly,
instead of counting the frequency? The legacy joystick port works this way
(also using polling).

Still, if you want to build your own sensor-to-pc interface, I think using
a microchip PIC microcontroller (on serial port, on a MIDI port, or the
USB-series) for analog inputs is a more elegant solution. It requires the
use of a programmer once though, but those are not expensive either. It is
less components, less handwork, less CPU cycles wasted on polling, and
more resolution. Have a look at www.ucapps.de for a well-documented and
free design.

I started messing with those chips a couple of months ago, and I'm pleased
with them. I've programmed them for analog-to-midi, as a 12-channel
infrared-light-barrier-controller and as multichannel pulse generator.

regards,
 j#|@




More information about the Pd-list mailing list