Friday, September 22, 2006

Dorkbot DC Meeting Sept. 27

Next Wednesday is the next Dorkbot DC Meeting...

Wednesday, September 27, 2006 7 PM - 9 PM (EDT)
Provisions Library
1611 Connecticut Ave. NW
Washington, DC 20009
(above Ann Taylor Loft)

Limited parking on street. Paid parking garage at 20th Street and Florida Avenue.
Metro: Dupont Circle, Q Street North Exit, turn right at the top of the escalator, and cross Connecticut Avenue and Q Street.

September Meeting Presentations:

Roberto Bocci (Assistant Professor of Digital Art and Photography in the Department of Art, Music and Theater at Georgetown University). Bocci is a multimedia electronic artist born in Siena, Italy, who over twenty years has evolved his work from painting through photography to computer-driven interactive multimedia installations.

Jason Freeman
(Assistant Professor, Music Department, Georgia Institute of Technology). Freeman will discuss his "Graph Theory" Solo violin piece with Web audience interaction. Freeman's works break down conventional barriers between composers, performers, and listeners, using cutting-edge technology and unconventional notation to turn audiences and musicians into compositional collaborators. Freeman will appear via Internet videoconferencing from Atlanta.

Thomas Edwards (Broadcast engineer and technological artist born and residing in the Washington, DC, metro area). Edwards will present a talk titled "Microcontrollers you Should Know About" aimed at artists seeking to add computers to their work. Edwards creates interactive robotic installations that plumb the depths of the "uncanny valley" between robots and people.

There will also be "show and tell" time for other folks to give short updates on projects they have been working on.

Friday, September 08, 2006

Touch w. CUBLOC and Xport

So it was pretty trivial to get one side of Touch working with the CUBLOC CB220 and the Xport.

I put the CUBLOC into the CB220 Proto Board. I attached the Xport to the Comfile Xport Dongle which provides an RS-232 level serial connection, but needs +5V on Pin 9 of the DB9. The Xport
needs about 200 mA, which is more than the CUBLOC regulator can provide (I found that out through trial and error...) So I put a 7805 5V regulator on the proto board, brought the wall wart positive voltage to it, and connected the output of the 7805 to pin 9 of the CUBLOC DB9 connector.



Then I hooked up the Pololu Micro Serial Servo Controller, this time using the logic-level serial connection from the CUBLOC second serial port:


The Xport was tuned to carry the first serial port of the CUBLOC over UDP to an Internet server. I also attached a servo with a finger to the servo controller board:


On the CUBLOC, I wrote this simple program to report out the finger force-sensitive resistor analog value and send it to the Internet server, then when it receives a new finger position from the Internet server, it commands the servo controller to update the position:

Const Device = CB220

Dim f_pos_1 As Byte
Dim f_pres_1 As Byte

Input 5 'P0 / Pin 5 as Input
Opencom 0,9600,3,32,32 'open RS-232 channel to Xport
Opencom 1,9600,3,32,32 'open serial channel to Servo Controller
Bclr 1,1 'clear channel 1 tx buffer

On timer(10) Gosub a2d 'every 100 ms
On Recv0 Gosub servo_move 'on UDP in from Xport


f_pres_1=Adin(0)>>2 'scale 0-1023 to 0-255
Put 0,f_pres_1,1 'send finger pressure to Xport

f_pos_1=Get(0,1) 'get commanded finger position from Xport
Put 1,255,1 'send 0xFF to servo controller
Put 1,0,1 'servo #0
Put 1,f_pos_1,1 'send finger position to servo controller

Pretty simple, eh? On the Internet server side, I had a Python test program that took the force-sensitive resistor value, and turned it around back to the CUBLOC to command the servo position:

from socket import *
while 1:
    print addr,p

So there you go, it works great, took about 1 hour to set up, and it looks like I need to pick up another CUBLOC and Xport!

Finally Embedded IP Solution!

For many moons, I have walked alone through the dark valley of unfinished or badly implemented embedded IP stacks. Then, lo, I found the Lantronix Xport:



This small unit is mainly a serial-to-Ethernet converter. I had heard of the Xport before, and was rather skeptical given my continuous failure to find an embedded IP solution that 1) DHCP's a gateway address properly and 2) puts the right MAC address on UDP packets heading out beyond the netmask.

But then I found something else, the Comfile CUBLOC which is like a BASIC Stamp but it has on-board A/D as well as other cool stuff:


You can see the CUBLOC is based on the Amtel MEGA 128. It is programmed in a very Stamp-like BASIC. The Comfile website has lots of example code, including code dealing directly with the Xport. Comfile also sells a Xport Dongle which makes interfacing the 3.3V Xport with 12V RS-232 a snap. Well, except you need to provide +5V on its DB9 pin 9 connector.

On the Yahoo Xport Group I asked if the Xport could really DHCP a gateway address and put the right MAC on Internet-bound UDP packets, and lo and behold a Lantronix engineer answered and said yes.

So I picked up an Xport, soldered it into the Dongle, made appropriate RS-232 cables, set up the Xport through the serial connection, and then I had a serial connection over a specific UDP port between my PC and my Internet server. Success finally!

Tuesday, September 05, 2006

Cheap USB-enabled AVR board

This neat board is made for rapid development of USB-oriented solutions with the 8-bit AVR AT90USB microcontroller. Demo kit is just $30!