Art Interface Device logo   Project description  Development   Mailing List  Contact


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AID: Embeded Ethernet Workshop Report

From: B. Bogart   benekran.org
Date: Sat, 7 Feb 2004 12:13:11 -0800

: Sent via the Art Interface Device mailing list: aid@interaccess.org
: Use your "Reply All" to  reply to the list, "Reply" for private response

============================================
Kinetic Connections Advanced Studio Workshop
============================================

Date: 25 January 2004
URL:  http://www.interaccess.org/ia.php?pg=kinconn

This was the second of two workshops lead by Jeff Mann as part of the Kinetic
Connections program.  Jeff is known around InterAccess for his work on the
Liveform Telekinetic project [1] and setting up the InterAccess studio area
where we work on AID every Sunday.

        [1] http://interaccess.org/telekinetics/

MIDI and I/O circuits
=====================

The morning started out with a review of I/O concepts such as voltage dividers
and pulse width modulation (PWM) and some talk about midi.

Jeff uses Keyworx (formally keystroke) [1a] software and midi for the LiveForm
Telekinetics project.  He listed as advantages of midi:

        - it works with lots of software (such as max, pd, keyworx,
          and director)

        - the hardware is optoisolated (so you won't fry your expensive
          laptop computer with a botched homebrew circuit)

        - it easily allows messages to be broadcast to many devices

        [1a] http://www.keyworx.org/kw_home.html

After mentioning the high cost [2] of commercial midi-sensor/actuator interfaces
Jeff showed us his own designs for a midi sensor board and a midi motor driver
board.

        [2] E.g. the I-CubeX system http://www.infusionsystems.com/


Jeffs midi sensor interface board:
----------------------------------

This board is designed around the PIC 16F676 which has an internal oscilator
(and so does not need an external crystal), 8 ADC lines, but no UART.  Jeff did
the circuit design in Proteus [3], including printed circuit board layout.  The
circuit board is single sided and Jeff has printed a printed a number of boards
using a chemical etching kit.  InterAccess owns a copy of Proteus which is
installed on one of the studio PCs.

        [3] http://www.labcenter.co.uk/

Jeff's design includes an in circuit debugger (ICD) port which he says has been
invaluable in solving some otherwise mysterious problems while developing PIC
software.  The ICD he uses is an MPLAB-ICD2 (part number 10-00319R12) [4] which
he connects through a USB cable to his Apple laptop.  The ICD works with MPLAB
[5] in VirtualPC [6] but only if he boots in MacOS 9, not OS X.  Jeff also uses
the PICStart programmer [7] but through a Keyspan USB-RS232 [8] converter.  It
works in VirtualPC on Mac OS9 or OSX.

        [4] http://www.microchip.com/1010/pline/tools/picmicro/icds/icd2/
        [5] http://www.microchip.com/1010/pline/tools/picmicro/devenv/mplabi/
        [6] http://www.microsoft.com/mac/products/virtualpc/virtualpc.aspx
	    http://www.apple.com/macosx/applications/virtualpc/
        [7] http://www.microchip.com/1010/pline/tools/picmicro/program/picstart/
        [8] http://www.keyspan.com/products/homepage-Serial.spml

Jeff wrote the firmware for his board in PIC BASIC [9] (~$400 compiler) with
some inline assembly for a software serial (midi) output routine.  Timing for
the serial data transfer is controlled by counting instructions and clock cycles
per instruction in the design of this routine.

        [9] This one perhaps?  http://www.vikon.com/PICBASIC.htm

Jeffs motor driver board:  (in progress)
-------------------------

On the output side, Jeff has a motor driver board in progress.  It is based on
the same PIC 16f877 that we are using in the AID.  He is working on PWM control
of hobby servos (the kind found in radio controlled toys) which are  about $30
each and give a minimum of 90 and maximum of 180 degrees of motion.  He is using
the chip's built-in PWM so it should be possible to create a AID motor driver
using the onboard PWM. Presently, he has hooked up a purchased motor driver
board that includes a L298 dual H-Bridge chip [10].

        [10] http://www.st.com/stonline/books/ascii/docs/1773.htm

This chip has been discussed on the AID list before, and we found a GPL circuit
design using the chip while writing this report.

        http://www.interaccess.org/aid/list/msg00252.html
        http://www.dprg.org/projects/1998-04a/

Jeff also presented a simple circuit to drive a DC motor (in one direction) or
lamp from a PWN output:

                                       Lamp or motor
                                         ooo
                                 ________| |_____________ Vcc
                                 |
                                /
         Stamp,              |/
         or PIC ---/\/\/\----|
         output.             |\>
                                \
                                |
                                |
                                |
                               ---  GND
                                -

There were some cool sensors lying around the studio that day too, including a
Crossbow CXL04M3 accelerometer, 3 axis, MEMS device (about $500 quantity one)
and an AIRRS IR rangefinder from HVWTech.com.

Embedded TCP/IP Devices
=======================

InterAccess has development kits for two relevant embedded platforms:

        1 - IOSoft ER21
        2 - Rabbit RCM2200

Rabbit boards
-------------

The RCM2200 [11] costs about $75 without a development kit.  The development
kit, however, is necessary.  It includes a variation on the C language called
"Dynamic C" and costs about $300.  Dynamic C supports cooperative multitasking
through language constructs called costatements and cofunctions.   It also comes
with a TCP/IP stack library and example code for higher level protocols (e.g. an
http server).  The headers on the Rabbit boards use a special narrow pin spacing
which is incompatible with normal breadboards and connectors.  Rabbit parts and
development kits are available from digikey with a few exceptions such as the
programming cable with inline MAX232 chip.

        [11] RCM2200 somewhere on rabbitsemiconductor.com

ER21 boards
-----------

The ER21 is based on a PIC 18f452, which is 2 times faster and has 2 times more
RAM than 16f877.  It also features a hardware multiplier.  A different compiler
is required for 18f chips (than the 16f), for which there is no free version.
The ER21 has two network interfaces.  One is an RJ45 plug, magnetic isolator and
Realtech ethernet controller chip, all of which can be purchased individually
but the Realtech chip is available in a surface mount package only.  The other
interface is a Netgear 802.11b PCMCIA card.  Drivers are included in the kit.
Because of the large number of connections to the PCMCIA card, there are almost
no free I/O pins on the PIC in this version.  The new version of this board is
said to leave 12 pins free on the PIC for general use.  Source code is included
in the development kit but under a non-free license.        ( iosoft.co.uk )

Almost nobody sells a wireless midi interface but lots of people want one.  Jeff
plans an ER21-like midi to 802.11b bridge but embedded TCP/IP and device drivers
are each a large project in themselves.  Another embedded platform with TCP/IP
that someone mentioned during the workshop is Tini (sp?) which runs Java, and
was used for Java buttons.  A copy of the book "TCP/IP Lean" by Jeremy Beckham
of IOSoft was passed around.  Jeff pointed out that the book follows the
timeline of developing the ER21 board, discussing dead ends and aborted design
features before the current, successful version.  It might be best read
backwards!


Afternoon Projects
==================

After lunch we broke into two groups to attempt a couple of quick projects:

        1. Motor control through a web form using the Rabbit board
        2. Open sound control (OSC) messaging over 802.11b with the ER21


Rabbit motor control web form project
-------------------------------------

The static web page example was as simple as opening the main .c file in the
Rabbit IDE and pressing the big green arrow.  Example code was compiled and
downloaded, web server started running on 10.10.6.100 with example page.

	- Default manual IP address is 10.10.6.100 (defined in
	  lib/TCPIP/TCPIPconfig.h)

	- We started with a copy of the temperature web form example in the
	  documentation.

	- Serial I/O will talk midi to Jeffs motor control board.


ER21 wireless open sound control project
----------------------------------------

	- Jeff's laptop broke early on so we did not get very far.


The implications for AID
========================

        - Writing a TCP/IP stack is a big job, much more involved than the
	  current AID firmware.

	- There is an open source implementation for 8 bit micros (uIP) but it
	  requires more memory (RAM) than is available on the 16f877 (about 900
	  bytes to our 360).  http://www.dunkels.com/adam/uip/

        - Kits are expensive but InterAccess has some.

	- Kits incorporate restrictive licenses as well as technical measures to
	  promote vendor lock in (e.g. Rabbit pin spacing).

	- Wireless networking with a PIC on the ER21 board is, however, quite
	  inspiring.

Ethernet support directly inside AID seems unlikely anytime soon, it is a very
intensive application and would require about as much development time as the
whole rest of the AID hw. A chip with more ram would be required, interfacing
with a ethernet controller is also a big issue, since a driver must be written
for the PIC in an open-source context.



:      messages saved at http://www.interaccess.org/aid/list
:      unsubscribe/help requests to mailto:Majordomo@interaccess.org