PaulJ wrote: ↑02 Nov 2018, 09:11My understanding of these things is somewhat limited but as I understand it, Phil's "Reeduino" works by emulating the stick pots on a propo unit. So when you operate the switch, instead of going progressively from it's centre position, the servo goes instantly to full travel.
Absolutely not Paul, sorry I dont want to come across all stern and finger-waggy but thats not at all how its done and I hope you dont mind if I 'nip this in the bud'
The only reason for using analogue inputs with the resistors centre-biasing is to enable 3 'digital' positions to be read from one input pin. It makes the cabling easier and its more economical on processor input pins. The toggle positions are not in any way linked to servo outputs, or to the resistor values.
Each input is quantised to 3 states: 'left toggle', 'right toggle' or 'neither'. To do this I use just the 2 most-significant bits of the ADC, which are translated as:
00=toggle thrown one way, signal line less than 1/4 rail, typically at ground 0v
01 or 10 =toggle at neutral, signal line is between a quarter to three-quarters rail, typically around half (2.5v)
11=toggle thrown the other way, signal line above 3/4 rail, typically the full 5v
Anything from 1/4 to 3/4 rail is seen as the toggle at neutral, this completely eliminates any resistor tolerances.
All the servo positioning is done from subsequent processing of 'target values' derived from several sources - the current position, servo-slow, trims, ATV and the various mixes - its nothing to do with the precise voltages read on the analogue inputs as it would be with a propo stick pot.
The old PIC Reeds encoders (the 12 & Tiny6) use exactly the same technique. Its important to me because replacing sticks pots with fixed resistors on a propo encoder would a very simple but poor way of emulating reeds, and I dont want people to think the Reeduino or PICs use such a cheap & nasty option
All this can be demonstrated by using unequal resistors - normally they are equal but unimportant in value, say 4k7, 5k6, 10k, etc. Try deliberately biassing the toggle slightly one way, replacing the two 10k's with an 11k and a 9k. That would offset the neutral, right? No, it doesnt, nothing changes because the resulting bias still falls within the 'neutral toggle' band of 1/4 to 3/4 rail - neutral toggle is a digital switch status, and neutral servo is the result of lots of unrelated calculations
Hope we're all ok with this, bit of a rant, sorry again!
Re toggles, here you go Dave:
http://mode-zero.uk/viewtopic.php?f=26&t=126&p=302
Cheers
Phil