voltage sense switch with a comparator and VREF

benbiles

Member level 5
Joined
Jan 24, 2014
Messages
80
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Visit site
Activity points
2,184
I am trying to design a way to sense voltage in a car which will switch on a microcontroller which has other tasks if a voltage is over 13.5V ( when the alternator is active in the car )

I could leave the micro controller on and monitor the voltage in a low power mode but I am looking into other ways using a comparator to see if it can use less standby power.

the relatively cheap REF30xx uses quite a Low IQ: 42 µA (Typical) and can deliver up to 25mA of current.

I am not sure how much peek current is required at the mosfet ZXMN2B01F or at least I don't know how to calculate that from the datasheet.

I am assuming I would need to use values in the resistor divider to allow for this switch on current.
That would be the burn current in standby waiting for the 13.5V before micro is switched on.

If this lost power lost in the resistor divider > 12mA then maybe I should just leave the micro controller on in low power with the screen off !!

the micro controllers other tasks would act as a timer before switching on a alternator powered DCDC charger for aux battery in the vehicle.
There is also a solar charger and charging is switched by micro controller from solar to alternator charge with a mosfet and a relay. the default
relay position with no power is solar.

so my question is is , how do I calculate the peak mosfet required power at gate. and / or is there a better way to do this ?
 

Attachments

  • voltage sense switch.png
    86.7 KB · Views: 19

Hi,
cheap REF30xx uses quite a Low IQ: 42 µA

there are low power microcontrollers .... having low ACTIVE current. It´s hard to say how much processing power you need and what periferals you need.

But in either case ... the microcontroller could be in deep sleep - let´s say for 10s - and then wake up just to check battery voltage (let´s say 10ms) and then go back to sleep.
So the active current is just ON for 0.1% of the time .. and thus does not contribute much to the average current.
At least this is how I would do it.

This approach gives best flexibility. All can be programmed - like voltage levels and timing. No need to use a soldering iron when you want to adjust parameters or functionality.

I am not sure how much peek current is required at the mosfet ZXMN2B01F
What "peak current" are you talking about? Gate? Drain? Why?

If GATE current: A MOSFET does not need current to switch ON. The leakage current may be in the nanoamperes.
However the gate (peak) current deteremines HOW FAST the MOSFET switches ON.
Is it allowed to take milliseconds ... or do you expect it to swtich ON wihtin nanoseconds.
And this current only is active during transition ... it is almost zero when completely ON and when OFF.

BTW: there are low power comparators with built in VRef. .. especially designed for applicatins like yours.

Klaus
 

Most of the power consumption is in the 3.3V reference potential divider, I'm sure a less power hungry solution is available. Given that the current flowing into the comparator is tiny you can probably use something much simpler, maybe a Zener diode and higher value series resistor.

You will also run into problems with the comparator anyway, the current into the MOSFET gate in this circuit will be insignificant as it should be a simple high or low DC level but there will be a "cliff edge" condition where the reference and measure voltages are almost identical and the comparator may switch on noise alone. A better solution would be to add hysteresis so the high and low switching voltages are adjusted according to the output state. This will avoid the problem and increase reliability for the cost of maybe a single resistor. I would check the use of the MOSFET as a switch as well, it will start to conduct when the gate to source voltage exceeds the gate threshold and will not reach full conduction until a higher voltage is applied. As you have the source connected to +12V you will need a higher voltage than the comparator can produce to make it conduct.

Being honest, it is probably cheaper, simpler and more reliable to use an MCU with built in comparator and voltage reference. Look at small switching regulator modules that produce stable 5V and can withstand inputs up to >30V to power an MCU, total current consumption will be less than your comparator circuit.

You should note that the 12V/13.5V on the battery line is not a reliable way to tell if the alternator is running. It will undoubtedly work but vehicles place many loads on the supply and are notorious for carrying high voltage spikes on the battery line. You would have to connect the circuit directly across the battery terminals to find 'clean' voltages, anywhere else will be prone to interference.

Brian.
 
ference potentia
Does your car contain built-in electronics which draw power 24/7? Clock. Security monitor (example, my car has a blinking led).
I tested once and found it amounts to mA. Less than 200mA.
Yes my car does have things that suck power while its parked although I was keen on not adding to the things that give me a flat battery while I'm holiday but you have a good point , 25mA is not much in the bigger picture.
--- Updated ---


I think this is probably the best solution , just have the micro wake up on a timer or something periodically. just less parts in the design that way too. Although I was interested to learn about using comparators etc so was worth looking into.
 

This is brilliant advise , thank you so much ! The 2 points , noise causing oscillation and the other about the mosfet requiring nearer the source 12V to completely switch on and supply enough power I had not thought of !

I think I will scrap the comparator and just monitor DC voltage with ADC through a buffer ( op amp ) on the micro. I'll just use a timer and wake the micro up at whatever given interval to check voltage.

I have watched the voltage from alternator in my Japanese Kei van and its above 13.5V if the engine is running all the time regardless of how much stuff I have running and for how long. fans headlights etc. the alternator is tiny , 60A. I have a DCDC boost buc that is current limited and will only take 150W max to charge 36V lithium 10S through an MPPT. I dont think I'll go as far as monitoring the alternator temp but I suppose the option is there. what would be cool is if I could hack into the CAN bus and only take the power when the engine is not idling !
 

Design the solution to handle load dump V's that exist in vehicles :



Regards, Dana.


Interesting !! thank you !!
I had some Diode protection but did not account for the load dump effect.

My 12V -> 3V3 is LMR51430XDDCR which has 4.5V -> 36V range.

If the micro crashes ( restarts )on cold / hot crank then I don't think it matters. if the voltage drops below 4.5V then LMR51430XDDCR will just cut power to the micro , otherwise it might keep going.

The micro has to count down 5 mins or more before it will kick in the relay and start charging the AUX battery with DCDC current limit and MPPT anyway.

The bigger concern is reverse polarity and having large enough Diodes and protection for that.
I think that's where your docs will come in useful. That could actually do quite a but of damage to the solar charger pannel etc. The lithium battery's blocks I am using have pretty good BMS's that protects against reverse polity so at least they would not catch fire !
 

Cookies are required to use this site. You must accept them to continue using the site. Learn more…