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.

PWM circuit for small DC motor not working

Status
Not open for further replies.

lilimike

Member
For some reason I am not able to get my circuit to run properly.
This is my circuit:
circuit.JPG
I tried connecting R6 to positive, also tried to remove it but anyway gives the same results.
Using this motor model 2295
I am using a 6V battery (4R25), I've tried to connect the PIC to one battery and the transistor to a second battery.

I've tried replacing Q1 with NPN transistor 2N3904 and also tried 2N2222
All configurations are working well if I use a LED instead of the motor.
When using 2N2222 I've tested connecting these ways:
test.JPG
When I look at the results from the scope connected where the motor should be I get results I don't understand but the closest that makes sens to me is with 2N2222 connected as TEST2 with the POT set to 50% duty cycle gives these results:
scope1.jpg scope2.jpg scope3.jpg
In all configuration probing the PIC PWM pin is good.

When I connect the motor it only starts turning with the MOSFET but as I increase duty cycle, the motor slows down and stops.

Sorry about all these pictures, I wouldn't know how to describe this otherwise.

Mike
 
The wiring of your speed control doesn't make sense to me, or you may be getting noise from the motor into the PIC.
 
The wiring on the motor/transistor side is pretty much the way I've seen it done on a number of websites.
Since the PIC side does what it's supposed to do and works well when driving a LED I guess that's ok too.
So I'm left with the possibility that the motor is generating noise so how can I fix this? I'm expecting by adding some capacitors but where? I've tried a few combinations that didn't fix the problem.
 
The motor draws 2.7A from 3V when it starts running. But the small transistors you tried probably burned out. Maybe the motor is also burned out since its max voltage is 4.5V and you tried 6V.
Test #1 has nothing limiting the current from the PIC so it is also probably burned out.
 
The motor's datasheet indicates 2.7A when it stalls, does it take this much when it starts as well?
The MOSFET I was using in my first configuration is an IRF Z46N this should be more than what I need or perhaps overkill and not appropriate?

I programmed the PIC to give 80% duty cycle at max.

Can you suggest an adequate transistor?
 
A DC motor is stalled when it starts running. Then it draws 2.7A from 3V. Your supply to the motor is trying to be almost 6V so the current is trying to be 5.4A!
The maximum allowed current for the little 2N3904 is only 200mA and is only 800mA for the 2N2222. But they did not have enough base current to turn on properly.

The IRFZ46 Mosfet needs 10V to turn on which is not available from the PIC. With only 5V then some of these Mosfets barely turn on. You need a logic level Mosfet that turns on well with a gate voltage of only 4.5V. Use an IRF3711Z and there are many more.
 
Comparing the datasheets for IRFZ46 and IRF3711Z, where do you see IRFZ46 turns on at 10V? and based on the specifications what makes IRF3711Z suitable for my application or what should I be looking for if looking at other MOSFETs?

EDIT: Apart from drain to source voltage and drain current.
 
Comparing the datasheets for IRFZ46 and IRF3711Z, where do you see IRFZ46 turns on at 10V? and based on the specifications what makes IRF3711Z suitable for my application or what should I be looking for if looking at other MOSFETs?

EDIT: Apart from drain to source voltage and drain current.
The datasheets explain it:
 

Attachments

  • Mosfets.png
    Mosfets.png
    44.4 KB · Views: 454
This becomes quite simple after you understand its complexity!
Thank you for the info.

Does the load affect the Vgs? I would suppose so as it works with an LED and not with the motor nor with just the scope at 10x
 
I do not know how much current you limited the LED current to. Most ordinary LEDs are operated at only 20mA.
The output voltage from your PIC is +5V so it might barely turn on your Mosfet that needs 10V.

Of course your Mosfet can turn on a low current LED but it cannot get the high current motor to run.
 
When a mosfet is near it's turn on threshold, it transitions from near infinite resistance to near zero resistance. The impact of this resistance on the load will vary with load current. A few tens on ohms will not be noticed driving an LED that has it's own current limiting resistor, but will have a huge impact when driving a motor.

Where it is along that resistive range a mosfet is is determined by the gate-source voltage. You want to make sure that you have chosen a mosfet with a gate-source threshold voltage such that you are driving it to be in it's 'near zero' ohm condition. Besides choosing a low threshold mosfet, you can also increase your gate voltage, either with a dedicated gate driver, or a small BJT or two to push a higher gate voltage controlled by a 5V signal.
 
I am still having issues. IRF3711Z is not available. after much browsing I found and ordered a bunch of these ones and I've received FQP30N06L.
Here is my breadboard circuit, am I missing anything?
breadboard.jpg

Mike
 
I am still having issues. IRF3711Z is not available.
Digikey has none but Newark has 532 of them for $2.69 each.
The last time I ordered from Newark then my order was delivered to me the next morning.

I found and ordered a bunch of these ones and I've received FQP30N06L.
This Mosfet has a lower maximum allowed current but it will work fine for your circuit.

Here is my breadboard circuit, am I missing anything?
1) You CANNOT use a breadboard for high current circuits.
2) Your circuit is missing a supply bypass capacitor (0.1uF ceramic) mounted close to the power supply pins of the PIC.
 
1) You CANNOT use a breadboard for high current circuits.
2) Your circuit is missing a supply bypass capacitor (0.1uF ceramic) mounted close to the power supply pins of the PIC.

1) Are you saying that if I make my PCB based on this circuit it should work fine although not on the breadboard?
2) The 0.1uF cap is sitting right on top of the PIC as this was the way I found to make it as close to the PIC's power supply pins as I could.

Mike
 
1) Are you saying that if I make my PCB based on this circuit it should work fine although not on the breadboard?
You never said what is not working properly with your new Mosfet. Maybe the contacts on the breadboard are heating instead of the motor running?
Maybe the voltage from your 6V battery drops?

2) The 0.1uF cap is sitting right on top of the PIC as this was the way I found to make it as close to the PIC's power supply pins as I could.
Maybe the blue thing on top of the PIC is your 0.1uF ceramic supply bypass capacitor?
 
The motor is not turning at all. When I start raising the POT I hear a high pitch hissing sound from the motor, if I turn the POT very slightly near this setting some times the motor barely start's turning but raising the POT further will turn the motor off.
If I disconnect the gate from the PIC and connect to +5V the motor turns at its maximum speed. If I probe the gate, it shows expected PWM with no load (motor) and a single spike that looks like the third picture from post #1 when the load is attached.

And yes the blue thing is a 0.1uF ceramic capacitor connected to VDD and VSS to the PIC, I've always called it decoupling capacitor, I am thinking bypass capacitor is the same?

Mike
 
I think the supply voltage to the PIC is jumping up and down which is resetting the PIC.
Try adding a 1000uF capacitor across the PIC supply pins.
 
Yup! that did it!
I don't have a 1000uF but I tried a 470uF and it is working as it should.
Thank you one more time.

Mike
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top