# Voltage Level Switch

Discussion in 'General Electronics Discussion' started by Dan Paulovich, Jul 18, 2014.

1. ### Dan Paulovich

6
0
Jul 18, 2014
I have an aneometer that puts out 0-2vdc. I want to monitor that voltage and trigger an alarm when the voltage gets below 1.5 vdc. Anybody have sugestions.

Thanks

5,164
1,087
Dec 18, 2013
Comparator.
Thanks

3. ### Supercap2F

550
150
Mar 22, 2014
In other words, feed the aneometer output in to one of the comparators inputs. Then hook up a resistor voltage divider circuit that outputs 1.5V, and feed that into the comparators other input. The comparators output can be fed into a transistor, so you can switch on a alarm. See here for how to hook up the transistor to the comparators output.

Regards

Dan

4. ### Gryd3

4,098
875
Jun 25, 2014
You end up making a very small circuit to generate a reference voltage.. and you feed that reference to one of the inputs on the comparator.
You take the output from your aneometer and connect it to the other input of the comparator.

The output of the comparator will toggle states based on which input is higher or lower which will let you wire an alarm in place.
You can wire this to provide an active low, or an active high to drive whatever circuit you have in mind for the alarm.

*Your small voltage reference circuit can be made with any part that has a known constant voltage drop like an LED, or other Diode

Edit: Supercap and I posted the same thing. He snuck in hitting submit before me

5. ### Dan Paulovich

6
0
Jul 18, 2014
Do you have a circuit diagram with parts List?

6. ### Supercap2F

550
150
Mar 22, 2014
I think I can draw you up one. what supply voltage to you want it to work off of? What voltage is the alarm? How much current does it draw?

Regards

Dan

7. ### Dan Paulovich

6
0
Jul 18, 2014
Supply = 12 vdc
Alarm = Sonalert 12 vdc, 40 ma

8. ### Supercap2F

550
150
Mar 22, 2014
All right give me some time, and I will see what I can do.

Dan

9. ### Supercap2F

550
150
Mar 22, 2014
Here's what I was thinking:

Here's the parts list:

First of all, the little box that says 'U1' is just the power connections for the comparator. You will need to adjust the pot until the voltage at the + input of the comparator equals 1.5V (I'm assuming that you have a voltage meter). I did not include the resistors on the price list, because I do not know what wattage they should be. I think 1/4 watt would be good, but someone else needs to confirm that (maybe Gryd3 or Adam can tell us?).

Edit: Here is the 2N4401. Here is the comparator. Here is the 0.1uF capacitor.

Regards

Dan

Last edited: Jul 19, 2014
10. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,501
2,841
Jan 21, 2010
Change your R2 (11R) and R1 (100R) resistor and pot to 10K and 100k and you'll waste a lot less power in the voltage divider.

Even better the fixed resistor (R2) could be 8k2, and pot (R1) could be replaced by a 20k pot in series with an 47k resistor to allow the voltage to be set anywhere between 1.31 V and 1.78 V.

Of course, this assumes that your 12V is regulated. If it's not regulated then your voltage reference will be all over the place.

I would also suggest placing a small capacitor (say 0.1µF to 1µF) across R2 to reduce noise.

A small amount of positive feedback will stop weird things happening when the wind speed is very close to the trigger point, but considering that the wind speed is usually not anything like constant it may not be required.

KrisBlueNZ and Supercap2F like this.
11. ### Dan Paulovich

6
0
Jul 18, 2014
Thanks Supercap2F I'll give it a try and let you know how it works out, I appreciate the help. I was an avid electronic experimenter back in the 60's, 70's and 80's but have not fooled around with it much since, will be fun to get back into it again.

12. ### Supercap2F

550
150
Mar 22, 2014
@(*steve*)

With that method the output voltage can swing from 1.092V to 12V, which is just about prefect. I would rather use this then the other method that can only go from 1.31V to 1.78V. Because if the OP ever wanted to change the 1.5 trigger voltage, and he wanted it to trigger at 1.9 volts then the second method would not work.

Great point! (as usual)

Never would of thought of that! Steve, what wattage resistors do you think would be good to use?

@Dan Paulovich

Why don't you wait tell we figure out some improvements for this circuit. That way it will work better, and I can give you a complete parts list.

Heres the updated schematic:

Regards

Dan

5,164
1,087
Dec 18, 2013
Hi Dan

It will probably be fine but I think it's good practice to have a pull down on the base of the transistor to ensure it is turned off fully 1/10th the base resistor value will be fine. The output of the comparator will not go to 0 V more like 0.3 V. Although it's not enough to turn the transistor fully on it's sometimes better to have it and not fit it if it's not required. if you get used to doing it now and when it is needed it's there.

Good job by the way, glad you didn't get caught out by the old open collector drive scenario and you chose one with push pull output.

Supercap2F likes this.
14. ### Supercap2F

550
150
Mar 22, 2014

Thanks I looked through a ton of comparators to find that one. Do you know what wattage resistors I should use?

All the best!

Dan

Last edited: Jul 19, 2014
15. ### Dan Paulovich

6
0
Jul 18, 2014
Thanks for all the help guys. What would I use for the U1 voltage regulator. I'm going to power the circuit from a garden tractor, probably 13-15 vdc when running.

16. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,501
2,841
Jan 21, 2010
Dan, given that the entire input range is 0 to 2 volts, it is pointless to make the adjustment go significantly above 2v. You could use a 20k pot as a voltage divider, with a 100k pot in series with it to give a range of adjustment which matches the input.

The reason you do this is to make adjustments easier and more accurate.

17. ### Supercap2F

550
150
Mar 22, 2014
@(*steve*)
I see your point now! Is this what you mean:

+ -----/\/\/\/----/\/\/\/----- Comparator + input -----/\/\/\/---- -
.........100k.........20k..........................................................10k

Dan

5,164
1,087
Dec 18, 2013
Nope other side of the resistor Dan.
Cheers

19. ### Supercap2F

550
150
Mar 22, 2014
OK, You mean like this:

+ -----/\/\/\/---- Comparator + input ---/\/\/\/\----/\/\/\/\---- -
.........100kPot...............................................20kPot..............10k

Dan