Digital counter from ebay - basic questions

MaxHeadRoom

Joined Jul 18, 2013
28,688
You can find the input impedance by measuring the current through the mechanical switch, I would expect the impedance to be sufficiently high that a resistor with the PhotoDet is not needed.
The unit input shows a PNP and NPN side, with just a 2 wire detector as you have, it should work on either side (PNP or NPN).
If it was an open collector 3 wire separately powered then it would be side dependent.
Max.
 

Thread Starter

knightfork

Joined Sep 11, 2013
27
You can find the input impedance by measuring the current through the mechanical switch, I would expect the impedance to be sufficiently high that a resistor with the PhotoDet is not needed.
You must be referring to this comment:
If I'm reading the spec sheet correctly, the max DC current through the photo transistor is 50 mA, so I somewhat arbitrarily chose a resistor of 150 ohms to yield a current of 10 mA.
I should not have included that; I was initially thinking of wiring the photo transistor such that when the transistor was on (IR detected), the circuit would bypass the counter, so in that case it would be a short circuit, which is why I thought a resistor was needed.

But my plan is to wire as per this schematic, substituting the photo transistor for the micro switch:


So no resistor. And the difference between the microswitch version and the photo resistor version will be that the former is normally open, while the latter is normally closed.

The unit input shows a PNP and NPN side, with just a 2 wire detector as you have, it should work on either side (PNP or NPN).
If it was an open collector 3 wire separately powered then it would be side dependent.
Max.
I sort of understand what you're saying. Per the spec sheet, the current flow (conventional) is from the collector to the emitter, so I think what you're saying is that as long as I connect positive terminal to the collector lead and negative terminal to the emitter lead, it doesn't matter if I'm using the NPN or PNP inputs on the counter, correct?

And if the transistor had a base lead, then it would be side dependent so that the current through the base lead would flow properly, correct?
 

MaxHeadRoom

Joined Jul 18, 2013
28,688
Generally 2 wire SS switches will sink or source as long as polarity is observed.
Placing a ammeter across the terminals will indicate the input impedance but i would expect it to be relatively high.
This may or may not help.
Max.
 

Attachments

Thread Starter

knightfork

Joined Sep 11, 2013
27
Got the parts and tested it out. Strange result - when the phototransistor is exposed to light or the IR LED, the counter goes from 00000 to 88888, and when light/LED is removed, counter goes back to 00000.

How can I get this to increment?
 
Top