Results 1 to 4 of 4
  1. #1
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Jul 2016
    Location
    Perth
    Posts
    6
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    panel specific PCB's with integrated atmel MCU & RS485 comms

    So, I started a discussion elsewhere that I'm moving here now.
    I asked about any reason why It would not be recommended to design application specific pcb's with integrated MCU & RS485 comms to make wiring very simple.

    Anyway, I've decided it's a good idea and the boards should be based on atmel MCU's running the arduino bootloader interfaced to FSX with link2fs.

    So I know link2fs is designed to run up to 3 comm ports to standard arduino boards. What I want to know is, if I use a usb->RS485 full duplex adapter, and then design my boards with RS485 FDX comms, is there any reason why I can't communicate with 20-30 boards all at once on the same serial bus.

    As far as I see it, when the pc transmits, all the boards will receive. If that board does not have code to process some of the information being sent down the line, it will just ignore invalid messages and process valid ones. Is this true?
    Secondly, with 20+ boards all on the same TX line, some collision avoidance will be required. I figured this could be solved 99% by using a 1 wire 'busy' signal. When the arduino wishes to transmit, it will check if the busy pin is high. If high, wait 10ms and recheck. continue this until pin is low, then pull pin high (to tell other arduino's that the line is busy) then transmit. When transmission is complete, pull pin low.

    Please, anyone who knows the arduino sketch well, can you see a problem with this?

    Thanks.

    * EDIT
    To be clear, this is an arduino based project using atmega328 & atmega2560 MCU's.
    They will be programmed from the arduino IDE with standard code.

  2. #2
    150+ Forum Groupie
    Join Date
    Nov 2013
    Location
    Evansville, Indiana
    Posts
    243
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: panel specific PCB's with integrated atmel MCU & RS485 comms

    MJWillia,

    Lets see if i know what you are getting at...
    You can chain multiple arduino boards together using i2C, "Wire" protocol.
    One board can be connected to communicate with the PC via USB and then pass information back and forth from the other boards to PC.
    The downside is that the single Arduino connection to the PC might get bogged down with too much serial communication.

    Other solutions are:
    Running multiple copies of Link2FS with multiple Arduinos, or running multiple LUA scripts with multiple Arduinos.

    ~Fess
    I will only ever be, half the Geek that I wished I was.
    TheGeekForge.Com

  3. #3
    Our new friend needs to reach 10 posts to get to the next flight level
    Join Date
    Jul 2016
    Location
    Perth
    Posts
    6
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: panel specific PCB's with integrated atmel MCU & RS485 comms

    Hey Fess, thanks for the reply.
    The whole point of this was to eliminate a mass of wiring, usb hubs etc...

    Were you saying you CAN chain multiple arduino with i2C, or in theory you can.
    I wouldn't use i2C. The idea was rs485.

    As far as serial comms traffic being too high, I don't think that will be a problem. The messages look pretty light weight, not sure what the maximum speed that Link2FS can run, but if any speed is selectable then arduino can easily keep up with 250k baud.

  4. #4
    25+ Posting Member
    Join Date
    Nov 2007
    Location
    Mobile, AL
    Posts
    51
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: panel specific PCB's with integrated atmel MCU & RS485 comms

    Mjwilla,
    You are talking about what Mike Powell designed in his first book and many of us or trying to use. Mike built each instrument around a PIC chip controller and all were conned with a RS-485 network. Check him out at mikesflighdeck.com
    Tripacer