0

motor project
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

motor project

by bmin on Mon May 10, 2021 11:42 pm

hello !
i am new to this forum. i hope this is OK.
i have a bunch of old motors that i'd like to play with - generally 5 to 12v, some brushed, some brushless, etc..
i've built things using microcontrollers, generally based on pulse-width modulation - but i'd like to find a different way to do this without producing a high-pitched whine.
can anyone suggest some ways to drive a motor at variable speeds without using a microcontroller or a PWM-based method?
thanks!

bmin
 
Posts: 3
Joined: Mon May 10, 2021 11:35 pm

Re: motor project

by adafruit_support_mike on Tue May 11, 2021 12:52 am

The other way is to control the voltage and current flowing through the motor, aka 'analog motor control'.

The down side of analog motor control is that the control system has to burn off any energy the motor doesn't use. That makes it much less efficient than PWM-based methods.

You can filter PWM-based motor control power down to nearly DC voltage and current if you run it through enough low-pass filters. The down side there is that motors use a lot of power, which means the filters have to be large and fairly expensive.

If noise is your major objection, you can tune the PWM frequency to move it away from mechanical resonance frequencies in your motors. The whine comes from the armature coils flexing in response to their own magnetic fields, and tends to be loudest at frequencies where the wires can vibrate naturally. Changing the PWM frequency can move the vibration to something the physical coils won't amplify.

adafruit_support_mike
 
Posts: 62768
Joined: Thu Feb 11, 2010 2:51 pm

Re: motor project

by bmin on Tue May 11, 2021 1:45 am

thanks for the input, mike - i just wanted to get a little more information on "analog motor control."
is there an easy way to do this? it's not entirely clear to me which adafruit products would be suitable for this, since so many breakouts seem to be PWM-related.
does it make more sense to build a circuit like this from scratch? i've seen some designs that make me think this can be done with just a pot and a IRF540.

bmin
 
Posts: 3
Joined: Mon May 10, 2021 11:35 pm

Re: motor project

by adafruit_support_mike on Tue May 11, 2021 10:03 pm

We don't have anything specifically for analog motor control.

For small motors you can use PN2222 transistors as emitter followers: connect the motor between the transistor's emitter and GND. The emitter voltage will be about 0.7V lower than the base voltage, and the base current will be 1% to 5% of the motor current.

For motors that use more current, you can use a mosfet instead of a BJT. The voltage at the motor's source will be anywhere from, 1V to 10V below the gate voltage, depending on the kind of mosfet you use. Mosfets have the advantage of being purely voltage controlled, so there's no DC gate current.

bmin wrote:does it make more sense to build a circuit like this from scratch?

Yes. Basic analog motor control is pretty simple.

bmin wrote: i've seen some designs that make me think this can be done with just a pot and a IRF540.

That's the basic idea.

The main challenge of analog motor control is that the rest of your control circuit also needs to be analog.

adafruit_support_mike
 
Posts: 62768
Joined: Thu Feb 11, 2010 2:51 pm

Re: motor project

by bmin on Sat May 15, 2021 12:26 pm

hi mike-
thank you for the guidance on this project.
i ordered some IRF540s and followed the design that is attached. there are also about two dozen youtube videos that offer small variations.
what i noticed is that with the 10k resistor, the motor (experimenting with a small 9v motor) doesn't really come anywhere near close to "stopping" - it seems to accelerate between two speeds that are already fairly fast. if i remove the 10k resistor, as some youtube videos suggest, my potentiometer starts to smoke. the diode across the motor doesn't seem to make much of a difference in either event.
is there a design for a "working" analog motor control that you can suggest? thank you.
Attachments
Voltage-controller-circuit-with-ampere-using-IRF540N.jpg
Voltage-controller-circuit-with-ampere-using-IRF540N.jpg (433.18 KiB) Viewed 75 times

bmin
 
Posts: 3
Joined: Mon May 10, 2021 11:35 pm

Re: motor project

by adafruit_support_mike on Sat May 15, 2021 8:09 pm

bmin wrote:if i remove the 10k resistor, as some youtube videos suggest, my potentiometer starts to smoke.

Something is definitely wrong there.

A mosfet's gate shouldn't draw any DC current, so removing the resistor shouldn't let enough current through to cause smoke.

Post a photo showing your hardware and connections and we'll take a look. 800x600 images usually work best.

adafruit_support_mike
 
Posts: 62768
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.