This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Cruise Control Project - Driving a DC motor with Potentiometer Feedback

Other Parts Discussed in Thread: MSP430G2553, CONTROLSUITE

Hello everyone, I'm working on a hobby project and would like some advice on some circuitry using an MSP430G2553.

The cruise control actuator and driver on my car don't work. However, the speed sensor, brake sensor, and control switches still work. My goal is to replace the actuator and driver. The actuator I replaced with a unit from a late model Lexus and the driver is my own design. If interested, you can read up on the project here: http://www.peachparts.com/shopforum/diesel-discussion/363769-cruise-control-project.html.

 

My question is about driving the control actuator. From what I can tell, it's a DC motor with a position feedback potentiometer. The pinout of the actuator is:

  1. Motor+
  2. Motor-
  3. FB Pot+
  4. FB Pot-
  5. FB Pot out
  6. Safety clutch +
  7. Safety clutch -

 

So far I've tried an H-bridge to control the new cruise control actuator from a Lexus. I got it kind of working - proportional control of the actuator arm using the feedback potentiometer built into the actuator. Due to ADC noise and mediocre signal integrity, the potentiometer reading fluctuates about 1%. Combined with overshoot from the motor, the controller and actuator oscillate unless I include hysteresis in the control algorithm. I haven't tried averaging the ADC outputs yet but that's in the works. Also, I had to include a massive proportional term because the motor won't move with PWM duty cycles below about 75%.

 

Can anyone think of a better way to control this without the hysteresis? Also, I stuffed the actuator control code into my debouncing ISR, so the sample period is about 5ms. Does this seem too high? I could move it to another timer and run it less often. The actuator isn't very fast, but does it matter much for proportional control?

 

Maybe an entirely analog solution would work better here? Any suggestions?

 

Thanks,

Ben

  • Ben,

    I hope you do not want to participate in the public road traffic with your selfmade solution. I'm not entirely sure, but I cannot imagine there is a pot connected to a rotating shaft. I guess it is some kind of pulse that appears more often the faster the shaft is rotating or something like that. Maybe a hall sensor or equivalent. Furthermore I think nowadays the motors won't be 2-wire DC brushed types anymore. BLDC types will be more common. But these are only my thoughts without knowing your hardware.

    Dennis

  • >but I cannot imagine there is a pot connected to a rotating shaft.
    If gear ratios are right - why not. After all it is not said that shaft rotates more than one turn. Also there are multiturn pots in case application needs more than one rotation of the shaft

    [edit] Note that this is DC motor-driven _actuator_

  • You could try to replace your ‘Error detection amplifier’ with an 2P2Z Controller. If you daisy-chain two you can use one to limit the current and getting information about the end ‘blocks’, and the other to control the voltage.

    The software for the controller isn’t difficult, but you need to optimize it for speed. It’s more difficult to find the correct parameters for the 2P2Z Controller, these needs to be exercised.

    You need to create a fixed timer which start’s the ADC on a regular time. After the ADC is ready you recalculate everything with the 2P2Z Controller. Keep the resolution of the PWM equal to the resolution of the ADC.

    If you download controlSUITE from TI you will find some method’s and examples here, or search Google. The parameters used with a PID Controller are similar.

  • Unless the pot is rated for a very high number of strokes, such as 20M - 50M as is used in military and aerospace applications, then it can wear out very quickly.  I would suggest a hall effect device or better yet a resolver.  Also a BLDC motor would be better.  Longer lifetime and less EMI to worry with.  

    5ms would be a good time base to use.  That gives you a 200 Hz update rate.  This should be more than sufficient for your project.    

  • The motor travel is limited by a ~45deg throttle move.

    The shorter the time interval (higher digital-filter frequency) the higher the position resolution and the smoother the motor will move. But if the time is too short you get overruns.

    If the motor, gear and potentiometer are from a Lexus than you can be sure they are solid build.
  • OK, then I maybe did not get the text right. I thought this is the axis that drives the wheels and therefore turns continuously.
  • You are correct. The potentiometer never fully rotates when the unit is connected to the car. The reason I went with this setup is because it has been around for a while and is reliable. In fact, the next generation of my car had a similar actuator. However, controlling it has proven difficult. I'm going to continue using the uC to control it. I'll try making the ADC resolution match the PWM resolution and look into the 2P2Z controller.
    Thank you!
  • I never use the 2P2Z to control a motor in two directions, so I can only throw some ideas, but I’m sure the 2P2Z with the correct parameters will give you a silent motor.
    You need to switch the H-bridge to get the desired direction, this you can do by testing the 2P2Z output for a positive or negative result. Now to get the full PWM range I think it’s better to have the ADC resolution one bit higher than the PWM resolution. With the 10-bit ADC use 9-bits for the PWM, depending on the full-travel range of the potentiometer, you can get a maximum car-speed resolution of about 1/1024.
  • >I never use the 2P2Z to control a motor in two directions

    AFAIK 2P2Z is better suited for motor speed control, not for actuator positioning. I would try PID controller instead.

    > I think it’s better to have the ADC resolution one bit higher than the PWM resolution

    In particular application PWM resolution can be way lower than that of ADC. To me seems like 6 bits are more than enough. BTW in _fast_ DC motor-driven positioning applications there shall be not only bidirectional PWM drive, but (PWM) brake drive too. Motor current shall be measure too - to detect actuator hitting end limiter.

    p.s. I hope this is educational project and it is not planned to be used in real car. Seriously.

  • Ahhh - braking. I didn't try that. I bet that would help with the overshoot. Also, I'll try changing the resolution of the PWM vs. ADC. 

    I'll keep working on PID control w/ braking and see if that helps.

    Thanks for your suggestions.

    Ben

    PS it may be some time before I respond again because work is very busy right now. I'll post again as soon as I make progress.

**Attention** This is a public forum