Author Topic: A HEX IN THE MIX  (Read 3012 times)

0 Members and 1 Guest are viewing this topic.

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
A HEX IN THE MIX
« on: January 21, 2008, 09:11:42 AM »
hey you guys, i think i should win the best title for this topic,, 8) blufff,,gus giggelin..
yea ,, its a hexapod im makiing.. i did write almost all the complex movments of this 12 servos kid and i need to turn it into a feasible algorithm,
i need to drive 12 servos using my atmega23 ,goinf for a timer's pwm modes this processor provides 4 , so not enough for my 12 kids(motors),
anyone done a hexapod before ? i need an approach to do this ,all i could think of now is just puzzling delays bu this sounds like a weak algorithm
,,thnks 4 any post
good ol' BeNNy

Offline hazzer123

  • Supreme Robot
  • *****
  • Posts: 460
  • Helpful? 3
Re: A HEX IN THE MIX
« Reply #1 on: January 21, 2008, 10:52:19 AM »
I don't understand your post to well, try to use the spell check.

But if you looking for code to send PWM to lots of servos, then i posted a bit of pseudocode in this topic - http://www.societyofrobots.com/robotforum/index.php?topic=2842.0

HTH
Imperial College Robotics Society
www.icrobotics.co.uk

paulstreats

  • Guest
Re: A HEX IN THE MIX
« Reply #2 on: January 21, 2008, 11:01:13 AM »
you would be better off not using the pwm's at all for servo's, since servo pwm is slightly different to the normal pwm standard that runs off mcu timers.

It is better to just attatch them to the digital ports and get these to control the servos.

Because the mcu will be tied up with controlling all of those servo's, i would look at making it a dedicated actuator controller and have a seperate mcu to run the programs on which can send basic commands like move forwards to the actuator controller mcu

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Re: A HEX IN THE MIX
« Reply #3 on: January 21, 2008, 05:10:22 PM »
yea using a different mcu for commands,,but im talking here about the walking mcu, are ou using pwm? or just put high ,delay, put low ?
good ol' BeNNy

Offline hazzer123

  • Supreme Robot
  • *****
  • Posts: 460
  • Helpful? 3
Re: A HEX IN THE MIX
« Reply #4 on: January 21, 2008, 05:22:16 PM »
The PWM pins on an MCU are not for controlling servos. They are sort-of analogue outputs.
A high frequency (in the kHz range) square wave is outputted from a PWM pin, which is then smoothed out with a capacitor to create a DC voltage.
This DC voltage can be altered by changing the duty cycle of the square wave output. Higher duty cycle --> more of the square wave is at high voltage --> higher voltage after capacitor smoothing.

The PWM used in servos is only about 30Hz. The duty cycle isn't important, it is the time that the square wave is high that is important.

These are very different so your servo PWM output will have to be done in software.

High, delay, low - This will work for a couple of servos, but you can only do 1 servo at once. With 12 Servos you might find the servos will 'shiver' because the pulse frequency can't be very high.

Using timers you can do all servos simulatneosly. I advise you to look at this post - http://www.societyofrobots.com/robotforum/index.php?topic=2842.msg20126#msg20126
Imperial College Robotics Society
www.icrobotics.co.uk

Offline benjiTopic starter

  • Supreme Robot
  • *****
  • Posts: 830
  • Helpful? 0
Re: A HEX IN THE MIX
« Reply #5 on: January 22, 2008, 12:15:07 PM »
thanks hazzer thats a nice algorithm to drive a big number of servos using one mcu
,, have you done a hexapod before?
good ol' BeNNy

 


Get Your Ad Here