Hi! I’m designing a circuit that is meant to switch on car headlights, or any 12v peripherals. The circuit is a 5v signal to a N-Channel MOSFET that turns the lights on, so far so good.
I would like to implement a bulb faultchecker that detects when a bulb has gone wrong, but I’m stuck. Any help or nods in the right direction is appreciated.
The circuit as of yet consist of a Arduino UNO and a 12v battery with shared ground, MOSFETS connected to the bulb with the gate going to the Arduino and of course a pulldown resistor (10k Ohm)
I have now tried a bit with OptoAmps but still dont get the result I need, Maybe I should just resort to the easy way and ignore the waultcheck altogether or go with a transformer solution. Though it isn’t what I wanted
With your last reply, you haven’t given us much info. What result did you get? What result do you want? You stated OptoAmp, but do you mean Opamp? A schematic of how it’s wired could tell us if it’s designed correctly or if there is something we could advise on.
So basically I want to have a 5 volt signal switch from HIGH to LOW if there is a change in the bulb. In my case the signal is going to an arduino, but it doesn’t matter in the schematic. The problem I’m getting is that the OpAmp in this case (I have also tried different BJTs and Mosfets) doesn’t switch off completely or doesn’t open completely based on if I put them before or after the bulb.
For example, I put an PNP before the bulb, hoping that it would go low when current flows through the bulb to ground. But I couldn’t get it to do that. I have done countless mockups, but since my knowledge is very limited so far, I seem to just run around in circles and repeat the same error over and over again.
Place an optocoupler (properly current limited) in parallel with the bulb. In normal operation, the bulb will take 99.9% of the current so the opto will be off. If the bulb burns out, now the current will flow through the opto and you’ll get a signal you can use at the output.
lyndon:
Place an optocoupler (properly current limited) in parallel with the bulb. In normal operation, the bulb will take 99.9% of the current so the opto will be off. If the bulb burns out, now the current will flow through the opto and you’ll get a signal you can use at the output.
Cost should be under $0.50.
Hi, I don’t now if the circuit simulator software I’m using is faulty or if I am a complete idiot. But i cant get it to work properly. Which method of current limiting should I use. Right now it’s just resistors. Maybe I should just buy the parts and try irl.
Say if my bulbs are rated 12v/55a like regular automotive headlight bulbs, what is then the correct way of limiting the current.
Sorry for all the dumb questions, but as I said. I’m still new and trying to learn.
An optocoupler is a led illuminating a phototransistor inside a closed compartment. So current-limiting the led is done just like other leds, except it probably has a different forward voltage. Should be found in the datasheet. Your supply voltage to the optocoupler led is 12 volt. Subtract it’s forward voltage. Then divide the remainder by the maximum current the led allows to get the least allowable resistance. Make sure you get one higher.
I’ve tried the circuit IRL now and it just don’t work. A car battery puts out way too much current to care about the resisted led in parallel with the bulb, however I switch the wires around, It just makes both the bulb and the led to light up. I never tried with the OptoCoupler since it basically is the same thing. A car has multiple headlightbulbs and LEDs running in parallel without them interfering with eachother, so this solution is not possible.
Right now it seems like a OpAmp is the only way to get a correct reading for the fault checker, I’m gonna try set it up in the simulator as a comparator and compare the current draw from the bulb with source
Yeah. I was thinking of a different situation where there was an upstream resistance that would cause a voltage drop across the bulb and I forgot they are placed directly across the power supply rails.
There are a number of ways you can address this:
directly detecting if the headlight is actually outputting light
measuring voltage drop across the light. This will be tricky since it will fluctuate a bit depending on battery condition
measuring voltage drop across a load in series with the light with a comparator or a transistor circuit
putting a relay with a high-current coil in series with the light, IIRC this is how most older cars do it.
How much current does the light take? It may be possible to do this with a simple transistor circuit.