Rasbery Pi 3 & Espruino Serial Communication

Posted on
  • Hi,

    I'm wondering whether it's possible to connect one master Rasbery Pi 3 using the GPIO serial pins to many slave Espruino devices through only RX and TX. (only 2 pins)

    Looking at the pin diagrams for each the PI is labeled as UART while the Espruino is labeled with USART. Is this a problem?

    I've also been reading some articles talking about voltage differences, does anyone have any insight into whether this is possible and what we need to consider?

    http://spellfoundry.com/2016/05/29/confi­guring-gpio-serial-port-raspbian-jessie-­including-pi-3/
    https://oscarliang.com/raspberry-pi-and-­arduino-connected-serial-gpio/

    Thank,
    Victor

  • The Raspberry Pi GPIO is 3.3v I think, so it should work fine. The problem with attaching multiple devices is that the Pi's GPIO isn't very powerful, so would probably struggle over longer distances.

    Also, Serial isn't set up very well for multiple devices connecting. You'd need to either:

    • Daisy-chain the Espruinos end to end (each one forwards the data it receives on to the next)
    • Set up all the Espruinos to use af_opendrain mode for the serial TX line, and then add a pullup resistor (which would allow them all to share the same TX line). Sharing the RX line isn't a problem.

    Hope that helps!

  • I've read that the hardware serial is used by bluetooth on the Pi, is this what you mean? As I've read that you can swap the bluetooth onto the software serial so you can use hardware instead.

    Cheers!

  • I've read that the hardware serial is used by bluetooth on the Pi, is this what you mean?

    No, it wasn't - I wasn't aware of that... Seems odd, but that would cause you some problems if it was true.

    I guess perhaps software serial is an option for connecting Espruinos... You could always plug in one Espruino via USB, and then use Serial on that Espruino to talk to the others? USB-TTL adaptors would work too.

  • Thanks @Gordon we'll give it a try and let you know how it goes.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Rasbery Pi 3 & Espruino Serial Communication

Posted by Avatar for Victor @Victor

Actions