Quantcast
Channel: Active questions tagged motion - Electrical Engineering Stack Exchange
Viewing all articles
Browse latest Browse all 43

Motion controller using brushed DC motors

$
0
0

I've designed a simple robot with 2 active wheels and 4 omni wheels and I'm trying to figure out the motion controls.

I'm using 8300 RPM motors (https://uk.rs-online.com/web/p/dc-motors/3213192) which are directly coupled to 600 PPR optical rotary encoders which actually provide 2400 pulses per rev by counting the pulse eddges (the wheels are geared down 100:1).

Now before you say it, I know this is a bit insane and I won't need anywhere near this much accuracy and real-world factors like wheel slip would be far greater sources of error, but I've had all the components on hand so I just used what I had. Also to deal with the large number of pulses, I'm using a CMOD S7 FPGA to do the pulse counting digitally as most MCUs wouldn't be able to keep up. It'll also be easier to do all the PWM controls and motion planning on the FPGA as it's fully customizable.

I have derived the equations for achieving the desired movements in terms of pulses required to do each move (for example for turning on the spot for X degrees, each wheel has to turn for N pulses in opposite directions), but I'm not sure how to accurately achieve these desired targets with a smooth ramp up/down.

I tried a simple PID controller and passing it the desired pulse count but it was too jerky for my liking. I have looked into how motion controllers work and read about trapezoidal / S-curve motion profiles which are fairly easy to implement (although the edge cases where max jerk,acceleration or speed values are exceeded needs to be handled which I haven't done yet).

S-curve:enter image description hereTrapezoidal:enter image description here

My main problem is I don't know how to actually translate these curves into PWM signals used to drive the motors. Do I need to follow these curves with a PID controller? If so should I drive the PID controller with velocity information or position information? Also, the motors won't be anywhere near fast enough to react to the commands that the FPGA sends (450MHz clock). How much do I need to slow down the PID controller?

If there are any articles, scientific papers, or YouTube videos showing similar projects, I would appreciate it if you could point me there. Unfortunately, trial and error hasn't gotten me far with this one and I can't find anything regarding how to translate these curves into PWM values after some searching.


Viewing all articles
Browse latest Browse all 43

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>