N-MOSFET simulation for Resistor Voltage Divider

Thread Starter

Kevil

Joined Jun 28, 2020
224
I need to measure the car battery voltage every hour, using a resistor voltage divider that will reduce the voltage to a max of 1 V for ADC measurement using MCU.

I choose the Diodec Semiconductor N-MOSFET MMFTN138K 360mA 60V SOT-23-3.

I need advice, where to get its parameters, or choose a similar type, so that I can simulate the function of the resistive divider in LTspice.

LTspice_RVD_CAR.png
 

Attachments

dl324

Joined Mar 30, 2015
18,219
I need advice, where to get its parameters, or choose a similar type, so that I can simulate the function of the resistive divider in LTspice.
Why???

If the N channel MOSFET is to be driving by the MCU, your setup is all wrong. The MCU will never be able to switch the MOSFET fully on. That's what the simulation is telling you.

Just use a logic level N channel MOSFET with a low on resistance with the Vgs the MCU can provide. Or just skip the MOSFET and have the resistor divider across the battery continuously (make the values larger if current drain is an issue).
 

Thread Starter

Kevil

Joined Jun 28, 2020
224
Why???

If the N channel MOSFET is to be driving by the MCU, your setup is all wrong. The MCU will never be able to switch the MOSFET fully on. That's what the simulation is telling you.

Just use a logic level N channel MOSFET with a low on resistance with the Vgs the MCU can provide. Or just skip the MOSFET and have the resistor divider across the battery continuously (make the values larger if current drain is an issue).
I need to avoid current drain. For smaller battery voltage (about 4.2V) I would us TPS22916BYFPR 1-V–5.5-V, 2-A, 60-mΩ Ultra-Low Leakage Load Switch. Maybe I should rather use the similar power switch for 14-16 V.
 

Alec_t

Joined Sep 17, 2013
15,103
Connect the voltage divider between battery+ and the FET drain instead of the way you have it. Use a logic-level FET.

Edit:
Scrub that.
 
Last edited:

Thread Starter

Kevil

Joined Jun 28, 2020
224
You mean to put N-MOSFET parallel to R2? But this will not avoid the current drain when not measuring.

Please show me how to make the circuit correctly. Attached files for ROHM N-MOSFET.
 

Attachments

crutschow

Joined Mar 14, 2008
38,316
Maybe I can use a new N-MOSFET RA1C030LDT5CL
Yes, that will work.
It has a high-side P-MOSFET switch to provide the full battery voltage to your resistive divider.

But note that, for a typical car battery capacity of 50Ah, the resistive voltage divider will take about 63,000 hours (7 years) to complete discharge the battery, even if it is left connected all the time, so I see no need for the switch.
 

LowQCab

Joined Nov 6, 2012
5,101
There is no need to turn the Power On & Off.
The Battery can run with a Voltage-Divider continuously connected for many Months.
.
.
.
 

ericgibbs

Joined Jan 29, 2010
21,390
I need to measure the car battery voltage every hour, using a resistor voltage divider that will reduce the voltage to a max of 1 V for ADC measurement using MCU.
Hi kevil,
As a side issue, why are you reducing the Vsource of 16V down to 1V?
Most MCU's will accept 3.3V or 5V maximum ADC inputs, which will give a better conversion resolution compared to 1V max.
E
 

Thread Starter

Kevil

Joined Jun 28, 2020
224
Hi kevil,
As a side issue, why are you reducing the Vsource of 16V down to 1V?
Most MCU's will accept 3.3V or 5V maximum ADC inputs, which will give a better conversion resolution compared to 1V max.
E
The 1V reference voltage (derived internally from the bandgap reference voltage 1.2V on SAMD21/SAMR34) allows me to measure the voltage more precisely.

I know that 1 mA flowing through the resistor voltage divider will not drain the car battery. I just need to test the functionality of the switched resistor voltage divider for the main project LoRaWAN/GPS micro locator embedded into cat collar powered by three Energizer 675 Zinc Air (Zn/O2) 1.4V cells (approx. 4.2V) which should last about 3 months while sending position each hour. I will use TPS22916BYFPR as the switch.
 

ericgibbs

Joined Jan 29, 2010
21,390
Hi Kevil.
Sounds like an interesting project.
Are you really trying to measure the battery voltage or just require detecting when the collar battery level falls below a minimum voltage.?
If your MCU's ADC has a high impedance and the MCU is powered from the 4.2V battery source, I would have considered the battery could be connected directly to the ADC input.
Most MCU ADC track the power voltage level, if the Vbattery is used as the Vref.
ie: ratiometric
E

Update:

My suggested ratiometric method will not work, you will need to use the internal Vref.
Sorry about the error, not had my morning coffee yet.:oops:
 
Last edited:

Thread Starter

Kevil

Joined Jun 28, 2020
224
Hi Kevil.
Sounds like an interesting project.
Are you really trying to measure the battery voltage or just require detecting when the collar battery level falls below a minimum voltage.?
If your MCU's ADC has a high impedance and the MCU is powered from the 4.2V battery source, I would have considered the battery could be connected directly to the ADC input.
Most MCU ADC track the power voltage level, if the Vbattery is used as the Vref.
ie: ratiometric
E

Update:
My suggested ratiometric method will not work, you will need to use the internal Vref.
Sorry about the error, not had my morning coffee yet.:oops:
I don't think the SAMD21/SAMR34 can withstand higher voltage than 3.3V. I'd rather be able to measure the battery voltage to one decimal place so I know it's getting low and will need to be replaced.

A sample program that measures the temperature of the MCU every 10 minutes and sends it to the LoRaWAN network. I will change the ADC settings to measure the car battery voltage, later I will also read the current GPS coordinates using the u-Blox MIA-M10Q. If it is not possible to determine the GPS position within, e.g., 1 minute, I will send a dummy message to the LoRaWAN network, e.g. "NoGPS", which will allow the approximate position to be determined using automatic triangulation in the LoRaWAN network:

MPLAB X IDE LoRaWAN Stack for SAM R34.jpg
 

Bordodynov

Joined May 20, 2015
3,430
I can't open qsch file for QSPICE. I use LTspice, EE-Sim OASIS and TINA-TI.
Of course, I could introduce the scheme into LTspice, but it is pleasant and convenient for me to work with Qspice. This is a new simulator and it has improved transistor models. There is quite a lot of continuity with LTspice. The scheme is simple and you can enter it into any simulator.
You can also install Qspice. It is free and has no limit on the size of the circuit. You can borrow my model libraries. I have made a large library of models for LTspice. There are links to them on this forum. Now I'm busy replenishing the library for Qspice. I post them on the forum kazus.ru . There I made a Qspice theme. There are models and many electrical circuits in it.
 
Top