go away spammer

Author Topic: Controlling DC Motor  (Read 2473 times)

0 Members and 1 Guest are viewing this topic.

Offline hendrachubbyTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 0
    • My-Blog
Controlling DC Motor
« on: February 09, 2009, 04:51:18 PM »
Anybody can help me to program axon MCU for controlling DC motor with 3 phase encoder attached, so the motor can rotate with specific angle..?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Controlling DC Motor
« Reply #1 on: February 09, 2009, 09:33:54 PM »
What motor driver are you using? Which encoder?

Don't forget that the datasheet of the motor driver will tell you exactly what to do to control a motor :P

Oh and you'll need to use hardware interrupts if you use an encoder.

(we can't help you without more info)

Offline hendrachubbyTopic starter

  • Full Member
  • ***
  • Posts: 49
  • Helpful? 0
    • My-Blog
Re: Controlling DC Motor
« Reply #2 on: February 10, 2009, 10:30:51 AM »
I'm using pololu Pololu High Current Motor Driver Board 9A 6V-36V and for the motor I use sanyo denki 24 volt DC servo motor with quadrature encoder attached on it, i read the spec for the encoder it says the voltage for the encoder is 5 volt. I able to control the motor with PWM but still not use the encoder. The encoder has 3 phase, a b z, i don't know which port of the axon can receive this pulse and how to code it so i can get the motor move with a specific angle.
 :(

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: Controlling DC Motor
« Reply #3 on: February 10, 2009, 08:24:49 PM »
You'll need to use the hardware interrupts to count encoder pulses. Also, google up on how to use an encoder and PID loops. Lastely, look at AVRlib, it has quadrature encoder source code already written for you.

You'd have to link us to a datasheet on the encoder, otherwise I'm just guessing how it works.

pins E4 to E7 all have hardware interrupts on the Axon:
http://www.societyofrobots.com/axon/images/640pinout.gif
(several other pins also have hardware interrupts)

 


Get Your Ad Here