Design an adjustable voltage switch

Status
Not open for further replies.
Bipolar transistors (NPN, PNP) are off when no base current flows. They are on when sufficient base current flows. The base-emitter junction looks like a diode. When Vbe (base to emitter voltage) is less than ≈0.7V, the transistor will be off, and no current will flow from collector to emitter. In your circuit, the base voltage of the 2N2222 is approximately at 0V when the comparator - input exceeds the + input, due to an internal NPN at the output of the LM393 which diverts the current through R8, the 3.9k resistor, to ground. When the + input exceeds the - input, the transistor internal to the LM393 will turn off, allowing the current through R8, to flow into the base of the 2N2222. The base voltage will rise to ≈0.7V, and ≈1.87mA of base current will flow ((8V-Vbe)/3.9k=1.87mA). This current will get multiplied by the transistor current gain, saturating the transistor (Vce(sat)<0.2V). This will energize the relay.
So - for the second section of the Lm393, when the + input > - input, the relay is energized.
 

OK then this makes sense. I was'nt sure about whether the transistor was on or off when the base was at 0.7 or 0.0

I want to simplify what you have said, mostly because I think you were only talking about one side of the comparator.

On U2 (pin 2&3). When Pin 2 (-) is low to vset, then Pin #1 is 10v. Then Pin 5 (+) will be high (10v) in referance Pin 6 (-). (Divider shows Pin 6 at 4v). So then Pin 7 output is 0v. This means the 2n2222 base voltage is 0v. So the relay is off.

If I switch Pins 5&6...then Pin 5 (+) will now be Low 0v to Pin 6 and then Pin 7 will be 10v. This will drive the 2n2222 base voltage to 0.7v this triggering the relay.

Did I get it right?

Stu
 
Why are you talking about 10V? The schematic says 8V. If you try to use 10V, the circuit may not work unless the engine is running (alternator is spinning). I know that this is generally not a problem, but will you ever want to test the circuit when the engine is not running?

When pin 2 is low, and you have swapped pins 5 and 6, pin 5 will be at 4V, and pin 6 will be ≈8V. Pin 7 will be at 0V, and the relay will be off.
When pin 2 goes high (4.7V), pin 6 will be 0V, pin 5 will still be at 4V, so pin 7 will go open circuit to GND. This allows R8 to source current to the base of the 2N2222, energizing the relay. The base voltage of the 2N2222 will be ≈0.7V.
 

Perfect. Sorry about the 10v thing, I wasnt paying attention. This answers ALL my questions. (-:

Stu
 
Here's my latest version, incorporating all the changes we talked about on PMs. I didn't include the .asc file, but you can easily modify one of your previous schematics if you want to simulate it.

Did I mess up? Or is this in error. In your post #112 Does U2b that is unused need to have the (-) pin go to GROUND? Or to 8V?. You show 8v here, but my final post #124 I show (-) going to ground. My proto boards are in and I have both Pins on U2b (5 & 6) going to ground. oops?

Stu
 

Attachments

  • Boost Circuit 2.asc
    3.8 KB · Views: 225
Last edited:
Check out post #114 (or read this):
I just checked the datasheet. It says to tie both input pins to GND.
Actually, it will work either way.
 

Just tested the final unit and it works perfectly. Although I had no 200K resistors, so I used a 220K and it didnt seem to cause any issues. It doesnt "re-trigger" anymore.

I have a question. If I wanted to modify this a bit so it triggers down lower, like 2.8v to 3.2v range, what R values would you recommend for R6, R9? I would like to keep the 2 pots at the same value since I have 10ea of those (if possible). I am going to test this somewhere else. The trigger voltage there is more of a "switch" type. It runs at 2.0v then jumps straight to 4v. So I am picking something in the middle as the trigger volt.

Stu
 

Attachments

  • Boost Circuit 2.asc
    3.8 KB · Views: 199
How much hysteresis will you need? Better yet, what should the threshold voltage drop to when the unit "fires"?
 
How much hysteresis will you need? Better yet, what should the threshold voltage drop to when the unit "fires"?

Well, the voltage is very stable at 2.0v with little to no variance. Then the ECU sends a flat 4.0v signal at a specific engine rpm level, not a ramp up voltage, to trigger an internal function. So as long as the hysteresis doesnt go below 2v then I guess it really doesnt matter. I would be concerned it I use like 3.7v on the high side, or like 2.3 v on the low side becuase that's pretty close. Once the circut triggers, I would guess that a .5v hysteresis is sufficient. When the system goes back, it immediately drops from 4.0v to 2.0v. This signal is not linear. Almost like a switch. Hence why I was thinking around 2.8 to 3.4 or something with a .5v hysteresis.

Stu
 
With a digital input from the ECU, you shouldn't need hysteresis, or any pots. A simple comparator with a 3V threshold should be fine.
Are you driving a relay, or a VSV? Should the load (relay, vsv) be energized or deenergized when the input is high?
 

Yes, I want this circuit to be in the "off" state at 2.0v. More for fail safe so if the circuit fries, I will maintain the "stock" configuration, When it sends the 4.0v trigger signal, I then want to drive a typical 30A relay. Then the relay will switch over to an aftermarket high volume Fuel Pump. When the 4.0v voltage then drops to 2.0v the relay will de-energise, which puts the car back to standard operation. A simple voltage divider as a referance would probably work out the best. I was trying just modify these new boards I had made with changing a part here and there. Hence why I asked about the R values. I had 10 proto boards made for the above circuit so I have extras to play with.

Stu
 
Last edited:
Is the schematic of your board posted? If so, which post #? If not, please post it here.
 
This is the circuit I was using for awhile. But it has failed on me. It also wasnt doing what I wanted. I think. I wanted the relay to be de-energized at the 2.0v operation. As I remember, I had to swap Pin 87/87a on the relay because It was opposite of what I wanted. I am revisiting this because of all the new knowledge I have gained on hysteresis. As you can see in this schematic, there wasnt any components for it. So the circuit was oscillating at transition. I thought it was due to a snubber, so I added that. However, it did work for awhile, but I ditched it cause it was un-reliable. Now I want to re-visit the design and try again.

Stu
 

Attachments

  • New BAP circuit Feb.jpg
    91 KB · Views: 235
My plan was to show you how to modify your most current board:
I was trying just modify these new boards I had made with changing a part here and there.
If you want to modify the board you posted in your previous post, we can try that. If you want to modify your most current board,
Is the schematic of your board posted? If so, which post #? If not, please post it here.
Let me know what you want.
 
My plan was to show you how to modify your most current board:If you want to modify the board you posted in your previous post, we can try that. If you want to modify your most current board, Let me know what you want.

My plan was to "modify" the Most Current board here. NOT the one I just posted. That one stinks ha..ha..

Stu
 
OK, this should work. It sets the threshold at 3V, with no hysteresis.
 

Attachments

  • Map switch 3 no hysteresis sch.PNG
    26.8 KB · Views: 294
OK, this should work. It sets the threshold at 3V, with no hysteresis.

Cool, that makes things simple. Do you happen to know anything about the LM2917 Frequency to Voltage converters? They are suppose to be able to take Tacho signals and convert it to a linear voltage output. Another project I am trying. It is the same as these types here, but using RPM signal for triggering rather than the map sensor. The attached is from another guy in the car tinkering business. I wasnt quite able to convert this to a standard 8-Dip 2917. I think all the components will work for my usage except I wanted my range more like 3000-6000rpm range.

Stu


Stu
 

Attachments

  • rpm%20switch%20-%20board%20layout.jpg
    87.5 KB · Views: 237
  • rpm%20switch%20circuit%20v3.gif
    13.8 KB · Views: 240
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…