Custom Frsky Hub

Electronic projects that are either related to the firmwares for the 9x, or simply great for radio control applications.
Post Reply
User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Custom Frsky Hub

Post by gohsthb »

I am building a custom(izable) Frsky hub on an Arduino. I won't be getting back to this project probably until after the flying season. But I am starting this thread to share with others now. Attached is some code I have already written. It was working on and Uno board. Other boards should work just fine, as long as they have the '328 and the same IO available.

I was setting this one up to use on my 450 heli. I wanted to monitor the headspeed, battery temperature, and battery volts (per cell). The design also includes a couple of LEDs and a buzzer. In case the telemetry isn't working/set up then there would be a visual and audio alarm for the lipo voltage. I basically copied the functionality of this with the LEDs and buzzer.

I think where this project might go, is to set up a framework where you would simply need to set up you sensor processing, and give the data to a sending routine.

-Gohst
Attachments
hubVMon.zip
(5.67 KiB) Downloaded 378 times

User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: Custom Frsky Hub

Post by gohsthb »

Answering Jhsa from another thread,
The Arduino Pro mini should work. It only has a '168 so you might need to watch the program size, but that would be the only inconvience.
-Gohst
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Custom Frsky Hub

Post by jhsa »

there is a version with the 328. That's what i use for multirotors. 5v 16Mhz.
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
Java
Posts: 50
Joined: Sat Aug 25, 2012 9:19 pm
Country: -

Re: Custom Frsky Hub

Post by Java »

I would rewrite few things in your code. Like:

if(countHeart++ % 2)
digitalWrite(13, HIGH);
else
digitalWrite(13, LOW);

to
digitalWrite(13, countHeart++ % 2);

and everything that counts time (for example):

if(millis() > txMillis) {
txMillis += txInterval;

to:
txmillis = millis(); // initial value
if (millis() - txInterval > txMillis) {
txMillis = millis();

but that's me, your code is just fine.

Thanks for your good job!
User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: Custom Frsky Hub

Post by gohsthb »

I don't think it's all that good. Some interesting ideas on changing the code, I like those.
-Gohst

User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: Custom Frsky Hub

Post by Rob Thomson »

So this is rather like the Halcyon project?
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
gohsthb
Posts: 1412
Joined: Wed Dec 28, 2011 2:32 pm
Country: -
Location: Naperville, IL

Re: Custom Frsky Hub

Post by gohsthb »

Yes, I started this around the same time that the Halcyon project started. I haven't looked at the Halcyon project recently, so I don't know exactly what it does. I'm thinking this one will be a more DIY project where you can plug or unplug code blocks in the Arduino environment. Then you just have to wire up your Arduino board to match.
-Gohst
Irish Steve
Posts: 149
Joined: Thu Dec 29, 2011 10:04 pm
Country: -
Location: Ashbourne Co Meath

Re: Custom Frsky Hub

Post by Irish Steve »

This could indeed get to be interesting, I've some arduino's on the way at the moment, HK have Nano's for $9, which is helpful, also have a couple of Unos and a Mega in the mix, with some of the shields that HK are doing.

I have an idea for one of the channels of a 9X, or whichever, which is to replace the pot (one of the top row 3, with a series of switches connected in such a way that the combination will send a specific value in that channel, which the Nano at the other end will decode into a series of binary on off values, which can then be used to control things like lights, beacon, and the like, but only using one channel's data stream, (for now). I reckon that one channel will be capable of dealing with at least 6 digital switches, maybe more, depending on the stability of the pulse width, and the crafty bit then will be to multiplex things like the beacon with the motor off switch, so that the beacon will not operate until the motor safe is in the enable position, things like that, Longer term, I'm hoping that the telemetrEZ card can be used to input the digital channels, which will make it even better.

Been waiting the better part of a month for the Nano's, so the timing is perfect!

Thanks
Irish Steve

If it was easy, shure, would't we all be doin it?

_

Post Reply

Return to “General RC Electronic Projects and Discussion”