LM358 to mosfet slow switching problem

Thread Starter

Richie121

Joined Jan 12, 2014
27
Hello,

I'm building a voltage controlled relay using an LM358 to monitor charge of two batteries and two Pmosfets that will turn on an Nmosfet if either of the battery's voltage rises above 13.8v. This will allow them both to be connected together in parallel if either battery is receiving a charge enough to push it over the 13.8v threshold.

This is the basic schematic -but the front end is duplicated for each battery.(Only one comparator shown). Although both can drive the final Nmosfet.


The circuit does work, only not as well as I had modelled in Spice. In practice the voltage rise from a battery charger is incredibly slow, and this seems to be causing a Pmosfet to enter its linear region for a lot longer than desired. This in turn causes the same effect in the Nmos and the current slowly builds in the relay until it turns on. I was hoping for a digital toggle effect from the LM358. Instead I am getting a sweep.

Can anyone explain what is happening and more importantly a correct method to drive the Mosfets for me. Maybe a different comparator.

Thank you for your time and any input.
 

eetech00

Joined Jun 8, 2013
3,859
Hello,

I'm building a voltage controlled relay using an LM358 to monitor charge of two batteries and two Pmosfets that will turn on an Nmosfet if either of the battery's voltage rises above 13.8v. This will allow them both to be connected together in parallel if either battery is receiving a charge enough to push it over the 13.8v threshold.

This is the basic schematic -but the front end is duplicated for each battery.(Only one comparator shown). Although both can drive the final Nmosfet.


The circuit does work, only not as well as I had modelled in Spice. In practice the voltage rise from a battery charger is incredibly slow, and this seems to be causing a Pmosfet to enter its linear region for a lot longer than desired. This in turn causes the same effect in the Nmos and the current slowly builds in the relay until it turns on. I was hoping for a digital toggle effect from the LM358. Instead I am getting a sweep.

Can anyone explain what is happening and more importantly a correct method to drive the Mosfets for me. Maybe a different comparator.

Thank you for your time and any input.
Maybe add hysteresis or use an actual comparator instead of Opamp.

eT
 

Thread Starter

Richie121

Joined Jan 12, 2014
27
Maybe starting with a LM2904 comparator would be better.

I think the problem is how I have connected the feedback to obtain hysteresis. With the inverting input going to a voltage divider to monitor the battery voltage, this leaves the non in inverting input sat on a 6.8v zener with a resistor to the +ve rail. I've connected the feedback to this non-inverting input, but I suppose it would be fixed because of the zener. It would be better to connect it to the middle of the divider so it could move, but now my outputs are wrong.
I will have a redesign and try again.

One more thing - is a resistor really needed at the base of the mosfet between it and the output from the opamp? I have seen designs with it and without it, and am hoping that as the change is slow there will not be a inductance spike to deal with.

Sorry about the link but I couldn't upload a picture directly, and photobucket have shot themselves with their pricing.
 

Thread Starter

Richie121

Joined Jan 12, 2014
27
Oh I see. That would enable the input to be pulled up or down a bit - enough to shift the threshold.

Good idea thank you.

I've seen another design using two diodes on the outputs of the comparator that would make an OR circuit and could drive the gate directly from that. It also seems to let the nMos reach ground to turn it fully off due to the 0.7 volts drop so am trying that route. So I could replace the two Pmosfets with diodes and swap the inputs.

I have tried this thisafternoon and shows better hysteresis in the simulation - sometimes too much! - which is a good sign.

Will have a try on breadboard next.

Thank you and will report back.
 
Top