In Industry (and also in other areas such as Aerospace), a visual Lamp Test is built into the equipment. Either at Power-On (as in some Aircraft), all Lamps are turned ON for a few seconds and then extinguish, or there is a seperate Button to press that will turn all the Lamps ON. In that way, the operator guages which Lamps are not functioning. Typically for Landing, the pilot needs three Green Lights which indicate that each of his wheels is down and locked. If he doesn't get three Greens, then there is a Button he can press as a Lamp-Test to determine if it's a bulb that has blown, or if it's time to freak-out the passengers.
An Automatic method...
If you have the PIC pins available (one for each Lamp), simply connect the -ve end of the Lamp (the Collector end of your NPN Transistor - assuming the Emitter is connected to 0v and you pull-down for ON-Lamp) via a Resistor (eg 10k) and protection Zener to your PIC pin. A value of say 10K will not be sufficient to turn the Lamp ON, and the Zener will clamp the input to the PIC at 5v. When the LAMP is OFF, a tiny nominal current will flow through the LAMP and you should get a HIGH at your PIC pin.
Naturally you can't detect if the Lamp is blown when it is driven ON, because the driver Transistor will pull the voltage LOW. However, when ON, if out of every Second you turn the Lamp OFF for say 1mS before turning it back ON again, visually you will not see any difference, but you can do a Lamp Test (check if PIC pin High) during that 1mS OFF period.
This will NOT detect Lamps that go SHORT-CIRCUIT when blown (in which case it's back to freaking-out the passengers).
Bookmarks