Author Topic: controlling DC servo motor  (Read 13145 times)

kenobe

  • Jr. Member
  • Posts: 66
  • I'm a llama!
    • View Profile
controlling DC servo motor
« on: September 07, 2008, 11:36:43 PM »
may I know how to use the t100md 888  plc to control a 5v futaba dc motor which needs pulsewidth of 1 to 2 ms?
 :o

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:controlling DC servo motor
« Reply #1 on: September 08, 2008, 10:39:41 AM »
Do you mean the DC motor uses Pulse-Width Modulated  (PWM) signal to control it?  How does the 1 to 2 ms pulse control the motor?

Email: support@triplc.com
Tel: 1-877-TRI-PLCS

kenobe

  • Jr. Member
  • Posts: 66
  • I'm a llama!
    • View Profile
Re:controlling DC servo motor
« Reply #2 on: September 08, 2008, 06:49:08 PM »
Sorry.
I mean a 5v dc servo motor

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:controlling DC servo motor
« Reply #3 on: September 09, 2008, 02:32:35 PM »
Are you referring to those "servos" that are used in radio controlled model airplane and cars?

We have not tried using the PLC to control such "servos" (these are not the same as DC Servo motor which comprises a DC motor and digital encoder for positional feedback that are more frequently used in industrial control). From the information I gathered from the Internet, it seems like a pulse width of between 1 and 2 ms controls the angle of turn between 0 and 120 degree. The off time of the pulse train should be between 10 to 30ms

You could try setting up the PWM output with frequency of 63Hz and duty cycle between 630 and 1260 to provide the required pulse train to the servo. However, since the PLC output are 24V NPN type, you will need to convert the NPN output to 5V TTL logic level using a PNP transitor or P-channel MOSFET in order to drive such "servos".

If you are prepared to build the 24VNPN to 5V TTL interface, then you can use the following formula to compute the PWM parameters:

Frequency = 63Hz => Period of 15.87 ms (within spec)

To obtain 1ms pulse width, duty cycle = 1/15.87 = 6.3%

Hence to turn to 0 degree, SETPWM 1,630,63

To obtain 2ms pulse width, duty cycle = 2/15.87 = 12.6%

Hence to turn to 120 degree, SETPWM 1,1260,63

To turn to any degree between 0 and 120, compute the required pulsewidth and then calculate the duty cycle and run the SETPWM command as described above.


Email: support@triplc.com
Tel: 1-877-TRI-PLCS

kenobe

  • Jr. Member
  • Posts: 66
  • I'm a llama!
    • View Profile
Re:controlling DC servo motor
« Reply #4 on: September 09, 2008, 06:26:13 PM »
I sincerely thank you for your help.
I will try it out

Thanks