Вы находитесь на странице: 1из 31

Art Hacking

Dave Monachello
sidnancy@verizon.net

Project blog: sidnancy.posterous.com


inspiration/history

2
Demo
How El-wire works

electroluminescent phosphor emits light when
placed in a field of AC current.


Zinc sulfide powder, with small additions of
copper or manganese

4
How El-wire works
How El-wire works
How El-wire works
What does it do?

Animated el-wire portrait

Driven by a home-made sequencer that animated the
el-wire

Provides synchronized sound via wave file player

The el-wire animation data and wave file are stored
on an SD card

There can be multiple animations on a card

The system will loop through the SD card directory
(fat16 file system) and play all animation file pairs it
finds

8
System Architecture

9
System
EL
Wire
(24 segments)

8 AC lines 8 AC lines
8
AC
I2c AC lines AC I2c
seq seq
I2c I2C
I2C seq
I2C AC
speaker
CPU AC
AMP
card inverter
speaker

12v sd 12v
6v
card
Hardware – el wire driver

11
Triac circuit
optoisolator
Hardware – el wire driver
Hardware – daughter board

15
Hardware – daughter board
Hardware – propeller chip

17
Propeller cogs

18
Propeller Counters
EL Wire Portrait

20
Software

Big picture

Talking over I2C

Playing a wave file - 1

Playing a wave file - 2

21
Software Big Picture
Main
cog

blinker el wave
cog cog cog

El data Wave
cog buffer
player

File
reader audio
lib pins

I2C SD
lib cog

I2C SPI
pins pins

22
Talking over I2C
repeat
pindir := -1
repeat 8
outa[dbgLed] := !outa[dbgLed] ' toggle the debug led
i2cObject.i2cStart
i2cObject.i2cWrite(i2cMuxAddr, numI2cMuxBits) ' send address
i2cObject.i2cWrite(pindir, numI2cMuxBits) ' send the data
i2cObject.i2cStop
waitcnt(frameTime + cnt)
pindir <-= 1

23
Playing a wave file - 1
'play the wave data from the buffer
PUB Player(pWav, buffSize, PinR, PinL) | idx, baseTime
'Set pins to output mode
DIRA[PinR]~~ 'Set Right Pin to output
DIRA[PinL]~~ 'Set Left Pin to output

'Set up this cog's counters to do D to A conversion


CTRA:= %00110 << 26 + 0<<9 + PinR

CTRB:= %00110 << 26 + 0<<9 + PinL

24
Playing a wave file - 2
buffSize--
baseTime:=cnt+15000

'Play loop
repeat idx from 0 to buffSize
baseTime += 10000 ' assume this is 8k rate.
waitcnt(baseTime)

FRQA:=(byte[pWav+idx])<<24
FRQB:=FRQA ' copy same data to the other audio channel

25
Creating sync data - 1

26
Creating Sync data - 2

AI phoneme FV phoneme

27
Creating sync data – 3
Creating sync data - 4

Data file format – frame<sp>phoneme<nl>
example el data file:
1 A

25 C

49 ^

73 D

97 E
Big picture again
Main
cog

blinker el wave
cog cog cog

El data Wave
cog buffer
player

File
reader audio
lib pins

I2C SD
lib cog

I2C SPI
pins pins
Credits

wav player - Raymond Allen
http://obex.parallax.com/objects/324/

I2C interface - James Burrows
http://obex.parallax.com/objects/217/

SPI interface to a Secure Digital card - Tomas Rokicki - http://obex
.parallax.com/objects/92/

El wire hardware ideas – guerroloco member of instructables
http://www.instructables.com/id/EL-wire-eye-candy/

another el wire sequencer - Dave Chesavage - http://www.oceanbeach.com/
ches/travel/burning_man/artcar/el_wire_sequencer/index.html

El wire/lipsync data file – David Cuny
http://yolo.sourceforge.net/

Вам также может понравиться