Yet another Single Channel Encoder

Button pushers
Post Reply
MaxZ
Posts: 142
Joined: 31 Jan 2019, 11:48
Location: Boskoop, Netherlands

Re: Yet another Single Channel Encoder

Post by MaxZ » 02 Jun 2019, 11:57

Yeah, I would agree to that in general, part of it is driven by my curiosity to understand the workings of the code :) No criticism taken..
Phil_G wrote:
02 Jun 2019, 11:29
What with the elevator corrections on throttle changes I feel we're losing the simplicity of S/C and its recreation. Just my 2p
I now regret bringing that up, yesterday I simply gave it some extra down thrust which did the job.

So you are saying I should just stick with it and learn :shock: :P One problem will be that I practised on a large heather field yesterday, about 1.5 hrs driving away from where I live. For everyday practice I have to use our own club field, which has less forgiving surroundings I am afraid...

Cheers,
Max.

MaxZ
Posts: 142
Joined: 31 Jan 2019, 11:48
Location: Boskoop, Netherlands

Re: Yet another Single Channel Encoder

Post by MaxZ » 03 Jun 2019, 10:17

F2B wrote:
02 Jun 2019, 08:45
We both suspect the culprit is in the format and this FlySky really needs a 9ch. input.
I think Max Will try that next and I expect him to report here when done do.
I have loaded a 9 channel version into the ProMini, but alas, no improvement. I have once more hooked up the pulse analyser, (and was able to filter and correct an error in the modified code) and it shows a stable frame rate of 20 ms. Over in the "modules" topic Bruno questioned the positive/negative pulse thing, so let's see what comes out of that. From the testing that Bruno and I did last Sunday at least I know that the module is basically sound, so it will live another day..... ;)

Cheers,
Max.

Mike_K
Posts: 254
Joined: 16 Feb 2018, 06:35

Re: Yet another Single Channel Encoder

Post by Mike_K » 03 Jun 2019, 12:11

Hi Max

Getting the Flysky module working seems to have spread onto two threads (this thread and the Modules, receivers, actuators & components) and have made some suggestions on the other thread.

Mike

User avatar
F2B
Posts: 92
Joined: 16 Feb 2018, 11:23
Location: 20 m NE of Amsterdam

Re: Yet another Single Channel Encoder

Post by F2B » 03 Jun 2019, 15:51

F2B or not to be....

MaxZ
Posts: 142
Joined: 31 Jan 2019, 11:48
Location: Boskoop, Netherlands

Re: Yet another Single Channel Encoder

Post by MaxZ » 06 Jun 2019, 14:08

Hi guys,

I am going to install a led to indicate the current throttle command status, off for stop, slow flashing for mid throttle, and rapid flashing for full throttle. (Phil, I think this is morally acceptable since I have no feedback from a screaming I/C engine, so I am entitled to an optical feedback instead. :mrgreen: )

The throttle pips are fine, but not very loud coming from inside the box, and I tend to forget the last input. More practise, I know, but still.. :roll:

I added a few code lines to Mike's sketch, and tested it on an Uno. All seems ok. I am sure you guys could have done it a lot quicker and probably more elegant, but it is ok for me.

If there is an interest, I could share the code here. Pin 4 was still vacant, so I used that for the output to the led. Attaching the entire sketch is probably not useful, since I modified that earlier to use DIP switches instead of jumpers.

The problem that still needs solving is the visibility of the led. For testing, I have used an ordinary 5 mm blue led with a 165 ohm resistor in series (actually two 330 ohm in parallel) supplied directly by the output pin, but I may have to add a booster stage.

Cheers,
Max.

User avatar
Phil_G
Posts: 311
Joined: 15 Feb 2018, 23:32
Contact:

Re: Yet another Single Channel Encoder

Post by Phil_G » 06 Jun 2019, 15:07

MaxZ wrote:
06 Jun 2019, 14:08
I am going to install a led to indicate the current throttle command status, off for stop, slow flashing for mid throttle, and rapid flashing for full throttle.
Its not important Max but you could use the 10-year-old convention, LED off for throttle off, fast flashing at 'mid' if the next position is 'full', fully on for 'full throttle', and slow flashing for 'mid' when the next position is 'off'.

This means you can always see where you are in the sequence, whereas with your sequence, 'flashing' could mean 'mid going up' or 'mid coming down'. Its not at all important but on low, slow, mid-throttle passes it is helpful to know that 'high' comes next! It also means that if you let another S/C flyer 'have a go' he will probably be familiar with the conventional throttle LED.

On the indicator, each chip pin can only supply about 30mA max but a superbright should be easily visible in daylight at 30mA. You can if need be parallel two or more outputs for more current - give each a separate ballast resistor, commoned at the LED.

Max I/O current is actually 40mA but thats an "Absolute Maximum" so we generally say 30 to be safe:


io.jpg


Cheers
Phil

User avatar
Shaun
Posts: 460
Joined: 15 Feb 2018, 21:49
Location: West Yorkshire

Re: Yet another Single Channel Encoder

Post by Shaun » 06 Jun 2019, 15:24

Hi Max,

Following in from Phil's comments, as a Kid I spent hours sat in front of the TV practicing my button craft with my MacGregor Tx and Veron Mini Concorde, much to the annoyance of my parents .

It paid off through and virtually never miss keyed the model when flying.

Also don't over complicate the throttle when learning. Off and on works fine then you don't have to worry about what happens next.

No more aquatic landings eh!👍

Shaun

MaxZ
Posts: 142
Joined: 31 Jan 2019, 11:48
Location: Boskoop, Netherlands

Re: Yet another Single Channel Encoder

Post by MaxZ » 06 Jun 2019, 15:25

Phil_G wrote:
06 Jun 2019, 15:07
.. but you could use the 10-year-old convention, LED off for throttle off, fast flashing at 'mid' if the next position is 'full', fully on for 'full throttle', and slow flashing for 'mid' when the next position is 'off'.
Good idea, I will change it to that sequence.

About the outputs: I thought the max was 20mA. But I will double up the outputs as you suggested, pins 3 and 4 are not in use yet.

Cheers,
Max.

MaxZ
Posts: 142
Joined: 31 Jan 2019, 11:48
Location: Boskoop, Netherlands

Re: Yet another Single Channel Encoder

Post by MaxZ » 12 Jun 2019, 14:49

Hi Mike,

Now that the FlySky module problems are solved by reversing the ppm output following your instructions on how to update the code (over in the other thread, thanks), I am now faced with a new problem. I need to connect to my backup Tx with a trainer/student link when I want to practise S/C at our local flying field. That will require two things to happen:

1. The ppm stream should not be reversed

2. The output stream should have "raw" data for rudder and elevator, i.e. no scaling, no reversing, no trim.

I solved 1. already by programming pins 11 and 12 for a jumper to achieve this (remember I replaced the original jumper 4 with a DIP switch)

To achieve 2. should I just skip lines 450 thru 467 in your original sketch, subject to jumper placement, or would that disturb the rudder and elevator control through the s/c button?

Cheers,
Max.

Mike_K
Posts: 254
Joined: 16 Feb 2018, 06:35

Re: Yet another Single Channel Encoder

Post by Mike_K » 12 Jun 2019, 18:59

Max

Can I make a suggestion about learning to fly single channel ie rudder only models based on my own experience?

Buy an old transmitter from the '70s or early '80s with mechanical trims. You should be able to find something like a Futaba FP-6-FN (sold in the UK as a Futaba M6) on eBay. It is ideal as it already has a push button fitted (originally for the buddy box) which you will use for single channel. But any other transmitter with mechanical trims would do as you can fit a pushbutton.

Next, convert it to 2.4GHz using Phil's 7 channel Arduino encoder and a FrSky DHT or OrangeRx DIY module (or similar module) and accept that you have to buy one matching receiver for it. I know you normally use a different make of transmitter, but trust me it will be easier in the long run than connecting a single channel transmitter to your normal transmitter via the trainer/buddy box port.

Next, build a trainer that was designed for both single channel and multi, but fit it with an elevator. Something around 1200mm wingspan is ideal as it is easier to see than some of the smaller single channel models. I won't suggest a specific model as everybody has their own favourites, but I used a Keil Kraft Mini Super as this was my first model.

Test fly and trim the model with the joysticks. Now you are ready to try flying the model on the button (rudder only, do not start with kick up elevator or even think of using blip throttle). Get as much flying time as you can, the more you fly the faster you will progress.

The great thing with Phil's encoder is, if you get disorientated and press the wrong key sequence (which you will), you can simply take control with the joysticks. This will stop many crashes and fly-aways, assuming you are good enough on the joysticks. If you are not good enough on the joysticks, forget single channel for the moment and just practice flying!

As you progress you will find you can set the model's elevator trim so you can do a complete flight on the button, including the landing, but still using the throttle joystick. Honestly, you don't need to flare the landing with elevator on a single channel model. Once you can consistently make flights without touching the rudder/elevator joystick you are finally ready to fly the model with the single channel transmitter.

I'm a couple of years into flying single channel and I'm happy flying on the button if alone, but still prefer the comfort of a converted multi-channel transmitter if I'm flying in public, like at Pontefract. So if you are the same as me expect the learning curve to be in years rather than a few days.

I also practice flying single channel using a flight simulator (Real Flight G3.5 in my case) and have a dedicated single channel transmitter connected to the PC (no need for a 2.4GHz module).

Sorry to be so long winded, but there are no short-cuts to learning to fly that I know of.

Cheers

Mike

Post Reply