go_away

Author Topic: AXON PWM duty cycle?  (Read 883 times)

0 Members and 1 Guest are viewing this topic.

Offline mstachoTopic starter

  • Supreme Robot
  • *****
  • Posts: 364
  • Helpful? 10
AXON PWM duty cycle?
« on: January 24, 2011, 11:28:46 AM »
Just out of curiosity, if I use one of the PWM channels on the axon, what's the duty cycle, in seconds?  I ask only because I may have to do some software PWM'ing and I don't want to mix duty cycles...

MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,943
  • Helpful? 98
Re: AXON PWM duty cycle?
« Reply #1 on: January 24, 2011, 11:36:05 AM »
Duty cycle is measure in percent of the PWM period not in time (seconds).

What device do you need to control with PWM?
What frequency or period do you require?

Offline mstachoTopic starter

  • Supreme Robot
  • *****
  • Posts: 364
  • Helpful? 10
Re: AXON PWM duty cycle?
« Reply #2 on: January 24, 2011, 01:29:36 PM »
Sorry, I meant PWM period.  I calculate the duty cycle on my own as a percentage of the period as you say, but once I know what percentage I want (I evaluate it as a PD controller) I am now just multiplying by the maximum integer, which in my case is 255, which represents one full period for the 8-bit PWM.  I want to know what 255 corresponds to in seconds.

As for the device, it's just a bunch of DC motors.  I can't use servos because I need both position and force control, so it's PWM for me :-)

MIKE
Current project: tactile sensing systems for multifingered robot hands

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: AXON PWM duty cycle?
« Reply #3 on: January 24, 2011, 01:38:38 PM »
You should use WebbotLib. My original Axon library is now obsolete.
http://webbot.org.uk/iPoint/37.page

You can set your period to be just about whatever you want, although resolution is limited to the 16 bit timers on a 16MHz processor.

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,150
  • Helpful? 109
Re: AXON PWM duty cycle?
« Reply #4 on: January 24, 2011, 01:47:15 PM »
You should use WebbotLib. My original Axon library is now obsolete.
http://webbot.org.uk/iPoint/37.page

You can set your period to be just about whatever you want, although resolution is limited to the 16 bit timers on a 16MHz processor.


Servo software PWM requires 16 bit timers - but general pwm motor control can be done in WebbotLib using 8 bit timers.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

 


Get Your Ad Here