Posts

Showing posts with the label Arduino

Canon EOS 450D triggered by an Arduino

Image
I was finally able to track down a 2mm stereo plug here in Belo Horizonte ( Eletronica Guarani ) so I can remotely control my Canon SLR from the Arduino. It uses two SPDT relay switches , one for the shutter and one for focus.  The way it's setup, there's no way I can cross the wires and hurt my camera, even after a few beers.  In the photo the black wire is hooked to ground and the blue wire to pin 12 on the Arduino (or Seeeduino in my case).  So far I've only used the shutter and have left auto-focus off. Here's my first attempt of a timelapse movie with this setup: You'll find the code here . This page helped me figure out to hook-up the plug. Making the movie is a little tricky on Linux.  First you'll need to installed GraphicsMagick (a faster version of ImageMagick): sudo aptitude install graphicsmagick Then you'll need to downloaded and compile from source mpeg2encode to that it can do the conversion to mpeg (this doesn't come includ...

Halloween Fun with Arduino and LCD

Image
For Halloween this year I did two things. I redid my spinning POV hat. I basicallly, just made it stronger, and lighter since it fell apart last year.  To make it lighter I used the Arduino Pro (5V) and two coin style batteries (CF2032) instead of the normal Arduino and the heavier 9 volt battery.  I didn't have much time to perfect it so the effect wasn't perfect ( code ).  I really need to put a sensor on it that senses every time it spins around for it to work correctly, at the moment I just guess how fast it's spinning and put in a delay based on that guess.  What came out doesn't look that hot: The second device I made was a little more successful. It was a 16x2 line LCD from sparkfun  (GDM1602K rev 2.1) display connected to a button so that every time you pressed it one more friend would be added.  I would go up to people and say "Press the button to be my friend on orkut". There's a colloquialism here in Brazil: "Me Add" which is bo...

Making an Arduino Controlled Power Outlet

Image
Over the weekend I created a Arduino controlled power outlet based on this design . With this connected to a the Arduino I can control the two plugs independently.  One end (which I cut an old US style plug) I plug into the mains power, the other end I connect to the Arduino (four connections): The fit was a bit tight! I did some tests to see if when the solenoids are on whether is would heat up too much. After about about a 1/2 hour it did heat up to 32 C° which isn't too bad.  So now I'm all set to scare some animals .

Arduino Sonar Trigger Part 2

The idea this weekend was to setup the sonar with the Arduino so that I can get a shot of the Siriemas  that pass daily at the farm, or maybe a hummingbird. Well that didn't work out so well, turns out that the sonar is affected by the wind. Adding a bit of hysteresis to the code , fixed it for the most part. I used lua to program the camera, except that it looks like there some issues with it and my Canon SD450.  Calling get_shooting() repeatedly causes problems, for example. I got my intervalometer  code  to work correctly only after removing that test.  Here's some timelapse photography that did work.

Canon SD450 Triggered by Sonar and the Arduino

Image
This weekend I played with my Canon PowerShot SD450  (aka IXUS 55) and the  CHDK  along with the Arduino and the MaxBotix MaxSonar  LV-EZ1 .  The idea is to automatically take pictures when an object moves into frame. Part of the job involved hacking a USB cable to hook up to the Arduino which I promptly did, as you can see below. Unfortunately, I was supposed to hack a Mini-USB cable (of which I have a dozen) and instead hacked my (only) Micro-USB cable (oops). The end I soldered two break away headers and then encased the whole thing with hot glue. Here's the setup. You can see the sonar on the right.  I soldered a female header to it instead of soldering wires directly to the board.  The hacked USB cable is connected to ground and pin 13.  For the sonar I've plugged it into Ground, 5V, and pin 7. You may also note that I'm not using the AN (analog) pin on the MaxSonar, but instead the PW (pulse width) pin, unlike most code I saw on th...

Build Status Monitor

Image
I bought the SparkFun LED matrix to go along with the Arduino and here's what I've built. I basically smiles when the build is green and frowns when it's broken. You can find the code at google code . I wanted to have is scroll messages across and there's code to do that, but in the end it was just too annoying since it sits in front of my desk. I have a routine ready, however if I want to give someone a message. To get the text I used wxPython and I draw the text in a buffer, then I look at the pixels one by one and those become the LEDs to turn on. One nice addition is that I can pass Unicode characters and thus it's relatively easy to show special characters like ⚘♂✔✖✈☝ although 8x8 pixels is often not enough and I have to fix them by hand. Another bonus the that program works from the command line so you can print larger messages: ./text2pixels.py --size 30 --bold --font "Delphine" Arduino ### ...

Fun with SmartFun's LED Matrix

I had some fun this weekend with the sparkfun LED matrix . It's a little bit expensive at $35.00, but looks like it could have a bunch of cool uses. Programming it I had to learn about SPI and I ended up writing my own SPI routines in processing . I've put the code up at led_matrix_tools and some of it is very reusable. Note: I wrote this on October 12th, I just noticed now that I never sent it.

More Arduino Ideas

More ideas on what to make: Make a bark stopper, like this one . Make a tennis ball shooter . Make a binary clock .

Arduino Ideas

Image
I've been wanting to play with electronics, for years. Somewhat spur of the moment I decided to purchase a bunch of stuff in order to do that. I've been collecting old junk (dead printers etc.) and now is my chance to to use all that. Here are some of the project ideas I've collected: First this is probably Hello world . Make an egg timer. Make adrumo drum pad. Have arduino play some drums, like in this robot band . Make a custom stoplight for when the build breaks. Datalog something (light, temperature, humidity , footswitch). Log the height of water in the water storage bin at the farm. Make a simple two wheeled robot that can be controlled from the computer. Make a simple intercom. Make a 2d table that draws or cuts something ( CNC machine ). Make a tiny Flickr frame . A Cylon or knight rider effect Persistance of Vision POV either hand-held or spinning . Take a photo based on motion in-front of the camera, may have to hack an old digital camera. Take a photo of a...

Bought some Microcontrollers

Image
For years I've been toying with the idea of playing more with electronics, specifically with microcontrollers, to build things like robots. I figure it's the perfect blend of my strengths (programming) with something different for me (electronics). In the past they were pretty expensive and underpowered, but thanks to Moore's Law they can be had for pretty cheap and they can do a lot in one tiny package. I've ordered two Arduino Diecimila USB devices from SparkFun . These things come with the Atmel AVR ATmega168 with 16K RAM and runs at about 1 MIPS which, in comparison, is about the same speed as my first computer, the Atari 1040ST . Each of these cost $35.00 assembled (the chip itself is $5.00) and can be run off of a 9 volt battery. When I looked at these things in the past the most popular ones for hobbyists ran BASIC which I though was stupid and expensive ($125 vs $35). As a programmer I'd much rather program in C or maybe Forth , besides, programm...