14 septembre 2008

Servos controlled remotely from a PC



Today, I have been able to control remotely servos from a PC through a pair of XBee modules.
On the receiver part I used an Arduino Dicemilla + XBee module and Futaba servos. This makes quite a big receiver to put in an RC modele, eheh, but hopefully the size should be smaller later on.

On the sender side, I used an Xbee Pro connected to the PC through the USB/serial cable. The PC sends commands such as "10400". The first number is the servo number, and the 4 other digits provide the servo position in hexadecimal.

The communication between the two Xbees is bidirectional, and allows many fancies that can't be done with traditional radios. For instance, during the test, I could get back information telling if the command has been successfully passed or not.

The nice thing about this, it that it all numeric: the sender sends pulse as number, the receiver receives pulse as number, and transform that to real pulse in time. Even if I stop the Xbee transmitter, the servo keep and hlod their current positions without any move. This makes easy to implement a failsave, where the servo go to a predefined position when no transmitter is detected.

The next step will be to couple the Sanguino with the Xbee to make the transmission part.

6 commentaires:

Unknown a dit…

hello, i'm trying to do the same thing. do you have the code you used at hand? i'm preety new in all this and the code will get me starting, thanks in advanced.
pibecalifornia@gmail.com

Obor a dit…

Send me you mail address, so that I can mail it to you.

Unknown a dit…

hey, my email address was on the comment (pibecalifornia at gmail)
I was able to get something like this done, but when i do the connection through xbee's the reception is not good

thanks a lot man

ACR a dit…

Given that the XBee modules have PWM outputs, could you not omit the arduino circuitry to achieve the same results?

Obor a dit…

@ACR,

Yes, maybe the PWM signal on Xbee can be used, but I did not want to use specific stuff from the Xbee. The Xbee is used for its 2.4Ghz transmission capaibility and nothing else. It can be replaced by something else if needed.

Anonyme a dit…

hello, i'm trying to do the same thing. do you have the code you used at hand? i'm preety new in all this and the code will get me starting, thanks in advanced.
jomacude@hotmail.com