Author Topic: Yet more servo questions  (Read 1578 times)

0 Members and 1 Guest are viewing this topic.

Offline fabguyTopic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 1
Yet more servo questions
« on: September 08, 2009, 10:07:46 PM »
I'm new to robotics and I'm enjoying the challenge of just wrapping my head around all this.

For my first robot I'm looking at using the axom MCU.  But I need to control about 23-25 servos, along with a few sensors.  In the specs for the axom it says I can control up to 29 servos.  But only 7 on PWM up to 9 with mods.

So my questions are this.

1.  What are the mods required to the Axom to get the other 2 PWM outputs?

2. for controlling the other servos I require, Do I have to have use programming delays to create the PWM or can I add an external timer of some kind using a I2c input to get true PWM?  If so what timer?

3.  How do complex biped robots use all their servos effectively?  A controller with more PWM outputs, programming delays, external timer?

Thankyou in advace for your help.

Robot nube.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Yet more servo questions
« Reply #1 on: September 09, 2009, 12:45:05 AM »
1. The on/off switch uses one PWM pin. Basically you can just solder a wire to one end of the on/off switch.
The green LED also uses another PWM pin, and you can solder a wire to that as well.
but you will loose the led and the on/off switch by doing that...

3. admin has made a program called "sor biped engine" specifically for the axon to control multi limbed robots like bipeds. they generally use things called "gaits" to control servos so in your programming you can say:
Left_leg_front and it will move front, instead of having:
servo_1(23)
servo_2(42)
servo_3(31) which makes things complicated in code.
Howdy

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots
Re: Yet more servo questions
« Reply #2 on: September 09, 2009, 05:38:40 PM »
Quote
For my first robot I'm looking at using the axom MCU.  But I need to control about 23-25 servos, along with a few sensors.  In the specs for the axom it says I can control up to 29 servos.  But only 7 on PWM up to 9 with mods.
spelled Axon, with an 'n' :P

Quote
2. for controlling the other servos I require, Do I have to have use programming delays to create the PWM or can I add an external timer of some kind using a I2c input to get true PWM?  If so what timer?
Hardware PWM is just one way to control servos. If you look at the Axon code, the recommended method is to pulse a pin - make it high, delay, then make it low.

Quote
3.  How do complex biped robots use all their servos effectively?  A controller with more PWM outputs, programming delays, external timer?
Hardware PWM is best for servos, but the problem is that they tend to be limited in number.

Offline fabguyTopic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 1
Re: Yet more servo questions
« Reply #3 on: September 10, 2009, 04:57:02 AM »
Thankyou for your help.  I'm sure while I build this robot I'll need much more.

I ordered my Axon  ;)

Offline fabguyTopic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 1
Re: Yet more servo questions
« Reply #4 on: March 15, 2010, 05:17:51 PM »
My project is comming along well.  The construction part anyway.

So far Ive just been testing my movement etc with a standard RC type of control.  Spektrum receiver.

















This isnt the final body for this project but i need to make sure it will all fit.







Offline fabguyTopic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 1
Re: Yet more servo questions
« Reply #5 on: March 15, 2010, 05:23:00 PM »
So brings me to more problems I'm having with the programming.  I'm reading as much as I can to avoid asking a stupid question but I'm stuck.

My program is very simple at this point.  But I cant even get how to define everything I need.  When I think I got it I'm still getting build errors.  I think Im missing something but I'm not sure what.

Please Help!

Build started 15.3.2010 at 19:01:36
avr-gcc.exe  -mmcu=atmega640 -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT bee.o -MF dep/bee.o.d  -c  ../bee.c
avr-gcc.exe  -mmcu=atmega640 -Wall -gdwarf-2 -std=gnu99 -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -MD -MP -MT control.o -MF dep/control.o.d  -c  ../control.c
../control.c:18: warning: data definition has no type or storage class
../control.c:18: warning: type defaults to 'int' in declaration of 'DDRC'
../control.c:19: warning: data definition has no type or storage class
../control.c:19: warning: type defaults to 'int' in declaration of 'DDRA'
../control.c:20: warning: data definition has no type or storage class
../control.c:20: warning: type defaults to 'int' in declaration of 'DDRH'
../control.c:21: warning: data definition has no type or storage class
../control.c:21: warning: type defaults to 'int' in declaration of 'DDRE'
../control.c: In function 'control':
../control.c:65: warning: implicit declaration of function 'servo'
../control.c:65: error: 'PORTH' undeclared (first use in this function)
../control.c:65: error: (Each undeclared identifier is reported only once
../control.c:65: error: for each function it appears in.)
../control.c:67: error: 'PORTE' undeclared (first use in this function)
../control.c:70: error: 'PORTA' undeclared (first use in this function)
../control.c:72: error: 'PORTC' undeclared (first use in this function)
../control.c:79: warning: implicit declaration of function 'delay_ms'
make: *** [control.o] Error 1
Build failed with 6 errors and 10 warnings...

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots
Re: Yet more servo questions
« Reply #6 on: March 15, 2010, 08:18:44 PM »
It looks like you missed a step, like didn't put all the files into the right folder.

Offline fabguyTopic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 1
Re: Yet more servo questions
« Reply #7 on: March 15, 2010, 09:08:45 PM »
Ive used the entire files used for the photovore, and modifying that.  Im not sure how something would be missing from there.  I tried adding all the files to the source files and header files with no change.  What files did I miss?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,660
  • Helpful? 169
    • Society of Robots
Re: Yet more servo questions
« Reply #8 on: March 15, 2010, 09:31:03 PM »
Start over, step-by-step, and don't deviate the slightest from the instructions. It should work . . . its only not working because you missed something :P

Offline fabguyTopic starter

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 1
Re: Yet more servo questions
« Reply #9 on: March 16, 2010, 07:15:03 PM »
Woo Hoooo

Thankyou!  ;D

I was moving files around instead of just putting them all in the file directly from the site.  I thought I moved tham all but as you say I must have missed something.

 


Get Your Ad Here

data_list