Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
how can i output a cmos signal depending on the state of an LED, like if it's on, it goes high, and off it goes low? could i tap the positive side of the LED and somehow plug that into a comparator? thanks for any pointers.
One side of the led is directly attached to the power supply. As an example, lets say the positive side of the led is directly attached to +.
This means the other side of the led is switched to GND (led on) or not switched at all (led off) or left "floating", wich is not an acceptable state for a cmos
The circuit below solves this. When the 'signal' is switched to GND the transistor will do nothing and its output (C) is pulled high trough R1
When 'signal' is left floating, the transistor input will be pulled high by R3 and the transistor will switch GND to the output
Now you have eighter V+ at the output when the led is on, or GND when it is off;
When the signal may be inverted (V+ when off, GND when on) remove the transistor and R1
If your logic is powered from the same source than your LED and the Vf LED voltage is < than 30% of V+ you can get your output direct from the LED, without the transistor & associated resistors shown in the above circuit.
Just sense the voltage in between the LED and its dropping resistor. When the LED is off this is at V+ When the LED is on this is V+ minus Vf. You can feed that straight into a C-mos input if the above condidions are met.
Vf depends on the LED type, I've seen it as low as 1.8V for low current LED's to 4V for high output LED's.