go away spammer

Author Topic: Questions/Experiences to the Project USB Servo Controller  (Read 2998 times)

0 Members and 1 Guest are viewing this topic.

Offline DrGuenterTopic starter

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Questions/Experiences to the Project USB Servo Controller
« on: May 13, 2007, 01:19:35 PM »
Hello there,

well, as a beginner in microcontroller projects - I modified/realized the usb-servo Project on my atmega8, as outlined on the web page here: http://www.societyofrobots.com/member_tutorials/node/25

 :) Nice work of engineering  :) Very Good work.  :)

So - I'd have some questions:

* Is there a reason -- or are there possibilities to improve the stability of the USB Connection?
Well, I assume, that there is an interaction between the software PWM and the Emulated USB System.
Normally the data is sent to the controller, but I'm thinking about utilizing it as a  controller of continous control -- so I don't like any interruption of the communication.

* I observe some timing problems - that means: my servos won't remain at the commanded pose, but "jump" every ten seconds to come back to the commanded pose. Unfotunately I don't have an Osci to check the PWM Signal to generate a proper 1-2msec pulse.
 
* Id like to utilize the A-D Conversion for sensorial issues - would you expect more trouble in timing and the like? Would it be possible?


+ I've ported the "commandline" interface "usb-servo" to Windows using libusb-wiproject. (Even I am a Linux fan ...). It is relatively straight forward - except the compiler is more strict in variable declarations.
 (libusb-win has to be installed -> especially the driver part has to be installed additionally - In contrast to Linux - then just compile and link the proper libraries of libusb-win of sourceforge)


Thanks in advance,
bye for now,
Günter








Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
    • dunk's robot
Re: Questions/Experiences to the Project USB Servo Controller
« Reply #1 on: May 13, 2007, 04:54:11 PM »
Quote
well, as a beginner in microcontroller projects - I modified/realized the usb-servo Project on my atmega8, as outlined on the web page here: http://www.societyofrobots.com/member_tutorials/node/25

 Smiley Nice work of engineering  Smiley Very Good work.  Smiley
thank you. glad it was of use to someone.

Quote
* Is there a reason -- or are there possibilities to improve the stability of the USB Connection?
Well, I assume, that there is an interaction between the software PWM and the Emulated USB System.
Normally the data is sent to the controller, but I'm thinking about utilizing it as a  controller of continous control -- so I don't like any interruption of the communication.
so i found the AVR-USB code fails occasionally.
i never bothered debugging this in any great detail.
instead i put checks in the code on the host computer's controller program to try and catch failed USB transmissions and retransmit them.
maybe you can improve on my error trapping here to improve stability.

Quote
* I observe some timing problems - that means: my servos won't remain at the commanded pose, but "jump" every ten seconds to come back to the commanded pose. Unfotunately I don't have an Osci to check the PWM Signal to generate a proper 1-2msec pulse.
so the worst i saw was some vibration in the servos when the USB bus has other traffic on it.
this is caused by the USB interupt getting called, slightly altering the timing of the PWM pulse.
maybe you are seeing something similar but worse because of more traffic on your USB bus.
try testing without other USB devices plugged in to verify if this is what is happening.

the vibration i saw in the servos was fairly minor. probably only 1 or 2 degrees every few seconds.

so i am currently have a working prototype for a servo controller that has no servo vibration.
i get round the timing issues by having the AVR controlled over the i2c protocol instead of USB. (i poll for incoming i2c commands so no disruptive interupts.)
a 2nd controller receives the USB input and retransmits it on the i2c bus.
this approach has the advantage that you can controll many servo controllers from one USB connected AVR.
i'll eventually post instructions for this on this site too.

Quote
* Id like to utilize the A-D Conversion for sensorial issues - would you expect more trouble in timing and the like? Would it be possible?
that should be possible.
i would avoid using the A-D interupt to avoid similar timing problems that i talked about with the PWM timing
but it will be easy enough to get A-D conversions without using interupts as long as you don't want very fast response times.

Quote
+ I've ported the "commandline" interface "usb-servo" to Windows using libusb-wiproject. (Even I am a Linux fan ...). It is relatively straight forward - except the compiler is more strict in variable declarations.
 (libusb-win has to be installed -> especially the driver part has to be installed additionally - In contrast to Linux - then just compile and link the proper libraries of libusb-win of sourceforge)
cool.
have you any interest in writing up additional information for windows users?
i'm afraid i have no windows experience so i wouldn't know where to start.

any way, thanks for letting me know how you got on.
as far as i know you are the first person to build one of these. (other than me.)

dunk.

 


Get Your Ad Here

data_list