Jump to content

Futaba M6 Fr Sky 2.4 ghz DIY Conversion


Paul Luby
 Share

Recommended Posts

Hi Phil

Whoops, glad I'm not the only one with bad spelling fingers. Thanks for the correction.

Chris

No problem, quite funny really.

Shaunie

I'm gonna revert to Arduino type cause its what I'm using for my encoders. I'm assuming your Challenger doesn't have expo. If so then the easiest way is to replace your whole encoder with an Arduino based one. Its a little late now but by tomorrow evening I can have the Arduino code modified to give a preset expo rate.

Paul

(AKA Veri-Gash)

Edited By Paul Luby on 27/05/2014 23:50:08

Link to comment
Share on other sites

Hi Paul,

Thanks for the info on decoupling of the signal input. In an effort to find out and understand more I found this comment which says that the frsky modules are not fussy about the rate at which the signal is received into the module so it can accommodate a wide range of radio types.

**LINK**

D

Link to comment
Share on other sites

Hi DG3

I'll have to put the Rx on a scope to confirm some of the info in that link.

The title of the link is to do with CPPM which is Combined PPM. On some systems there called PPM Sum signals. Basically they output an 8 channel data stream out over one set of pins. A bit like Futaba SBUS. It tends to be used on Autopilots, etc to save on the number of cables. I've used it on my Ardupilot satis.

Link 1

Link 2

FrSky even do a SBUS to CPPM converter.

The issues with the FrSky CPPM signal were as far as I am aware solved middle to late 2012.

I hope we're not confusing an input verses output issue

I'll put my scope on it tomorrow and have a play.

Shaunie

Sorry couldn't do anything today on expo code as wifey dragged me out to look at Maine Coon Kittens. We have a couple of large pussy's and we're adding a couple more to the family.wink

Will try and sort it out tomorrow.

Paul

(AKA Veri-Gash)

 

Edited By Paul Luby on 28/05/2014 22:27:12

Edited By Paul Luby on 28/05/2014 22:35:32

Edited By Paul Luby on 28/05/2014 22:36:45

Link to comment
Share on other sites

Hi Paul,

I was reluctant to post the link as you pointed out it is for cppm which could easily confuse the topic for others. I guess we are only really interested in the first 3 items in the chain for bog standard models and old transmitters ... i.e.

TX sticks, trims and switches --> Arduino --> PPM assembled and output to --> Frsky DHT DIY Module --> RF signal sent from DHT with 9ms cycle to Frsky RX which with acquires / processes data every 22ms or so --> RX processes wireless signal and either a) outputs to individual channels pins or b) outputs on one pin as CPPM (Rx specific) for connection to a flight controller with a default frame length of 18ms unless firmware upgraded to 27ms frame length.

18ms frame length seems to be the default that it shipped. See bottom of this page; **LINK**

Anyway, I'm going way off topic! When I get my hands on a scope again I'll probe around to try learn more and maybe try test the limitations of frame lengths output of the arduino just for interest.

D

Link to comment
Share on other sites

Lot's more done today.

Here's the Arduino mounted in postion, (complete with PAUL's code). Along with the FrSky module velcro'd opposite and the aerial on a bit of plate epoxied across the large aerial hole.

img_4235.jpg

img_4244.jpg

The original aerial trim was drilled out to suit. Sets it off rather nicely.

img_4246.jpg

Just these parts to mount now.

img_4240.jpg

Everything works very nicely with an FrSky Rx in my mini Tyro. As luck would have it, all servo centres and directions were correct first go. I don't think I've ever had that happen before.

Link to comment
Share on other sites

Hi Paul, no the set has no expo, i'd be happy to whip the encoder out and pop an Arduino in. How about picking up the expo rate from another analogue input so it could be tweaked with a pot. Just one pot for all aileron/elevator/rudder maybe?

My last assembler work was on the Motorola MC6809, showing my age now! bought some PiCs and got a developer kit but never ever did anything with it. Did buckets of ladder programming, if you need any of that I'm your man!

Shaunie.

Link to comment
Share on other sites

Hi Chris

The Waltron looks great. Should get a few comments down the field.

Shaunie

Adding expo will mean changing the Arduino code quite a bit to accommodate an expo algorithm. An adjustable pot is what I've been thinking about. I've modified the code to make the expo calculation easier given the limited math functions of the Arduino (burned midnight oil again). I'll post a cheer when its ready.

Paul

(AKA Veri-Gash)

Link to comment
Share on other sites

I have been meaning to give an Arduino a try though I'm a dedicated pic user, smiley I wanted to get an idea of how the atmel compares, not just the atmel chip but the whole development setup. I cant compare the IDE as I dont use one for the pic stuff (you cant beat windoze 'notepad' !), nor do I use any of the microchip debug tools.

Anyway I put this Kraft Series 70 conversion together last night as an experiment. Its definitely a brilliant little processor board but I did find I had a lot of jitter on the PPM line which was getting through to the servos - I was thinking of filtering the adc readings (sum the last 4 readings, divide by 4) but first I tried disabling interrupts - which cured it   

The microseconddelay function doesnt use interrupts so there are no detrimental effects at this level (read adc, send ppm - nothing fancy)

The 44-year-old Kraft pots are still a bit noisy but getting better with more use. Initial thoughts are that the arduino is very easy to work with, its so quick to try things, and ideal for experiments. To anyone who's inquisitive but never got into micros I'd say have a go at Pauls project, these boards make it fun!

In fact its so easy its almost cheating

I'm not jumping ship though, personally I'm more comfortable with my pic stuff and the granular level of control that pic assembler gives, but thats just me, I'm a bit of a 'stick in the mud!'  

Cheers

Phil

kraft_arduino.jpg

 

 

Edited By Phil Green on 29/05/2014 11:29:31

Link to comment
Share on other sites

Be careful Phil.

Arduino might suck you in.

Have a look at some of the more capable Arduinos or even a Riotboard, you'll love the Riotboard.

I have a pre-release Arduino Tre, its why my downstairs toilet isn't decorated yet, (wifey moans yet again it the background).

Regards the stopping of interrupts, I only do that if the problems are very noticeable as it can cause issues with some code I put together.

Shaunie

Regards the expo, I've had to re-write the code quite a bit and have to mod the stripboard in the Futaba M6 to put a couple of pots on it. I'm putting both dual rates and expo on it and should have the code finished and tested by tomorrow night, downstairs toilet decorating and wifey permitting.

That, I think, will be as far as I can go with the current set up in the Futaba.

Chris

I'll start on the Digifleet and the article then.

Of course all this is job hunting permitting.

Paul

(AKA Veri-Gash)

Edited By Paul Luby on 29/05/2014 11:21:53

Edited By Paul Luby on 29/05/2014 11:27:52

Link to comment
Share on other sites

Hi Phil

Reversing and rates are easy, just reverse the map for servo reversing and adjust the map range for rates, both can be done by switch sensing.

Adding expo has made me re-write the base code, which has made it a little simpler but a little more difficult to follow for the novice as the mapping changes from 1000 to 2000 to -500 to 500 which makes the math a little simpler.

Hopefully the new code won't cause too much confusion.

As I said the code was written originally so it wouldn't cause too much confusion for novices but as you add more functions it becomes more complicated by default.

Paul

(AKA Veri-Gash)

Link to comment
Share on other sites

Hi Chris

I agree totally.

First thing I do after a test flight is adjust the control surface linkages and then neutralise the Tx trims just like we had to do when I were a lad.

Most guys I know nowadays just leave the trims how they are and use the computer gear settings.

Not my way of doing things.

Don't get me wrong, my DX18 and my Taranis allow me a level of flexibility that is amazing, door sequencing, telemetry recording, etc which combined with my fixed wing stability systems, flybarless controllers and autopilots are things we could only dream of 10 to 15 years ago.

Wait till you see my Arduino Undercarriage & Door Sequencer.

Paul

(AKA Veri-Gash)

Link to comment
Share on other sites

Posted by Paul Luby on 29/05/2014 11:34:41:

Hi Phil

Reversing and rates are easy, just reverse the map for servo reversing and adjust the map range for rates, both can be done by switch sensing.

Yep indeedy, but theres no need to waste switches or processor inputs for simple reversing. To reverse any function I just hold the stick over on power up. To reverse elevator for example you'd hold the stick right down and switch on then release the stick - on power up the software sees the stick is over, flags the reversal and saves it to flash.

On the next power up the software sets the reversing options etc by reading the flash.

The map function is slow and big - a much faster & smaller reverse is to simply subtract the channel value from 3000, although if you're selecting this map or that map based on a switch it makes no odds, other than you end up with a lot of maps for all combinations of rates, reversing and expo. Similarly you could have fixed rates (say fixed 50%, either on or off) can be done with maths instead of another map table. Much less code space!

Must admit I dont particularly like the option of throttle reversing - its an accident waiting to happen! so I just have low 1ms high 2ms as normal convention for an esc. To me, electric motors and reversed throttles are a scary thought!

Cheers

Phil

PS did anyone else get the jitters or was it just mine?  smiley

Edited By Phil Green on 29/05/2014 16:22:23

Link to comment
Share on other sites

Hi Phil

Smart idea using the stick to select reverse. I had a similar way for selecting for bind on some of the indoor RTF heli Tx's I had. Must confess I didn't like it, I'd rather have a nice DIL switch on the strip board and then set the map range on startup, call me old fashioned.

Cause of the code re-write I can do the rate just by multiplication.

Regards the jitters, I had a micro amount of it on one Tx I did but it disappeared after the sticks had been exercised a while. Try doing a digital switched channel and see if that jitters. That's how I narrowed it down to old pots when I first started using Arduino's for Tx encoders. Effectively, if switch in position 0 channel = 1000 else if switch in position 1 the channel = 2000. These digital switched outputs were and are always solid for me.

Seemed to work for me.

Paul

(AKA Veri-Gash)

Link to comment
Share on other sites

Hi guys

Got the Futaba M6 strip board modified and the code written to give pot adjustable rates and pot adjustable expo on elevator and aileron. that includes positive and negative expo for those who like to make their models twitchy around neutral.

I've used the math commands within the Arduino and not based it on integer math to keep it easy to understand so those not familiar with programming integer math can follow it easily.

Its not perfect and some will not like it but it is easy to follow and it works.

The rates work on the expo as well.

So it's pretty functional.

I'll post it later after I've converted the code to a picture cause this forum won't allow uploading of other types of files.

Paul

(AKA Veri-Gash)

Link to comment
Share on other sites

Hi Phil

Agreed.

As I said earlier on in the thread, I have a lovely Digifleet Custom III delux four channel set that has the original rate switches on the front that I could use for the rate and the expo selection.

Not sure if Graham would go for a black Tx though, he did say use a Tx that photographs well.

It's the only one I have that hasn't been touched and I can start from scratch on taking pictures as I go.

Will have to take a few pictures and send them to him to see what he reckons about using the Digifleet Custom III.

I've included the noInterrupts() command as it gives something else to explain though on mine it made no difference regards servo jitters.

I agree about a monthly &E column, I've already chatted to Chris regards this. I think it would put something back into the Mag.

I've already got an Arduino U/C multiple servo door sequencer on the go, it could also be used for multiple servo flap control as well. These would be useful for more complex models. Most people have 8 channel Tx's and if you want to move to more complex models you need to make the leap from 8 channel Tx's to the more expensive 14, 16 or 18 channel sets because of the extra servo's. (Taranis excluded from expense cause its just great, I really like mine).

You'd have loved my old multi engine synchroniser, did that in the nineties for 2 ,3 ,4 ,etc engine models, lots of lovely analogue circuits.

Paul

(AKA Veri-Gash)

Edited By Paul Luby on 30/05/2014 12:02:54

Edited By Paul Luby on 30/05/2014 12:06:25

Edited By Paul Luby on 30/05/2014 12:08:40

Link to comment
Share on other sites

Re 'pictures' of the code, the sketches could be put on DropBox or Skydrive etc directly rather than as pictures, there are probably other filehosting sites too...

I think regular a '&E' column would bring a lot of disillusioned readers back... it doesnt have to be 'E' all the time, it could cover any technology or developments. I also used to like 'Gadgets & Gimmickry', remember that?

Posted by Paul Luby on 30/05/2014 11:59:28:

I've already got an Arduino U/C multiple servo door sequencer on the go, it could also be used for multiple servo flap control as well. These would be useful for more complex models.

I did one a while back for Andy Whitehead's DH Vampire (which he passed on to Ali):

Andy particularly wanted the 'everything adjustable' thing but he only had one spare channel.

Cheers

Phil

Edited By Phil Green on 30/05/2014 12:41:50

Link to comment
Share on other sites

I have a very tiny jitter on the aileron channel. Could that be down to the fact we have a number of different "digital" sections with different sampling rates and resolutions? That's the coder, the RF stage and this one digital servo?

I had to laugh at just how "old fashioned" my attempt at a solution was.
Whereas Phils first thought was "I was thinking of filtering the adc readings (sum the last 4 readings, divide by 4)"

I dug out a handful of capacitors and started soldering them across the pot! indecision

Link to comment
Share on other sites

Hi Chris

I've not had the jitter issue, but before you go soldering capacitors onto things, have you tried the "noInterrupt()" command the Arduino has, Phil mentioned it a few posts back and it cured his jitter issue. Jut place it on a line below the "void loop() {" command.

As I said, I've not had the issue myself.

I take it you've removed the following bits of code after calibration and prior to upload and operation?

// initialize serial communication at 9600 bits per second
// this is here to see results for channel calibration
// disable prior to Tx operation
Serial.begin(9600);

and

// print out the remapped values to serial monitor
// this is here to see results for channel calibration
// disable prior to Tx operation
Serial.print(chan01);
Serial.print("\t";
Serial.print(chan02);
Serial.print("\t";
Serial.print(chan03);
Serial.print("\t";
Serial.print(chan04);
Serial.print("\t";
Serial.print(chan05);
Serial.print("\t";
Serial.print(rate);
Serial.print("\t";
Serial.println(expo);
delay(1);

Blooming thing puts smileys in, instead of )

Paul

(AKA Veri-Gash)

Edited By Paul Luby on 30/05/2014 13:17:45

Link to comment
Share on other sites

Hi Phil

Amazing how there so many projects on the go but there kept so quiet.

I thought the internet was suppose to allow us to communicate easier.

Must admit though, there is a lot more model electronic stuff on RC Groups.

Paul

(AKA Veri-Gash)

Link to comment
Share on other sites

Thanks Paul, yes I'd taken out all those lines.

I'll try the "noInterrupt()" and see if that makes a difference. It's only very minor anyway, analogue servos don't jitter at all.

I do hope the &E is a regular thing in the mag. The Taranis Spektrum module seemed to go down well.

You two and others like you should have plenty to contribute.
I wonder if a Spektrum telemetry mAh sensor would be of interest?

If you need any of my Waltron photos, just let me know. thumbs up

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...