Loading...

Lord of the Relays

26,959 views

Loading...

Loading...

Loading...

Rating is available when the video has been rented.
This feature is not available right now. Please try again later.
Published on Jun 22, 2009

Six-relay team performing for you "Lord of the Dance" style.

These are six large, loud 12V relays driven by ULN2003 darlingtons and programmed using a Basic Stamp 2. The relays are plugged into sockets screwed into wood planks. Under each relay is a 12V dashboard illumination bulb switched by the relay contacts.

The program is amazingly simple: Repeatedly count from 0 to 63, XOR a random number with most of the bits, and switch the relays using the 6 LSB bits. The timing between each beat is varied randomly to make it sound more human. (Full program at bottom.)

Other Tid-Bits:
- When everything's on, it draws 1.8A. Just the relays alone draw 600mA.
- Now and then one of the Darlington channels of the ULN 2003 burns out and has to be replaced.

Basic Stamp 2 Program ---------------------

' {$STAMP BS2}
' {$PBASIC 2.5}

DIRS = %1111111111111111
OUTS = %0000000000000000

speed VAR Byte
r VAR Word
i VAR Byte

speed = 119

main:

FOR i = 0 TO 63
RANDOM r
OUTL = i ^ (r.LOWBYTE & %11111101)
PAUSE speed + (r.HIGHBYTE & %00000110)
NEXT

GOTO main

Loading...

When autoplay is enabled, a suggested video will automatically play next.

Up next


to add this to Watch Later

Add to

Loading playlists...