7ch Propo + S/C mix encoder update/rewrite
-
- Posts: 66
- Joined: 26 Mar 2018, 23:21
Re: 7ch Propo + S/C mix encoder update/rewrite
Yes. Its a simple voltage divider and the Arduino already knows the limits for the pot you are tying into. You'll notice other Arduinos like the Nano only have access to one pin. It expects the common + and - signals. So if we were wiring directly to a Nano like Phil did originally, its just one wire In Phil's first Kraft shown in his original documentation, he tied all the outer pot wires to the + and - rails.
- Bo Edstrom
- Posts: 23
- Joined: 20 Sep 2018, 19:52
- Location: Sweden
Re: 7ch Propo + S/C mix encoder update/rewrite
Scott, thanks for answer.
/Bo
/Bo
- Bo Edstrom
- Posts: 23
- Joined: 20 Sep 2018, 19:52
- Location: Sweden
Re: 7ch Propo + S/C mix encoder update/rewrite
Hi,
Just opened the Arduino file PPM_Enc_7ch_sc_v2.ino in Arduino Web Editor to see if I understood anything.
I think I understand some, and with all the helpful comments for the various fuctions made by Phil it should be hard to get lost.
Note sure what Editor to use if I'm going to change anything in that file later on but maybe Arduino Web Editor is enough (it is a browser based Editor and just a plugin was needed to be installed I noticed).
I did not fnd any "undo" in Arduino Web Editor, maybe it is there but I did not find it. I'm sure undo is avaliable in "Arduino IDE" software but I have not installed that (yet).
/Bo
Just opened the Arduino file PPM_Enc_7ch_sc_v2.ino in Arduino Web Editor to see if I understood anything.
I think I understand some, and with all the helpful comments for the various fuctions made by Phil it should be hard to get lost.
Note sure what Editor to use if I'm going to change anything in that file later on but maybe Arduino Web Editor is enough (it is a browser based Editor and just a plugin was needed to be installed I noticed).
I did not fnd any "undo" in Arduino Web Editor, maybe it is there but I did not find it. I'm sure undo is avaliable in "Arduino IDE" software but I have not installed that (yet).
/Bo
Last edited by Bo Edstrom on 15 Dec 2019, 00:37, edited 1 time in total.
- Phil_G
- Posts: 629
- Joined: 15 Feb 2018, 23:32
- Contact:
Re: 7ch Propo + S/C mix encoder update/rewrite
Thats exactly what I do Scott & Bo, if someone specifically wants a 2 or 3 channel set for example I insert 'contrl_pos[x]=0' appropriately to stop them wandering. I do it immediately before the S/C emulation:Scott Todd wrote: ↑14 Dec 2019, 17:15[re unused analogue inputs]
Phil should respond with a more technical answer but in short, you can just leave them. I have done lots of 3 channel radios and I usually just leave them. He only says its 'untidy'. You could also go into the sketch and zero them out. Somewhere around throttle lock and the slow function, you could just add the commands 'channel[x]=0' where x is each channel you want to zero.
Code: Select all
// Centre any unused channels here, eg channel[4]=0;
// Three channels only this edit
contrl_pos[2]=0; contrl_pos[4]=0; contrl_pos[5]=0; // rudder, aux1, aux2
// single-channel emulation
scrudder=0;
// compound button
.
. etc
.
Re the tying of unused inputs, I worry that someone might use an unterminated channel that is simply 'picking up' the adjacent input, thinking its a legit second aileron channel or something - then one day it doesnt!
Remember that you only need parallel the unused signal pins, theres no point paralleling all three pos, neg & signal, in fact one servo plug twisted 90 degrees could connect three unused signal pins.
By far the best way is to 'zero' unused channels as above - easier and neater.
Yes its all good fun, though if you make any changes, it is important to thoroughly test all possible combinations & preconditions before flying it. Its common to spend more time testing than writing - "full-combinational parameters testing" and all that - in our case we need to be 100% sure, for safety.Scott Todd wrote: ↑14 Dec 2019, 17:15 I think half the fun is playing with Phil's code and learning what it does. Then its SO easy to make simple custom mods like this.
My suggestion would be to forget the browser-based editor and download the proper IDE locally Bo.Bo Edstrom wrote: ↑14 Dec 2019, 20:09 Note sure what Editor to use if I'm going to change anything in that file later on but maybe Arduino Web Editor is enough
You'll ultimately need a few libraries too, like OLED, ATTiny85, maybe ESP8266 etc all much easier to manage locally.
Cheers
Phil
-
- Posts: 66
- Joined: 26 Mar 2018, 23:21
Re: 7ch Propo + S/C mix encoder update/rewrite
I thought about the one plug turned 90 degree thingy but it doesn't quite match up to what Bo wanted. He wants Ail, Elev, Thro (A0, A1, A3). So 2, 4, 5 don't line up. He would have to change the order. Then he might as well do the software mod.
Sometimes when I'm bench playing, those unused channels go hard over. I don't know how far they are going but I worry about stripping servos. So I'm usually careful about NOT plugging stuff into unused channels if I leave them in the sketch. I have just been zeroing the channels lately on 3 channel stuff.
Bo, definitely just use the IDE. Its really simple and straight forward. Looks like you are learning and having fun. Exactly Phi'l mission
Thank you again Phil for all you have done and continue to do for us
Scott
Sometimes when I'm bench playing, those unused channels go hard over. I don't know how far they are going but I worry about stripping servos. So I'm usually careful about NOT plugging stuff into unused channels if I leave them in the sketch. I have just been zeroing the channels lately on 3 channel stuff.
Bo, definitely just use the IDE. Its really simple and straight forward. Looks like you are learning and having fun. Exactly Phi'l mission
Thank you again Phil for all you have done and continue to do for us
Scott
- Bo Edstrom
- Posts: 23
- Joined: 20 Sep 2018, 19:52
- Location: Sweden
Re: 7ch Propo + S/C mix encoder update/rewrite
So. lets se if I understand.Phil_G wrote: ↑14 Dec 2019, 21:37 ...if someone specifically wants a 2 or 3 channel set for example I insert 'channel[x]=0' appropriately to stop them wandering. I do it immediately before the S/C emulation:
Remember that internally the input order is aileron, elevator, rudder, throttle, aux1, aux2, ch7 regardless of output order AETR/TAER etc ... and that a 3-channel "rudder/elevator/throttle" set uses A0 (aileron) for rudder - hence zeroing contrl_pos[2], contrl_pos[4] and contrl_pos[5], leaving contrl_pos[0], contrl_pos[1] and contrl_pos[3] active for rudder, elevator and throttle respectively. This order has nothing to do with output order AETR/TAER/ETAR etc.Code: Select all
// Centre any unused channels here, eg channel[4]=0; // Three channels only this edit contrl_pos[2]=0; contrl_pos[4]=0; contrl_pos[5]=0; // rudder, aux1, aux2 // single-channel emulation scrudder=0; // compound button . . etc .
…
Cheers
Phil
Internal input order is aileron, elevator, rudder, throttle, aux1, aux2, ch7
And of the first 6 channels if I have unused connectors for Rudder, Aux1 and Aux 2 - for a 3 ch radio,
You say one should zeroing channel[2], channel[4] and channel[5]
So my conclusion then is that channel numbers for the first 6 channels are like this:
aileron = ch 0
elevator = ch 1
rudder = ch 2
throttle = ch 3
aux1 = ch 4
aux2 = ch 5
So if I for example would not use aileron one would zeroing channel[0]
Is this correct?
/Bo
- Bo Edstrom
- Posts: 23
- Joined: 20 Sep 2018, 19:52
- Location: Sweden
Re: 7ch Propo + S/C mix encoder update/rewrite
I have installed the Arduino IDE (version 1.8.10) now on my Window 10 laptop.
What programmer should one use (get) when programming the DIY More Pro Mini More P328 microcontroller?
In the Aurdino IDE list of programmers one can select rather many as listed below.
What should I get (I have no programmer now). I want to use USB port on computer and on the Pro Mini board it is a 6 pin (2x3) ISP connector. An USBtinyISP 5 volt seems to me (that know nothing on this subject yet) to be a good candidate? Any link to a good known (such?) programmer?
AVR ISP
AVRISP mkII
USBtinyISP
ArduinoISP
ArduinoISP.org
USPasp
Parallel Programmer
Aurdino as ISP
Aurdino as ISP (ATmega32U4)
Arduiona Gemmo
BusPirate as ISP
Atmel STK500 development board
Atmel JTAGICE3 (ISP mode)
Atmel JTAGICE3 (JTAG mode)
Atmel-ICE (AVR)
/Bo
What programmer should one use (get) when programming the DIY More Pro Mini More P328 microcontroller?
In the Aurdino IDE list of programmers one can select rather many as listed below.
What should I get (I have no programmer now). I want to use USB port on computer and on the Pro Mini board it is a 6 pin (2x3) ISP connector. An USBtinyISP 5 volt seems to me (that know nothing on this subject yet) to be a good candidate? Any link to a good known (such?) programmer?
AVR ISP
AVRISP mkII
USBtinyISP
ArduinoISP
ArduinoISP.org
USPasp
Parallel Programmer
Aurdino as ISP
Aurdino as ISP (ATmega32U4)
Arduiona Gemmo
BusPirate as ISP
Atmel STK500 development board
Atmel JTAGICE3 (ISP mode)
Atmel JTAGICE3 (JTAG mode)
Atmel-ICE (AVR)
/Bo
-
- Posts: 332
- Joined: 31 Jan 2019, 11:48
- Location: Boskoop, Netherlands
Re: 7ch Propo + S/C mix encoder update/rewrite
Hello Bo,
If you want to use the six-pin connection on the board, you should use the USB to ASP method, see my exploits here: viewtopic.php?f=41&t=661
You will not have to do the conversion to twin servo leads as I did, those were only needed to program a bare ProMini (without the six-pin connector).
Another thing: I do not know where the discussion on unused channels now stands, but I am reading this in Phil's narrative: Any unwanted analogue inputs (say for a 4ch set) should simply be tied to another one that is used rather than left floating. For the stick calibration to work all the stick inputs need to be included, even if they're only mimicing another channel.
The toggle could be omitted but as well as losing the channel you would also lose the single-handed range-check.
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 ?)
Cheers,
Max.
If you want to use the six-pin connection on the board, you should use the USB to ASP method, see my exploits here: viewtopic.php?f=41&t=661
You will not have to do the conversion to twin servo leads as I did, those were only needed to program a bare ProMini (without the six-pin connector).
Another thing: I do not know where the discussion on unused channels now stands, but I am reading this in Phil's narrative: Any unwanted analogue inputs (say for a 4ch set) should simply be tied to another one that is used rather than left floating. For the stick calibration to work all the stick inputs need to be included, even if they're only mimicing another channel.
The toggle could be omitted but as well as losing the channel you would also lose the single-handed range-check.
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 ?)
Cheers,
Max.
- Bo Edstrom
- Posts: 23
- Joined: 20 Sep 2018, 19:52
- Location: Sweden
Re: 7ch Propo + S/C mix encoder update/rewrite
Max,
It seems unclear (to me) if it is enough to only zero in the code unsued channels (if unsued is among the first 6 analoge channels).
"For the stick calibration to work all the stick inputs need to be included, even if they're only mimicing another channel"
So will stick calibation work if one only zero zero in the code unsued channels?
If not, I see no point to zero in the code unsued channels, since You anyway need to paralleling from one used to unnused channels on the signal pins on the board.
/Bo
It seems unclear (to me) if it is enough to only zero in the code unsued channels (if unsued is among the first 6 analoge channels).
"For the stick calibration to work all the stick inputs need to be included, even if they're only mimicing another channel"
So will stick calibation work if one only zero zero in the code unsued channels?
If not, I see no point to zero in the code unsued channels, since You anyway need to paralleling from one used to unnused channels on the signal pins on the board.
/Bo
- Bo Edstrom
- Posts: 23
- Joined: 20 Sep 2018, 19:52
- Location: Sweden
Re: 7ch Propo + S/C mix encoder update/rewrite
I have been thinking about the DIY More (DM) Pro Mini Strong P328 board:
Since this encoder is the vital part in whole conversion with a 2.4 GHz RF module I would like to use "genuine" DIY (made by DIY More). I have seen "clones" copies of Pro Mini boards sold on the net.
Obviously one can get a genuine DIY More board, 5 volt 16 MHz, from DIY More themselves.
Cost US $6 at present, and shippong is free if one can wait 20-30 days but it is faster shipping alternatives also,
https://www.diymore.cc/products/diymore ... 2456455226
Shipping alternatives, cost:
https://www.diymore.cc/pages/shipping-delivery
I see in the encoder documentation it is mentioned "ebay" board.
I checked briefly and they are sold by some ebay sellers for about US $3-4, so some savings in cost.
So is "ebay" boards DIY More genuine board? Is it "clones" of this Pro Mini boards made also?
In the documentation for the 7 ch encoder Phil has written:
"Any ebay-board encoders I supply will have the buzzer assembly ready-made & tested."
So if I buy a ready made board this way from Phil I will get an ebay board - is that board a genuine DIY More Strong board?
I just want to avoid to use any clone board, that is all.
Sorry if this has been asked discussed elswehere on this forum.
/Bo
Since this encoder is the vital part in whole conversion with a 2.4 GHz RF module I would like to use "genuine" DIY (made by DIY More). I have seen "clones" copies of Pro Mini boards sold on the net.
Obviously one can get a genuine DIY More board, 5 volt 16 MHz, from DIY More themselves.
Cost US $6 at present, and shippong is free if one can wait 20-30 days but it is faster shipping alternatives also,
https://www.diymore.cc/products/diymore ... 2456455226
Shipping alternatives, cost:
https://www.diymore.cc/pages/shipping-delivery
I see in the encoder documentation it is mentioned "ebay" board.
I checked briefly and they are sold by some ebay sellers for about US $3-4, so some savings in cost.
So is "ebay" boards DIY More genuine board? Is it "clones" of this Pro Mini boards made also?
In the documentation for the 7 ch encoder Phil has written:
"Any ebay-board encoders I supply will have the buzzer assembly ready-made & tested."
So if I buy a ready made board this way from Phil I will get an ebay board - is that board a genuine DIY More Strong board?
I just want to avoid to use any clone board, that is all.
Sorry if this has been asked discussed elswehere on this forum.
/Bo
Last edited by Bo Edstrom on 15 Dec 2019, 12:46, edited 1 time in total.