4772 views|22 replies

541

Posts

1

Resources
The OP
 

Problems with constant current source composed of op amp + MOS tube [Copy link]

 

PWM is generated by the microcontroller, with a frequency of 20K. After RC filtering, it becomes DC, that is, the voltage at point A is DC voltage.

The problem during debugging is that I don't give PWM, that is, the PWM port of the microcontroller is directly pulled low, the output is zero, but the LED is still on at this time.

Then I used an oscilloscope to measure the voltage at point B, which was 2V. As I gave PWM and controlled the duty cycle, the voltage at point B slowly rose from 2V, and the LED gradually became brighter, but the LED could not be turned off.

I would like to ask you why the voltage at point B is not 0V but 2V when the input is zero.

This post is from Analog electronics

Latest reply

This should be a problem with the bias voltage of the op amp. When the non-inverting end is 0, the MOS is almost turned off, and the entire circuit is in a nearly open-circuit state. At this time, the output voltage is the Vos*open-loop gain of the op amp itself. You can try an op amp with a smaller bias voltage. At this time, the output voltage of the op amp may become smaller. To reach 0V completely, it is recommended to add a forward bias at the inverting end to ensure that the constant current can reach 0mA. However, the calculation formula will change in this way.   Details Published on 2023-7-17 10:39

2w

Posts

0

Resources
2
 

"Then I used an oscilloscope to measure the voltage at point B, which was 2V. As I applied PWM and controlled the duty cycle, the voltage at point B slowly rose from 2V, and the LED gradually became brighter."

Why not measure the voltage at the source of Q1 (upper end of R31)?

This post is from Analog electronics

Comments

The voltage test shows 35mV   Details Published on 2023-7-11 09:53
The voltage test shows 35mV   Details Published on 2022-6-17 15:24
The voltage test shows 35mV   Details Published on 2022-6-17 15:05
 
 

706

Posts

0

Resources
3
 

It may be caused by capacitor C28, you can remove this capacitor and try it first.

This post is from Analog electronics

Comments

You can try it   Details Published on 2022-6-17 15:57
 
 
 
 

541

Posts

1

Resources
4
 
maychang posted on 2022-6-17 14:38 "Then I used an oscilloscope to measure the voltage at point B, which was 2V. As I gave PWM and controlled the duty cycle, the voltage at point B slowly rose from 2V, and the LED also gradually became brighter...

The voltage test shows 35mV

This post is from Analog electronics
 
 
 
 

1w

Posts

143

Resources
5
 

The op amp has input offset...

This post is from Analog electronics

Comments

Input offset, is it such a big offset?  Details Published on 2022-6-17 15:26
 
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 
 
 

541

Posts

1

Resources
6
 
maychang posted on 2022-6-17 14:38 "Then I used an oscilloscope to measure the voltage at point B, which was 2V. As I gave PWM and controlled the duty cycle, the voltage at point B slowly rose from 2V, and the LED also gradually became brighter...

I suspected that the pull-down of the microcontroller was unreliable, so I directly soldered the PWM port to GND. I found that the 2V voltage at the G pole of the MOS tube slowly decreased over time. After about 5 minutes, it dropped to 700mV, and it was still decreasing over time.

This post is from Analog electronics

Comments

The MCU's IO cannot actually output 0V, as long as it conforms to the logic 0 level. When testing, the op amp's inverting input should be directly grounded, otherwise the residual charge on C31 will have an impact over a period of time.  Details Published on 2022-6-17 16:02
The MCU's IO cannot actually output 0V, as long as it conforms to the logic 0 level. When testing, the op amp's inverting input should be directly grounded, otherwise the residual charge on C31 will have an impact over a period of time.  Details Published on 2022-6-17 15:39
 
 
 
 

541

Posts

1

Resources
7
 
chunyang posted on 2022-6-17 15:13 The op amp has input offset...

Input offset, is it such a big offset?

This post is from Analog electronics

Comments

Low-end models generally have an input offset voltage of several mV, which can be obtained by directly grounding the non-inverting input and measuring the inverting input. However, accurate measurement requires the internal resistance of the meter to be high enough.  Details Published on 2022-6-17 15:35
 
 
 
 

1w

Posts

143

Resources
8
 
S3S4S5S6 posted on 2022-6-17 15:26 Input imbalance, is it so big?

Low-end models generally have an input offset voltage of several mV, which can be obtained by directly grounding the non-inverting input and measuring the inverting input. However, accurate measurement requires the internal resistance of the meter to be high enough.

This post is from Analog electronics
 
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 
 
 

1w

Posts

143

Resources
9
 
S3S4S5S6 Published on 2022-6-17 15:24 I suspect that the pull-down of the microcontroller is unreliable. I directly soldered the PWM port to GND and found that the 2V voltage of the G pole of the MOS tube slowly decreased over time, about 5 minutes...

The MCU's IO cannot actually output 0V, as long as it conforms to the logic level of 0. When testing, the op amp's non-inverting input should be directly grounded, otherwise the residual charge of C31 will have an impact over a period of time.

This post is from Analog electronics
 
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 
 
 

541

Posts

1

Resources
10
 
Fred_1977 posted on 2022-6-17 14:54 It may be caused by capacitor C28. You can remove this capacitor and try it first.

You can try it

This post is from Analog electronics
 
 
 
 

2w

Posts

0

Resources
11
 
S3S4S5S6 published on 2022-6-17 15:24 I suspect that the pull-down of the microcontroller is unreliable, so I directly soldered the PWM port to GND and found that the 2V voltage of the G pole of the MOS tube slowly decreased over time, about 5 minutes...

"I directly soldered the PWM port to GND and found that the 2V voltage at the G pole of the MOS tube slowly decreased over time. After about 5 minutes, it dropped to 700mV and continued to decrease over time."

I suspect that you used a capacitor with large dielectric absorption, such as an electrolytic capacitor, for C31 in the first post. Due to the dielectric absorption of this capacitor, the potential of the op amp's in-phase input terminal can only drop slowly to zero. The time constants of C28 and R27 are also over 10ms. These two items make the current in Q1 change slowly.

This post is from Analog electronics

Comments

C31 uses a 0603 packaged ceramic capacitor, and there may be problems with the selection of the values of C28 and R27.  Details Published on 2022-6-17 16:20
C31 uses a 0603 packaged ceramic capacitor, and there may be problems with the selection of the values of C28 and R27.  Details Published on 2022-6-17 16:18
 
 
 
 

541

Posts

1

Resources
12
 
maychang posted on 2022-6-17 16:02 S3S4S5S6 posted on 2022-6-17 15:24 Suspecting the pull-down of the microcontroller, it is unreliable. I directly soldered the PWM port to GND and found that the 2V of the G pole of the MOS tube...

C31 uses a 0603 packaged ceramic capacitor, and there may be problems with the selection of the values of C28 and R27.

This post is from Analog electronics
 
 
 
 

541

Posts

1

Resources
13
 
maychang posted on 2022-6-17 16:02 S3S4S5S6 posted on 2022-6-17 15:24 Suspecting the pull-down of the microcontroller, it is unreliable. I directly soldered the PWM port to GND and found that the 2V of the G pole of the MOS tube...

The entire circuit structure is based on TI's documentation.

Voltage-to-current (V-I) converter circuit with MOSFET.pdf

527.19 KB, downloads: 54

This post is from Analog electronics
 
 
 
 

9

Posts

0

Resources
14
 
Learn about ,,,,,,,,,,,,,,,,,,,,,,,,,
This post is from Analog electronics
 
 
 
 

1022

Posts

0

Resources
15
 

At least a 120K resistor should be connected to the ground at point A to achieve basic input current balance. At the same time, the offset voltage also needs zero point adjustment.

This post is from Analog electronics

Comments

How does this work? Can you explain it in more detail?  Details Published on 2022-6-17 20:52
 
Personal signatureچوآن شـين
 
 
 

541

Posts

1

Resources
16
 
Gen_X posted on 2022-6-17 17:42 At least a 120K resistor should be connected to the ground at point A to balance the input current. At the same time, the offset voltage also needs zero adjustment.

How does this work? Can you explain it in more detail?

This post is from Analog electronics
 
 
 
 

706

Posts

0

Resources
17
 

The reference circuit is 100PF, so the capacitor of C28 is used incorrectly. There is a big difference between 100PF and 0.1UF.

This post is from Analog electronics
 
 
 
 

288

Posts

0

Resources
18
 

Excuse me, what is the function of the 100pF capacitor in this reference manual?

This post is from Analog electronics

Comments

[What is the function of the 100pF capacitor in this reference manual] It suppresses the high-frequency gain of the amplifier circuit and makes this strong negative feedback circuit work stably.  Details Published on 2023-7-11 10:03
 
 
 
 

288

Posts

0

Resources
19
 
maychang posted on 2022-6-17 14:38 "Then I used an oscilloscope to measure the voltage at point B, which was 2V. As I gave PWM and controlled the duty cycle, the voltage at point B slowly rose on the basis of 2V, and the LED also gradually became brighter...

Teacher, does this op amp require rail-to-rail op amp?

This post is from Analog electronics

Comments

[Does this op amp have to be rail-to-rail?] The power supply of the op amp is supplied separately. The on-state voltage of the MOS tube is usually 2V, which is higher than the lowest voltage that an ordinary op amp can output. Therefore, this op amp does not require rail-to-rail.  Details Published on 2023-7-11 10:02
 
 
 
 

2w

Posts

0

Resources
20
 
Pingpiaoliu published on 2023-7-11 09:53 Teacher, does this op amp require a rail-to-rail op amp?

[Does this op amp have to be a rail-to-rail op amp?]

The power supply of the op amp is supplied separately. The on-state voltage of the MOS tube is usually 2V, which is higher than the lowest voltage that an ordinary op amp can output, so this op amp does not require rail-to-rail.

This post is from Analog electronics
 
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list