Page 1 of 1

Atmel chips

Posted: Fri Aug 11, 2006 1:33 pm
by olivers
I heard that some people use the Atmel AVR series of chips for their Mininsumo bots.

I don't suppose anyone has any good links for programming them in basic or good howto projects people have built.

Previously I have used Picaxe chips for programming but I need something that can give more real-time control of multiple servos.

Thanks.

Posted: Sat Aug 12, 2006 3:55 pm
by slurp
how many servos are you trying to control? what's the problem with the picaxe?

I under stand that http://www.avrfreaks.net/ is the place your looking for...

regards,
colin

Posted: Sat Aug 12, 2006 5:15 pm
by olivers
With the picaxe you can send mutiple commands to servos at the same time and they do them. The issue is that they do them at the servos top speed. To say turn the servo slowly you need to put a pause command in a for-next loop while constantly outputting PWM signals to the servo.

This is fine for 1 servo but with multiple servos it gets messy. I know with the Atmel chips you can say which position you want the servo at and the time it takes to get there.

I did find the SSC-32 kit which will probably suit my needs, it is the one they use for the Lynxmotion walkers.

I am considering making a 4 legged walker with 3 servos per leg so 12 in total then another 7 controlling other functions.

Posted: Sat Aug 12, 2006 10:35 pm
by slurp
With that many servos maybe you should consider a servo driver or breaking the system down in to manageable chunks... leg sub-systems

have a look at http://www.milinst.com/ and their 12 servo driver board, under "Animatronics"

best regards,
colin

Posted: Mon Aug 14, 2006 6:20 pm
by BeligerAnt
I use an Atmel ATmega8 in Origami. PeterW uses a slightly bigger version in his minisumo bot.

I used the WinAVR toolchain, which is all freeware based around GCC and several other open-source programs. It all works quite nicely under Windows.

The ATmega chips have a number of PWM outputs that can easily be programmed to drive servos. Just set up the PWM, then set the pulse width as & when you need it. The chip will output the required pulse train continuously until you tell it otherwise.

I program the AVR in C, PeterW uses assembler I think.
BASCOM AVR is a Basic complier for AVR. The demo version will compile 4k of code (so the blurb says) which is probably enough for most small projects.

To control 12 servos, I would consider breaking it down to smaller chunks as Colin suggests. The AVR I use can do 2 PWM channels. Some of the larger (ie more expensive) chips can do more channels but not as many as 12 I don't think.

Posted: Tue Aug 15, 2006 9:52 am
by slurp
BeligerAnt wrote:The ATmega chips have a number of PWM outputs that can easily be programmed to drive servos. Just set up the PWM, then set the pulse width as & when you need it. The chip will output the required pulse train continuously until you tell it otherwise.
so like like the PICaxe, unless you modify the PWM over time you'll have the servo drive to the target loction at usualy servo speed.

regards,
colin

Posted: Sun Dec 10, 2006 12:46 am
by BigEd
You could use PIC chips proper, rather than PICaxe which is a somewhat limited (well, really quite limited) environment to make it more friendly to educational environments. PICs always suprise me with what they're capable of- certainly you can run 20-odd servos off a 28 pin PIC (although there wouldn't be a great deal of CPU time left over). 3-4 servos along with, say, a serial routine, general i/o and some number bashing are the bread and butter of these devices. Perfect for an autonomous ant.