Microcontroller for DC Motor Controller

Click For Summary

Discussion Overview

The discussion revolves around the design and construction of a high current DC motor controller for an electric vehicle, focusing on the selection of a PWM source for MOSFET drivers. Participants explore the use of dedicated PWM TTL chips versus microcontrollers, considering various features and functionalities required for the motor controller.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant suggests using dedicated PWM TTL chips, while another advocates for a microcontroller due to its additional capabilities despite higher cost and complexity.
  • Questions are raised about the methods for generating and varying PWM, including options like digital input, serial control, or analog comparators.
  • Another participant emphasizes the advantages of microcontrollers, noting that many have dedicated hardware routines for PWM output, which could simplify control.
  • Participants discuss the use of an H-bridge design and the need for basic functionalities such as forward/reverse control, regenerative braking, and speed/torque measurement.
  • Concerns are raised about programming ease with different microcontroller families, with some participants noting that certain architectures are more suited for high-level programming than others.
  • One participant mentions the importance of considering ramp-up acceleration, torque limiting, and stall protection in the design, while another points out that some functions can be implemented using analog methods.
  • Stall protection is suggested to be achievable with a fuse in series with the motor, while torque limiting is described as a complex challenge that may be best avoided.

Areas of Agreement / Disagreement

Participants express differing opinions on the choice between microcontrollers and dedicated PWM chips, with no consensus reached on the best approach. Additionally, there are varying views on the complexity and necessity of features like torque limiting and stall protection.

Contextual Notes

Limitations include the potential lack of experience with certain microcontrollers, the complexity of implementing torque limiting, and the varying levels of programming support across different microcontroller families.

Who May Find This Useful

Individuals interested in electric vehicle design, motor control systems, and microcontroller applications may find this discussion relevant.

EEstudentNAU
Messages
30
Reaction score
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
What are the features you think you'll need or want with your motor controller?
 
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.
 
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?
 
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.
 
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).
 
I appreciate all of the replies. I am going to check out the AVR. It sounds like its right up my alley.
 
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.
 
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.
 

Similar threads

Replies
21
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
Replies
3
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K