Voltage controlled cutoff. . .I think.

Thread Starter

popto

Joined May 1, 2009
44
Hi,

I am making an led circuit for a friend. The circuit has just over 200 leds in a combination of blue, green, white, and red. It has several different modes so that he can activate whichever section he chooses and pick if the lights are just on or if they flash with the rhythm of music. This circuit will be built into his car. Now before anybody reminds me that colored lights, especially flashing ones, in a moving car is illegal, please let me finish. I do not trust this friend to not use the lights when he is driving, but I want this system to be able to work when he is stopped and the car is off. This system MUST NOT be able to work when he is moving or the car is even on.

I had originally thought of putting a switch under the emergency brake so that he had to pull the emergency brake for the system to be activated, but he is the kind of person that would pull the emergency brake enough to activate the system then drive off even if it ruins the car. Therefore that won't work.

I have measured the voltage across his battery and it is around 12.5v when the car is off and around 14v when it is on. I have thought of using that voltage difference to make a circuit that kills the power when the voltage exceeds 13 volts. Herein lies the problem: I am not very experienced with designing circuits, and I have never before dealt with a voltage controlled circuit. Therefore designing a voltage controlled circuit in a short amount of time presents a great problem for me.

The only idea that I have had is to somehow use a zener diode (I don't know much about them either) with a relay.

I need your help to find a circuit or idea (the simpler the better) that will make this led system inoperative while the car is running because I WILL NOT build something that is illegal.

Thank you very much for all advice.

P.S. This friend has no clue about electronics, and I will not explain anything to him so that there is no way he can bypass it.
 

windoze killa

Joined Feb 23, 2006
605
This should be a pretty easy task. Just use a 12V relay to remove power when the ignition is turned on. Supply power to your circuit through the normally closed contacts of the relay and power the relay from the fuse box on a fuse that is ONLY powered when the ignition switch is in the fully on position. Also make sure you use a seperate inline fuse so you don't overload any of the exisiting circuits. You don't want it popping fuses as you are driving
 

Thread Starter

popto

Joined May 1, 2009
44
Wow, I hadn't even thought of using the fuse box! One problem though, (unless I missed something) all it would take is for this person to pull out the wires to the fuse box. Then the relay would never trip so never disconnecting the circuit. Is there a fuse that has power only when the car is off? That way I could power my whole circuit with it.

I also didn't really get the part about the inline fuse so that I wouldn't overload any of the existing circuits.

Thanks for the quick reply.
 

windoze killa

Joined Feb 23, 2006
605
Wow, I hadn't even thought of using the fuse box! One problem though, (unless I missed something) all it would take is for this person to pull out the wires to the fuse box. Then the relay would never trip so never disconnecting the circuit.
Good point. Yes he could. But if you were to route the wires in such a way that he wouldn't know which one to pull. He could also enlist the help of someone else to bypass it but there has to be a limit to the paranoia we have. You said he knows nothing about electronics so you can only do your best to protect the installation. If he wants them flashing while he is driving then he will get it done. With regards to breaching the rules of this forum I feel you have done everything you can to stay within them. If people want to modify their cars there is nothing anyone can do to stop them.

Is there a fuse that has power only when the car is off? That way I could power my whole circuit with it.
No idea. You would have to check all the fuses with a meter to see if there are any that are only powered when the ignition is off.

I also didn't really get the part about the inline fuse so that I wouldn't overload any of the existing circuits.

Thanks for the quick reply.
Instead of taking the power from the fused side of the fuse which would blow if your circuit had a problem you would take it from the live side of the fuse and use an inline fuse holder going to your circuit. These are available from any auto store or electronics store.
 

Thread Starter

popto

Joined May 1, 2009
44
I already have a fuse in this circuit, 4 amps first thing on the positive side of the circuit. Will that work or will I have to use another one or a different value?

I could make it so that four wires go to the fuse box, two to get power for the circuit, two to disactivate it. But even there even thought he doesn't have any electronics experience it is just a little trial and error to find which ones to pull. There us no underestimating this guy, he isn't exactly normal but he is very intelligent and has a huge determination to achieve whatever he wants no matter how long it takes, however legal or illegal his goal is. But as far as I know if I can build the cutoff inside the circuitry then there is know way he could figure out what is what and how to change it.

If there is no other option I will have to do what you suggested but for now does anyone have any ideas for a way to cut off the power when the car is on, and be an actual circuit or a non-bypass-able/foolproof method? Is there an IC or something that can be set to trigger at a certain voltage? (That way I can just use the voltage difference and not have any extra wires)

Thanks for all suggestions!

Just joking about the following:

but there has to be a limit to the paranoia we have.
I'm not paranoid its just that everyone is out to get me! ;)
 

thatoneguy

Joined Feb 19, 2009
6,359
You could try tweaking a 12V Zener inline with a BJT which in turn drives a MOSFET, both BJT and MOSFET on the +V line, may need a bit of tweaking for resistors sizes on base, though.
 

Thread Starter

popto

Joined May 1, 2009
44
That sounds good. Exactly which transistors would I use since there are a lots of different types? That brings up another question: when I am trying to decide a transistor to use is there a website, chart, formula, or something to figure out the specific transistor to use or do you guys just have them all memorized?

My circuit uses about 3 amps, how much heat will the BJT and MOSFET produce running at that power?

I have never bought a Zener diode, so do they have codes or do I just ask for the voltage that I want? I looked at the section on Zener diodes in the e-book but it didn't have any specific codes, just voltages.

Since I have never built anything like this could you post a more specific description or a basic schematic/diagram to follow?

Thanks
 

wayneh

Joined Sep 9, 2010
17,498
That sounds good. Exactly which transistors would I use since there are a lots of different types? That brings up another question: when I am trying to decide a transistor to use is there a website, chart, formula, or something to figure out the specific transistor to use or do you guys just have them all memorized?
Hah! That's a hoot. There are millions of 'em! Or at least it seems like it. But you're right in a way; I think a lot of hobbyists learn a few from experience and in that sense have them memorized. Once you have a little experience, it's easier to read and understand the charts. To start, there are really maybe only 3 things that matter: Type (N vs P - always choose N unless you know you need P), current handling ability, and sometimes max voltage. At low voltages and currents, all transistors behave similarly and many can substitute. It's only when voltage, current, frequency, etc. get "extreme" that choices really matter. I know many readers of this will think of exceptions, but c'mon, it's mostly sort of true.
My circuit uses about 3 amps, how much heat will the BJT and MOSFET produce running at that power?
If you decide to regulate your project with a MOSFET instead of a relay, it'll be fine without a heat sink at that current, if you wire it properly. I'm using a IRF540 for a 4A circuit and it's fine. That would be one of many MOSFETs that would work for you. Note that it's rated for MUCH higher current, and that's a good thing. You want at least 2X by design.
I have never bought a Zener diode, so do they have codes or do I just ask for the voltage that I want? I looked at the section on Zener diodes in the e-book but it didn't have any specific codes, just voltages.
Right, the zener will give you a reference voltage when you pass about 40mA through it. (You'll need to protect against over-current.) It'll pass more or less current thru itself to keep that voltage steady. That's why they just specify the threshold.
BUT, I agree with the previous post that you should trigger off an on/off voltage that indicates "running". This is far easier than trying to compare the system voltage to the reference. That's not hard either, but on/off is way easier.
 
Last edited:

Thread Starter

popto

Joined May 1, 2009
44
I would like to try the circuit using a Zener diode, a BJT, and an IRF540/relay. What BJT do I want to use? I need a number or something to start looking for because if I go to the local electronic store and ask for a Bipolar Junction Transistor that will that will do what I am trying to do, he will tell me that I need a code or number.

I also don't understand what you meant when you said:
You want at least 2X by design.

Thank you all for your help!
 

wayneh

Joined Sep 9, 2010
17,498
I meant you should choose transistors that are rated to at least 2X whatever current you intend to pass through them. Go 4 or 5X for good measure.

There's very little penalty for over-specifying in this regard. Only in the most sensitive cases would you have to back off. The penalty for under-specifying a part can be severe.

As for your circuit, personally I'd go with a comparator to control the MOSFET. Maybe someone can offer a simple, single-transistor comparator circuit but I think a comparator is a more direct solution. An LM339, available everywhere, is an IC with 4 comparators. You'd need one of them, so you'd just ground the other pins. One pin of the comparator would be regulated by your zener (and probably another diode or two, to get the comparator up to ~13v). The other pin would watch the system voltage and the comparator would throw its output on or off based on how the system voltage compares to the reference. That output (with a pull-up resistor) would control the MOSFET, which would control your circuit's path to ground, just like a relay.

This scheme requires comparing voltages at the rail (supply) when the system is off. I think that's OK but you'd need to confirm that the comparator maintains the right state.
 
I think you just lost him. You haven't actually specified what your comparator is comparing. Although I think it may be a bit above him at this stage so a schematic might be the way to go.

He is another description of what Wayne was saying. I think.

The zener voltage should be about 13V as stated. This I/P to the comparator will be what ever the battery voltage is (12V when the car is off) and will rise towards 13.8V - 14.2V when the car is running. If the zener I/P is set to 13V it won't matter what the battery voltage is doing.

Now. When the car is off the zener I/P will be 12V. You would also have the un-zenered battery voltage fed to the other I/P of the comparator. In this scenario the comparator will have the same voltage to both I/Ps hence no O/P.

Now we turn the car on. (unfortunately this bit will only work with the motor running) The alternator will start charging the battery at 13.8V -14.2V approx. The zener I/P will will increase to 13V and stay there. The voltage on the other I/P will rise to what ever the alternator is charging at, eg. 14V. Now we have a difference between the 2 I/Ps. The comparator will now change state and can be used to swith your circuit off.

If I get time in the next day or 2 I will have a go at drawing something up.

PS. Sorry Wayne if thats not whatyou were trying to say but I was a little confused with your description.
 

Thread Starter

popto

Joined May 1, 2009
44
That sounds great! This is exactly what I was hoping for. I looked around on this website and others and found lots of stuff on comparators. I found a page on the e-book that explains how to use a comparator very clearly. Here is the link: http://www.allaboutcircuits.com/vol_6/chpt_6/2.html Would I be able to experiment a little, find out the resistance I need then just use resistors instead of a Zener diode? If so then I will just follow the schematic from the e-book.

I would prefer to use a relay triggered by the comparator because I used some voltage regulators to get a constant voltage for the leds. But if the MOSFET drops any voltage at all then I will lose some voltage going to my leds because the voltage regulators are set at the maximum voltage that I could get after they drop 2v. I really would prefer not to change all of the resistors for all of those leds. . . again. Is there a problem with using a relay that I don't know about? I figured that with a relay I would get the full voltage and not even have to think about heat.

Thank you very much for this idea, I think that it will do exactly what I want it to do.
I am eagerly awaiting your answers.
 

Thread Starter

popto

Joined May 1, 2009
44
Whoops! My previous post was posted before I had seen windoze killa's post.

@windoze killa: Thanks, that does clarify several things. I am still wondering if it would work the same with resistor instead of a zener diode since I am much more familiar with resistors? btw I really like your name!
 

thatoneguy

Joined Feb 19, 2009
6,359
I just thought of something. If the car has a high end stereo system, it is very common to run the engine at idle when showing a demo or at a contest, the extra voltage helps. So the voltage option wouldn't work for this.

On the other hand, this is the method Garmin uses for auto-shutoff on their Nuvi GPS units that are powered by the Lighter jack, so it isn't "Insane Crazy Request". :)
 
Whoops! My previous post was posted before I had seen windoze killa's post.

@windoze killa: Thanks, that does clarify several things. I am still wondering if it would work the same with resistor instead of a zener diode since I am much more familiar with resistors? btw I really like your name!
The resistor option may work but as the supply voltage increases so will the voltage at the junction. It won't increase by the same amount but at a rate determined by the voltage divider. This would make the zener option more stable.

The name came about when I discovered Linux and how much more stable and friendly. I was always crashed windows. And because windows is @#$%. Microsoft allows millions of people to beta test their software and they make you pay for the privilege.
 

Thread Starter

popto

Joined May 1, 2009
44
I just thought of something. If the car has a high end stereo system, it is very common to run the engine at idle when showing a demo or at a contest, the extra voltage helps. So the voltage option wouldn't work for this.
The person that I am making this for has done several things not very legal and has little to no regard for the law, so his parents have informed me that either this system works only when the car is off or nothing at all. So despite all the disadvantages, I have to make this system shut off when the car is on.

The resistor option may work but as the supply voltage increases so will the voltage at the junction. It won't increase by the same amount but at a rate determined by the voltage divider. This would make the zener option more stable.
Okay, that does make sense. I will do some more research and re-read the section on diodes and Zener diodes on the e-book. I may be able to make the zener diode work, but a schematic or description would be very helpful and appreciated.

Thanks to all of you for your help


The name came about when I discovered Linux and how much more stable and friendly. I was always crashed windows. And because windows is @#$%. Microsoft allows millions of people to beta test their software and they make you pay for the privilege.
Hahaha! That's good. I agree, windows never seems to work for very long without something crashing, locking up, glitching or accidentally deleting something important. It is always trying to catch up to mac and yet it can't even stay ahead of Linux.
http://forum.allaboutcircuits.com/member.php?u=41928
 

thatoneguy

Joined Feb 19, 2009
6,359
Here is a quick design I just through together. I think it should work and I am sure I will be corrected if not.
That would only provide 9V to the load and limit it to ~1A, need to run the Vin Path to the MOSFET Source in addition to the Regulator input, rather than inline. General idea is good though. I normally leave unused outputs floating on comparators.
 
You are right. Not sure how I missed that. The regulator was selected as a sample. A 5A version would be an easy replacement. I will have a go at fixing it up tomorrow if I get a chance. At least it gives him an idea of what to do.

PS. Did I get the I/Ps to the comparator the right way round? I have had a dead brain day today.
 

Thread Starter

popto

Joined May 1, 2009
44
Here is a quick design I just through together. I think it should work and I am sure I will be corrected if not.
The schematic was exactly what I need to figure out how to wire the lm393, I would have wired in the Zener diode and resistors wrong otherwise.

That would only provide 9V to the load and limit it to ~1A, need to run the Vin Path to the MOSFET Source in addition to the Regulator input, rather than inline. General idea is good though. I normally leave unused outputs floating on comparators.
I am still hoping to use a relay to give and disconnect power from my existing circuit because I already have voltage regulators in the circuit and I need every last tenth of a volt that I can get and I assume that the MOSFET will drop a little bit of voltage from the original voltage. Is it possible to just trigger the relay with the output from the lm393? Is there a problem that I don't know of about using relays?

Thanks to everyone, you guys are great!
 
Top