of course you are not getting 0V when the fet is off, there may appear some voltage from the positive rail depending from the impedance of your load
With the LED in that particular spot, the gate will require the R4 39K resistor to go all the way to 0V Vgs which is slower
than the 1K1 in series with the LED. Hope that's OK.
Data sheet FQP30N06L says Gate-Source Voltage Vgss +-20V absolute maximum
You also can measure the voltage across the FET. The load will be 24-Vd.
Oh, and put a large resistor, like 100k across the FET channel; otherwise if the load is open circuit and the FET is off Vd will be an antenna
QuoteData sheet FQP30N06L says Gate-Source Voltage Vgss +-20V absolute maximum
Well I dropped a clanger there. I have purchased several different MOSFETs while getting to grips with theory and practice. This MOSFET was initially not going to be driven by the opto but by the uController (via a 100R resistor). That would have been fine but now I have changed the Gate voltage from 5v to 24v!
While we are talking about this particular subject, I have seen 'Gate drivers' recommended for this application such as the
UCC27423 http://www.ti.com/lit/ds/symlink/ucc27424.pdf. What advantage would that bring to my current 'design' (and I use the term lightly!)? I have attached a design, stumbled across via google.
It's good to bring specifically designed MOSFET driver into perspective. IMHO, galvanic isolator is right things for safety, and there are many IC to choose. For example, https://www.vishay.com/product?docid=81808
Study data sheets, there are a lot useful info there.
After more hours of study, looking at various components and designs I am left with an additional question. If I use an Isolated Driver for the MOSFET (which will also help when I get to PWM control), I believe I will have a problem with my voltage sensing design as I will no longer have a common GND reference. Is this correct?
Right. Use isolated amplifier as voltage sensor. Like:
https://www.broadcom.com/products/optocouplers/industrial-plastic/isolation-amplifiers-modulators/isolation-amplifiers/acpl-c870
Or
http://www.ti.com/lit/ug/tidua58/tidua58.pdf
You are messing with the datasheets; you don't have the parameters of the VO3150 but of the UCC27424.
You're right; the FET is voltage controlled, since its gate is isolated from the conducting channel, it acts like a capacitor; to build up a voltage in a cap, there has to flow a current - the higher this current is, the faster you reach a certain voltage.
So, if you drive a FET directly from a uC which sinks or sources maybe 25mA, it can take a considerable time to get the gate of high power FET charged and conducting - in other words - when using a FET driver, the parameter of sink- and sourceable current tells you, how fast you can switch the FET on and off - via I = dQ/dt
0,5A for a driver is not such a great parameter; there are drivers, which can sink and source several Amps, but it's surely better than your setup with a common opto or directly driven by a I/O-pin of a uC
Initially the microcontroller did not sense the voltage correctly until I shared the GND both sides of the Opto-Isolator, which makes sense(so to speak!). The microcontroller measures the voltage okay when the MOSFET is switched on but when I switch it off, the microcontroller is showing random(ish) values instead of 0. This was the end of the day and my wife was calling me so I did not have to to check this with the meter.
When the MOSFET is off, the voltage on the ADC input will theoretically be 24V, because the MOSFET will disconnect the lower side of the potential divider R5 & R6, leaving only R5 in series with 24V. In reality, the ADC input's ESD protection diode will start conducting, so the voltage on the ADC input, will one diode drop above the power supply voltage. Because the voltage would be outside the acceptable range for the ADC pin, the reading will be unreliable, hence the random values.
Good job Hero. I have been monitoring this thread, and shaking my head. While I wanted to answer, I took the Socratic approach but flame refused to respond to my opening salvo.
I have been monitoring this thread, and shaking my head.
It think others have answered the other questions adequately, but unless I've missed something, no one seems to have dealt with this.
When the MOSFET is on, the voltage on the ADC input will be V = VIN*R6/(R5+R6) = 24*10/(100+10) = 24*10/110 = 22/11V
When the MOSFET is off, the voltage on the ADC input will theoretically be 24V, because the MOSFET will disconnect the lower side of the potential divider R5 & R6, leaving only R5 in series with 24V. In reality, the ADC input's ESD protection diode will start conducting, so the voltage on the ADC input, will one diode drop above the power supply voltage. Because the voltage would be outside the acceptable range for the ADC pin, the reading will be unreliable, hence the random values.
If you don't need any isolation, then the voltage across the load can be roughly measured by connecting the potential divider across the MOSFET. When the MOSFET is off, the ADC input will read 22/11V and when it's on, it'll read a very low voltage, probably around zero, as it will be under one ADC count. For a more accurate measurement, monitor the 24V, using a potential divider and the voltage across the MOSFET using a single current limiting resistor.