Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

MOSFET motor controller

Status
Not open for further replies.

AllanBertelsen

New Member
I have been working on a relay/MOSFET motor controller. The diagram shows the circuit without the relay. When I send the PWM signal the LED (D1) clearly shows if duty cycle is hi or low and all in between.
Problem is that I can't recognize any difference in motor speed.
If I measure voltage difference on the output of the opto isolator I see high voltage at low duty cycle and low voltage at high duty cycle. I don't measure any difference in voltage at the motor. It's always high when there is just a small duty cycle. When the PWM signal is of the motor is also off.
I should also mention, that I added a 100 uF cap at the motor supply to reduce noise.
The opto isolator is a PS2501-4.
 

Attachments

  • PWM.GIF
    PWM.GIF
    4.3 KB · Views: 2,711
Last edited:
When you remove the motor will you get variable voltages on the traces/wires where the motor should be connected? some cheap motors do not support PWM... also try reducing the size of the cap to 0.1uF (100 is HUGE)
You could also add a capacitor triangle on the motor leads (if using DC motor): cap between leads, lead1 to case, lead2 to case.
 
I just removed the cap. I put the big cap on because of a noise power supply. Now I got 24V batteries instead. But it did not do any difference. When the motor is removed, I don't get variable voltages. It's as if the MOSFET don’t shot down in the low parts of the PWM signal.
I could sure use a scope here! The output from the opto isolator is sensitive to the PWM signal. The MOSFET isn’t.
 
OK What mosfet are you using?
 
Have you thought of that Logic level TrenchMOSTM means, that it wants 5V to the Gate not 24V?
throw away that opto isolator and replace it with a 330ohm resistor (or a like) to control the gate of the mosfet.

PS if you really want to protect your MOS you need at least 2 Diodes. one for both leads of the motor.
 
The opto isolator has to be there. The logic and the motor have separate power supply. Its relatively big motors, so the isolation also isolates from a potentially noisy motor.
When I measure the voltage drop over the gate-resistor it goes from 2 volt at lowest duty cycle to 24 volt at the highest duty cycle. Now this is a PWM signal, and I only got my digital multi-meter. The PWM frequency is near 16KHz. So the meter would se it as a constant voltage.
 
Does the gate like that 24V coming in? Logic level things normally only like 5V (or 3.3V). Also the resistor Mister_e pointed out. change it to a lower value of some kind (4k7 or 10k) or omit it totally...
 
The circuit is from the book "Building Robot Drive Trains" written by Dennis Clark and Michael Owings. It's not clear in the book if the circuit is for 12V or 24V on the motor side of it. But it is for high currents. 20 Amps. The MOSFET and the diode are explicit mentioned by name.
I will try to put a smaller resistor in parallel with the existing.
 
Thank you Mister Bloody and Mister_e.
I have replaced the gate resistor with a 10K resistor. That did work. Now at low duty cycles I hear a clear 16 KHz sound. When I make the duty cycle higher the motor start. And at highest duty cycle the motor is running at highest speed. I will reprogram my PIC to make the PWM frequency near 32 KHz and only at levels where the motor actually moves. Could a even lower gate resistor make the motor run at lower duty cycles?
 
you can try ;) But how slow do you want to go?
 
I reprogrammed the PIC and the noise disappeared.
I got 127 steps of speed/PWM. The 10 lowest values did nothing.
So I reprogrammed again where I raised the low end of duty cycles. As you said: How slow would you go?
Everything just works fine now. Unless unexpected things happen when the rover is on wheels I now got myself a speed controller. Next step is the PID-controller.

Thanks again!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top