Microcontroller for DC Motor Controller

In summary: I would recommend using a low-pass filter on the output of the controller to prevent excessive torque from being sent to the motor.
  • #1
EEstudentNAU
30
0
Hello, I am designing and eventually constructing a high current DC motor controller to be used in an electric vehicle for a senior design class. Right now I am at the stage of selecting the PWM source for the MOSFET drivers. A team member wants to use dedicated PWM TTL chips, I wish to use a microcontroller. Although a microcontroller is more costly and adds complexity, it has more capabilities.

I am hoping there is someone here who can help me out with some pros and cons of both, which you would use or have used etc.
 
Engineering news on Phys.org
  • #2
What are the features you think you'll need or want with your motor controller?
 
  • #3
Well, how would you generate and vary the PWM in the first place? Input with pre-generated PWM (from a microcontroller or PC)? Drive with digital input? Serial control? Analog comparator using a ramp? IF YOU HAVE EXPERIENCE with the micro in question, it's often the easiest way to go. May even be easier than any of the other methods if you have no experience with either of these routes.
 
  • #4
I would go with a microcontroller. For the extra $2 its more than worth it over using 555/or similar timers with the analog circuitry to control them. Most micros have dedicated hardware routines for running for outputting PWMs which can be very easily and directly controlled which is what you want. I take it your going to be going with the classic H-bridge design?
 
  • #5
I will be using an H bridge design. I am looking for the basics: forward, reverse, regen braking in both directions, and speed and torque measurement to be outputted to a display. I was thinking of using a dsPIC, but I want something with higher level programming, but I am not sure what is out there. MSP430? something C-like.

The dsPIC offers 4 or 8 PWM outputs, duty cycle controlled by comparing a reference voltage.
 
  • #6
There are C compilers available for the entire Microchip line. But they were designed by EEs to be programmed by EEs (i.e. in assembly) Their architecture is not really meant for high-level programming (this might be different for PIC32, but I'm less familiar with their offerings these days than I used to be). Most of the C compilers cost a few hundred bucks, but the official Microchip one can be "student evaluated" with optimizations that expire after three or so months. I don't believe that any of these are perfectly ANSI C compliant.

On the other hand, ATMEL was designed from the get-go to be a high-level language microcontroller (lots of instructions, memory access modes, deep stack, etc.) The (arguably) best compiler happens to be the free implementation of GCC (WinAVR). Programming it is a bit harder, but the plain-jane programmer (the AVR-ISP mkii) is pretty cheap, even if it doesn't give emulation / stepping functionality, and requires the use of the ISP port.

Different beasts, but low-level work seems to be less and less popular these days (probably because everything is so fast, anyways).
 
  • #7
I appreciate all of the replies. I am going to check out the AVR. It sounds like its right up my alley.
 
  • #8
EEstudentNAU said:
I will be using an H bridge design. I am looking for the basics: forward, reverse, regen braking in both directions, and speed and torque measurement to be outputted to a display. I was thinking of using a dsPIC, but I want something with higher level programming, but I am not sure what is out there. MSP430? something C-like.

The dsPIC offers 4 or 8 PWM outputs, duty cycle controlled by comparing a reference voltage.

Have you considered things like ramp up (would it be okay if someone goes from 0 to full speed in an instant?), torque limiting (allow fast acceleration only if a preset torque isn't exceeded.) and stall protection (what would you do if the motor stalled?).

Don't forget that all of the functions you mention and that I mentioned can be done with op amps, in fact that's the way it was done before microcomputers. Believe it or not, some of these things are actually more easily done analog.
 
  • #9
I am interested in ramp acceleration. As for torque limiting and stall protection, those are things I am unfamiliar with and haven't considered. This controller must have full protection from almost everything that can happen when driving an electric vehicle, so I would like to select one that isn't going to come up short down the road.
 
  • #10
Stall protection can be solved by using a fuse in series with your motor. Torque limiting is a very complex thing to do and I suggest that you don't deal with it.
 

What is a microcontroller?

A microcontroller is a small computer on a single integrated circuit that is designed to control specific functions and devices. It contains a processor, memory, and input/output peripherals, making it a complete computing system on a chip.

What is a DC motor controller?

A DC motor controller is a device that is used to control the speed, direction, and torque of a DC motor. It receives input signals from a microcontroller or other control system and uses them to adjust the voltage and current supplied to the motor, allowing for precise control of its movements.

How does a microcontroller control a DC motor?

A microcontroller controls a DC motor by sending signals to a motor controller, which interprets the signals and adjusts the power supplied to the motor. The microcontroller can also receive feedback from sensors on the motor and use that information to adjust its control signals, enabling precise and responsive motor control.

What are the advantages of using a microcontroller for DC motor control?

Using a microcontroller for DC motor control offers several advantages, including precise and responsive control, flexibility in programming and customization, and the ability to integrate with other electronic systems. It also allows for automation and remote control of the motor, making it ideal for use in robotics and other applications.

What are some common applications of microcontrollers for DC motor control?

Microcontrollers for DC motor control are commonly used in a wide range of industries and applications, including robotics, industrial equipment, home automation, and automotive systems. They can also be found in everyday devices such as fans, toys, and appliances that use DC motors for their operation.

Similar threads

  • Electrical Engineering
Replies
11
Views
959
Replies
3
Views
1K
Replies
2
Views
964
  • Electrical Engineering
Replies
1
Views
662
  • Electrical Engineering
Replies
4
Views
3K
Replies
5
Views
1K
Replies
2
Views
990
  • Electrical Engineering
Replies
14
Views
3K
  • Electrical Engineering
Replies
2
Views
3K
  • Electrical Engineering
Replies
11
Views
2K
Back
Top