Showing posts with label hacks. Show all posts
Showing posts with label hacks. Show all posts

Tuesday, January 22, 2013

My first (good) timelapse

Had a great day today! Finally used my Arduino camera controller for something useful - making a timelapse photo of our photo society's portrait session




http://www.youtube.com/watch?v=rCkQ1WwaJoA
read more "My first (good) timelapse"

Thursday, January 17, 2013

Arduino Based Camera Controller

The motivation
After seeing Matt Richardson's video about his high-speed photography controller, I thought to myself "Wow, I want one of those!" And I had all the necessary bits, so I set about building one.

This post isn't going to be a how-to (I'll write one if enough people offer to buy me beer), but just general boasting about what it does.

What can it do?


Ok, so I now have a device which can trigger my camera's shutter, fire off a flashgun or turn a bunch of sockets on and off at my command. Just think of the possibilities!! It's basically up to me and what program I write.

Taking Matt's lead, I first created a program to take photos of popping balloons. Here's a rough outline of the process:
  1. Start the process (by pressing a button)
  2. Arduino turns room lights off (via a relay attached to an extension lead)
  3. Camera shutter opens
  4. Arduino waits for sound of balloon popping
  5. I stick a pointy thing in a balloon
  6. Arduino hears the sound, and fires off the external flash unit
  7. Camera shutter closes
  8. Room lights turn on
  9. Paddy has a beer to celebrate a successful day's work
For an explaination of the above, see my next post (LINK COMING SOON). For some results, see my Flickr Arduino tag

I've also created a timelapse Arduino program, which allows me to repeatedly take photos a certain number of seconds apart - I created a simple video of a candle burning away, seen below



The parts


What I've used (essential stuff)
  • 1x Arduino Pro (though most Arduinos are suitable)
  • 1x Quad opto-isolator
  • 1x 7d remote trigger (sabbotaged for its connector and cable) - A cheap knock-off one was ideal because it cost about £5 ($8)
  • Various pieces of stripboard
  • Various colours of wire - For wiring up the circuit, but I also used a lot to make the tails to go off to the external stuff like the flash and camera
Non-essential stuff (added for the cool factor)
  • Real time clock module - allowing for more accurate timelapses
  • Lots of male and female PCB pin headers - these make up the plugs for wires, or the slots to plug the Arduino in so it can be removed easily
  • 4x LEDs (various colours) to show the status
  • 2x PCB-mount buttons to set the functions
  • Transistors - Arduino can't source enough current to power LEDs itself (though I'm told it can sink it - can any confirm?)
  • Piezo transducer - to pick up loud sounds
  • Photodiode - to pick up the light from a laser pointer (laser tripwire!)
  • Various resistors - they're boring, but ya need 'em
Stuff I didn't add (but would love to)
  • LCD status screen
  • Ion cannon - not really essential for this project, but how cool would it be if you could take photos and then blow stuff up?

Some requirements I aimed for
Functionality:
  • Control the camera focus and shutter (obviously) - the "how" is discussed below
  • Control an external flash gun - also discussed below
  • Two buttons to program the device - so I don't have to download a new program every time I want to change between "take picture when lights are bright" and "take picture when lights are dark" modes, for example
  • 4 LEDs to display the status - in the end only 3 of mine worked, but it's still plenty
Expandability:
  • Inputs and outputs should be as generic as possible
    This wasn't always possible (i.e. for the camera connector) but where I could, I tried to make the inputs and outputs generic. For example, the relay to switch the sockets on and off is on a separate piece of stripboard, and just plugs into a simple digital out. This means I can design as many little plugins as I can think of and still use the same main board
  • Input buttons have ports to plug external buttons in (so I can carry a button around with me, instead of having to be right beside the controller)

Camera Control
The camera (in this case a Canon EOS 7d) is controlled via the cable from a remote shutter release (about £5 on Amazon). These shutter releases (at least for Canon) are just simple switches. There are three wires in the cable - ground, focus and shutter. Connect focus to ground, the camera enters "focus" mode (like half-pressing your shutter button). Connect shutter to ground... well you get the idea.


In order to isolate my very expensive and love-of-my-life camera from my shoddy soldering, I used an opto-isolator. These little devices look like a standard IC chip, and basically consist of an LED on one side, and a photo-diode on the other. Apply a voltage to the input side, LED lights up, photo-diode allows a current through on the other side. You'll notice that there is no direct electrical connection between the input and output side - there's no need to worry about frying your camera if you short something out on the other side of the isolator, it provides about 7,500V of electrical isolation (or so the datasheet says).


Flash Control
I needed to be able to control an external flash to really get that "motion-stopping" effect. I have two external flashguns - a YN-460 and YN-468. The trigger for both of these is a hotshoe, which means the flashgun provides a 6V voltage on the center pin, and when this is brough to ground (via another contact around the edge of the shoe), the flash will fire. This sounds like another job for an opto-isolator!

To make things easier for me (and because I don't have any hotshoe adapters) I added a small homemade sync port, which you can read about here


External lighting control
This was such a good idea from Matt's video that I couldn't not do it!

Matt had a fancy extension lead with a digital input for turning it off and on. I don't have such crazy technology, so I had to make one myself.


What you see above is a small piece of stripboard, with relay which opens or closes based on a digital signal it receives from the Arduino. I've cut the live wire in a 4-way extension lead, and inserted the relay in the gap.

There's a little bit of circuitry so that the low current 5v output signal from the Arduino can power a 12v relay coil, but other than that it's very simple.

Because this board needs 12v, I usually power it directly, and I've added a socket so I can take power from this board and take it to my main board (which has the Arduino). The main board has an onboard regulator to give me 5v.

Inputs
In this iteration there are 4 (3?) inputs - two buttons and a socket for a photodiode. I know I'd said I was trying to keep everything generic, but I didn't have the awesome idea of having additional bits of stripboard with extra circuitry at that stage.

One of the buttons also has a socket, so that I can plug an external button with a long wire on it. This gives me freedom to move around the scene, makeing life so much easier!

There's room for other inputs too, and another socket for an opto-isolator, but I haven't got round to doing the wiring yet.

Arduino Code
This is coming in my next blog post. [INSERT LINK HERE]

The results
For the results, see my Flickr Arduino tag

More info
Find me at flickr.com/pskillen

Some more parts
Remote control button

Piezo transducer

Real time clock module

Connecting wires
read more "Arduino Based Camera Controller"

Friday, July 1, 2011

Cheap Joystick and Accelerometer for Arduino from Wii Nunchuck

For ages now I've been wanting to play with an accelerometer but didn't really fancy paying £20-25 for the privilege. I'd also seen a lot of posts about people using the joystick from a Wii Nunchuck to control robots, servos, cameras, etc, which I didn't have a lot of interest in. Then I remembered that the Nunchuck controller actually has an accelerometer built in. Long story short, I'm now short one Nunchuck and plus one accelerometer.

The economics of this one really work out, since a Nunchuck is usually only about £15, and communicates over I2C which saves on IO. So far, the lowest price accelerometer I've found was over £20 and communicated using 3x analogue signals.

Obviously I'm not the first to make this realisation. A quick Google search took me to http://www.windmeadow.com/node/42, which gives a great tutorial on how to wire it up and gives a sample sketch to get you up and running.

I wanted a way to visualize the data coming out, just so I could see how it looks when I make a few gestures or use the buttons and joystick. I'm not the greatest fan of Processing (mainly because I haven't used it an awful lot) but I am a big fan of Java. I created a program which shows me the current levels of each of the 5 axes (x, y, z, joystick x, joystick y), and the 2 buttons. It also graphs the xyz-axes over time. Cool eh?


As with most of my programs it needs a lot of attached Jar files, so here's my Eclipse workspace folder in zip format.
Note:
you'll need to tweak the Windymedow sample sketch a little to work for my Java program - specifically you'll need to change the value separator in the "print()" function to a comma, not a tab.
read more "Cheap Joystick and Accelerometer for Arduino from Wii Nunchuck"

Friday, May 6, 2011

Windows free for 30 days - Day 2

Day 2 of my Exam Revision Avoidance Strategy(tm)

I still haven't been to sleep yet, so this is still technically day 1, but whatever...

Linux & Gaming...
Tonight I decided to put some games on to play. Not the crappy card games that come with every OS, proper games, FPSes. I wanted to run Steam, and there's a this cool app called PlayOnLinux that handles all the fiddly bits for you. Basically you install it, and it handles all the Wine setup, etc, for you. Cool eh?

Installing POL was as easy as going to their website, adding their repository to my sources.list, and installing using apt. Installing Steam required even less effort - simply click on the "Add" button and select Steam from the list. Once Steam was installed, I shut it down, deleted the new steamapps folder, and created a symbolic link back to my normal steamapps folder. This saved me downloading the 6.9GB of games I'd already downloaded. Even cooler!

Running the games proved less fruitful. Source (the game engine) had a small brain hemorrhage (probably over my dual monitor, virtual space setup) and died a horrible horrible death. It's too late tonight to try again, but over the weekend I should get it sorted....


Linux Web Servers
If you've been exposed to Linux for more than 5 minutes you'll probably know they make the best web servers. There's even an acronym, LAMP, which stands for Linux, Apache, MySQL and PHP (WAMP is a Windows variant, but we don't care about that).

For the more nerdy among you, I've just spent the day recompiling php5 for Ubuntu to include GD2. This isn't normally included with the Ubuntu version of php5, and using apt to install it will not give you all the necessary image functions.

I've read a really good step-by-step on how to recompile php with the gd2 extension here.
read more "Windows free for 30 days - Day 2"

Sunday, May 30, 2010

Dismantling the EEE PC

Hi all,

This is a post to compliment my post on modding the EEE PC to do awesome things.

I will describe, in detail, the steps required to strip your eee pc 701 down to its bare bones (you have to figure out how to put it back together again yourself).

1 - Remove battery, modem bung, RAM door
Removing the battery is easy. Grap the two slidey locks, push outwards, and pull out the battery. The modem bung is nearly as easy, get a fine screwdriver and carefully pry it out of the connector. Finally unscrew the two screws on the RAM door, save these and remove the door.

2 - Remove the keyboard
Turn the laptop over, so it is now face up. There are 3 tiny catches at the rear of the laptop, behind the F1, F6 and Break keys.
Take a straight screwdriver and push these backwards (towards the monitor), and the keyboard will lift up at the back. Now unclip the ribbon connectors for the keyboard and the mouse (shown below).Lift away the keyboard and keep it somewhere safe.



3 - Removing the outer case Under the keyboard are 9 screws. Remove these with a star screwdriver and save them somewhere safe. Turn the laptop over and unscrew 6 screws from the base.
Note: To keep tiny parts safe I use small boxes, especially for screws. This, combined with counting the number of screws to be removed or re-inserted, virtually eliminates the "parts left over" effect.

When removing the upper case you should note that the audio connectors are surrounded by plastic which is part of the case you are removing. You should put a straight screwdriver behind this and pry it out gently before removing the top completely

Remove the case evenly upwards (try not to lift the front first as the rear parts will catch on the monitor). Part of the metal will be stuck to two of the chips underneath by thermal stickers. Be careful to pry these slowly so as not to damage or unseat the chips.

4 - Removing the motherboard
There are two plastic clips holding the front of the motherboard in, unclip these with a straight screwdriver. You need to remove (in no specific order):
  • Speakers connector (top left)
  • Webcam connector (top left)
  • Fan connetor (top left)
  • VGA connector (top right)
  • WIFI antenna connectors (x2) (underside, top right)


(The third picture above is provided for when you forget which way round the speaker/webcam connectors go)

You should now be able to lift the motherboard out. Place this somewhere SAFE - you kind of need this to run your laptop.

5 - Removing and dismantling the screen
The screen is held to the base by two screws at the base of the screen.

To remove the front bezel of the screen, there are 6 screws. These are hidden under the 4 rubber "feet" at the top of the screen, and 2 hidden under round plastic bits at the bottom. You need to pry these out with a sharp knife and keep them safe. They can be re-attached later with some superglue, though not for a while becuase they will be harder to remove again.

There are small plastic clips around the perimeter of the bezel, which are unclipped by applying gentle pressure. There are also two clips on the inner perimeter (next to the screen, just below the speakers). These can be best accessed by poking a screwdriver from the outside of the bezel, past the speaker and unclipping them.


6 - Congratulations
You have stripped down your EEE PC about as far as you'll ever need to make some mods. I will not provide any more details here. I can be reached by email if you for some reason value my less-than-useful opinions.
read more "Dismantling the EEE PC"