4

No technical project today because I have people sleeping next to my workspace :-). Instead, we went to the Desert Botanical Garden and took some pictures.
I am quite glad that I participated in the Thing-a-Day project! The whole experience was very positive, and I really enjoyed the encouragement and feedback from all of you. I will continue building and blogging at my site, though I might take a few days off now and then.
Thank you Mouna Andraos, Mohit SantRam and Steve Lambert for setting up and offering Thing-a-Day!
3
My parents are coming to visit so I am trying to straighten up my place. I hung some pictures on my wall for a project today… Right now, they are just taped up, but as soon as I find me some photo clips I will redo it with those.

3
Canon did not include a remote trigger option in this camera, however there are many times when I have wanted on. Recently, though, the CHDK people figured out that you can use the USB port on the camera as a trigger. It’s a great hack- the camera already has hardware to detect when the camera connects to your PC, so they captured that event and made it scriptable. This is great for what I wanted to do, which is to take long exposure shots without disturbing the camera. A potential drawback to this method, however, is that the camera can take up to a second to respond to the trigger. This means it will not be useful for syncing captures to a fast event. There are two parts to this project, building the hardware and getting the CHDK program running on your camera. Some instructions are on my website.

6
7
7
I was angry with my PC today so I did what any decent geek would do: I lit it on fire! To achieve a long exposure shot on my Powershot S3, I used a recent build of the CHDK firmware (I chose the allbest flavor). This allowed me to override the normal 15 second maximum with a 64 second one. I also saw that some other really cool features have been added. Two that caught my eye are motion detection and a USB remote. The motion detection feature is apparently fast enough in some cameras to be used to photograph lightning and water drops, and the remote feature lets you build a remote control to trigger your camera (something a more expensive camera would have built-in.) Cool stuff!

0
For day 23, I added optical encoders to the drawing bot that was built on day 19. I also modified the program so that it uses the Servo library, which I only recently became aware of. The encoders work like a charm- they are hooked up to the interrupt input on the Arduino, and that part works fine. The problem, however, becomes that the continuous-rotation servo motors cannot be stopped fast enough, so they end up overshooting their destinations. I tried to get around this by cutting power to the servo motors when the device reaches position, however there still appears to be a good amount of mechanical energy in the system, so no dice. I’m giving up on the servos, and will switch to stepper motors for the next version. The code, which demonstrates how to use interrupts, is available here. The test patterns were not so interesting so I didn’t take any pictures 
5
I went to bed early on Friday, but this is what I had planned to have finished. I was wondering what it would look like to make a macroscale slip-stick motion robot, and here is my attempt. The bot does move forward, but not at a very useful rate, and it appears to be fairly uncontrollable. My conclusion is that to pull this off correctly, you really need a bit more sophisticated leg motion. Source code is here. A video is here.
Update: Thanks to some suggestions by Rubberfishy on Youtube, I was able to improve walking bot’s movements. An updated video is here. Also, a nicer picture of the bot is here.


2
My friend gave me some stepper motors today, so my project tonight was to take one apart and find out how it worked. I chose the one that had 5 wires, and traced out a wiring schematic. It turns out to be a 5-phase stepper motor! I am eager to test it out, but first I need to order some H-bridge parts so that I can control it.

5
1
Today I re-started work on a program to solve substitution cyphers. The substitution cypher is where you take every character in your message and replace it with a different character- they sell little puzzle books full of these to try and crack by hand. My (most likely naive) approach for doing this is to count the frequency of each letter in the message. Starting with a list of the letters that occur most frequently in the English language, I will then use a bunch of different substitution combinations to decrypt the message and compare against a dictionary to calculate which combination works best. It would be ugly to search all combinations because there are so many, so I will start off by masking out all of the letters I haven’t found yet. The code doesn’t get far, but demonstrates how to load the files in.
3
This night’s creation is a pitching machine to fling pieces of foam. This was accomplished by using the flywheel and small motor from an old tape deck. The main issues were that the wooden holes became elongated, which caused the device to vibrate, and that the DC motor did not rotate at an acceptable speed. Although this particular design did not work out too well, I did like how everything came together to achieve a relatively stable motor-flywheel interface, and I was happy that I figured out how to make a pulley using two washers and another piece from the tape deck.
The motivation for this is to make a desk contraption that can be remotely controlled to fling little things towards unsuspecting office mates. I think a better way to accomplish this would be to use a can of compressed air, so that is what I will try next time.

2
The only thing I created on Day 16 was a hangover. It turns out that one is not supposed to ignore the strong in the name Strong Beer Festival. Which, one should have become aware of when the first morsel of liquid enjoyment to be presented with upon arriving at the affair is a fine Barleywine.
In a feeble attempt to atone for this lapse in character, I attempted to pay tribute to the gods of technology by renewing my membership with the Free Software Foundation. Hopefully with this and an increased resolve to pursue a path of enlightenment, all will be forgiven.

4
This one doesn’t really do anything useful. I call it the battery waster. Basically, its just abusing the solenoid by putting the battery contact in line with the actuator rod, so that when it turns off, the rod is pushed out by the spring, which causes the connection to be made and the rod to pull away. It’s sort of a primitive motor. It mostly moves in circles, however with some better weight balancing and a better material underneath, it has the potential to be good fun.

9
4
I re-purposed the display I made earlier to act as a snake game. It’s not perfect but it’s a good start. Code is at my website. See the (overexposed) video.

3
Todays project is another little experiment in different ways to interact with the Arduino. It was inspired by a project I saw a while ago, which consisted of these blocks that you could bang on, that then remembered that beat and would play it back. Mine isn’t quite so sophisticated, I just used a common switch for the input, but I think it was interesting as a proof of concept. You might notice that in the video, one of the ‘beats’ is missing from the output near the beginning- this is a consequence of only polling the input every so often. Source code is available here. A video demonstration is here.

6
Today, I invented a black light. This could be useful for things such as hiding messes when someone you want to impress comes over, shooting film noir during the day, or growing mushrooms. It works by selectively emitting radiation that modulates the emission spectrum of the target material, effectively creating a band-stop filter over the 400-700nm range (or, perhaps it is just a doctored photo.) Here is a picture of the system prototype:
