Sunday, August 31, 2014

Raspberry Pi PLUS Arduino Esplora = Best of both worlds

First of all, a big thank-you to all who turned out to the Tulsa Mini-Maker Faire on Saturday.  We've conducted the drawing for the door prize and have sent out emails to the winners.  Once we receive responses back, we'll post the names of the winners up here.

For those of you that didn't make it out, I made a display of using the analog I/O capabilities of the Arduino Esplora to drive a packet TNC to put telemetry and message packets out over APRS.  The Arduino and packet TNC were both connected to my laptop computer on the USB ports.  Scott KD5NJR then pulled up my information and displayed it on his laptop that was running APRSIS.

While unloading the Arduino today, decided to take the plunge and interface the Raspberry Pi with the Arduino. The Pi is a great computing environment with all of the capabilities of a fully-featured LINUX box-- not to mention the Python environment for programming.  However, the inputs and outputs are digital.  So, you need to put some type of analog to digital converter between it and traditional analog devices, like resistance thermal devices or temperature sensors.......On the other hand, the Arduino is stricly command line based and not much for graphical user interface or the like.  But is has plenty of input and output lines for analog work!  Even better, the Arduino Esplora has a light sensor, temperature sensor, joystick, push buttons, leds and even a built-in accelerometer.

So, to leverage the best of best worlds, I connected the Raspberry PI to the Esplora board like this:



You will notice that I used the USB hub between the Pi and the Arduino.  The Esplora board is powered off the micro-USB connection, so it's important to have another source of power so that you don't end up rebooting the PI due to excessive current draw.  Plus it allows the keyboard, mouse, and wifi USB connections to be made (since the original Pi only has two USB connections).

Once I pulled up Mincom terminal program and told it to go to the ACM0 serial port (which is the first USB com port) running 9600 bps, my APRS data program started streaming across the Raspberry Pi screen.



So, a Python program using the serial library should be easy to talk and listen to the Arduino.  That will be my next project.....There is some neat stuff we could do have the Pi do the web serving and the Arduino doing the I/O.........

--Jeff AE5ME

1 comment:

  1. Great job! I can see this being the basis of many great projects. Especially the network we discussed on Tuesday night.

    ReplyDelete