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.