MaxHeadRoom
- Joined Jul 18, 2013
- 30,872
As I said, Watch the video !
You are still barking up the wrong tree. This is how you do PWM. The purpose of the sawtooth Ramp is to sample the value of Ref using a comparator to change the value of pwm when (Ramp - Ref) changes sign. In normal operation Ref would some reference voltage that you would use to control the pulse width. I made it a lower frequency triangle wave to demonstrate the change in duty cycle.i want speed controller, not just turn on/off
In the logic level MOSFET, MCU pin is overloaded
I'm going to use PC817, but it's only on/off
I am looking for suitable Vgs using the Voltage Divider for 24
However, I don't know the R value at which Mosfet turns on/off quickly.



Inquiring minds want to know.Why do you keep asking for help, then ignore the answers and try another ill-conceived circuit of your own?
But R4 isn't doing anything, and you've limited the gate voltage to 4.3V.
sorry for that i tried all the circuits all night. I didn't have many parts, so I bought the rest late.Why do you keep asking for help, then ignore the answers and try another ill-conceived circuit of your own?
Thank you, but I made a stupid mistake.Inquiring minds want to know.
I changed R3=5V−0.65V0.33mA=13kΩ -> 10KΩBut R4 isn't doing anything, and you've limited the gate voltage to 4.3V.
Don't try it with 3.3V logic or you will come unstuck.
but the voltage on the base won’t be 0.65V, because you have an emitter follower: R3 is superfluous.I changed R3=5V−0.65V0.33mA=13kΩ -> 10KΩ
R4 is to limit the Q1's collector current
Isn't it stable to limit the speed as much as possible? or i ust adding useless parts?but the voltage on the base won’t be 0.65V, because you have an emitter follower: R3 is superfluous.
and why do you want to limit the current into the MOSFET gate? You don't want to slow it down.
It's just that I'm lucky that the frequency isn't high, so it's not loadedNO!! Limiting the output (controlled variable) in a feedback system will usually reduce any stability by adding non-linear response.
NEXT: the basic concept of a PWM system is to switch the applied power between zero and some maximum value, and have the inertial averaging of the controlled device do the smoothing back into an intermediate value. but from the initial post forward it has not been aiming in that direction. The mosfet transistor should have been switching between cutoff and saturation, unfortunately the response times were not in line with the frequency selected, it seems.
The gate drive signal was not enough to put the transistor into saturation, and all of the capacitors assured that there would be no rapid changing of the voltage applied to the motor. In a linear analog system that could be fine, but the claim was to be wanting PWM control of the motor..
PWM control is indeed switching on and off completely and quickly. The motor inertia is what delivers the averaged power through varied torque and speed.
I'm sorry to see this late.a bit poor (read "too idealistic") model - but . . .
( notice the gate current )
View attachment 273004