transceiver servo control
bnikkel
Posts: 104
in Propeller 1
Hi everyone, So i have a 2.4ghz controller ive built. basically one prop sends through a transceiver to another transceiver then into a second prop and finally to a bunch of servos. im wondering if there is anyway to get rid of the second prop and have the transceiver connected directly to the servo? i can change the baud rate on the transceiver (currently at 9600) any thoughts or ideas about this would be appreciated.
Comments
-Phil
-Phil
-Phil
-Phil
600, 1200, 2400, 4800, 9600, 19200, 38400 and selectable via an AT command.
Unfortunately the radio doesn't support hardware handshaking, otherwise you could have tried bitbanging the RTS or DTR lines to get the pulse stream on the other end as Phil mentioned.
Have you tried Phil's suggestion and used a different baud rate?
You've established that 9600 doesn't work. Give the others a try just to see what happens.
The manual is unclear but I assume that it only supports 8 data bits, no parity, and one stop bit.
If it lets you change at least the data bit size and parity, you could try experimenting with those as well.
But the key is what type of serial or bit stream does your particular servo expect? Can you post any info on that? From there it could be determined if the UART approach will even work under any settings.
-Phil
Do you understand what a serial data transmission looks like, for example, on an oscilloscope screen?
IOW, a scattershot approach will not work here. You have to do the math and figure out which data sequences are going to translate into the pulse widths you need after they've been filtered.
-Phil
I used this program to drive it:
Here is the output I got on my scope:
The yellow trace is the serial output from the Propeller chip; the cyan trace, the filtered output that's input to the Schmitt inverter; the magenta trace, the output from the inverter, which could be fed to a servo.
Note the modulation near the end of the serial data. This is done to finesse the position of the inverter's falling edge. You will have to experiment with different data values to determine how each affects the timing and build a table that relates desired pulse widths to to the data sent.
But here's the rub: you have to repeat this sequence every 20 ms for each servo. There is not enough time in 20 ms to address and pulse 30 servos with one transmitter. You could use multiple transmitters, but that starts to get pretty unwieldy. It would be much better to have a micro at each receiver that continuously pulses each servo based upon the serial data it receives.
I consider what I've shown above to be no more than an academic exercise and of little value for your application.
Go with the receive micros!
-Phil
1 - use a single receiver and a propeller that has one pin wired to each servo
2 - use 30 small cheap micros and wire the receiver data line to all the micros
3 - use X receivers and Y micros to control Y groups of servos
Number 1 would be the most economical and simplest way. There is software to control 32 servos in the OBEX to get things started.