MotorsElectric motors come in a million shapes and sizes. I happen to be using ones that I have found, the Faulhaber 2342S-024CR. They are core-less brushed DC motors. Coreless refers to the fact that the internal rotating coil (often called the armature) is not wound around a "core" of iron. This allows the motor to have very low inertia and in theory much faster response. Lots to know about motors. A major trademark of brushed DC motors is that torque is proportional to current.
The necessary equations for modeling a simple DC motor are:
The Faulhaber 2342S-024CR has the following properties:
PWMPulse width modulation is a general principle of using digital pulses at spaced intervals that when averaged over time approximate a continuous time signal. This has benefits for motor control in that the power supply can have a fixed voltage, but by switching the supply on and off at different frequencies the effective voltage/current seen by the motor can be changed.
A brief discussion of the Arduino PWM is found here. The Arduino (Atmel 368) is able to supply PWM signals to pins 3, 5, 6, 9, 10, and 11 using the AnalogWrite() command. The PWM frequency defaults to approximately 490 Hz, and can be modified by setting registers associated with the proper timers. The duty cycle (percentage of time signal is "on") of the Arduino PWM is divided up into 256 levels (level 0 being off and 255 being 100% on). Pins 5 and 6 have additional overhead that will cause the duty cycle for these pins to appear greater than it normally would.
There are two standard types of PWM control for DC motors, Locked Anti-phase and Sign-Magnitude. These refer to the possible ways of closing and opening the switches to an H-Bridge.
Choosing the optimal PWM frequency to drive your motor depend on the characteristics of the motor. Below 20 kHz you will hear audible noise, so it may be desirable to run at these higher frequencies, the LMD18200 can be run up to 500 kHz. Based on the amount of ripple you are willing to allow in the current you can calculate the switching frequency for your motor if you know the appropriate parameters. You need to know the coil inductance, L, and resistance, R, to compute the decay of the current. Then for a desired percentage of ripple, P, you can determine the switching frequency:
The Faulhaber 2342S-024CR DC motor has L=265 uH and R=7.1 Ohms, thus the optimal PWM frequency for a ripple of P=35% is 31 kHz. Thus I will want to change the Arduino clock in order to switch the PWM at near this frequency. Most of what I have read so far suggests that the switching frequency should be in the 4-20 kHz range to minimize noise of the motor and reduce switching losses. The break on switching efficiency for the LMD18200 H-bridge is at 10 kHz, so I may want to keep that in mind.
From the Atmel 328 manual and some coaching from the internets I will probably want to mess with the clock frequency for the TCCR1B register:
Meaning that if I want 64*490 Hz = 31 kHz I will need to add the following line into my code: //Set the PWM frequency on pins 9 & 10 to 31 kHzH-BridgeThe micro-controller can only output a low power PWM signal. In order to supply a PWM signal with a large amount of current requires an additional power supply and a way to amplify the micro-controller's signal. This can be done through a simple switching circuit called an H-bridge, so called because it looks like an H. I am using an integrated circuit (National Semiconductor LMD18200) that neatly packages the H-bridge into a single component.
The package I am using has the following physical layout:
And the functional layout of the device appears like this:
When braking the motor the PWM, direction and brake pins (3,4&5) should be set to high in order to take advantage of the over-current protection.
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||







