torsdag 9. juni 2016

Transistor Sword - a closer look at the electronics

I have written about how I built my Transistor sword here, but I did not explain the electronics in detail. But fear not, here's a little more rambling about how I made the talking and glowing parts of my sword. 

First things, I don't know how to program, I want to learn, but until then I hack other objects to do as I want. So I still think this is a fairly simple electronic build. I had a friend try to help me with an arduino, but as the rules for the competition said strictly do everything yourself, we mostly planned and worked on this solution for later. 

What does the sword do?
If you have seen the trailer for the game Transistor, you know that the sword glows green-ish while it talks. It also has a corrupted mode where it glows red instead and completely different quotes. 
Official Transistor Trailer

So I need it to 
- talk 
- glow green
- glow red
- separate mode where it glows only while it is talking

Talking
I could have made a sophisticated solution with a SD card and an arduino, but instead I bought a small Bluetooth speaker. I ripped out the inner electronics, to make it more compact and actually fit inside the cross guard of the sword. 

This way I could just pair the speaker with my phone and play music and quotes directly from a music folder I had stored on Dropbox. This also gave me a lot of freedom to add new files or have the sword play random stuff from YouTube and such. 



To get the quotes from the game I recorded myself playing the sections with required monologue. I also had a friend with an amazing voice record the quotes I needed for my show, so I had a nice dialogue in his voice running through the sword. This made sure the voice had the same pitch all though my show, but for random talk I could use game files. 

The game music can be bought here

Ok, the sword now talks!

Glowing
If you know a little about electronics this is a very simple step. I had never worked with LED strips before, but by Odin, how I loved it. I shall always work with LED strips if I can from now. 


The ones I bought were single color, meaning I had one strip for red and one for green. I know there are RGB strips that let you program your single strip to glow in any hue you want, but I did not dare with my limited time to try this. 

How to use LED strips you ask? They come in large spools, allowing you to cut it at desired length as long as you follow the markings. 

After you cut it you solder on a positive and negative wire and this strip of light is ready for the rest of your circuit. 


But wait a minute, my sword can be divided into two! How to still make it glow all over? Well, I just used connectors, follow the direction of the current so you always know which way it flows and you can easily divide the cord. 





Now add a battery and we get it glowing. 


Check, the sword now glows green. 

Adding the corrupted mode. 
A three way switch can help make the sword go from normal to corrupted in a second. Then I soldered and added strips of red LED strips. 


Also the eye will always glow red, no matter if the rest of the sword glows red or green. And it shall not react to sound. These eyes could also be disconnected from the sword using smaller connector pins. 

Another checkpoint reached, we have several modes. 

Lights reacting to sound
With both sound and lights working, we need to bring them together so that the lights react to the sound coming out of the Bluetooth speaker. Again, if I you program an arduino, that would be a gorgeous solution. But alas, I just hack stuff. 

When I made my Tali helmet I found out that you could buy cheap (ish) voice changers, which had light indicators. So I bought one of these, ripped off all the parts I didn't need, attached my own lights and voila. It has a small chip and a microphone that together would make my light glow when exposed to sound. 






So I placed the mic next to my Bluetooth speaker parts and "it was alive!"

Also I wanted a mode for continuous glowing, so the sword would still look cool even without my spamming the hallways with transistor quotes. Switch #1 has three modes: green - off - Red. Switch #2 has two modes: Sound reacting - continuously glowing. And all the holes are where the speaker is placed.
Photo: Frida Tørring

This ended up being my final diagram, which I taped to the inside of the cross guard lid in case I needed to emergency repair something. 
Photo: Frida Tørring

And here's the inner guts of the the cross guard (remember, it can be opened and closed because of magnets). On the left side if the bluetooth speaker and the sound reacting chip (alternate power source). On the right side is the batteried for the main circuit (8xAA) and a switch for the red eye lights. 
Photo: Frida Tørring

Want to see the sword in action, here's a video of it talking :)

And a last photo of my Transistor Sword and my Transistor Tattoo <3 

Ingen kommentarer:

Legg inn en kommentar