Help with RC project

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

Moderator: Benj

Post Reply
TedO
Posts: 79
Joined: Sat Mar 14, 2015 7:52 am
Has thanked: 46 times
Been thanked: 26 times
Contact:

Help with RC project

Post by TedO »

Good day,

I would like to have a go at creating a program for Radio control use on model aircraft, namely a quadcopter. What I do not have the experience in is PWM. How does one input the different signals that the RC receiver is putting out in order for my controller program to know what the pulse width of the four channels is doing.

Does one use a potentiometer input or what?

Any help would be appreciated.

Thank you
Ted

chipfryer27
Valued Contributor
Valued Contributor
Posts: 617
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 184 times
Been thanked: 195 times
Contact:

Re: Help with RC project

Post by chipfryer27 »

Hi

First off I admit to having no RC experience so apologies in advance if this is idiotic.

My understanding is that modern receivers operate using PPM (pulse position modulation) per channel (?). If so you could perhaps have the microcontroller monitoring this stream and adjusting its PWM outputs accordingly? I may be wrong but didn't older systems operate servos directly using PWM? You could perhaps feed the output going to the servo into a port of a microcontroller and monitor this incoming signal. Any change in the incoming pulse rate could be reflected in the microcontrollers PWM outputs.

I'm sure someone far more knowledgeable will offer better advice.

Won't you need "XYZ" sensors to fine tune the motor speeds to auto-stabilise? Don't forget to include a Fail Safe that will automatically perform a controlled descent and landing should it fly out of RC range.

Sounds like a fun project and I hope you keep us posted on progress.

Regards

chipfryer27
Valued Contributor
Valued Contributor
Posts: 617
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 184 times
Been thanked: 195 times
Contact:

Re: Help with RC project

Post by chipfryer27 »

Hi

Further to my previous post, I have spoken with a colleague whom was part of a team that created a "drone" as part of a University project. His project had specific needs and he looked into all aspects of control and communication.

The project used Arduino technology and he confirms that the initial idea was to decode the PPM signals I mentioned above. Each PPM output from the receiver would be fed into a port of an Arduino, and he would monitor that port for the presence and position of a signal and use that to do whatever. I think this would be relatively straightforward to do.

However they then changed things. They needed a different way to control and communicate with features that standard RF technology could not provide and they settled on, believe it or not, WiFi technology. They created an encrypted path to/from the "drone" and sent all commands/replies etc over it. This was of course for a project and they just needed POC to get their grades. I think they also included GPS sensors so that the operator would know exactly the height and position of the drone and if it lost communications it would automatically make it's way back.

Hope this helps.

chipfryer27
Valued Contributor
Valued Contributor
Posts: 617
Joined: Fri Jun 06, 2014 3:53 pm
Has thanked: 184 times
Been thanked: 195 times
Contact:

Re: Help with RC project

Post by chipfryer27 »

Ted

Whilst I know this doesn't quite fall within the scope of Flowcode / uC programming it may still be of help.

My friend crashed his quadcopter. Nothing too expensive, maybe around £40 to buy, but it did carry a WiFi camera that linked to his tablet. His kids are more upset about the loss of a toy than anyone.

He bought new blades / rotors (?) and tried a test flight. I cannot fully detail how he described what happened next as this is a public forum, but he likened it in Scottish vernacular, to a "scabby dug" cleaning itself across a carpet. No lift, just sideways scraping against the floor...

He asked me to take a look (at the coptor...) but I was rather hesitant as doing anything with SMD is generally not worth the effort as replacement boards are so cheap and then if you compare board to new unit it's even less.

But a friend is a friend.....

It did scrape itself against the carpet as he described when "up" was sent. However it did attempt to rise before impersonating "scabby dug" and I could control the motors from off to full on. Wiggling the direction control as I applied "more thrust Scotty" did see it lift a few cm before going heading sideways off towards the skirting board.

It's not stable.

Opening it up I really wasn't expecting to see anything that I could economically repair but once the casing was removed I could see that two out of the four pillars that support the Rx pcb were broken (presumably from his crash) which meant the Rx pcb was free to vibrate / wobble when power was applied.

As this pcb also held the accelerometer responsible for keeping it level, and it was flapping about, it isn't hard to imagine the frustration of the uC in attempting to keep things level. A good application of Araldite soon had the pillars secure.

Normal operation was resumed.

So, if you do decide to build your own Quad, remember to keep the accelerometer firmly secured to the chassis.

Regards

Post Reply