go_away

Author Topic: $50 Robot PWM  (Read 550 times)

0 Members and 1 Guest are viewing this topic.

Offline ArkboyTopic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
$50 Robot PWM
« on: September 11, 2012, 03:17:15 PM »
I have read through the tutorials and I think I understand but just wanted to clarify.  Does the PWM on the $50 robot that controls the differential drive servos use software based PWM that uses the system clock?  Or is there some other way that its using timer0, timer1, or timer2?  Because according to the data-sheet the only PWM on the ATMega8 is on B1, B2, and B3.  Then does it just use that to drive until the sensors interrupt, so you couldn't have them driving in the background?

-Arkboy
Failure is just another excuse to keep playing with your robot.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: $50 Robot PWM
« Reply #1 on: September 13, 2012, 04:51:10 PM »
Hi,

Please post software questions in the proper forum (which, cryptically and puzzling, I know, is named "Software" ;))


Besides (and that's not your fault - it's more or less the entire servo "world" bend on mis-labelling the signalling), R/C servos do not use PWM (externally).
A PWM signal is characterized by the pulse width being able to be anywhere from slightly above 0% to slightly below 100% of the period (if 0.0% or 100.0%, it's plain old DC)

The R/C servo protocol calls for a signal wherein the pulse can be of a duration of between 1ms and 2ms, while the period itself are allowed to vary quite a bit from the defined 20ms.
A signal with a pulse of a defined duration range, within a loosely defined period is Pulse Duration Modulation (PDM)
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline ArkboyTopic starter

  • Jr. Member
  • **
  • Posts: 10
  • Helpful? 0
Re: $50 Robot PWM
« Reply #2 on: September 17, 2012, 09:34:26 AM »
Soeren,

Thank you for your response.  My question wasn't really intended to be about software (sorry if it came across that way).  The software part of the question was just to confirm my reading on the hardware capabilities of the atmega8 and its timers.  Because in the data-sheet it says that the atmega8 has 3 PWM channels outputting to 6 pins I think.  But pin 2 and 3 aren't one of them, and they are used on the $50 robot, so my assumption was that the servos were controlled using software to turn the pins on and off using the time duration needed to do PWM.  Is this correct or is there something about the atmega8 hardware that I am not understanding?

-Arkboy
Failure is just another excuse to keep playing with your robot.

 


Get Your Ad Here