当前位置:网站首页>Lack of comparator, operational amplifier to save the field! (the op amp is recorded as a comparator circuit)
Lack of comparator, operational amplifier to save the field! (the op amp is recorded as a comparator circuit)
2022-07-01 10:16:00 【Caused by Jin Chen】
Circuit class , Let's talk about an example of using an op amp as a comparator ... by Due to Jin Chen
Catalog
Preface
Recently I did a small project , Because a comparator is out of stock , There's a little problem , It took some time and finally used an op amp to temporarily replace the comparator , Solved the problem .
Because of this problem , It reminds me of the previous example of using op amp instead of comparator , And then I thought This period's circuit class , Let's talk about how to use op amp as comparator as well as Things to pay attention to .
One 、 OP AMP and comparator
Those things like principle application instructions belong to basic problems , Not the focus of this article , We explain in a simple way .
1.1 brief introduction
The comparator :
Let's start with a simple comparator , I really don't want to draw , Post your previous notes = =! Make do with it :

You can see it , The function of comparator is to compare The voltage of the two inputs is high or low , The general circuit application for comparing two voltages in a circuit is ( We haven't talked about the output here , Will the following article say , This is just a diagram ):

The voltage comparator can be seen as having a magnification close to “ infinity ” Operational amplifier .
Operational amplifier :
Operational amplifiers are relatively better than The voltage comparator is much more complicated , If you have the time , I will write a separate article to explain . This article will not do too much basic introduction .
Operational amplifier is an electronic integrated circuit with multi-stage amplification circuit , Its input stage is a differential amplifier circuit , High input resistance and ability to suppress zero drift ; The intermediate stage is mainly used for voltage amplification , With high voltage amplification , It is generally composed of common emitter amplifier circuit ; The output pole is connected to the load , It has strong carrying capacity 、 Low output resistance .
The operational amplifier uses differential input , And it has high gain , This is similar to the characteristics of the comparator , Therefore, it can be used as a low performance comparator in practical applications .
Use the op amp as a comparator , Then the operational amplifier works in an open loop way .
In fact, the most commonly used operational amplifier circuits are closed-loop circuits .
What is open loop and closed loop ?
An open-loop circuit is a circuit without feedback , Output does not affect input .
The closed-loop circuit is a circuit connected with feedback , That is, the output will affect the input .
So for the op amp , The input feedback resistor is a closed loop circuit , No access is an open loop circuit .
We have drawn the application circuit diagram of the comparator above , For comparators , His common basic circuit is the closed-loop feedback circuit , Here's the picture :

1.2 * Output terminal *
The op amp should be reasonably used as a comparator , Their outputs Vout Need special attention .
The output of operational amplifier is generally push-pull , The output of the comparator is open ( The opening episode ) More , There are also many Push-Pull Outputs .
Push pull output , It can easily output high and low levels ;
Open a leak (OC/OD door ) The most important characteristic of the output is that the high level has no driving ability , The external pull-up resistor is needed to really output high level .
therefore , When choosing op amp or comparator, you should pay attention to their output mode , The use of circuits with different output modes is also different .
Let's take a comparator as an example , such as TI Of LMV723X, I've never used , In fact, it is only for writing articles and searching on the Internet , There is a description of the model and output in its documentation :
For open drain output :
When we use it , The circuit generally adopts the following forms :

For push-pull output :
When we use it , The output terminal can be without a pull-down resistor ( In some cases, a diode can be added , For example, when the comparator output is in parallel ):

So when we use op amp instead of comparator , First, check whether the original design of the circuit is open drain output or push-pull output , If it is a push-pull output, it can be directly replaced , In case of open drain output , It needs certain treatment .
1.3 Precautions for using op amp as comparator
Here is the description of Baidu Encyclopedia , In practice , Compared with using a dedicated comparator, using an op amp comparator has the following disadvantages :
- The response speed is slower than the real comparator , The op amp is designed to operate in a linear segment with negative feedback , Therefore, saturated operational amplifiers generally have a slow flip speed . Most operational amplifiers have a compensation capacitor to limit the swing rate of high-frequency signals . This makes the op amp comparator have microsecond propagation delay , In contrast, the flip speed of the dedicated comparator is in the nanosecond order .
- The op amp has no built-in hysteresis circuit , A dedicated external network is required to delay the input signal .
- The static operating point current of the operational amplifier is stable only under the condition of negative feedback . DC bias occurs when the input voltages are unequal .
- The function of comparator is to generate input signal for digital circuit , It is necessary to consider the compatibility with the digital circuit interface when using the operational amplifier comparator .
- Interference may occur between different frequencies of multi section operational amplifiers .
- Many op amps have diodes in reverse series at their inputs . The inputs of the two poles of the op amp are generally the same , It won't cause problems . But the two poles of the comparator need different voltages , This may lead to unexpected diode breakdown .
actually , If we make some common civilian sensors , In addition to paying attention to the processing of the output circuit , Other problems are not problems .
At least some of the civilian sensor fields where bloggers are located , Some product cases haven't said anything about the problems .
Two 、 Circuit record
It says so much , Simply use a few program examples to illustrate , Also as my own plan record , Because it involves some problems , So I disposed of the resistance and capacitance in the circuit , But the explanation of principles and knowledge is not affected .
2.1 A proud alternative
Let's look at a circuit :
In the circuit 2 A comparator ,2 An op amp , Finally, it is directly connected through the output of the comparator MCU Of IO mouth :

It is also mentioned in the above figure , because LPV521 and MAX920 These two materials are expensive and short of materials , So the product has to be upgraded , Finally, I used a cheap 4 road Op amp directly replaces the above scheme :

Combined with the analysis of the above article , Many problems can be explained by the above circuit ,
2.2 Some details are explained again
The above plan was completed a few years ago , Recently, when making a simpler plan , I didn't think much about it , Just draw the following picture , Yes , The same chip , The circuit is simpler :
But I didn't think too much when designing , It is directly designed as follows :

A micro power comparator is used RS8901XF , Everything tested is normal , When making small batch samples , because RS8901XF Shortage , Therefore, another signal comparator is selected , When you find out, something goes wrong .
The reason is that I didn't pay attention to the output of the comparator I chose later , If it is an open drain output, then this circuit cannot be used . Finally, an op amp is used to replace COP1 , The sample is tested to be normal !
Now think about it. , This plan should not be designed like this , Use standard comparators directly , No diodes are required , Use only one pull-up resistor R4 , Directly connect the output of the comparator to MCU Corresponding IO Eloquence is the simplest way !!!
Of course, the diode in the above figure is also a little redundant , The first is because 2 Circuit output in parallel , Diodes are necessary , And here, single channel output , Diodes are not needed !
Conclusion
Okay , This article is mainly to explain the actual case that bloggers have used operational amplifiers as comparators .
Now look back , In general , If possible , Operational amplifier or operational amplifier , The comparator is a special comparator . But sometimes , For example, the first plan in my above record , Take the op amp as a comparator , It's also a good choice .
* Of course , Although I said that generally speaking, the general product is not a problem , But more tests are needed , Circuit design , Besides theoretical knowledge , Practice is essential !!*
Okay , This article is here , Thank you. !
Recommended reading :
Share a practical solar charging circuit ( Indoor lighting is available )
Talk about the automatic power switching circuit ( Summary of common automatic switching circuits )
边栏推荐
- 怎么理解JS Promise
- C# 一行代码计算文件的MD5值 - CodePlus系列
- The Lantern Festival is held on the fifteenth day of the first month, and the Lantern Festival begins to celebrate the reunion
- CSDN's one-stop cloud service is open for internal testing, and new and old users are sincerely invited to grab the fresh
- Comparison between Oracle JDK and openjdk
- Is it safe to do fund fixed investment on CICC securities?
- Module 9: design e-commerce seckill system
- Win11账号被锁定无法登录怎么办?Win11账号被锁定无法登录
- Apple amplification! It's done so well
- 大佬们,数据湖iceberg的数据,怎样导出到mysql? 有什么工具? sqoop,datax都没
猜你喜欢

Who has the vision to cross the cycle?

建议收藏 | 在openGauss上遇到慢SQL该怎么办?

Can you afford to buy a house in Beijing, Shanghai, Guangzhou and Shenzhen with an annual salary of 1million?

leetcode:111. 二叉树的最小深度

北汽蓝谷:业绩承压,极狐难期

What if the win11 account is locked and unable to log in? Win11 account is locked and unable to log in

微信表情符号写入判决书,你发的OK、炸弹都可能成为“呈堂证供”

CodeBlocks 左侧项目栏消失,workspace 自动保存项目,Default workspace,打开上次的workspace,工作区(图文教程,已解决)

Scratch big fish eat small fish Electronic Society graphical programming scratch grade examination level 2 true questions and answers analysis June 2022
![C# [字节数组]与[16进制字符串]互相转换 - CodePlus系列](/img/d2/dad88f53701c7cd7638bd4983cbb4b.png)
C# [字节数组]与[16进制字符串]互相转换 - CodePlus系列
随机推荐
Introduction to expressions and operators in C language
uniapp微信小程序组件按需引入
Who has the vision to cross the cycle?
The stock position building rate of global funds and asset management reached a new low in 15 years
零基础入门测试该学什么?最全整理,照着学就对了
Common penetration tools -goby
button按钮清除边框
Comparison between Oracle JDK and openjdk
BSN长话短说之十:如何保证NFT的安全
Meituan P4 carefully collated microservice system architecture design manual to see the world of microservice architecture
Does anyone know why? The table structure is the source table MySQL CDC that has just been directly copied
Graduation summary of actual combat camp
About database: how to avoid deadlock in gbase 8s
JD and Tencent renewed the three-year strategic cooperation agreement; The starting salary rose to 260000 yuan! Samsung sk of South Korea competes for salary increase to retain semiconductor talents;
CentOS configures discuz prompt, please check whether the MySQL module is loaded correctly
树莓派4B系统搭建(超详细版)
问下群里的各位,有使用flink oracle cdc的logminer方案,在生产上稳定运行的实际
SQL statement modify field type "suggestions collection"
历史上的今天:九十年代末的半导体大战;冯·诺依曼发表第一份草案;CBS 收购 CNET...
leetcode:111. 二叉树的最小深度