MOSFETS as voltage controlled gates - Page 1
Forum section: electronics / beginners

author: SolderOcelot
author_rank: Contributor
timestamp: November 18, 2018, 12:12:28 am
content: I need 3 gates in my circuit which each should close (as in: let current go through source and drain) IF the circuit voltage is > X.My question: Are MOSFETS the right tool for this construction?My goal is to create a LED strip that lights up a number of LEDS depending on voltage. Please take a look at attachment for schematic.

author: ArthurDent
author_rank: Super Contributor
timestamp: November 18, 2018, 12:34:37 am
content: Here is an IC that is designed for this type of application and I'm sure there are some others.https://www.ti.com/lit/ds/symlink/lm3914.pdf

author: SolderOcelot
author_rank: Contributor
timestamp: November 18, 2018, 01:06:57 am
content: Quote from: ArthurDent on November 18, 2018, 12:34:37 amOn one hand I think it's pretty cool that IC's come onto my path now but on the other hand it's quite a buzzkill to just slap an iC on there and be done with the project. I was hoping to build this a bit more primitively.

author: Whales
author_rank: Super Contributor
timestamp: November 18, 2018, 01:33:50 am
content: You could use varying amounts of diodes in series to each LED. The turn-on might not be as abrupt as you hope, however.Another alternative is to use diode stacks that then feed the base of an NPN. That might have a sharper turn-on. I suspect FETs would again be too gradual of a turn on.

author: SolderOcelot
author_rank: Contributor
timestamp: November 18, 2018, 01:51:28 am
content: Quote from: Whales on November 18, 2018, 01:33:50 amWhat do you mean with "abrupt"? As in speed in which LEDs switch on or the contrast between the LEDs' on and off state (diffusion).Quote from: Whales on November 18, 2018, 01:33:50 amSo with "diode stacks" the diodes act as voltage barriers right? So the first stack would require a voltage of 1.3 for current to go through right? If so, I'm worried about the amount of resistence they add to the circuit which would interfere with other features.

author: spec
author_rank: Frequent Contributor
timestamp: November 18, 2018, 08:04:47 am
content: Hi Faloude,Attached is a voltage threshold circuit using basic jelly bean components.You can add as many LED channels as your battery can supply.Theoretically, with the appropriate choice of RT, there is no limit to the input voltage. But most small resistors will only stand 100V across them, so that would be a practical limit.

author: Whales
author_rank: Super Contributor
timestamp: November 18, 2018, 08:22:24 am
content: Quote from: Faloude on November 18, 2018, 01:51:28 amYou probably want something like:- 2.6V and below: LED not on- 2.65V: LED half on- 2.7V and above: LED on... however instead you might get:- 2.2V and below: LED not on- 2.5V: LED half on- 2.8V and above: LED on(Numbers are made up)QuoteYep. The exact vdrop depends on what combo of diodes you use, standard silicon are around 0.6V.QuoteCommon diodes passing mA don't add "resistance" as such, instead they mainly just drop voltage. Think of them as voltage regulators, just as how you would make a "zener diode regulator".EDIT: I like spec's design

author: spec
author_rank: Frequent Contributor
timestamp: November 18, 2018, 09:34:19 am
content: You can also have the reverse function where the LEDS are normally on and are turned off when the input reaches the threshold voltage, as per the first attached schematic.Now that you have the two logic functions you can combine them and get any overall logic function that you want.The second schematic shows an example. You can add as many transitor level detectors, either to the LED cathode or LED anode, as you like.

author: Zero999
author_rank: Super Contributor
timestamp: November 18, 2018, 10:47:34 am
content: Quote from: Faloude on November 18, 2018, 01:06:57 amThat's the way to go for 99% of designs nowadays. The great thing about the LM3914 is it has current regulated outputs, so the brightness remains constant, irrespective of any changes to the supply voltage.If it's understanding you're after, read the data sheet, specifically page 8, which gives the schematic. If that's beyond your current level of understanding then research comparator circuits. No, before you do that, I strongly recommend going back to basics, as the first schematic you posted contained an error, which could blow the LEDs: no current limiting resistors.The suggestions using transistors will work, but the base voltage is subject to changes in temperature and the turn on threshold isn't very sharp. An alternative would be to use an IC such as the the TL431, which has a sharp turn on threshold of 2.495V, as a voltage monitor.http://www.reuk.co.uk/wordpress/storage/tl431-battery-voltage-monitor/http://www.ti.com/lit/ds/symlink/tl431.pdf

author: mvs
author_rank: Frequent Contributor
timestamp: November 18, 2018, 11:10:00 am
content: Quote from: Hero999 on November 18, 2018, 10:47:34 amTLV431 with 1.24V reference would work for 1.3V, 1.4V and 1.5V monitoring thresholds, but not TL431. Schematic needs also some modifications, since additional power supply is required (voltage drop on led, current setting resistor and tlv431 would exceed 3V).

author: SolderOcelot
author_rank: Contributor
timestamp: November 18, 2018, 11:57:16 am
content: Very grateful for everyone's inputI've decided to with an IC after all.Quote from: Hero999 on November 18, 2018, 10:47:34 amI actually really like this feature.Quote from: Hero999 on November 18, 2018, 10:47:34 amIs the LM3914's turn-on treshold less sharp?Also, does the LM3914 know when I've attached 5 LED's instead of 10 and use that as a scale?

author: mvs
author_rank: Frequent Contributor
timestamp: November 18, 2018, 02:51:53 pm
content: Quote from: Faloude on November 18, 2018, 11:57:16 amNo, it does not. LM3914 is dumb as bread. You need to define voltage window, LM3914 will make 10 equal intermediate steps.Then you can decide which outputs to use.If RHI=1.5V, RLO=0.5V and only 5 last leds are connected, you will get 1.5V, 1.4V, 1.3V, 1.2V and 1.1V thresholds.

author: SolderOcelot
author_rank: Contributor
timestamp: November 18, 2018, 05:36:18 pm
content: Quote from: mvs on November 18, 2018, 02:51:53 pmGot it! How are those intervals (0.1V) set? I know, I should read the PDF.

author: Audioguru
author_rank: Super Contributor
timestamp: November 18, 2018, 05:37:04 pm
content: You might be too late. The LM3914 is not made in an old DIP package anymore, they are only surface mount now. You might still find a few old ones somewhere.The LM3915 logarithmic display driver is not made in any package anymore.

author: MarkF
author_rank: Super Contributor
timestamp: November 18, 2018, 07:03:57 pm
content: Quote from: Faloude on November 18, 2018, 01:06:57 amIf you would like to make it more complex, you could add a microcontroller to read the voltage and define any voltage steps you like.A pic18f1320 and constant current blocks made of LM358 op-amps and IRFP250 MOSFETs.Here is my idea with minimal components:Edit-If you add some MCP4802 DACs controlled by the PIC, you could have dynamic brightness for the LEDs.You would need to go to a different PIC (like a pic16f886).

author: mvs
author_rank: Frequent Contributor
timestamp: November 18, 2018, 08:10:50 pm
content: Quote from: Faloude on November 18, 2018, 05:36:18 pmI draw a schematic for this case with formulas.

author: SolderOcelot
author_rank: Contributor
timestamp: November 18, 2018, 10:11:36 pm
content: Much appreciated MVS! I have some questions on this diagram.Where is ground of J1?What is C1?If there were no resistence on RLO and RHI lines, what would the voltage be?

author: Mechatrommer
author_rank: Super Contributor
timestamp: November 19, 2018, 07:15:53 am
content: another thought comparator based, maybe half the BOM price, ymmv...

author: mvs
author_rank: Frequent Contributor
timestamp: November 19, 2018, 08:56:49 am
content: Quote from: Faloude on November 18, 2018, 10:11:36 pm1. It is GND2. C1 is a decoupling capacitor. TI recommends 2.2µF tantalum or 10µF aluminum electrolytic capacitor, but you can use also MLCC ceramic.3. If you remove R1 and short out R2 and R3 you will get V_RHI=1.25V and V_RLO=0V. LED current will be quite low, I=12.5/10K=1.25mA.