How to do the comparator reference voltages? - Page 1
Forum section: electronics / projects

author: MuriTheMyth
author_rank: Contributor
timestamp: September 10, 2024, 03:16:16 am
content: Hi folks,I hope this email finds you well.I'm working on my project involving 2x TLV3601 (quite high-speed) comparator. I need reference voltages of 2.6V and 2.7V, and ideally adjustable in lab.My current solution is to have a voltage divider to generate reference from +5V rail. This is adjustable by plugging in different resistors into the slot.Though, in my last meeting with my tutor, he was worried that the reference voltage would be too noisy. He suggested me to use something called "voltage reference IC".I did a search online and found some voltage reference IC, but they seems to have very limited voltage options (2.5V, 3.0V, 3.3V...).Am I looking into the wrong thing? Any comment on this is highly appreciated!Many Thanks,Muri

author: brucehoult
author_rank: Super Contributor
timestamp: September 10, 2024, 03:25:25 am
content: Impossible to answer your question without knowing how accurate that 2.6V or 2.7V needs to be. Nothing is this world is 100% accurate. DC accuracy? Ripple?What is supposed to be wrong with the 5V rail? You can do a voltage divider from, say, an accurate 3.3V source.

author: MuriTheMyth
author_rank: Contributor
timestamp: September 10, 2024, 03:43:36 am
content: Thank you for replying!I would say in the worst case the 2.6V and 2.7V reference shouldn't cross over. And it will be ideal if the error is below 10mV.I think the 5V rail is fine, it is derived from the LDO. My tutor might be worrying about the contact noise I guess. I don't really know.P.S. I think my way of doing the reference voltage is fine. Does it look anywhere incorrect to you?

author: inse
author_rank: Super Contributor
timestamp: September 10, 2024, 04:37:56 am
content: The 10mV error you allow will need the 5V rail to be 0.4% accurate, so maybe a dedicated reference is required.As an example LM4050 delivers 0.1% accuracy.Please consider you cannot do the necessary divider with 1% resistors.

author: MuriTheMyth
author_rank: Contributor
timestamp: September 10, 2024, 04:44:57 am
content: Thank you! your advice is very helpful!

author: brucehoult
author_rank: Super Contributor
timestamp: September 10, 2024, 04:57:24 am
content: Quote from: inse on September 10, 2024, 04:37:56 am... at least not without accurately measuring the resistors you actually have and adding small series (or large parallel) resistors to them to increase (resp decrease) to the desired resistance.With a 5V reference using GND - 12k - 470 - 11k - Vcc would give with ideal resistors 2.556 and 2.656 with very close to the desired 0.1V gap between them.Assuming you get an exact 470 Ohm resistor the targets for the other two are actually 10810 (23x) and 12220 (26x) so with perfectly accurate resistors you'll want about a 220 series trim resistor with the 12k and a 620k parallel trim resistor for the 11k ... but those can vary pretty wildly with the actual measured values of the 11k and 12k resistors.You don't actually need to know the true values of your resistors, only their ratios. So if you don't have a super-accurate resistance meter you could use each of the resistors in turn in a simple RC circuit and check the ratios of the frequencies, which you can do extremely accurately with any microcontroller.

author: PGPG
author_rank: Frequent Contributor
timestamp: September 10, 2024, 08:25:46 am
content: Quote from: MuriTheMyth on September 10, 2024, 03:43:36 amYou can guarantee it using one 3 resistor divider instead of two independent dividers.Quote from: MuriTheMyth on September 10, 2024, 03:43:36 amSpecify what error you define:- absolute value of 2.6 and 2.7 voltages error (10mV means 0.37% tolerance), or- 0.1V difference between them error (10mV means 10% tolerance).To do things with 10% tolerance is much easier than with 0.4% tolerance.

author: Zero999
author_rank: Super Contributor
timestamp: September 10, 2024, 10:11:06 am
content: Use a three resistor divider and a reference, if the 5V supply isn't good enough.Here's a website which can calculate the optimum resistor values, using standard E12, E22, E48 preferred numbers.http://sim.okawa-denshi.jp/en/teikokeisan.htmEDIT:Obviously, if you use the web based calculator, linked above, you should mention it to your tutor and include a link to it in the bibliography of any write-up.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: September 10, 2024, 10:15:28 am
content: Quote from: MuriTheMyth on September 10, 2024, 03:43:36 amYou are making a big error here. Ask yourelf:Is my main goal to build a gadget and pass the test? Or:Is my main goal to grow a deeper understanding of how electronics work, and as a result be able to design better gadgets.