Author Topic: Servo Control with I/O expanders  (Read 2618 times)

0 Members and 1 Guest are viewing this topic.

Offline LXETopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
Servo Control with I/O expanders
« on: October 03, 2010, 08:10:47 PM »
I'm planning on interfacing this to an Arduino

http://www.sparkfun.com/commerce/product_info.php?products_id=9056

I was wondering if I could control 16 servos with it. I'm building a Biped with arms.

Offline knossos

  • Robot Overlord
  • ****
  • Posts: 278
  • Helpful? 14
Re: Servo Control with I/O expanders
« Reply #1 on: October 03, 2010, 09:10:57 PM »
I would guess no.  After all each servo requires you to continuously send the same signal repeatedly approx every 20msecs.  Assuming the response of the mux/demux is sufficient, an average pulse would be about 2msecs at max, so at best you could only control 10 (20/2) through this circuit.
"Never regret thy fall,
O Icarus of the fearless flight
For the greatest tragedy of them all
Is never to feel the burning light."
 
— Oscar Wilde

Offline LXETopic starter

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
Re: Servo Control with I/O expanders
« Reply #2 on: October 03, 2010, 09:16:20 PM »
Ok.

Offline KurtEck

  • Robot Overlord
  • ****
  • Posts: 217
  • Helpful? 12
Re: Servo Control with I/O expanders
« Reply #3 on: October 04, 2010, 08:07:44 AM »
As one of my side projects I was going to try using a Arduino mega (seeeduino) to control one of my Hex robots. So I purchased one of these: http://www.seeedstudio.com/depot/renbotics-servoshield-rev-11-p-498.html?cPath=78. 

I modified it to add two more servo connectors, but I have not yet tried the board out.  I did look through the library code for it and found a few issues which I fixed and someday I will bet back to it and try it out. 

FYI - While waiting for this to arrive from China I did port the Lynxmotion phoenix code to run on the Mega but it continued to use an SSC-32 to actually control the servos.

Kurt

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Servo Control with I/O expanders
« Reply #4 on: October 04, 2010, 09:49:56 AM »
Hi,

I'm planning on interfacing this to an Arduino

I was wondering if I could control 16 servos with it. I'm building a Biped with arms.
It won't be easy, but it could be done.

By chance, I recently started this 1/8 servo expander. It hasn't been prototyped yet, but any issues will be in timing (if so, component values will just need a little fine tuning).
Please remark that it takes a slightly different signal than an ordinary servo to control the timing (described in the schematic).

When it's matured, perhaps webbot could be persuaded to include a control sub-procedure in his library.

It's an old circuit that I designed for R/C control decades ago and now changed the input circuitry some, but personally, I'd just use a µcontroller. The cost should be about the same and the timing will be set in software.
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 waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 99
Re: Servo Control with I/O expanders
« Reply #5 on: October 04, 2010, 09:52:21 AM »
I'm planning on interfacing this to an Arduino

http://www.sparkfun.com/commerce/product_info.php?products_id=9056

I was wondering if I could control 16 servos with it. I'm building a Biped with arms.

NO. read the description again. This board is mostly analog inputs with four digital outputs  so it could be used for four servos.
A serial port expanded could be used to control 16 servos but the board you linked to is not one.

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: Servo Control with I/O expanders
« Reply #6 on: October 04, 2010, 09:58:08 AM »
By chance, I recently started this 1/8 servo expander.

That looks like a PPM decoder:



correct? Or what's the difference?

Offline KurtEck

  • Robot Overlord
  • ****
  • Posts: 217
  • Helpful? 12
Re: Servo Control with I/O expanders
« Reply #7 on: October 04, 2010, 10:23:38 AM »
By chance, I recently started this 1/8 servo expander. It hasn't been prototyped yet, but any issues will be in timing (if so, component values will just need a little fine tuning).
Please remark that it takes a slightly different signal than an ordinary servo to control the timing (described in the schematic).

When it's matured, perhaps webbot could be persuaded to include a control sub-procedure in his library.
FYI - The board that I mentioned in the earlier post used two of the 4017s for up to 18 servos...  Each one can control 9 servos with one channel left for the wait until the next grouping.   From the PDF for this board, the ideas behind this board came from the document: http://www.barello.net/Papers/AVR%20RC%20output.pdf

Kurt

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Servo Control with I/O expanders
« Reply #8 on: October 04, 2010, 10:58:56 AM »
Hi,

NO. read the description again. This board is mostly analog inputs with four digital outputs  so it could be used for four servos.
A serial port expanded could be used to control 16 servos but the board you linked to is not one.
The 4067 (and it's 74xx variants) works fine with digital signals, so YES, it could be used, but it would be a bitch to make the program for it.
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 Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Servo Control with I/O expanders
« Reply #9 on: October 04, 2010, 11:06:27 AM »
Hi,

FYI - The board that I mentioned in the earlier post used two of the 4017s for up to 18 servos...  Each one can control 9 servos with one channel left for the wait until the next grouping.
It's way more practical to be able to hold the info in a single byte - hence the 8 line limit in my design (I do think a little when I design circuits ;)).

Controlling 18 servos on a single line... Well, each could potentially be 2ms (=36 ms), so the repeat rate of 20ms wouldn't be guaranteed.

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 Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Servo Control with I/O expanders
« Reply #10 on: October 04, 2010, 11:08:18 AM »
Hi,

That looks like a PPM decoder:
[...]
correct? Or what's the difference?
It sure does... ;D
Why do you ask?
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 KurtEck

  • Robot Overlord
  • ****
  • Posts: 217
  • Helpful? 12
Re: Servo Control with I/O expanders
« Reply #11 on: October 04, 2010, 11:33:03 AM »
FYI - The board that I mentioned in the earlier post used two of the 4017s for up to 18 servos...  Each one can control 9 servos with one channel left for the wait until the next grouping.
It's way more practical to be able to hold the info in a single byte - hence the 8 line limit in my design (I do think a little when I design circuits ;)).

Controlling 18 servos on a single line... Well, each could potentially be 2ms (=36 ms), so the repeat rate of 20ms wouldn't be guaranteed.
Actually this board takes 4 io pins.  2 for each chip.  One for the clock and one for an enable.  The enable allows you to turn the whole servo system on or off...

I also try to think some when I write software ;)  In the implementation that comes with the servo shield, it makes very little difference between 8 or 9 servos.  Just an extra 2 byte value in the array to hold the desired pulse width...  Again I have no real vested interest in this product, I simply purchased it as I was trying to find something to hook up 18 servos to an Arduino Mega board...

Kurt

Offline madsci1016

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,450
  • Helpful? 43
    • Personal Website
Re: Servo Control with I/O expanders
« Reply #12 on: October 04, 2010, 12:11:59 PM »
It sure does... ;D
Why do you ask?

I was just curious. PPM has been used in RC equipment since the 60's, and I have been having the same though of using it for uC servo control for a while, as there are many circuits around the web for decoding it with decade counters like you did.

Looks like the only difference is how you did the sync detect.

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Servo Control with I/O expanders
« Reply #13 on: October 04, 2010, 12:34:59 PM »
Hi,

Actually this board takes 4 io pins.  2 for each chip.  One for the clock and one for an enable.  The enable allows you to turn the whole servo system on or off...
That sounds workable, but the it's only 1/4.5 then.


[...] it makes very little difference between 8 or 9 servos.  Just an extra 2 byte value in the array to hold the desired pulse width... 
That's the trouble with modern days loads of memory... Programmers get sloppy and bloatware pops up   :P   ;D
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