Proximity sensor to PC connection problem

  • Thread starter Stefano Campioli
  • Start date
S

Thread Starter

Stefano Campioli

Hi everyone,

Imagine you've got a proximity sensor, say a
capacitive, DC, 3-wired one which should sense
a passing object in the range 10/20mm. It has
voltage drop at max load <3.5V and max rated load
250mA. The object is passing approximately at a
rate of 60 times a minute that is 1Hz, largely
under the sensor performance.

The sensor should than be connected to the
joystick port of a PC so that when it switches,
it simulates the fire button.

What kind of circuitry between the sensor and the
PC joystick port should be added to make it work
mantaining the TTL levels, supposing that the
sensor is supplied with 24VDC?

Is there any better solution than the joystick port to interface PC and proximity sensor
(parallel port not available)?

Thanks a lot.

Stefano
 
You could use a keyboard encoder so that the proximity sensor would generate a keyboard character every time the sensor detected a target.

Have a look at www.audon.co.uk - they do a range of low cost keyboard encoders that may do the job.
 
C

Curt Wuollet

The joystick port digital inputs, if memory serves me, are simply ttl inputs. To interface with 24V logic, one must limit the signal excursion to 0-5 V. If interfacing with open collector logic, PNP outputs are the simplest as you simply tap the pulldown resistor using for example a 2k resistor from output to TTL input
and a 500 ohm resistor from TTL input to ground. This draws approx. 10 ma. which is necessary to ensure that the input is pulled down when the output is off. With NPN outputs, one way is to use a 10K pullup with the output tied directly to the input and a 4-5 V zener diode to ground from that junction. High current is not necessary
here as TTL inputs source very little current in the high state. Treat bipolar outputs that can both sink and source current the same as the PNP case. I can draw these if the explanation doesn't
make sense to you.

HTH

Regards

cww
 
Top