[chbot] The X-plane multiplex problem

Trevor Wignall zl3adz at gmail.com
Sat May 19 01:16:15 BST 2018


Hi Paul

I see from the diagram that you plan on using SX1509 I2C I-O modules - 20
of them. Be aware that the I2C addressing for these modules only allows 4
of them on the same I2C bus. If you are prepared to bit-bash the I2C, then
the same Arduino board can support more than one I2C bus, or it may be
possible to incorporate an I2C switch.

The diagram lists 25 pots and 15 rotary encoders. I am not quite sure what
you mean by a rotary encoder, but if this is implemented with a resistor
divider network, that would mean a total of 40 analog inputs. The SX1509
does not appear to support analog inputs but the Arduino itself does,
although not 40 of them. 4051 or similar selector ICs can be used to allow
one or a few of the analog inputs of the Arduino to be used to read 40 or
more analog signals.

The diagram also lists 80 push button switches. Are these momentary
switches or push-on push-off switches, i.e. do they stay on? A switch
matrix using momentary switches can be quite simple if it doesn't have to
cope with more than two switches being closed simultaneously, but if three
or more switches can be closed at the same time, then diodes are needed to
prevent phantom switch presses - a switch appearing to be closed when it is
actually open but other switches on the same row and column are closed.

Thanks for sharing with us.

Trevor


On Sat, May 19, 2018 at 11:47 AM, Paul Sharp <paulsharp360 at gmail.com> wrote:

> Hello Trevor,
>
> Thank you for your interest.
>
> Here is what I have just put together here
> <https://docs.google.com/drawings/d/1f8SLsSIm2VDcym7C_tvF0J3xjTBrV1xGKGb4beIdqfM/edit?usp=sharing>.
> I am sorry it doesn't address your questions specifically as I am not sure
> of how to answer at this stage.
>
> Cheers
> Paul
>
>
>
> On Thu, 17 May 2018 at 22:29, Trevor Wignall <zl3adz at gmail.com> wrote:
>
>> Hi Paul
>> I saw some push button switches with built-in lights on your display.
>> Presumably these will also need to be driven from the computer. Could you
>> tell us the voltage and current of these lights and how many lights need to
>> be driven in total? Also are there any 7-segment displays or similar? I ask
>> because in some ways having a lot of outputs is harder to achieve than a
>> lot of inputs.
>> Cheers
>> Trevor
>>
>> On Thu, May 17, 2018 at 11:32 AM, Paul Sharp <paulsharp360 at gmail.com>
>> wrote:
>>
>>> Dear All,
>>>
>>> Thank you for showing an interest in my project. It is very much
>>> appreciated.  I am trying to get up to speed with electronics [beyond
>>> beginner] as quick as my time allows (I am reading your comment,
>>> researching your comment, reading my recently purchased electronics book
>>> etc, then reading your comments again).
>>>
>>> For those of you who are interested in the project; here is  my google
>>> plus page here
>>> <https://plus.google.com/u/1/collection/Mra5TE?pageId=none>
>>>
>>> Thanks again for all the support.
>>>
>>> Cheers
>>> Paul.
>>>
>>> On Wed, 16 May 2018 at 19:31, Mark Atherton <markaren1 at xtra.co.nz>
>>> wrote:
>>>
>>>> OK, before you pile in, he is using I2C on a VGA port. Very cool idea.
>>>>
>>>> -mark
>>>>
>>>> On 16/05/2018 7:27 PM, Mark Atherton wrote:
>>>>
>>>> Synco,
>>>>
>>>> Still not sure how X-plane connects to the I2C devices - maybe a USB to
>>>> I2C bridge, or are you bringing the SMB bus directly off of the motherboard
>>>> ?
>>>>
>>>> -Mark
>>>>
>>>> -----------------
>>>>
>>>> Couple of our messages have been corrupted, here is Synco's earlier
>>>> reply to me
>>>>
>>>> -----------------
>>>>
>>>> Wed May 16 00:33:27 2018
>>>>
>>>> Hi Mark+,
>>>> I've written a few plug-ins for X-Plane, rather than use the UDP
>>>> protocol, yet by next meeting that'll most likely have changed and will be
>>>> happy to share. If each panel was to be stand-alone, from all the different
>>>> I2C port expanders out there, it's likely you would have spare I/O that
>>>> would avoid multiplexing / scanning tricks. Also, if you are running Linux,
>>>> and don't want to use a Raspberry Pi, another option is to use the I2C
>>>> adapter on your monitor connector. I've done this in the past, (and will
>>>> again), yet be careful to ensure voltage levels and device addresses don't
>>>> conflict !
>>>>
>>>> For example here is what it looks like on my pc:
>>>> $ sudo apt install i2c-tools
>>>> $ i2cdetect -l
>>>> i2c-3 unknown    NVIDIA i2c adapter 7 at 1:00.0  N/A
>>>> i2c-1 unknown    NVIDIA i2c adapter 4 at 1:00.0  N/A
>>>> i2c-4 unknown    NVIDIA i2c adapter 8 at 1:00.0  N/A
>>>> i2c-2 unknown    NVIDIA i2c adapter 6 at 1:00.0  N/A
>>>> i2c-0 unknown    NVIDIA i2c adapter 2 at 1:00.0  N/A
>>>>
>>>> $ sudo i2cdetect -y 0
>>>>      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
>>>> 00:          -- -- -- -- -- -- -- -- -- -- -- -- --
>>>> 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>> 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>> 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>> 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>> 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>> 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>> 70: -- -- -- -- -- -- -- --
>>>>
>>>> $ sudo i2cdetect -y 4
>>>>      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
>>>> 00:          -- -- -- -- -- -- -- -- -- -- -- -- --
>>>> 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>> 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>> 30: -- -- -- -- -- -- -- 37 -- -- 3a -- -- -- -- --
>>>> 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>> 50: 50 51 52 53 54 55 56 57 -- -- -- -- -- -- -- --
>>>> 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>> 70: -- -- -- -- -- -- -- --
>>>>
>>>> And if you run out of addresses you can always add a i2c-i2c bridge:
>>>> https://www.aliexpress.com/item/TCA9543A-Low-Voltage-2-
>>>> Channel-I2C-Bus-Switch-Interrupt-Logic-And-Reset-
>>>> Module/32763291440.html
>>>>
>>>> /s
>>>>
>>>> On 15 May 2018 at 22:01, Mark Atherton <markaren1 at xtra.co.nz>
>>>> <markaren1 at xtra.co.nz> wrote:
>>>>
>>>> > Hey Synco,
>>>> >
>>>> > Any chance of a quick tutorial how X-Plane processes incoming UDP
>>>> packets, and assigns associated bytes/bit-positions to each function.
>>>> >
>>>> > Getting some kind of spec. from Paul (or help write one) would be
>>>> very useful to determine cable loom lengths, number of inputs, types etc.
>>>> For each control: Push Button, On/Off, Rotary (number of positions) ,or
>>>> Potentiometer (and resolution), and max scan time.
>>>> >
>>>> > He may have been using a 4 position switch with 4 wires, when it may
>>>> actually be an encoded 2-bit problem. Not sure if full size, low cost
>>>> rotary binary outputs switches are readily available - hex coded switches
>>>> are obviously too small...  There was mention of an R-2R ladder on the
>>>> switch and an ADC - this seems a bit over the top (?). How about using a 1
>>>> of 4 rotary switch, and a small diode matrix (4 diodes + 4 pull down
>>>> resistors) to encode to binary - there are obviously larger bit-savings
>>>> with 8 and 10 positions switches.
>>>> >
>>>> > Not personally a fan of carrying I2C any great distance due to noise
>>>> immunity issues (or lack thereof), but screened twin cable (and associated
>>>> unwanted capacitance) with low clock rate (10kHz ?) and careful grounding
>>>> may be OK though.
>>>> >
>>>> > R-PI seems over the top to convert bits into UDP, but I guess they
>>>> are readily available, well supported, and low cost, so why the hell not...
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Chchrobotics mailing list Chchrobotics at lists.ourshack.comhttps://lists.ourshack.com/mailman/listinfo/chchrobotics
>>>> Mail Archives: http://lists.ourshack.com/pipermail/chchrobotics/
>>>> Meetings usually 3rd Monday each month. See http://kiwibots.org for venue, directions and dates.
>>>> When replying, please edit your Subject line to reflect new subjects.
>>>>
>>>>
>>>> _______________________________________________
>>>> Chchrobotics mailing list Chchrobotics at lists.ourshack.com
>>>> https://lists.ourshack.com/mailman/listinfo/chchrobotics
>>>> Mail Archives: http://lists.ourshack.com/pipermail/chchrobotics/
>>>> Meetings usually 3rd Monday each month. See http://kiwibots.org for
>>>> venue, directions and dates.
>>>> When replying, please edit your Subject line to reflect new subjects.
>>>
>>>
>>>
>>> --
>>> Paul
>>> 0292 360 360
>>>
>>> _______________________________________________
>>> Chchrobotics mailing list Chchrobotics at lists.ourshack.com
>>> https://lists.ourshack.com/mailman/listinfo/chchrobotics
>>> Mail Archives: http://lists.ourshack.com/pipermail/chchrobotics/
>>> Meetings usually 3rd Monday each month. See http://kiwibots.org for
>>> venue, directions and dates.
>>> When replying, please edit your Subject line to reflect new subjects.
>>>
>>
>> _______________________________________________
>> Chchrobotics mailing list Chchrobotics at lists.ourshack.com
>> https://lists.ourshack.com/mailman/listinfo/chchrobotics
>> Mail Archives: http://lists.ourshack.com/pipermail/chchrobotics/
>> Meetings usually 3rd Monday each month. See http://kiwibots.org for
>> venue, directions and dates.
>> When replying, please edit your Subject line to reflect new subjects.
>
>
>
> --
> Paul
> 0292 360 360
>
> _______________________________________________
> Chchrobotics mailing list Chchrobotics at lists.ourshack.com
> https://lists.ourshack.com/mailman/listinfo/chchrobotics
> Mail Archives: http://lists.ourshack.com/pipermail/chchrobotics/
> Meetings usually 3rd Monday each month. See http://kiwibots.org for
> venue, directions and dates.
> When replying, please edit your Subject line to reflect new subjects.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ourshack.com/pipermail/chchrobotics/attachments/20180519/d5d8c308/attachment-0001.html>


More information about the Chchrobotics mailing list