7ch Propo + S/C mix encoder update/rewrite

Single to Multi propo
User avatar
Phil_G
Posts: 303
Joined: 15 Feb 2018, 23:32
Contact:

Re: 7ch Propo + S/C mix encoder update/rewrite

Post by Phil_G » 15 Dec 2019, 12:38

Hi Bo, you're over thinking all this ;) Any 328P board will do, even Nanos, ProMinis or anything similar, genuine or clone. I've supplied hundreds of the type recommended and I just buy whatever is on ebay at the time - I've never seen one that isnt labelled "DIY-More" - but if it was, but looked identical, that wouldnt concern me. In fact I'm pretty sure DIYMore cloned their board from a "Deek Robot" design :D

I've added a few explanatory comments and renamed the array "channel[]" to "servo_pos[]" as it actually depicts servo positions, hopefully avoiding the confusion with receiver output channels. No code changes.

Code: Select all


// Optionally, and only if you fully understand the array allocations, you can set any unused analogues here instead of 
// paralleling unused analogue inputs.  Either method prevents floating inputs 'wandering' or following an adjacent pin.
// Physical wiring is: A0=aileron stick pot, A1=elevator, A2=rudder, A3=throttle, A4=aux1, A5=aux2, and
// A0 is your 'primary steering' control - on a rudder/elevator/throttle set, the rudder servo is plugged into the aileron channel. SOP.
// So for example on a 3ch set, zero the rudder, aux1 & aux2 elements (servo_pos[0] is primary steering) like this:
// servo_pos[2]=0; servo_pos[4]=0; servo_pos[5]=0 // example for a 3ch rudder-elevator-throttle set


Bo Edstrom wrote:
15 Dec 2019, 02:05
...
So if I for example would not use aileron one would zeroing channel[0]
Is this correct?
No Bo, channel[0] is your primary steering channel, in a 3ch set rudder is primary steering.
You would never disable the aileron channel unless you fly some weird mode (3?) with steering on the secondary stick. When you fit out a 3ch rudder-elevator-throttle model, its expected that you'd plug the rudder servo into the receiver aileron channel... thats how its always been :D
The single-channel emulation operates on array element "channel[0]" as your primary steering channel, as do the V-tail and elevon mixes.
Its unfortunate that I used the word 'channel[]' as the name for the servo position array, as occasionally people confuse it with R/C channels and the order of channels output by the receiver.
So on a 3-channel set, you would zero channel[2], channel[4] and channel[5], leaving channel[0], channel[1] and channel[3] active for rudder, elevator and throttle respectively.
MaxZ wrote:
15 Dec 2019, 09:57
So it seems to me that, besides zeroing the unused channels, you still need to tie those together and connect them to the wipers of your stick pots (or just ch4 ?
No you dont Max, its either tie unused inputs OR code them out. The document is aimed at non-tech people who use my pre-programmed 7ch boards, or who are not adept at code changes, and they should tie unused inputs.
For those who can code, who fully understand the sketch and are blowing their own boards from it, zeroing unused channels is an alternative. Nothing has changed in this respect from the earlier code! :D

To be honest this urge for first-time-users to change a perfectly stable project before even trying it makes me nervous. If anyone is not absolutely 100% on how the code works I'd be much happier if they leave it as-is and parallel unused inputs exactly as per the document, many hundreds have been done this way, exactly as per the document, and it works!

Cheers
Phil

User avatar
Bo Edstrom
Posts: 23
Joined: 20 Sep 2018, 19:52
Location: Sweden

Re: 7ch Propo + S/C mix encoder update/rewrite

Post by Bo Edstrom » 15 Dec 2019, 12:41

Phil,
Thanks for the clarification on the unused "channels". It is clear now (to me).
I did figure out the Aileron is used even in a 3 ch scenario, but I was just after the number to put in [X] for unused "channels" in the code.

For me I think it is no point to change anyting in the code since I do not see any special scenario (yet) to need to modify anything there. As You point out one should really know what things do there. Still interesting to see the code You have written for the 7 ch encoder, I was surprised that it was not more code needed then this.

Great that any ebay board will work then, as You say. I did not know, sorry.

Have patience with me, I'm learning slowly bit by bit (I hope), I have been flying proportional since 1973 so I have been flying for rather long time by now, but never digged under the hood in any of my radios really and I have never converted a radio before to 2.4 GHz, and the encoder boards are new teritorry for me. But I have read all Your documentation and most forum posts I have been able to i find about your 7 ch encoder. It is impressive work You have done for the retro RC users that want to convert an old radio with new encoder board (and 2.4 GHz module). I have maybe over 10 old radios from late 1950s, early 1960s but most are from early-mid 1970s that I would like to convert. It is proportionals, reeds and single channel radios. I have read Your documentation for the "Reeduino" and singel channel emulator encoders also.

/Bo
Last edited by Bo Edstrom on 15 Dec 2019, 13:20, edited 9 times in total.

Scott Todd
Posts: 66
Joined: 26 Mar 2018, 23:21

Re: 7ch Propo + S/C mix encoder update/rewrite

Post by Scott Todd » 15 Dec 2019, 15:46

Great job explaining all this Phil :) It alwasy makes me smile when I read these threads. I have only done about 50 Arduinos. I have used all the boards in Phils' documentation and never had a failure of any of them. Some have been re-flashed hundreds of times when playing with the code. Most are radio encoders but I have also played with the PPM Analyzer (Excellant!) and a few other sketches related to RC stuff. I have been thru every line of Phil's codes and changed stuff on the bench to learn and understand what is going on. When asked, I almost always recommend people use his code as-is. Like Phil says, just because I like to tinker in there, doesn't mean everyone should.

Having said that, its good Bo is trying to understand a little of what is going on since he has a lot to convert. But at he end of the day, Phil's code is awesome and works great as-is. A few minutes of making extra leads for the unused channels is a small price to pay for the hours of enjoyment you will get flying your old Radio :)

Bo, there is also fun stuff going on in the Vintage Radio forum on RCG. You will find lots of pictures of radios and conversions. Phil also chimes in there and always has good stuff to add. Good luck and we look forward to some pictures ;)

https://www.rcgroups.com/forums/showthr ... ol-Systems

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

Re: 7ch Propo + S/C mix encoder update/rewrite

Post by Mike_K » 20 Dec 2019, 09:00

Phil_G wrote:
19 Dec 2019, 11:40
I found a cheap source of Spekky bind-plugs which are perfect for selecting options on DIY-More boards:
Hi Phil

I've been using these header pins for a while now with the DIY-More boards. Not as cheap as your Spekky bind plugs, but more easily available:

https://uk.farnell.com/amp-te-connectiv ... dp/2668461

I also bought some similar headers to what you bought from eBay and while they shorted all three pins together, they didn't fall to pieces. My solution to shorting all three pins out - don't fit the centre positive pin.

But what I've been using for my last few projects (not your transmitter) with the DIY-More boards has been to fit DIP switches. Now I know they are on a 0.3" (7.62mm) pitch and the 0V and inputs on the Arduino are on a 0.2" (5.08mm) pitch, but the legs can be easily "teased" inwards into position with pin nosed pliers. I don't know what inputs you've got your header connected to as I haven't looked at your code, but I would imagine they could be reconfigured if necessary. Ideally, the DIP switch is fitted at the end of the row of I/O (4 to 7 in my case) as they overhang a little at each end. In the photo, you can see digital 3 becomes a little tight to use. In my opinion, a DIP switch is a lot more convienient than headers and about the same cost.

https://uk.farnell.com/multicomp/mcnds- ... dp/2910894

DIY_More_DIP.jpg
Mike

User avatar
Wayne_H
Posts: 339
Joined: 17 Feb 2018, 05:26
Location: Temora, NSW. Australia
Contact:

Re: 7ch Propo + S/C mix encoder update/rewrite

Post by Wayne_H » 06 Jan 2020, 02:10

Thanks again Phil, top job! :D
Cheers,

Wayne
Once a Retrobate, always a Retrobate............ ;)

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

Re: 7ch Propo + S/C mix encoder update/rewrite

Post by Phil_G » 14 Jan 2020, 23:14

I've posted an update, just changes to the way the buzzer sounds, adding a startup pip, made the minute-minder alarm less intrusive (in practise the alarm was annoying!), and I found that in an unlikely set of circumstances the buzzer could latch 'on'. This didnt affect general operation at all but its fixed. This is just a small code update and only concerns the noises it makes, encoder-wise there are no changes.
In the document I found a reference that I'd missed, to using the 5.08mm links - this has been removed. They are a bad idea as they short all 3 pins including the 5v supply.
Cheers
Phil

Post Reply