i am just wondering how could i interface a particular device (let's say a flourescent lamp) to a uC such that the uC will know whether the lamp is on or not? (sort of a feedback)
i am just wondering how could i interface a particular device (let's say a flourescent lamp) to a uC such that the uC will know whether the lamp is on or not? (sort of a feedback)
For a flourescent lamp I would suggest using an LDR or phototransistor to detect the light given off - bearing in mind that flourescent tubes sometimes don't strike correctly, and only glow faintly - you could adjust the design so it needs a certain amount of light to work.
well, i have thought of using ldr's but i am not really in favor of it, because it would be more reliable if i would be able to monitor the current flowing through the circuit.
the problem is that i don't know how am i going to monitor that current...
well, i have thought of using ldr's but i am not really in favor of it, because it would be more reliable if i would be able to monitor the current flowing through the circuit.
the problem is that i don't know how am i going to monitor that current...
Like you would monitor any current!, by measuring the voltage drop across a resistor in series with the circuit. As it's fed from AC, you would need to feed the voltage across the resistor through a bridge rectifer and add a small smoothing capacitor - this would give you a voltage dependent on the current flow through the resistor. As this would be live mains, it would probably be a good idea to feed this to the LED in an opto-coupler (through the usual current limiting resistor), giving an isolated signal for your processor. By careful choice of the monitoring resistor you could only get a signal when the current was over a ceratin amount.
The advantage of the LDR idea is that it actually measures light output from the flourescent lamp, the current method only measures current, and could still be triggered if the tube doesn't strike correctly (like when the starter is jammed).
You could use a current transformer as well. The advantage would be that you woldnt have to mess with any high voltage wires - just wrap one of the conductors around the transformer loop.