Second Arduino in sequential communication

Discussion in 'UDOO NEO' started by Maurice, Oct 16, 2016.

  1. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    Apart from the possibility to add a multiplexer I'm considering to use my Arduino Mega as a second arduino in my project. This way I'm sure I can use any Arduino compatible component, although the price is that software complexity increases from two to three components that need to communicate.

    I'm looking to answer the following questions:

    1: I've read somewhere that the TX and RX pins output the same data as the USB on an Arduino, I guess this is the same on the UDOO Neo? So I should not connect the Arduino Mega to the TX and RX pins, but e.g. pins 16 and 17, shouldn't I?

    2: The Arduino Mega has labeled pins 18 and 19 as TX1 and RX1, I guess that corresponds to using Serial1, but I can use pins 1 & 0 as well (TX0, RX0) as well can't I?

    3. Making providing power to the entire setup easier I want to provide power from the Neo to the Arduino. Am I correct that I can connect Neo's 5v pin to the Mega's 5v pin and a GND to GND and all will be fine? The Neo is 3.3v, the Mega is 5v.

    4. An alternative is connecting the Mega to the USB of the Neo. But, will the Neo provide enough power on the Mega? Will the Mega show up under Linux as another serial stream?
     
  2. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    1. Serial of Arduino Neo is mapped to ttymmc device for communication with Linux A9. No mapping to USB here. Neo Arduino Serial1 is the serial device you can use to communicate to your Mega.

    2. I don't have a Mega but don't see a reason not to use serial0 on your Mega.

    3/4 I wouldn't draw too much power from your Neo. It could even not boot if your Mega draws too much power. I would power the Mega separate. Does the Mega also accepts 12V?
     
  3. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    Yes, the Mega accepts 12v. I can of course split the power supply to supply both. Would it still be necessary to have a GND<->GND connection? After all, both would be connected to the same GND of the power supply.
     
  4. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    No, no need for GND connection. But for serial I realize now that Mega is probably a 5V device and Neo is 3.3V so you need a converter to protect the Neo.
     
  5. Maurice

    Maurice Active Member

    Joined:
    Oct 13, 2015
    Messages:
    394
    Likes Received:
    87
    Last edited: Oct 16, 2016
  6. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
    If you already have a Usb to TTL 3.3V device you could connect it from Neo serial1 to USB of Mega.
     
  7. Cyril BOSSELUT

    Cyril BOSSELUT New Member

    Joined:
    Oct 30, 2015
    Messages:
    23
    Likes Received:
    14
    You can use I2C with the Neo as master and the Arduino as slave. No problem with voltage.
     
  8. waltervl

    waltervl UDOOer

    Joined:
    Dec 12, 2015
    Messages:
    2,314
    Likes Received:
    580
  9. Cyril BOSSELUT

    Cyril BOSSELUT New Member

    Joined:
    Oct 30, 2015
    Messages:
    23
    Likes Received:
    14
    I use i2c to link a rpi zero (3.3v) to an Arduino and there's no need for a pullup resistor as long as the rpi is used as the master in the i2c chain (https://oscarliang.com/raspberry-pi-arduino-connected-i2c/).The Pi has an internal pullup resistor (1.8k), but i'm not sure if it's the same for the Neo. If no,you can just add an external pullup resistor. Hope this helps ;)

    Envoyé de mon Nexus 5X en utilisant Tapatalk
     

Share This Page