Pages: [1]   Go Down
Author Topic: Will atmega8 handle 6 servos and PWM ?  (Read 2130 times)
0 Members and 1 Guest are viewing this topic.
Katowice POLAND
Offline Offline
Full Member
***
Karma: 2
Posts: 127
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi
Can anyone answer my quetion : will atmega8 handle 4-6 servos and 2 PWM outputs?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

the ATmega 8 has 3 pwm outputs.
You'll need something like a TLC5940NT to control all servos independently.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 310
Posts: 26619
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Can anyone answer my quetion : will atmega8 handle 4-6 servos and 2 PWM outputs?
It depends on how much other stuff the processor is doing - if you're short of timers,  you could bit-bang the servos, or the PWM.
You need to tell us more,like how much jitter or reduced frequency PWM your application can cope with.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Katowice POLAND
Offline Offline
Full Member
***
Karma: 2
Posts: 127
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

program would be simple only 6 butons 5 servos and 2 motors driven by PWM. Servo and motors control over serial and buttons.
Logged

Toronto, Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 144
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you want to use PWM from Timer1 (pins 9 and 10), the answer is no. Why? Because the Servo library needs Timer1 to function. So, to be able to use PWM and servos, you need to use either Timer0 (pins 5 and 6) or Timer2 (pins 3 and 11). Timer0 is also used by the millis() and delay() functions, so you can't change the frequency. Also, Timer2 is used by the Tone library, so if you plan on using Tone, better use Timer0 for PWM. This is the way my Robot Builder's Shield (see my blog or store from the signature bellow) is set up: Timer0 for motors PWM signal, Timer1 for servos and Timer2 available for Tone.
Logged


Pages: [1]   Go Up
Jump to: