Wednesday, January 7, 2009

The UV LED microcontroller bracelet

I have been thinking about soft circuits for a while now. Its interesting to think about electronics as they relate to clothing, as well as building circuits with no solder, just knots. At about the same time i had come across "magic beads", which are white beads that change colors when exposed to UV light. Apparently they are one of the least expensive ways to reliably detect UV, and have some scientific use. but mainly they are sold by science education stores to teach kids about sun protection. The beads retain their dark color for a bit after the UV light source is removed, so the idea came up to make a slow refreshing solid state display out of beads and UV leds. This got mashed up with the soft circuit idea, and the ultimate raver cancer device was born!

I found some UV led's from a china importer for really cheap, and decided to use the arduino minipro from sparkfun as the microcontroller. it has such a small form factor, and is completely integrated so no external parts are needed besides power. Theres also a CR2032 battery holder from sparkfun, and a magnetic conductive snap (also from sparkfun. can you tell i love this place?). I took each bead and made a cut through it, and fit the LED through two of them.




Using conductive thread (sparkfun), and a piece of leather as a board I experimented with how close you could get the traces together in a sewing machine. The leather made a surprisingly good circuit board. the critical part here is to use the conductive thread on the *bottom* bobbin, not the main bobbin. you get a perfectly flat "wire" with a nice little thin wrap around it. This stuff frays like *crazy*, and was a giant pain in the ass to work with. Id almost recommend hairspraying over it lightly or something once you finally get it with no shorts.


Front


Back

So after many hours of carefully..... okay, im lying. I totally had my sewing machine master roommate sarah sew this for me. I laid it out with a ruler and had her sew over the traces. It was unusually fun designing the circuit traces, this is why i am a nerd. Its sort of hard to tell, but the microcontroller will go on the right, and there are 10 UV led's that run down the center of the bracelet.




the LED's were attached by wrapping the wire very tightly around each lead, and sealing it with a drop of glue. I had high hopes to make the entire thing with no adhesives of any sort, but the fraying was really frustrating me.




Here you can see the first few leads of the microcontroller attached. they were attached just by stitching through the hole in the board a few times around the leather. it looks fantastic, and was very solid. You can also see the detachable mini USB programming header.





Here it is! It is very very difficult to take videos and photos of this thing. all of my cameras react very badly to the UV light, even with playing with UV filters. There is no flickering to the eye, that is an artifact of the camera. It has ten individually addressable LED's, with the full power of the arduino behind them. This program reads from a stored sine wave table to do fakie PWM on all 10 pins. Sadly, the beads do not hold their color for very long since the UV is not that strong coming out of the led's. its bright, its just not enough of the ideal wavelength. The effect is pretty damn cool anyways though. i cant see actually wearing this, but it was a cool way to explore these technologies. Its pretty amazing how advanced of things you can make these days at home with fifty bucks and a few hours time.

Sunday, June 22, 2008

Casio EX-F1 remote shutter mod

So, the last thing most people do with a brand new $1000 camera is start cramming a screwdriver into stuff and popping it open. Luckily, I was stupid so you dont have to be! In this case, stupidity paid off bigtime. Turns out the remote shutter release isnt some fancy schmancy USB device, its just three wires! Casio even conveniently labeled them for me: GND, Half-Shut, Shutter!



Thanks for the labels!



Just a simple single sided board, nothing hiding on the back.




Now.. to find out where to get some of those funky USB connectors.

Thursday, May 22, 2008

High Speed: Cheese grater 300/600/1200 demo

This is my cheese grater in the sink under running water. Between these shots, the camera remained in the same position. only the FPS setting and the lighting were adjusted. as you can see, the higher the speed, the smaller the frame size.

300 FPS. 10 seconds=1 second of RL



600 FPS. 20 seconds=1 second of RL





1200 FPS. 40 seconds=1 second of RL


Something about the 1200 clips really appeals to me. Its like a tiny window into into a bizarre world you encounter every day, but are not able to appreciate. I cant wait to explore it more!

High Speed: Bic lighter


Notes: 1200FPS in a moderately lit room. First video I took. High speed videos unsurprisingly require a LOT of light. Even fire seems a little dim

Casio EX-F1

For the last several years I have been fascinated with high speed photography. Even rental of equipment capable of higher than 60fps has been cost prohibitive for me. With casio releasing one of the first consumer high speed video cameras, I couldn't resist jumping on the opportunity to experiment more with the format.

Friday, January 4, 2008

Nintendo DS MicroSD card storage solution



For the last few years ive come to know the joys of having a DS flash cart. Imported games, fantastic homebrew, emulators galore. No need to carry a giant stack of games with you, just grab the DS and go! Ive gotten so used to the idea of carrying around all of my games right inside the DS, that when I finally outgrew my 2gb microSD card I realized I had no place to put the second one! Its truly impossible to find a place to store those tiny memory cards. After pondering it for a while I finally came across a solution that was so obvious, I cant believe it wasnt the first thing that came to mind. use microSD card slots!

I ordered up a few of the "click-in click-out" style microSD solder-on surface mount components from mouser.com for $1.13/each. hot glued them to the inside lid of the DS, and bam! instant 4 gig memory expansion. The slots of course dont work, but they keep the card in place just fine, the lid still closes, and they blend in nicely. I slapped one in each corner, but there seems to be enough room for at least 5 of them in there with the lid still able to close.


Hope someone else finds this as useful as I did!




Saturday, December 22, 2007

Yak hat

This is the first hat i ever knitted. It was made with "Shokay" 100%
Tibetan yak fiber. This all started when someone told me that yak
fiber was one of the softest and warmest fibers you could get, but
you couldn't get it because of the extreme pain in the ass it is to
gather. Yaks cannot be shaven and must be combed to gather fiber.
Apparently a couple of harvard grads noticed the demand for fiber,
yet an abundance of very poor Tibetan yak farmers. So they started
the shokay yarn company and here we go!

This stuff costs $32 for 3.5oz of worsted weight yarn. The hat ended
up using 1.5oz of yarn, so i am quite happy with the overall cost. The
hat is warm, and extremely soft. It seems a little delicate though,
there are lots of "pills" that form on the surface with wear.

The pattern was made from several generic hat patterns i found. cast
on 8, every other row tbl on all end stitches on each of the 4
needles until cap fits head, knit until its long enough.

Tuesday, December 11, 2007

The KMFDM scarf

This scarf was made by sarah for a friend of ours. Call me impressed! The pattern was made using an album cover photo and automatic pattern generation software. it was cleaned up by hand. The end result is a really really nice looking font! I cant believe how nice it turned out.





Wednesday, December 5, 2007

I-cord bikini




I didnt personally knit this project,miainly because i dont wear many bikinis :) my wonderful friend Sarah did (pictured). using the I-cord I made in the lego knitting machine.

The pattern was based on a generic bikini pattern. its very difficult to work "yarn" this large as far as increases and decreases go. Every thing you do is very very visible. But the overall effect is really great! nothing looks quite so nice as a custom fitted bikini, and the fuzzy wool look makes it all the more awesome. Here is sarahs pattern:

1st cup:
Temporary CO 15 sts (Leave a long enough tail to tie between the cups)
Row 1-10: St. st. starting with Knits
Row 11: K2tog tbl, K11, K2tog
Row 12: P13
Row 13: K2tog tbl, K9, K2tog
Row 14: P11
Row 15: K2tog tbl, K7, K2tog
Row 16: P9
Row 17: K2tog tbl, K5, K2tog
Row 18: P7
Row 19: K2tog tbl, K3, k2tog
Row 20: P5
Row 21: K2tog tbl, K1, k2tog
Row 22: P3
Row 23: K3tog
Pull end through remaining stitch (Leave long tail to tie around the neck)

2nd cup:
Temporary CO 15 sts (Leave a long enough tail to tie between the cups)
Row 1-9: St. st. starting with Purls
Row 10: K2tog tbl, K11, K2tog
Row 11: P13
Row 12: K2tog tbl, K9, K2tog
Row 13: P11
Row 14: K2tog tbl, K7, K2tog
Row 15: P9
Row 16: K2tog tbl, K5, K2tog
Row 17: P7
Row 18: K2tog tbl, K3, k2tog
Row 19: P5
Row 20: K2tog tbl, K1, k2tog
Row 21: P3
Row 22: K3tog
Pull end through remaining stitch (Leave long tail to tie around the neck)

Cut a piece of I-cord long enough to tie around ribs; this will bow in the back. Run this piece through the temporary cast on loops on both cups. Slip out the original cast on tails so that they end up between the cups and bow tie together.

Bottoms:
Temporary CO 27 sts
Work 7 rows in St. st.
BO 3 stitches at the beg of next 2 rows
Cont in St. st., dec 1 st at beg and end of every row for 8 rows (either K2tog or P2tog)
Work 12 rows in St. st.
Work 13 rows in St. st., inc 1 st at beg and end of every row **(A)
Work 13 rows in St. st., inc 1 st at beg and end of knit rows only **(B)
** Depending on the size you need, adjust the number of inc rows (either fewer A rows and more B rows, or vice versa. This pattern fits my body, and I have wide hips, so periodically check the piece to see if it will fit appropriately.)
Work 7 rows in St. st.
Leave stitches on the needle and cut the I-cord leaving enough length to seam the front and back together at the side.

Cut a long enough piece of I-cord to tie around the hips and run this piece through the stitches on the needle and the temporary CO stitches. Slide out the CO tail and use to seam the other side.

Monday, December 3, 2007

560ft of i-cord



Finally! I got through the entire massive bag of yarn i had. The little lego knitting machine held up for the lot of it! I believe this is "sport" weight yarn. its pretty thin. The three balls of yarn weigh:

Red-260g
Green-274g
Blue-212g

For a total of ~750g(26oz, 1lb 10oz)

16" of cord weighs 1.8 grams, giving me 560ft of cord. Amazingly, this is roughly 8,300ft of input yarn!

At its peak run, towards the end of minor optimizations, the lego knitter could knit 1 foot of yarn in 1.8 seconds. Thats theoreticly only about 4 hours of runtime, in reality it was closer to 10 hours over the last couple weeks.

now... to see if my idea for knitting this works....

UPDATE:


Some test swatches. The gauge for knititng this "yarn" is:

4x4"

#13 9x15
#15 8.5x14
#19 7x12

Friday, November 30, 2007

iPhone lego NXT control


BricX command center screen viewer+VNC+iphone=iphone lego NXT control. f'ing awesome :)
Posted by Picasa

Monday, November 26, 2007

Lego assisted I-cord knitting machine(update4)

This is a $13 plastic "i-cord" maker i bought in the kids section of a fabric store. its called an "embelish knit". Its a pretty neat mechanical device considering its made entirely of plastic. you turn a crank, feed in yarn, and you get a knit cord ("i-cord") as output. I have a project idea that will require a few hundred feet of this cord, so this seemed like the right device.




















This also seemed like an ideal task for one of my favorite toys, a lego mindstorms NXT robot set. So I attached it to a pedestal, removed the hand crank, filed a lego sleeve into a square and jammed it into where the crank used to go. instant automated cord factory! This was about all i really needed to solve my problem, an electric drill would have been probably a lot better than this (and about $170 cheaper :p).

The geek in me couldnt help but try to think of a way to completely automate the little machine. It would seem simple enough, just spool up the cord as it comes out. The problem with knitting machines is that they require lots of tension on the output line. this machine came with a 1oz weight that had to be kept on the yarn. lose the tension, and the delicate little crochet hooks would likely snap. The other issue is that because the hooks move around the center in this device, the cord spins as it comes out. This isnt a big deal for a few feet like it was designed for, but making huge pieces got to be annoying. The entire mass of already knit cord had to spin at the same rate new cord was being made. and since it was being spun, a simple winder wouldnt work. i had to figure out a way to un-spin the cord first.


So i spun the entire machine instead! Using rubber wheels i removed the yarn feed clip leaving a nice ridge that i could support from the top and bottom, letting it spin freely. but not move up and down. I removed the bottom of the machine and effectivly 'jammed' the gear for the center rotating piece in place. This meant the cord could come out of the machine un-spun, and could be easily wound up.







Keeping tension on the output cord is critical, so i rigged up a channel for the cable to come through. The lever hits a switch that is monitored. When the switch is not depressed, it turns on the winder until it sees tension.


























More Pictures:









Video and full resolution image gallery



I cant really say how long i think the poor plastic gears and bearing race will hold out, but its sofar knitted 160ft of output cord, which at about 15:1 ratio is nearly 2400ft of input yarn. not too shabby.

This is what the output cord looks like. its stretchiness depends on the input yarn.



This is a bracelet knitted on size 15 needles with some nice wool yarn i had as scrap. This is the "knit" side of the fabric.


This is the "purl" side of the same bracelet


Update: Trying to see how large a continuous ball of output i can get, as well as the largest spool i can attach. this is about 110ft of cord spooled up, and a fresh 2oz spool of yarn on the input




Update2: Some people have asked for pictures of the knitting device. as luck would have it i accidentally picked up the machine by the tube, and the tube support broke. so the knitting portion completely fell apart. boy.. was that fun to put back together.... anyways...

There are two concentric tubes, the outer tube has a bearing race cut into the side:


The center spindle has grooves cut in it that the hooks ride on:


And the hooks are flat, and have pegs that ride in the outer tubes bearing race.

Code

The code isnt clean and pretty, but it works!
This code is written in "NBC". Im not used to programming in assembly,or with threads, but this language seemed more complete than the "NXC" C interface to the language. The hardest thing to grasp were the backwards if/then/else statements.

It also uses regulated motor speeds, which are a lego firmware feature i think. It makes both of the drive motors spin at the same speed, even if they have different loads on them. sort of like a software differential.

UPDATE: Prettier better commented code below



// Embelish-knit controller
// Left and right keys adjust speed

dseg segment
KnitSpeed byte 50 // Initial knitting speed
TensionSpeed byte 5 // Initial tension speed
TensionMin byte 2 // Minimum allowed tension
TensionMax byte 20 // Maximum allowed tension
ButtonstateR byte
ButtonstateC byte
ButtonstateL byte
SwitchState byte // Switch state
crap byte // Disposable variable
exetime byte 0 // Runtime in seconds
dseg ends

thread main
TextOut(0,LCD_LINE1, 'Knitter 2.0')
TextOut(0,LCD_LINE2, 'Knit Speed:')
TextOut(0,LCD_LINE4, 'Runtime:')
TextOut(0,LCD_LINE6, 'Tension Speed:')
SetSensorTouch(IN_1)
precedes Knit,ScanButtons,Tension,TimeLoop
endt

// Drive the dual knitting machine drive motors
thread Knit
//Pretension drive. do not start knitting until there is tension
WaitForPreTension:
ReadSensor(IN_1,SwitchState)
brtst EQ,WaitForPreTension,SwitchState
KnitForever:
NumOut(0,LCD_LINE3, KnitSpeed)
OnFwdReg(OUT_AC,KnitSpeed,OUT_REGMODE_SPEED+OUT_REGMODE_SYNC)
jmp KnitForever
endt

// Watch for button presses
thread ScanButtons
WaitForButton:
ReadButtonEx(BTN2,TRUE,crap,ButtonstateR,crap)
ReadButtonEx(BTN3,TRUE,crap,ButtonstateL,crap)
ReadButtonEx(BTN4,TRUE,crap,ButtonstateC,crap)
brtst GT,RightPress,ButtonstateR
brtst GT,LeftPress,ButtonstateL
brtst GT,CenterPress,ButtonstateC
jmp WaitForButton
RightPress:
add KnitSpeed,KnitSpeed,5
jmp WaitForButton
LeftPress:
sub KnitSpeed,KnitSpeed,5
jmp WaitForButton
CenterPress:
stop 1
jmp WaitForButton
endt


// Drive and adjust the output spool drive
thread Tension
//Pretension drive. do not start until pretension is finished
PreTension:
OnFwdReg(OUT_B,TensionSpeed,OUT_REGMODE_SPEED)
ReadSensor(IN_1,SwitchState)
brtst EQ,PreTension,SwitchState
TensionLoop: // Constantly check for the state of the button press
NumOut(0,LCD_LINE7,TensionSpeed)
ReadSensor(IN_1,SwitchState)
// If the switch is down, slow down the output drive (slowly)
// If the switch isnt down, speed up output drive
brtst EQ,TensionLost,SwitchState
GainTension:
sub TensionSpeed,TensionSpeed,1
call SmoothTensionSpeed
OnFwdReg(OUT_B,TensionSpeed,OUT_REGMODE_SPEED)
//Off(OUT_B)
wait 1000
jmp TensionLoop
TensionLost:
add TensionSpeed,TensionSpeed,1
call SmoothTensionSpeed
OnFwdReg(OUT_B,TensionSpeed,OUT_REGMODE_SPEED)
wait 1000
jmp TensionLoop
endt

// Increase a variable once a second to determine runtime
// I cant believe the NXT cant do this... maybe i couldnt find it
thread TimeLoop
Runtime:
// Reset the poweroff timer
ResetSleepTimer
add exetime,exetime,1
NumOut(0,LCD_LINE5,exetime)
wait 1000
jmp Runtime
endt


// Bounds check the tension speed to prevent literal crashes
// Negative tension speed can cause permanant damage to the machine
subroutine SmoothTensionSpeed
SmoothLoop:
TextOut(0,LCD_LINE7,' ')
NumOut(0,LCD_LINE7,TensionSpeed)
brcmp GT,LowerTS,TensionSpeed,TensionMax
brcmp LT,RaiseTS,TensionSpeed,TensionMin
return
LowerTS:
mov TensionSpeed,TensionMax
jmp SmoothLoop
RaiseTS:
mov TensionSpeed,TensionMin
jmp SmoothLoop
return
ends