Turn on a mosfet at one voltage and off at another voltage? - Page 1
Forum section: electronics / beginners

author: gilligan
author_rank: Contributor
timestamp: April 08, 2019, 11:24:45 pm
content: Basically, I'm looking to have a mosfet go OFF at say 4v but not go back on till 4.5v to prevent rapid cycling (I know that seems odd but I'm just using it as a switch).So kind of like how a thermostat has a "window" for your temperature. It doesn't just go on and off at exactly 75* it will go on at 76* and off at 74*.Am I explaining myself well enough?

author: tooki
author_rank: Super Contributor
timestamp: April 08, 2019, 11:34:51 pm
content: Yes, it’s clear. The keyword you’re looking for is “hysteresis”.A common implementation of this is the Schmitt trigger.Do a bit of googling for these things and you’ll probably find a circuit that works for you.

author: ataradov
author_rank: Super Contributor
timestamp: April 08, 2019, 11:35:25 pm
content: The thing you are looking for is Schmitt trigger. There are multiple options that may work. The easiest - to use a standard logic gate with a Schmitt trigger input, but you have very little control over threshold voltages.Another option to make your own from a comparator and a few resistors. Here you will define the thresholds. Search for "schmitt trigger comparator" and you will get a ton of circuit diagrams (which are all essentially the same).

author: Wimberleytech
author_rank: Super Contributor
timestamp: April 09, 2019, 12:34:21 am
content: Here you go. Play with this. I only spent 10 minutes with it, so I am not ready to put it on the space station. You will have to do the math to get your desired trip points.

author: gilligan
author_rank: Contributor
timestamp: April 14, 2019, 08:46:30 pm
content: I thought this was the answer I needed (Schmitt Trigger) as it certainly does what I'm asking.Then I realized because I failed to give you guys a complete picture the solution doesn't work.I'm basically looking to power up an arduino from a solar cell withOUT a battery. So, once the panel is putting out enough power, THEN turn it on. Once it drops below a threshold turn it off.The reason for the hysteresis would be so it's not going on and off like crazy when it's just at that threshold... but the problem would be that the reference voltage to the Schmitt Trigger would be going up and down as well ergo not really solving the problem.I've been thinking a Zener Diode (1n4727a ?) in reverse would maybe work to act like a switch? Once it hits 3v it opens up and Bob is your uncle. But all the modeling I've done still shows some current going through below my threshold when it gets close.

author: ataradov
author_rank: Super Contributor
timestamp: April 14, 2019, 09:17:19 pm
content: You can still use a zener diode to create a voltage that is lower than the lowest possible supply voltage. And then scale your input voltage accordingly. This way you will be independent from the actual power supply voltage, as long as it is high enough for all the ICs to remain in spec.

author: gilligan
author_rank: Contributor
timestamp: April 14, 2019, 09:40:45 pm
content: Quote from: ataradov on April 14, 2019, 09:17:19 pmI would be looking to use the solar panel as my SOLE power source.So when it's dark it's at 0v and the circuit is off.Then as it starts to lighten up (sun coming up or on cloudy days): it would be say 1-2v which would not be enough to turn on my arduino and accompanying circuit.Then as it gets sunny and goes to say 3.3v+ I'd like to turn it on. I have some cheap buck boost converters I could use to maintain the 5v but that might be overkill/a waste/too much load.Then as clouds pass over or it gets dark it could turn off if drops below 3v and not come back on again till 3.3v to prevent rapid cycling.

author: ataradov
author_rank: Super Contributor
timestamp: April 14, 2019, 09:58:42 pm
content: And this is fine. For the reference voltage get a 2V zener diode. Most comparators will work fine from 3.3 V.So the negative input of the comparator will go to the 2V reference voltage + hysteresis voltage. The positive input will go to the input voltage divider by the factor 3.3 / 2 = 1.65.The only concern is operation in under-voltage conditions. And for that you can use a voltage supervisor, to keep the whole thing in reset until the voltage reaches ~3 V.You may even be able to get away with a voltage supervisor alone. They are basically all of the described above implemented in a single IC. But they nay have a limited and not adjustable hysteresis. But it may work for your application, if your only goal is to avoid rapid switching.