Shop OBEX P1 Docs P2 Docs Learn Events
Interfacing Arduino Shields to the Propeller Platform — Parallax Forums

Interfacing Arduino Shields to the Propeller Platform

nglordinglordi Posts: 114
edited 2010-12-04 12:46 in Propeller 1
There has been some discussion on the forum (e.g., Bill Henning's Propduino thread) about adapting Arduino shields to the propeller, most recently, Martin Hodge's A.C.S. Propeller board. WBA Consulting and schill have suggested an adapter board for the propeller platform. The attached figure shows an image of an Eagle layout of an adapter board which would work on all three versions of the Gadget Gangster propeller platform. It is designed to be sufficiently flexible to adjust for the peculiarities of specific Arduino shields.

Board features:

Arduino shield power can be set as 3.3 or 5V.

P31 & P30 are connected to Arduino D0 (rx) & D1 (tx) which are reserved for serial communications.

P27 & P26 are connected to Arduino AIN5 (SCL) & AIN4(SDA) which are reserved as the Arduino I2C bus.

A MCP3204 ADC chip provides 4 12-bit ADC channels (AIN0..AIN3). I can find no shields of interest (to me) which use more than 2 ADC channels.
Pin Assignments: P16 - CLK, P17 - DI/O, P18 - /CS

Arduino D2..D13 are connected to P4-P15, freeing P0-P3 for use by the SD
platform.

3.3V pull-up resistors can be selected for any of the 11 general purpose DI/O pins for Arduino shields which use the AVR built-in pull-ups.

While protection resistors can be connected between the propeller and shield DI/O pins, I plan to use dip sockets in which dip switches, resistor arrays, or headers with connections designed for specific shields can be inserted.

I have previously posted an earlier version of the adapter on Martin Hodge's thread. However, this version had flaws which reduced its flexibility. While waiting to receive a prototype of the new version , I am experimenting with a few shields on the 1st version. I will report the results of these tests when completed.

NickL
424 x 379 - 56K

Comments

  • Martin HodgeMartin Hodge Posts: 1,246
    edited 2010-09-11 06:02
    Looking very nice, Nick! Keep moving forward with this project.
  • jazzedjazzed Posts: 11,803
    edited 2010-09-11 06:03
    Nice idea. Bet there's an army of potential users out there.

    Cheers.
  • nglordinglordi Posts: 114
    edited 2010-09-12 15:36
    Continuing my first post, I have successfully verified the operation of SparkFun's Voice Box (SpeakJet.jpg) and Adafruit's DataLogger (Datalogger.jpg) shields on the propeller platform adapter (Rev.1). Both shields were powered at 3.3V. This allowed direction connection of shield-to-propeller pins.

    The SpeakJet module is restricted to normal operation which means you cannot change the baud rate (set at 9600) or run the demo mode. Details of the shield's connections and refernces are described in the attach spin program, which is a Spin version of SparkFun's Arduino demo program.

    I tested the DataLogger Shield using Kye's SD2.0 FATEngine demo. THe shield includes a 5-to-3.3V regulator to power the SD card. This is by-passed with a jumper. At 3.3V, the 3V battery must be removed in order for the RTC to work. The SD inputs are buffered using a 74AHC125 chip which acts as a level shifter. As far as Propeller Platforms are concerned, this shield is most useful to those using the original dip version.

    I will now turn my attention to Adafruit's Wave Player & GPS Datalogger shields.

    NickL
    450 x 338 - 40K
    800 x 600 - 49K
  • nglordinglordi Posts: 114
    edited 2010-09-21 20:05
    This post describes the Adafruit Wave Shield running on the Propeller platform using the Arduino Shield Adapter (Rev.1). Attachment WavePlay1 shows the shield which includes a SD Card, 12 bit DAC (MCP4291), and a 2-stage amplifier with RC-filters and a volume control pot. The Shield can be operated at either 3.3V or 5V. It plays 16 bit, mono, PCM coded waves at frequencies not exceeding 22050 Hz.

    There are 3 wave player objects in the Object Exchange, written by David Sloan, Rayman, and Kye. All use counters to demodulate the PCM data and
    a simple Rc filter as the DAC. It is evident, that the Adafruit shield's DAC is redundant for use on the propeller. The RC filter preceding the first amplifier stage is more than adequate to provide the dac function. Attachment WavePlay2 shows the shield attached to the propeller with the DAC removed and replaced with a dip header, connecting dac pins 1 (DIN) and 8 (AOUT).

    I used Kye's SD2.0_FATdemo, which includes a wave player function, to test the shield. All tracks were 16 bit, mono, 22050 Hz format. I played music in several different styles and lengths (2-7 minutes) with excellent fidelity (no detectable noise, pops, etc.).
    450 x 338 - 42K
    450 x 338 - 52K
  • nglordinglordi Posts: 114
    edited 2010-10-06 19:04
    I have finally received Rev.2 of my Arduino Shield-to-Propeller Adapter, which is shown in the attached image (Adapter_Rev2.jpg). The ADC (MCP3204) is located in the right upper quadrant. It is powered at 5V to maintain compatibility with 5V devices. Headers for selecting shield power (3.3 or 5V) and ADC AREF source (board power or shield) are below the ADC. A wire connects the shield reset to the prop plug reset pin on the propeller platform.
    All connections between Arduino D2-D13 and propeller P4-P15 are shown on the left side. These can be all 1K resistors. However, I inserted 1K resistor DIP arrays from beneath the board and dip spst switches on top. If the switches are on, shield pins are directed connected to the propeller pins.
    If the switches are off, the connections are made through 1K resistors. The second bank of 12 spst switches to the right enable connection of 10K pullups to the propeller pins.

    The propeller platform allows easy access to all unused propeller pins by simply inserting a protoboard between the platform and shield adapter, or wings as shown in the image. The advantage of using wings is demonstrated in the second attached image (wavePlayer.jpg), which shows an enhanced version of the wave player described in the previous post. My objective was to have a wave player independent of PC terminals or keyboard/display hardware. I accomplished this by adding a 16-position encoder and a bank of 4 push buttons to control the player, i.e., implement Next, Pause, Fast Forward, and Playlist functions. The key is to maintain an index of all wave file names on the SD. The index is loaded into hub memory. Details are given in the detached spin program.

    My next post will be a discussion of the Adafruit GPS Logger which is another Arduino shield which works at 3.3V.

    NickL
    450 x 338 - 58K
    600 x 450 - 90K
  • Nick McClickNick McClick Posts: 1,003
    edited 2010-10-06 19:56
    Looking very good. Just a thought - you can add pin headers on the inner row of the Propeller Platform that point down, so you can still access the unused propeller pins with an adapter / arduino shield on top.
  • nglordinglordi Posts: 114
    edited 2010-11-30 19:34
    The Adafruit GPS Arduino Shield ( available without a GPS module) includes an SD card module with spaces for attaching 4 different GPS modules. However, the board is only configured with a socket for the GlobalSat
    EM-406A module. The less expensive Parallax GPS modules will also work if connected directly to the appropriate pins. The attached figure, AdafruitGPS.jpg, shows the GPS shield plugged into the Arduion Shield-to-
    Propeller Platform. The shield can be powered at 3.3V. The software described in Chapter 9 (Programming and Customizing the Multicore Propeller ..), "Portable Multivariable GPS Tracking and Data Logger" by Joshua Hintze, can be used with appropriate changes in pin assignments.

    My next post will showcase the Adafruit and SparkFun Arduino motor control shields adapted for use on the propeller platform.

    While this thread deals with the Arduino Shield Adapter for the Gadget Gangster Propeller Platform, I am also interested in using the Arduino shields on a Parallax Proto Board. The attached figure, ProtoBrdAdapter.jpg, shows the shield adapter designed for the proto board plugged into the board. It has the same features as the propeller platform model, except that the I2C pins are connected to the prop I2C bus. Since I am using a USB proto board, I needed to make a connection to the reset line, using a via located below the USB chip, to enable a reset button on the adapter board. The attachment, AdapterConnections.txt, lists the propeller pin assignments for both adapters.

    NickL

    boards.
    450 x 338 - 130K
    600 x 450 - 194K
  • nglordinglordi Posts: 114
    edited 2010-12-04 12:46
    Two Arduino motor control shields, the Sparkfun Ardumoto and the Adafruit Mshield, were successfully run on the propeller platform and Parallax proto board, using the Arduino shield-to-propeller adapters. The attached figures show the Sparkfun and Adafruit boards attached to a propeller platform. Two Parallax 12V unipolar stepper motors are attached to the Mshield. Both boards were powered at 5V. All required propeller pins were outputs.

    The Ardumoto uses a single L298D motor driver to control two dc motors with only one direction pin and an enable pin per motor. The direction pin is inverted on the board. The Ardumoto can not be used to drive a stepper motor or execute brake commands which require two direction pins set at the same value, due to the boards' design. The motor driver object "PWMMotor driver" by Rick Price works with the Ardumoto if the code is altered to eliminate all use of the forwardInversePin in the software.

    The Mshield uses two L293D controller chips, allowing operation of upto four motors or two stepper motors. However, the direction pins on both chips are interfaced through a serial (spi) shift register
    (74HCT595N), precluding the direct use of the stepper motor control software in OBEX. The two attached archives include code to drive four motors or two steppers. I used a 3V Radio Shack and a 12V Digilent geared motor (which could also be operated at 3V) to test the AFMotor software.

    The next Arduino shields I heve on my list to test are the Sparkfun MP3 Shield and the Seed Music Shield, both of which are based on the VS2053b audio decoder chip.
  • Did you ever make more of these Arduino Shield-to-Propeller Adapter and are they available ofr the rest of us ?
Sign In or Register to comment.