Sunday, December 30, 2012

Esplora Expansion Header Pinouts

As most know, the new Arduino Esplora has an expansion header on the front which is not compatible with previous Arduinos like the Uno, Mega, or Leonardo.  This documents the pins on the header.

As the device encourages hacking (as do all Arduino products, thank you Open Source), I have worked to document the pinouts of the expansion headers.  This is my work and not an official release.  It is based on the officially released schematic, information on the 32U4 chip and electrical and software testing on my part.
The left expansion header (closest to the joystick) appears to not be electrically connected and may only serve to provide a mechanical standoff for the proposed display.  It is the right ten pin header (nearest the 4 buttons) that corresponds to the schematic.  I have designated Pin 1 as the topmost (the top having the USB and white/orange ports) and Pin 10 being at the bottom (the end with the linear sliding resistor).

My interest stems from expanding the capabilities of the Esplora.  Yes it has many sensors and displays, but I may wish to add a sensor.  But more importantly to connect it to the Internet of Things (or to act as a good controller), it should have wireless communication.  So I have connected the Esplora via hard serial and soft serial with good results.

Note: the Esplora has dedicated the pins for another use - we are repurposing the display pins fo this will not work well with both something else and a display connected (you might be able to do something but it is beyond this post).

The hardware serial, Digital Pins 0 and 1 which are Serial Receive and Transmit on classic Arduino Uno etc. map to the Esplora right expansion header pins 7 and 8.  On the Uno they are shared with the USB port but on designs based on the Leonardo like the Esplora, the hardware serial is connected separately.  The hardware serial is addressed as Serial1 for Leonardo style Arduionos (the regular Serial port being the USB).

Software-wise, this means the Serial() function talks to the USB.  The Serial1() function talks to the hardware serial pins.  The SoftwareSerial library works on Leonardo based designs but the receive pin only works on classic I/O pins 8, 9, 10, 11, 14 (MISO), 15 (SCK), and 16 (MOSI) according to a comment in the SoftwareSerial example.  I confirmed the hardware receive pin will not work as the software serial receive (transmit works though).  Here is a wiring diagram for the SoftwareSerial.  Note the ground and 5 volt pins are connected also.

I use a TTL serial to USB device called a Foca from IteadStudios but a FTDI Friend or similar is fine.  It should be 5 volt compliant (as the Esplora is a 5 volt Arduino).  Biggest note: the Esplora Transmit (expansion pin 8) should connect to the receive of the device and the Esplora Receive (hardware is expansion pin 7 for hardware, one of the others like expansion pin 6 for softwareserial).

The software examples for hardware and software serial connection are posted at https://github.com/TheKitty/EsploraSerial

Next up is connecting the serial lines to an Xbee radio.

No comments:

Post a Comment