- Posts: 22
Hardware Modification / Rotary Pot
- flyguy
- Topic Author
- Offline
is it generally possible to modify the hardware and add a rotary pot or something similar as input source? Maybe instead of one of the D/R switches?
Thanks for your replies!
Please Log in or Create an account to join the conversation.
- FDR
- Offline
The switches are tied to a matrix drived and scanned by digital IOs, but a pot should be tied to the analogue input of the ADC, and supplied with some regulated voltage.
There might be unused ADC inputs, but they are probably grounded, so you probably have to seriously modify the PCB and solder to the MCU's pins...
Please Log in or Create an account to join the conversation.
- flyguy
- Topic Author
- Offline
- Posts: 22
Please Log in or Create an account to join the conversation.
- flyguy
- Topic Author
- Offline
- Posts: 22
Please Log in or Create an account to join the conversation.
- rbe2012
- Offline
- So much to do, so little time...
- Posts: 1433
Please Log in or Create an account to join the conversation.
- FDR
- Offline
You could easily use it for scaling, but I haven't found out yet how to use it for limiting...
Please Log in or Create an account to join the conversation.
- Gall
- Offline
- Posts: 22
Please Log in or Create an account to join the conversation.
- flyguy
- Topic Author
- Offline
- Posts: 22
Using a uC to transform the signal is a good idea, but i have no clue how it could be wired up to the devo electronics (depending on the devo mcu capabilities, it might even not necessary to use a separate uC or am I wrong?)
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
to be clear you want to take the input of a channel (say a virtual trim) and use it as the max value for another channel?
I can't think of a way to do that with the currently available curves, but I could probably add a new capability to support it. file an enhancement request on bitbucket and I'll give it some thought.
Please Log in or Create an account to join the conversation.
- flyguy
- Topic Author
- Offline
- Posts: 22
to be clear you want to take the input of a channel (say a virtual trim) and use it as the max value for another channel?
exactly! I will create an enhancement request. Thanks a lot!
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
we have a stick input: thr
we have a limit input : lim (which youcan define using trims for instance)
we want:
if (thr < lim) then output = thr
if (thr >= lim) then output = lim
We can achieve this with the existing capabilities as follows:
VirtCh1 = thr - lim
complex mix:
page1:src=thr
page2:src=lim,scale=-100,mux=add
OutputCh = VirtCh1 * (if VirtCh1 <= 0 then 1 else 0) + lim
complex mix:
page1:src=VirtCh1
page2:src=VirtCh1, curve = zero-max, scale=-100, offset=100, mux=mult
page3:src=lim, mux=add
This actually works well, except that the mixer applies a cutoff of -100 to 100 after each operation. so if lim = 80 and thr = -40, we end up with (thr-lim) < -100 and it gets truncated, making the code not work as expected
So we can fix it as follows:
VirtCh1 = 0.5*thr -0.5*lim
complex mix:
page1:src=thr, scale = 50
page2:src=lim,scale=-50,mux=add
OutputCh = VirtCh1 * (if VirtCh1 <= 0 then 1 else 0) + lim
complex mix:
page1:src=VirtCh1
page2:src=VirtCh1, curve = zero-max, scale=-100, offset=100, mux=mult
page3:src=lim, scale=50, mux=add
Then set a final scalar (on the limit page) for OutputCh to 200%
Here is a demonstration model.ini that sets THR as the input (Ch1), AIL as the limit (CH2) VirtCh=Ch3, OutputCh=Ch4.
I don't see an easy way to implement this as a push-button solution, but I may be able to build a template that will at least do an initial configuration.
I will also look into whether I should not truncate the intermediate stages when building a mixer. I have a feeling there is a reason I did that, but maybe not.
Please Log in or Create an account to join the conversation.
- flyguy
- Topic Author
- Offline
- Posts: 22
i also took a look at the STM32F103VCT6 datasheet and some pictures of the Devo 8S pcb (didn't open mine yet). Can you tell me to which are the pin used for analogue input?
According to the code, it's Port C, GPIO 0-3, so Pins 15-18? I think it should be possible to add some tiny wires to the uC and get access to some unused analogue pin?! I'm not so deep into hardware hacking, but i have some avr experience and did a lot of smd soldering during the last years and i really like voiding warranties
Please Log in or Create an account to join the conversation.
- HornetMaX
- Offline
- Posts: 8
- Add a mux type MAX (or LIMIT) to the existing mux types (REPLACE, MULTIPLY, ADD).
Does not seem very complicate, neither to code nor to understand. Anything I'm missing ?
MaX ( )
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
The problem is that you need a input-controlled limit.HornetMaX wrote: Honestly I haven't played with Deviation mixer stuff at all hence I may just be talking garbage here, but from what I've read in the manual, wouldn't the easiest way to implement a limiter (i.e. an input limiting the max output of an output channel) be the following:
- Add a mux type MAX (or LIMIT) to the existing mux types (REPLACE, MULTIPLY, ADD).
Does not seem very complicate, neither to code nor to understand. Anything I'm missing ?
MaX ( )
The mixer defines functions which are of the form:
f1(x) <+/*> f2(y) <+/*> f3(z) ...
but you need one that is
f(x,y)
As I've shown above, it is complicated but can be achieved.
Please Log in or Create an account to join the conversation.
- HornetMaX
- Offline
- Posts: 8
PhracturedBlue wrote: The problem is that you need a input-controlled limit.
The mixer defines functions which are of the form:
f1(x) <+/*> f2(y) <+/*> f3(z) ...
but you need one that is
f(x,y)
Well, if you think at the operator "min" or "max" just like another operator as "+" or *" (or "replace"), then you could write:
f1(x) <+/*/min/max> f2(y) <+/*/min/max> f3(z) ...
Simple example:
f1(x) min f2(y)
with more readable prefix notation for the "max" operator this would be just:
min(f1(x),f2(y))
In this case, input x limits input y (or viceversa).
More complex example:
f1(x) min f2(y) + f3(z)
which would mean (with some assumptions on the application order of the operators):
min(f1(x),f2(y)+f3(z))
In this case input x limits the sum of inputs y and z.
Where's the problem ?
There's some complexity to handle, for example you may want to have symmetrical limits for positive and negative values, so you may have 2 additional operators (e.g. maxsym and minsym), but still it's much much easier to understand than your (clever) solution.
MaX.
Please Log in or Create an account to join the conversation.
- PhracturedBlue
- Offline
- Posts: 4402
Please Log in or Create an account to join the conversation.
- Home
- Forum
- General
- General Discussions
- Hardware Modification / Rotary Pot