Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Voltage comparator problems

Status
Not open for further replies.

Rosmawati Ismail

Junior Member level 1
Joined
Aug 14, 2010
Messages
18
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,293
Location
Malaysia
Activity points
1,414
Hi,

I am facing problem with voltage comparator. The comparator that I use is TL331 from TI. I connected every components as stated in the schematic but it didnt work. The output voltage is always fix at LOW level even I decreased/increased the Vin + at pin 3.
The output of the comparator should trigger to LOW when Vin+ is below than 3.8V. The Vref is 3.8V.
I already added pull up resistor to the output line but still nothing happened.
Can someone help me?
Thanks.:smile:
 

Attachments

  • comparator.jpg
    comparator.jpg
    36.7 KB · Views: 67

can you compare input voltages which are lesser than the Vcc which is 3.3V as shown in your circuit? I am not sure. Just guessing
 

You cannot use the TL331 within 1.5V of the positive rail - check the common mode input voltage range in the data sheet. So, with a 3.3V supply it won't work above 1.8V on the inputs.

Keith.
 

Hi Keith,

Glad ur back.

I dont really understand about comparator. Do you have any comparator to suggest? Thank you:grin:
 

I doubt you will find a comparator that will work more than 0.2V away from the rails. You could use a rail-rail comparator and power it off the 4.2V. When you aren't charging it will have no power so you would need to put a high value resistor in the non-inverting input to protect the comparator and minimise leakage. You would also need a capacitor on the non-inverting input. It is not an ideal solution.

I am not sure what you are trying to achieve by the circuit. If you just want to detect when the 4.2V charge voltage is above 3.8V then simply use a 1.25V reference on the non-inverting input of the comparator and change the resistor values to get the triggering voltage correct. You can then stick with the TL331.

Keith.
 

cameo_2007,

I cant change the Vcc since it is tied directly to microcontroller where its HIGH logic is 3.3V


Keith,

What I want to achieve is whenever the non-inverting (IN+) is below than Vref (IN-), the output will switch from HIGH to LOW. For the earlier case, the Vref after voltage divider circuit is around 3.8V. So basicly, when the Vbat id dropped to 3.79V I will get an interrupt at microcontroller's side which in this case is the output of the comparator.
By the way, can I use 1.7V as voltage reference instead of 1.25V?


I attached a new schematic. Please help to review. This time around, I changed to voltage divider value at inverting input so the Vref become 1.78V while the non-inverting input is set to 1.75V when the Vbat value is drop to 3.7V. I havent test this circuit but it is just a rough idea.
 
Last edited:

By the way, can I use 1.7V as voltage reference instead of 1.25V?

You can but you are very close to the maximum input range of the comparator then. You can of course just scale down the voltage on the non-inverting input from the 3.3V supply to any value rather than using a separate voltage reference.

Keith.
 

You need to take your non-inverting input reference from a fixed voltage i.e. 3.3V not Vbat.

Also, I would suggest you aim for a lower input voltage than 1.75V - it is too close to the limit of the working range.

Add capacitors to the inputs to ground.

R104 can be a lot bigger - you are wasting several milliamps which is unnecessary.

Keith.
 

Keith,

You need to take your non-inverting input reference from a fixed voltage i.e. 3.3V not Vbat.
I take the Vref from 4.12V_Charge, while Vbat is the triggering input. When the value of Vbat is lower than 3.7V the output is LOW. Is my circuit wrongly connected?

R104 can be a lot bigger - you are wasting several milliamps which is unnecessary.
I'll replace it with 470R then.

Cameo,

where is your 4.12V_Charge coming from
- it comes from another step down regulator which is on-board. I use this voltage source to scale down the Vref input voltage at IN-.
 

Your circuit implies that you have a variable voltage going into BOTH of the comparator inputs. I thought that you wanted the output to trigger when the 4V2_charge volatge is above a fixed amount in which case you need a fixed voltage on one of the inputs. If you just want to trigger when the charge volatge is above the battery voltage then your circuit is conencted correctly.

You do, however, have to take heed of my warning about having 1.75V nominal on the comparator inputs. The comparator will only work up to 1.8V and when the battery is fully charged there will be 2V on the non-inverting input. Why do you not change the resistor values to use a lower voltage such as 1V or 1.2V on the inputs as I suggested earlier?

Also, you should INCREASE R104 not decrease it. I am sure 10k would be fine.

Keith.
 

Actually 4V2_charge voltage is fix voltage that I use as Vref. I scaled down the voltage to 1.25V at IN-. I wanted the output trigger when Vbat scale down value is below than 1.25V at Vref. So in my case Vbat is the variable voltage.

Why do you not change the resistor values to use a lower voltage such as 1V or 1.2V on the inputs as I suggested earlier?
I already changed resistors value to have 1.25V on the inputs.

by the way, do you have an idea how to manage battery charging system. Since I need to implement the circuit while in microcontroller's sleep mode, only interrupt pin is function so I cant go for timer solution.
from the above circuit, the final result that I want to achieve is that whenever battery voltage is below than 3.7V the battery is start charging. when it detects 3.9V then it stops charging. Can I use a schmitt trigger solution? if yes, how? I have been googling on the net yet I didnt seem to found any hint of understanding.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top