Servo SBus PWM Analog Conversion

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times

Servo SBus PWM Analog Conversion

Post by Jay Dee »

Hi guys,
An upcoming project will be taking signals from a model radio control reciever and using the received signals as inputs to a microcontroller (MIAC, ECIO, dsPIC)
Now, the tricky bit is getting the output from the RC reciever into the Microcontroller.

A)
I could go purely datastream.... Has anyone heard of SBus?
I know the basics, its a propitiatory protocol that allows one receiver to talk to many servos. Has anyone decoded or played with the SBus datastream?
I dont really want to get bogged down into a week of trying to decode it into a PIC, if I can help it!

B) Take the classic raw Servo PWM and try to convert that.
But the PWM is actualy more of a periodic pulse with variable duration. Not just a simple 50% mark/space 0-100% PWM convertion.

C) Some other method?

Once I have the 'data' from the RC receiver, I'm in the happy land of microcontroller and can do all the fun stuff, before passing it back out to the rest of the customers project.
any pointers appreciated, as ever! J.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Servo SBus PWM Analog Conversion

Post by Benj »

Hi J,

I've not come across SBus but it sounds interesting. Do you have a specification document we could look at. Maybe we could make a component.
Though we are pretty busy already at the moment maybe another forum member or VC could help finding a simple way to decode the protocol?

Option B is a possibility, you would basically wait for the signal to go high and then time how long it takes to go low again. I think a standard timing is something like 1.2ms min to 2.5ms max but this can vary a bit depending on how much your pushing the bounds of the servo motor. I really want to make a universal timing helper component and so that would be really nice but again we are busy and this is likely a fair amount of work to get right so am aware of what I can offer up. A simple timer interrupt approach with a high speed of interrupt and a basic counter might be quite simple to achieve the same result.

User avatar
Jay Dee
Posts: 398
Joined: Tue Aug 18, 2009 6:42 pm
Has thanked: 121 times
Been thanked: 154 times

Re: Servo SBus PWM Analog Conversion

Post by Jay Dee »

Hi Ben,
Ha, Understand the pressures of a busy workshop!
Unsurprisingly Futaba dont release an official protocol and there is just snippets reverse engineered by others.. Credit to these guys who have done quite a bit of work.
https://forum.arduino.cc/index.php?topic=99708.0
http://www.robotmaker.eu/ROBOTmaker/qua ... esentation

If I could ensure a reliable way to link an S-Bus reciever to a microcontroller, I think it could be a good solution. So if my customer project happens I will still look at it.
But to get us up and going very quickly, I suspect I may be linking a Servo to a Pot and feeding that into the micro! Ugly electro-mechanical solution.

I'll also have a look at your other suggested approach, however I would need to monitor 6 channels, so perhaps a dedicated circuit+micro so I dont tie up the main controller... will have a think! :)
Thanks, J.

Post Reply