Thursday, May 20, 2010

[DIY] light saber ver 2

Still remember my 15bux light saber i made couple months ago?

I made an upgrade of it, with proper light saber handle...It is kinda cool to take graduation picture with it!!!!But I did not dress up as obi-wan and bring it to the ceremony, it is too eccentric somehow.

I went to the mom&pops hardware shop trying my luck to get parts to make the handle, but some how, lady luck is not smiling at me. None of the parts express their enthusiasm to be modified by me. Then I went to tom&stephanie to buy present for my friends daughter and I bump into a toy that looks like a light saber and it is CHEAP. s$8.90 only.

I did put 3x AAA battery to turn it on and record down the animation. Did not upload it, because wanted to save me from the embarrassment of the toy. BUT, it is still cheap.

Since young, I have a knack of opening up things (+ forgot how to put it back!! haha) and take a look "under the hood". Being young, I have no idea what are the "innard" looking components and the wiring that are so intriguing to look at. My parents are  language teachers and can't really help much on the electronics/physics part. It is very important to have a mentor, a guide and somebody to teach the basics and principles of the working. Alternatively, I self taught by experimenting...... but that was a long time ago......

Here is how it looks like after it is dissected.
In the lower container, from left. small DC motor with counter weight to create vibrations when turn on. speaker, small IC circuit for sound & light.

while trying to cut out the excess plastic to make room for my modification, it snapped. So much for a s$8.90 toy. Luckily, it is not affecting the overall stability of the mod.

I got some tracing paper and transparent blue flim (2m  x1m) popular book store for s$1.50, but I only use 4" of it. the materials can be save for later use. Line them up nicely, secure with double sided tape and slide in the acrylic tube from the previous light saber. 3R= Reuse, Recycle, Re .... ahem...forgot....

After I finally got the LED strips into the acrylic tube that is lined with the diffuser and colour filer, 3 hours had passed...... I am running short of time to attend the graduation ceremony.....

Went to ah yap's lab to use his power tool to do some fabrication on the handle...
this is the final look of it.

some soldering, mouting and testing... the clock showed 5 pm.... i better get my shirt and tie ready....

boys & girls, May I present to you.... my s$23.90 light saber

this is how it looks under fluorescent light.

Saturday, May 15, 2010

[DIY] arduino and temperature sensor LM35

I accidentalmy hand 2weeks ago when I left my solder iron on for a prolonged period and I grabbed the metal guard. It is really a painful mistake. Luckily, no 3rd degree burn of that sort.

So prevent this from happening again, I decided to make a colour changing bling that reacts to temperature. All I is just hook up the temperature sensor to the heat source, for this example, the metal guard. It can be also modified to be fitted into a tap to give visual warning on the temperature of the water.

I laid my paws on RGB LEDs from sim lim tower that cost $1 per piece. It is on the pricey side and i only bought 5 of them. Loaned 1 to nigel and saravanan each for their D&I. Mr.Chew told me last Wednesday he got some for 40cents each (at 100pc lar)!! I felt I was really ripped off....I also have a temperature sensor LM35z lying in some dark corner in my tool box..

To light up R,G and B individually, just connect it to a logic low. My RGB LED is the common anode type. In arduino, this can be achieve by using the digital write.

But, to achieve "blending" of another color, it is necessary to input different intensity of Red, Green and Blue for that "new" colour. Hence an analog write is used.
I have used a 0-255 value, it is the same as programming HTML colour blending.

connect as below
int redLED=11; //Pin11 = Red LED
int blueLED=10; //Pin10 = Blue LED
int greenLED=9; //Pin9 = Green LED
A0 connect to vout of LM35z.

Vout is scaled to 1024 steps for easy conversion.

the code below is for your reference. Uncomment the colour blending part to play with the RGB LED.

take a look at the video. My office is at 20degC -> BLUE, my laptop is emitting heat at 30degC +++ RED. Anything in between, green.

Monday, May 3, 2010

annotating power point slides with laser graffiti

I came across the GRL (Graffiti Research Lab) website while researching for open platform and openCV to do tracking of an image blob.

I am totally amazed by the ability to draw with a laser, albeit not the emotion they are expressing with graffiti.

So I was thinking, can I used it to annotate my powerpoint slides while teaching?? + the wireless presenter I am issued with to scroll the slides back and forth. It is going to be damn cool lar! commercial product such as "afterglow" is going for usd$1950 per copy for the same feature i mentioned.

quickly, I downloaded the code (I love open source!!) and compile it. The webcam is the input device looking at the whole vision field and the code tracks the red dot (it is called a blob)
you will need

1x code
1x webcam (any model with driver)
1x <5w laser pointer 1x projector

check out the video.

sadly, when i run it with power point slides as the background, the slides doesn't show up as the background. More code tweaking ahead and more weekends are needed....

Akan Datang............................