I'm gonna show an easy (and probably not optimal) circuit to take the blink of a led and transform it into an electric signal that will become the logic state to be counted by a pulse counter device.
The counter device is a "SENECA Z-D-IN". This digital input device is able to count electric pulses and it is queryable with the modbus protocol.
Here is the circuit:
These are the components I used and the links to the data sheets:
- diodo zener 8.2 V http://docs-europe.electrocomponents.com/webdocs/0de2/0900766b80de2c96.pdf
- phototransistor BPX 43 http://docs-europe.electrocomponents.com/webdocs/0d00/0900766b80d00198.pdf
- transistor BC107B http://docs-europe.electrocomponents.com/webdocs/0e77/0900766b80e779e3.pdf
- opamp OPA251 http://docs-europe.electrocomponents.com/webdocs/0c8c/0900766b80c8ccc9.pdf
The 16 volt power can be supplied by the Seneca digital input counter.
I have used a phototransistor that must be attached to the pulsing led, maybe with some adesive tape so that it will remain in the dark when the led is off.
The phototransistor must be sensible to visible light and cannot be an infrared one. The Bpx is sensible to all the visible spectrum.
The 8.2Volt Zener diode is useful to maintain the voltage between the collector and emitter of the phototransistor less than 3V. This is because many phototransistors have a small maximum Vce and with this circuit the phototransistor will switch on a second transistor that can have higher maximum ratings.
The opamp is used as a subtractor of the voltages across tre resistor marked with "R5". So the output will be 0 V when the led is off and almost 16V when the led is on.
The resistors involved with the opamp are 1MOhm because I don't want current circulating across the "R6" and "R9" resistors.
The zener diode used is very small and must be soldered even if you use a breadboard.
This circuit has been tested with the Seneca device.
1 comment:
hello,
this project it´s prefect for what I need, but.... I need a little more, it´s possible connect this to arduino module, to create a log from the pulses ?
I need connect the pc to arduino or other, to download the total pulses in txt file !!
Post a Comment