Instructables

Build your own (cheap!) multi-function wireless camera controller.

FeaturedContest Winner
DSC_7584.jpg
DSC_5772.jpg
Introduction

Ever fancied building your own camera controller?

IMPORTANT NOTE: Capacitors for the MAX619 are 470n or 0.47u.  The schematic is correct, but the component list was wrong - updated.


This is an entry into the Digital Days competition so if you find it useful, please rate/vote/comment favourably!  If you reallly like it and are a stumbler, hit "i like it!" :)

Update: featured on hackaday! hackaday.com/2009/10/13/a-different-breed-of-camera-controllers/
Update: new photos of the laser trigger in action!
Update: First Prize =D, thanks for voting and/or rating!

This instructable is mainly for the benefit of SLR users looking to get a bit more mileage out of their cameras, however if there are any point and shoots with IR interfaces, you might find this interesting. Certainly this will also work (with a bit of modification) with camera hacks where you can wire up logical outputs to camera trigger terminals.

This started off as a full blown tutorial, but due to some unexpected constraints i encountered later on, it may be more of a guide as to how to accomplish various things - i'll often leave you the choice on how you could do things which i think is a better way of doing things than just blindly saying "you must do this".  Think of this as a lesson in camera controller design.

I've provided schematics and full code so you can always just copy it.  It will be a simple case of transferring the design to a stripboard and adding the LCD for most people.  I've gone through how to breadboard it since the process is very similar and allows for correcting mistakes before you make the design permanent!

Features:

Single shot mode
Interval (time lapse) mode
Triggered shot (trigger from external sensor) mode with variable conditions
Included sensor designs - light, sound (many more possible!)
Total cost - under £25 (excluding tools)
LCD Display for easy change of settings
Compatible with Nikon/Canon (coded), potential support (untested) for Olympus/Pentax
No firmware modification needed
Uses IR so is both wireless and doesn't damage your camera

I had the idea for this after sitting outside in the cold clicking my remote control for hours. I was doing an 8 second interval for around 1000 shots. I thought, hey, it's just an IR LED isn't it? Why can't i replicate it and make my own remote with a built in delay?

I then found out (somewhat embarrassedly, because i thought i'd had a massive brain wave) that this has been done and there are even a couple of instructables on the topic.

Where my implementation differs from most intervalometers and diy remotes is that it allows for a lot of customisation and modularity, is compatible with both Nikon/Canon (and likely others later) and combines the ability to take a picture on a particular trigger.

The idea is simple. You want to take a picture of something quite fast (limited currently by the lag on your shutter, for me 6ms). There are a variety of methods for doing this:

1. Trial and error  you try to take the picture at the right moment
2. Improved trial and error  you black out the room, put your camera on bulb (open shutter) and fire a flash at the right time
3. Buy a dedicated trigger controller that has some kind of audio/light sensor to take the picture at your command
4. Build one yourself!

Ok, 1 and 2 are fine for messing around and can yield some very good pictures. But what im going to show you is that its possible to construct a circuit that will give you consistent results time and time again. Most importantly, in these tight times, the cost is lower than alternative models (some people have produced kits doing this kind of thing, but they cost a fortune  see links).

The versatility of the design is this:
If your sensor generates an output voltage between 0 and 5V, you can use it to trigger your camera!
On the face of it this is a boring statement, but once you begin to understand the implications it becomes very powerful. By simply monitoring a voltage level, your trigger could be light based (LDR), sound based (microphone or ultrasound), temperature based (thermistor) or even a simple potentiometer. In fact, just about anything. You could even link the circuit up to another controller and provided it can give you a logical output, thus you can trigger from it.

The only major limitation of the design currently is that it works only with IR interfaces, it would be fairly simple to modify the software and hardware to output via mini-USB or whatever sort of interface is required.

Note: Source Code:

I have provided some applications in step 13.  The code i run on my controller as of now is up there in a hex file along with the main c file and its dependencies.  You can simply run my code if you are unsure about compiling.  I've also included some sample code that you can use in various steps (they're named obviously like remote_test, intervalometer test and adc test.  If i refer to code in a step, odds are it's in there.

EDIT: An update about balloons popping - it seems i was a bit short sighted when i said you could easily shoot photos of popping balloons.  Turns out that the skin on the average balloon travels so fast that it'll have popped completely by the time your camera fires.  This is an issue with most cameras, NOT the controller (which senses the ADC at a rate of around 120kHz).  The way round this is to use a triggered flash, which is doable if you add an extra wire out and another small circuit.  That said, you could in theory use something else to pop it and play with the delay (or even change the delay code to include microseconds).  A air pellet travelling 1m at 150ms-1 takes about 6-7ms, enough time to trigger and shoot.  Just moving the gun would provide a rudimentary delay of a few microseconds.  Again, apologies about this, i'm going to play about tonight if i can get hold of some balloons, but there are still many uses for an audio trigger, like fireworks!

I've put a quick and dirty time lapse below to show that it works however :)



Don't forget to read, rate and/or vote!

Cheers, Josh

Disclaimer

In the unlikely event that something goes horrifically wrong or you somehow brick your camera/dremel your cat, i am not liable for anything.  By starting a project based on this instructable, you accept that and continue at your own risk.


If you make one of these, or use my instructable to help you - please send me a link/photo so i can include it here!  The response has been overwhelming so far (at least by my standards) so it'd be awesome to see how people are interpreting it.  I'm working on revision 2 as i type ;)


 
Remove these adsRemove these ads by Signing Up
vignesh12302 years ago
Can this be made to have a bulb mode for the D3000? I have no experience in C though :/
Whiternoise (author)  vignesh12302 years ago
Yes, in principle.  The exposure time is set by the camera currently, the controller simply tells the shutter to release.

Provided the controller works to trigger the D3000, all you'd need to do is put your camera in bulb mode. You'd then send one shoot command at the start of the exposure and one at the end. I'm afraid I'm developing the next version of the controller so I'm not sure this code will get updated (the new one will have this functionality), but you could do it by setting the mode to time lapse with the interval set to your bulb duration. That way you get:

1) shot - bulb mode entered
2) interval
3) shot - bulb mode exited
4) interval etc

Not much use if you need shorter times between shots, but potentially doable.  It would mean you get half as many pictures as you normally would in any given space of time.


And i also dont get how you used a MAX619 regulator to give you 5v and 3v, but if i use a 9v battery with a LM7805, i would only get 5v and 9v rails :/ Or do i use another regulator to get it down to 3v?
Whiternoise (author)  vignesh12308 months ago
Because it's not powered with a 9V battery, it's powered from two AA's = 3V rail.
OR could i just use a LM7805 with a 9v battery and Have a only a 5v rail. Then power everything off that (the LEDs rated to 5v) and for the IR emitter (forward V - 1.5) so i guess R = 60/5 - 12 Ohms And then the 5 Ohms from the FET should mean that i only need a 10 Ohm resistor? Correct me if i am totally wrong :) Sorry for all these questions
I will wait for you to create the next one then :) Ill have a couple of read through this to understand it more. Great instructable!

I did have an idea to do something like this but instead of an IR i could connect it to the mini USB port on my camera and somehow program an Atmel chip to send WIA commands.

And also dosent bulb mode need to have its shutter button pressed so it would take bulb? Dosent that mean that the IR has to continually send the shutter open command?
Whiternoise (author)  vignesh12302 years ago
I used 2 AA batteries, hence 3V rail. AAs have a better energy density than 9V batteries and down-converting 9-5V is wasteful. It's much more efficient, albeit a bit more expensive, to use a switch-mode power supply to up-convert the 3V to 5V.

For bulb mode on Nikon cameras, if you are in remote mode (as you should be using IR), the camera takes one shot command to open the shutter and another to close it. The reason I originally bought a proper remote was because you can't use bulb on the camera by itself because of the stupid "hold down the button" functionality.

I looked into commands over USB, but while Nikon provides an SDK for all the fun stuff like shutter speed/aperture control, most of it is wrapped in proprietary DLLs which I'm not happy about using.
So i run everything off 5v if i choose to down convert?... Would i need to put anything between the leds so i dont fry it?
Whiternoise (author)  vignesh12302 years ago
You can run basically everything off 5V, yes. In my design I ran everything off that - essentially you'd have the same system except your +5V rail (in the schematic) comes from a different place. Note that I'm running the IR led straight from the batteries because my regulator couldn't cope with the current; you can run yours from either the 9V or 5V lines.

It's always a good idea to put a current limiting resistor in series with the leds - I generally run them well under the recommended current rating to extend battery life anyway. The exception is the IR led which should be at maximum (something like 50-100mA depending on your precise led) to get the best range.

You can power the status LEDs straight from the AVR through a resistor to ground.
jajmeri8 months ago
Hey, I tried with ATmega8, n followed this schematic........
http://img856.imageshack.us/img856/396/h58d.jpg

But it didnt work. LCD display was full of blocks on the first row.......
Please help
jajmeri9 months ago
OK, 1more idea, just removing the IR circuit n placing a relay switch at that point and simply connect the 2.5mm pins to the relay switch ? bcos simple wired trigger works by closing the switch........
And 1 more, ATmega8 doesnt store the main program we need ATmega328 for it.
Right ?
Whiternoise (author)  jajmeri9 months ago
Yes, that's a simpler approach, although as I said the reason I didn't do that was because my camera didn't have a 2.5mm port and the adapters at the time were expensive.

The Atmega8 absolutely stores the program, I didn't use a 328.
jajmeri9 months ago
Hey instead of connecting IR LED, why not connect 2.5mm jack directly ?
Will this work ?
Whiternoise (author)  jajmeri9 months ago
Yes, but this instructable was specifically written for the Nikon D90 which doesn't have a 2.5mm jack, only the IR reciever. However, the D90 (and most Nikon cameras) does have a proprietary 10-pin port which you can trigger from. You can buy 2.5mm adaptors.

IR has some additional advances, like the trigger doesn't need to be dangling from the camera all the time, e.g. if you have the camera tripod mounted and you want to wander around. Also the 10-pin jack is for GPS connections so if you're geotagging you can't trigger via wire.

If you go the 2.5mm route then all you need to do is connect the jack to a micro via an optoisolator and short the tip and ring to ground.
I was about to order an ATMega8 when I noticed it has an interesting sibling - the ATMega8A is built for a 3V input! Now I'm not exactly experienced, so I was wondering what your thoughts on using that one instead are. I'd run into lots of problems if it functioned different than the version you used in this (awesome) instructable.

http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=ATMEGA8A-PU-ND

Thanks for the help, and AMAZING guide!
Whiternoise (author)  Sushi Warrior3 years ago
Hi, thanks for the kind words!

Atmel lists the 8A as being compatible between 2.7 and 5.5V, so I wouldn't worry too much there if you still want to go with a 5V supply.
http://www.atmel.com/dyn/products/product_card.asp?part_id=4585

I believe I used a 5V converter because the LCD display required a 5V supply (JHD162A), but you may be able to find a pin-compatible one that requires a 3V input.

It would be convenient if you did, since the rest of the circuit would probably function fine with 3V.

Josh
This is stupid i only see a board with: |Max 619| on it.
                                                                |Csa        |
                                                                |O +         |
                                                                |-------------|
This does not help to build it.
Whiternoise (author)  Kitty-Tippie4 years ago
That's odd.. for some reason the entire textual stuff has vanished.

I'm not sure what your problem is?  This step deals purely with a discussion of the power supply.  The later steps show you what should be connected to what.

Buggerit, why has the text gone!
vectragt4 years ago
Hello!

Nice Project!
I build that, but not working (nothing write to  LCD & no LED light up)
How set the fusebit in ponyprog?

What light LED1&2?
What doing the S1-S6?

Can u help me?

Have a nice day!

Whiternoise (author)  vectragt4 years ago
I'm afraid i have no experience with PonyProg.  The fuse bits you need to set are:

Low: 0xFD
High: 0xD5

(Avrdude command: -U lfuse:w:0xfd:m -U hfuse:w:0xd5:m)

What lights LED 1 and 2?  Well, they're attached to two pins (PC1 and PC2) which are controlled by the C code provided.  What are S1 to S6?  They are the switches discussed in the instructable.  

Apologies if it's not clear, but S6 is the "shoot" button.  S5 is "mode" and S1-4 are the directional buttons.  Looking at the code we see: S1 = Left, S2 = Right, S3 = Up, S4 = Down.

It's all in the definitions at the start of the C file so refer to that if you get stuck.

Nothing writes to the LCD?  Do you get any output at all?  What do you have connected to what?  You're going to need to give me a bit more information!

Cheers, Josh

 

Whiternoise (author)  Whiternoise4 years ago
I also advise that you don't just sling everything together.  Start from the beginning and work through it making sure every step works, build it up gradually so you know what's going wrong and what is definitely right.

For instance, no use you trying to get the LCD working if you don't know how the LEDs are controlled.
Thanks reply!

I write the Code\Cannon\main_canon.hex with pony-prog.
Fusebit : Spien,EEsave,BOOTSZO0    CKSEL1
Wiring the circuit! When connect the power than display 1 line all pixel is on.
Resonator is working when powered (See with scope)
When touch Osc1 Pin9 than scrolling random characters and random flashing the led1-2.
What maybe wrong.
Thanks for help!
Whiternoise (author)  vectragt4 years ago
Ok, if you're seeing a single line on that means something isn't connected properly or the LCD hasn't been initialised properly.

Make sure that you've connected up the LCD to the correct pins on the AVR.

I suggest you try building a test file from here: http://homepage.hispeed.ch/peterfleury/lcdlibrary.zip  A makefile is included.

And then running it - don't use the lcd.c and lcd.h from that folder though, use the ones i supply because i mapped the screen to different pins from default.
lynne1234 years ago
Too cool - but Youch - my non-electronics brain is getting a cramptrying to understand it.
Which leads me to a question:
Since you are obviously electronically adept, Maybe you could helpme.  I have been trying to make a large trash can that willdispense a treat when trash is thrown in. I have a cereal dispenser,small electric motor and gears, but have not been able to find a sensingsystem that will trigger the motor for a variable 1-4 seconds, cover alarge area, and sense a thrown object.
Is this something that I could put together with my limited skills? Andwhere would I look for help and supplies?
Whiternoise (author)  lynne1234 years ago
Haha, you're too kind!

Well i'm afraid i've not had that much experience with servos/motors soyou'll need someone else for that.

As for the sensing, well you have a variety of ways.  Anaccelerometer could be used to detect when something lands in it (i.e.vibrates).  You could put it on a spring loaded lid so that whentrash lands on it, the lid goes down, accelerometer detects movement andyou fire your motor for however long you want.

Simpler solution would be to use an optical or proximity sensor (thoughproximity would be easier if you just shell out for a module than buildit yourself out of two ultrasonic transducers).  You put the moduleon the inside of the bin and set it so that it doesn't do anything ifthe distance read back is equal to the opposite side of the bin. When something falls in, the ultrasound signal is bounced back soonerthan expected and the microcontroller (or whatever) can deal with it.

Best bet would be to look on a robotics forum :)

Break your project into chunks.  With the controller, i lookedfirst at how the IR signal worked, then how i would go about making abasic remote, then buttons, LCD, triggering and so on.  Build it upgradually and it'll go a LOT easier than blindly stumbling into acomplicated design.

Supplies, depends where you live.  In the US, plenty of onlineshops - Farnell, digikey, radioshack catalogue, etc.  In the UK,Rapidonline and Farnell are best bets.  Google is your friend!
Thanks for the good ideas. I feel less like I'm stumbling in the dark.

And I'm sure breaking it into chunks will be the best advise yet for helping me work this out.

Thanks again.
Lynne123
i would go even simpler than that... if you just need voltage to go high for a few second to the motor, i.e. no pulses or data, you could just pick up a PIR motion detector and delay timer from an alarm company and wire the motion detector to close a relay for however many seconds when it sense motion in the trash can... it sounds likke you have a very interesting project here and i'd be interested to see how it turns out....

and by the way, Whiternoise, i LOVE this instructable and i LOVE your camera controller... i will definitely be trying this as soon as i can!
to deathfromabove,
Thanks for the great idea for the motion detector and timer. I will be sure to make it an "instructible" if I ever get it done.


rndmnmbr4 years ago
Upregulation is an interesting idea.  Personally, though, I'd gofor 4 AA's. 4 2500mAh NiMH's will produce 4.8v, enough to power theremote, and convenient too since I carry 16 of them in my camera baganyways for my flash, and another 4 won't make that much of a difference(in a pinch, 4 alkalines will work, too, but I wouldn't do it for long).
Whiternoise (author)  rndmnmbr4 years ago
True, the reason i didn't was predominantly space considerations - theenclosure i ordered turned out to be quite small so i could only fit twobattteries in.  Secondly using an upconverter means i have a stablepower supply down to an input of 2V - more than low enough to cope withcrap batteries that go down to one volt when they're running low on "charge".
flemron4 years ago
I must say brilliant read! you sir know your stuff!
Whiternoise (author)  flemron4 years ago
Aw thanks :)

If you enjoyed it that much, consider rating/voting for me in thecompetiton!

</ blatant pandering>
flemron4 years ago
'You should then connect RS to pin , R/W to pin and E to pin .'

what are these pins?
Whiternoise (author)  flemron4 years ago
Whoops, thanks for picking that up - i changed the ports midinstructable and forgot to edit them back in.

#defineLCD_PORT        PORTD       /**< port for the LCDlines   */
#defineLCD_DATA0_PORT  PORTB       /**< port for 4bitdata bit 0 */
#define LCD_DATA1_PORT  LCD_PORT    /**< port for 4bit data bit 1 */
#define LCD_DATA2_PORT  LCD_PORT    /**< port for 4bit data bit 2 */
#define LCD_DATA3_PORT  LCD_PORT    /**< port for 4bit data bit 3 */
#defineLCD_DATA0_PIN   0           /**<pin for 4bit data bit 0  */
#defineLCD_DATA1_PIN   2           /**<pin for 4bit data bit 1  */
#defineLCD_DATA2_PIN   1           /**<pin for 4bit data bit 2  */
#defineLCD_DATA3_PIN   0           /**<pin for 4bit data bit 3  */
#defineLCD_RS_PORT     LCD_PORT    /**< port for RSline         */
#defineLCD_RS_PIN      6           /**<pin  for RSline         */
#defineLCD_RW_PORT     LCD_PORT         /**< port forRWline         */
#defineLCD_RW_PIN      5           /**<pin  for RWline         */
#defineLCD_E_PORT      LCD_PORT   /**< port for Enableline     */
#defineLCD_E_PIN       4           /**<pin  for Enable line     */

This is from lcd.h.

The pins are correct on the schematic to my knowledge (check onabreadboard before you build to be sure): http://img8.imageshack.us/img8/8904/cameracontrollerschemat.png/4743/cameracontrollerschematm.png<br />
From the above, LCD_PORT is PortD.

RS - PD6, pin 12
RW - PD5, pin 11
E - PD4, pin 6
Mig Welder4 years ago
wow nice.
too bad I probably couldn't build something like this :( :)
jamwaffles4 years ago
This instructable is awesome :D it makes me envious due to the fact idont think i could get one to be this good AND the fact i need to dosomething to make an instructable out of! nice job and i really like the results

James
Nice job Josh!

I'm going to start ordering the components this weekend.

Cheers,
Joe
Whiternoise (author)  HowlinPreacherMan4 years ago
Glad you like it, feel free to pm me if you have any queries about schematics/design!

If you're in the UK, irecommend:http://cgi.ebay.co.uk/16x2-Blue-LCD-display-module-HD44780-LED-Backlight_W0QQitemZ270143465646QQcmdZViewItemQQptZUK_BOI_Electrical_Components_Supplies_ET?hash=item3ee5ce28ae&_trksid=p3286.c0.m14for a cheap backlit screen

Otherwise these guys do good deals on multicoloured models (and ifthey're in China they probably ship everywhere):
http://cgi.ebay.co.uk/Character-LCD-Module-Display-16X2-1602-HD44780_W0QQitemZ190336901323QQcmdZViewItemQQptZUK_BOI_Electrical_Components_Supplies_ET?hash=item2c50f6a0cb&_trksid=p3286.c0.m14

Double check the components against datasheets though, i'm pretty surethe list is right but worth making doubly sure - especially if you gowith a different power IC.

Remember you can go with an ATMega8 or anything that's pincompatible, but it needs at least 8k memory!  If you need to changepins, there are defines in LCD.h and my source file for doing so.

Cheers, Josh
Whiternoise (author)  Whiternoise4 years ago
And for some reason my spaces keep getting taken out!
Wow!  Great instructable.

 

Thanks :)

I like the simplicity of your solution though!
chilll20094 years ago
 I will vote ! ! ! I will put 5 stars! ! !
yokozuna4 years ago
I didn't exactly read this all the way through, but it's clear all the proper documentation is there.  Excellent photos as well, props for including the needed code, five stars, great project.
"... my first real project in electronics..."

Your FIRST project involves circuit design, interfacing, programming, - wow!

If this is the standard of your first project, I predict that you will be the guy to invent nuclear fusion within 12 months!

Incredible job!
Whiternoise (author)  Trigger_Happy4 years ago
Thanks!

I am a physicist ;)
kmpres4 years ago
Most impressive!  The detail is just what I need to fill in the gaps of my limited understanding.  I have made many electronic projects, and enjoyed writing about one for this website, but never have I built one so feature rich for the number of components used like this one.  The advantages of "going digital" are readily apparent.  I can see I'm going to have to dust off my as yet unused Arduino and get to programming something useful with it. Well done, and well written, too! 
Berserk874 years ago
Im amazed at this instructable, i didnt read the whole thing, but it goes into so much detail and includes a lot of pictures/schematics, awesome job.

The amount of detail in this makes it looks like someone with no knowlege of electronics/micro controllers could put this together.
Whiternoise (author)  Berserk874 years ago
That was the aim :)

Glad you approve!

The reason for this is that i didn't have that much experience with microcontrollers a couple of months ago.  I  wanted to show that it's really easy to make quite complex/useful devices without much hardware experience.  Having coding experience is very useful, but digital hardware is simpler than analogue in many respects.
firemanfu4 years ago
I must go about building this
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!