Auto testing bulbs


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697

    Default Auto testing bulbs

    Hi. Im designing a circuit that uses a 40 pin PIC chip to control a bunch of lights. Each light has its own transistor on the board. I would like some method of testing these lights to be built into the circuit. The bulbs dont have to be working during testing.

    Ive come up with a few ways that might work

    I thought about having a circuit to measure the current that each board is using (the simple resistor style one Ref: Measuring Volts and Amps digitally. If i measure the amps its using while all outputs are off then turn each output on individually and measure again. If there is no significant increase in current then the bulb has blown. This one has the added bonus that the bulb being tested can be turned on. The problem i see might be that the bulbs dont use enough current to distinguish between the bulb being on and the chip using a little more power for something etc.

    Another idea was to have a relay that switches the common wire of the lights over to an input pin on the chip (with a resistor because the bulbs are about 7-12V). Then turn each bulb on individually and check if the input pin goes low (transistors are NPN). I would need a resistor to make the pin high when no outputs are on. The problem i see here is that the bulbs will effectively become resistors so the biasing resistor needs to be big enough to pull the pin high but small enough to allow it to go low when an output is turned on

    The power to the board will be DC 12V (regulated for the chip). There will be capacitors elsewhere to smooth out the DC ripple and some extra on the board itself.

    What i want to know is what do you think? Which method would be overall best taking into account number of pins used, reliability, cost etc? Does anyone have a better suggestion?

  2. #2
    Join Date
    Dec 2007
    Location
    Sweden
    Posts
    73


    Did you find this post helpful? Yes | No

    Default

    Without knowing more about the actual circuit it’s hard to give an optimal solution.
    What I use to do in similar cases is shunting the “switch” transistor or relay with a high value resistor. Doing this I close the circuit though the bulb causing a very small current to flow. By measuring the voltage drop across the resistor I get a voltage drop if the filament is intact otherwise no voltage.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    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).

  4. #4
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Thankfully i dont have any passengers to freak out. This is one of the circuits for my pinball machine (i dont think i mentioned that yet). I do plan to add a visual test where each bulb can be set to flash by itself and a picture on the screen will show where the bulb should be. I only plan to use that for testing new bulbs when i put them in (or for short circuits). There will be hundreds of bulbs so the automatic testing would really help. If a bulb blows then nobody is at harm so its safe enough to let the circuit decide where the problem is. The bulbs i have dont short out when they blow. They simply break the circuit

    PICante, your idea sounds like one of those that i suggested. The basic idea is put an ammeter in the circuit to test if it draws more current when a bulb turns on. In theory it sounds good because the bulbs can be tested while they are in operation. The circuit knows how many bulbs are on and how much current to expect. They would still need turning on individually to identify the blown bulb though. I plan to put the check on startup and run it again every 24 hours and have an option in the operators menu.

    Melanie, Im not sure i fully understand your method. I do have 1 pin for each bulb but only to turn it on and off (rather than multiplexing). Are you saying to use those same pins or do i need extra pins? It does sound like it needs a lot of extra components too. Each PCB is designed to control 22 bulbs.

    Since i posted this thread i made up a quick design using the relay method because im more familiar with relays than the ammeter way and i didnt know about your way Melanie. Ive uploaded screenshots of the board. I dont mind making it bigger but there can be upto 7 of these plus all the other circuits too. 2 of them are zoomed in so its easier to see and 1 is the actual size of the board. Sorry but its only a PCB layout (not a schematic).

    In that circuit the relay gets turned on which switches it into test mode. A resistor holds one of the PIC's pins high. When a transistor is turned on it grounds the pin if the bulb works. If it remains high then the bulb is blown. Ofcourse the bulb will act as a resistor so i will probably have to change the value of the biasing resistor. There are also a few mistakes on it that i know about. It was just a quick version to see how things would fit on a PCB.

    When i get some small value resistors im going to test out the ammeter idea because i need that for another project anyway. I would like to test out your way too Melanie but im not quite sure how that would be wired.

    It doesnt matter if the lights are on or off during testing. Even if it has the capability i probably wouldnt program it to test during normal operation anyway
    Attached Files Attached Files

  5. #5
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    I hate verbal descriptions of circuits... it always sounds more complicated than it actually is...

    Consider the attached schematic. The Lamp is driven by the PIC. Pin goes High, Lamp goes ON. A single ULN2004 can drive 7 Lamps. There are driver chips that can can do eight. Doesn't have to be a chip, you can use Transistors, but you need Base Resistors and all kinds of junk, and since the ULN can drive an inductive load (such as a Relay) you don't need Diode back-emf surpression as it's built-in.

    Just two components needed. A Resistor and a Zener. Those two parts will prevent the PIC pin from having 12v applied back to it. This example uses two PIC pins, one to drive the Lamp, the other receives a HIGH if the Lamp is Good, and a LOW if the Lamp is Blown.

    You can combine both on one PIC pin, but the circuitry would more components. As you have it now you just have one Resistor and one Zener per Lamp.

    Actually, as an afterthought, you'll need a second Resistor across the Zener (say 47K) to ensure the pin is Pulled-DOWN when the Lamp blows, otherwise it's technically floating.
    Attached Images Attached Images  

  6. #6
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,648


    Did you find this post helpful? Yes | No

    Talking Kiss ...

    Hi

    just place an air winded coil around a reed "bulb" ... 10-15 turns * amp ( 20 - 30 turns for 1/2 amp ... 5 - 8 turns for 2 amps.)

    in SERIES with your lamp.

    reed contacts close when current flows.

    Maaaaaagic, you told Maaaaaagic ???

    circuits insulation as a bonus ... what else needed ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

Similar Threads

  1. auto recloser ELCB
    By badbaik in forum mel PIC BASIC
    Replies: 5
    Last Post: - 5th February 2009, 13:54
  2. Auto SCART switching
    By The Master in forum Off Topic
    Replies: 6
    Last Post: - 5th August 2008, 00:12
  3. Condition testing
    By jtburnham in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th August 2006, 10:02
  4. Auto Baud Rate Detection
    By mytekcontrols in forum Serial
    Replies: 10
    Last Post: - 31st October 2005, 02:17
  5. Modem Auto Answer-Hanging for 1 min...
    By Ioannis in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 22nd August 2005, 09:38

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts