DSLR Master
Written by Dave Grennan   
Thursday, 16 July 2009 22:39

Build your own microcontroller based unit for controlling the shutter on a Canon 300D or 350D digital SLR camera.  Included are full circuit diagrams and firmware for programming onto the microcontroller. Version 1.2 firmware now available.

 

 

v1.2 Fixes/Additions

Bugfix:  Shutter did not release unless camera type was set.
Addition:  Pressing button 5 for at least 1 second during exposure cancels that exposure session and closes the shutter.  This avoids having to reset the unit if a session goes awry.

Note (05 November 2008)

An error in the power connections on the main MCU circuit has been noted and fixed on the circuit diagram.  Thanks to Henry Scheun for bring these issues to my attention.  Please note Pin 14 (Vdd) on the MCU should be connected to ground and Pin 4 (MCLR) should be connected to +5v via a 4.7K resistor.

Please note any links provided are given for informational purposes only and are not meant as an endorsement of these products.

Anyone who has attempted any kind of serious astrophotography will know well that sometimes the gear can get in the way.  If you have a mobile setup then it is important to keep it all as simple as possible.  I often thought, wouldn't it be nice to be able to control my Digital SLR's shutter automatically but without the overhead of having a laptop in the field.  I am a great fan of Chris Venter's DSLR Focus. This is a great piece of software which allow remote operation of a DSLR camera and provides much more besides. Saying that I often long to leave the computer at home so I began thinking of ways around the problem. It crossed my mind that such a task as opening and closing a shutter should be a simple task for the modern breed of microcontrollers such as the PIC range from Microchip Technologies Ltd

As such, I set about designing a circuit which could make use of such an MCU. I set out some design goals.

Feature List

I think I have acieved my goals and added the following features;

  • Fully standalone (needs no PC)
  • Supports Canon 300D/Digital Rebel and Canon 350D/RebelXT
  • Integrated LCD display
  • Supports mirror lockup on 350D.
  • Allows up to 99 exposures of up to 1 hour to be scheduled
  • Allows delay between exposures up to 1 minute
  • Stores settings in EEPROM so that they remain next time you start the unit.
  • Supports standard serial port long exposure cable (this cable also works with serial-usb adaptors)
  • (You can make this cable or buy one pre-made by Hap Griffin)

The Circuit

PLEASE NOTE THIS ARTICLE IS PROVIDED AS A SERVICE TO FELLOW ASTROPHOTOGRAPHERS.  DO NOT BUILD THIS CIRCUIT UNLESS YOU ARE KNOW WHAT YOU ARE DOING.  I TAKE NO RESPONSIBILITY FOR AND DAMAGE YOU DO AS A RESULT OF BUILDING THIS DEVICE, NO MATTER HOW THIS IS CAUSED.  I BUILT THIS DEVICE FOR ME, IT WORKS FOR ME. I HOPE IT WORKS FOR YOU TOO, BUT IF IT DOESN'T PLEASE DO NOT BLAME ME.  i WILL OF COURSE TRY TO HELP YOU OUT WHERE POSSIBLE.  BUT I CAN ONLY DO SO IN MY SPARE TIME.  I MAKE NO WARRANTIES.

(Click on any  circuit diagram for a higher resolution version).

This is the voltage control part of the circuit.  Its function is to deliver the required 5vDC to the MCU and LCD display.  Watch out, the voltage regulators can get quite hot.  You should use an appropriate heatsink.
This is the switch control part of the circuit.  You may build this on the main circuit board or perhaps you might like to turn it into a separate hand control unit for the device.  The choice is yours!
This is the'brains' of the outfit.  The control circuitry for the MCU and LCD will be familiar to anyone who has worked with these devices before.  The 'Secret' (so to speak) is the program code you program into the MCU device.

 

I quickly put together a circuit.  I chose a 16x2 backlit LCD using an industry standard HD44780 controller.  These can be picked up easily from your local electronic supply shop.  I chose the 16F628 MCU since it has enough pins and has 2K of flash program memory (I'm not a very tidy programmer).

Here are the circuit diagrams.  Anyone with the basic ability to read a schematic will have no problem putting this together.  The reason I split it into three diagrams is that I feel it would be best to break the curcuit into 3 distinct stripboards so that it fits inside a project box.  Also, I think it shows that the circuitry is rather simple and will not discourage the beginner as much. You can of course make this all on one stripboard (as I did).

  • The voltage control circuit (supplies a regulated 5v supply to the main logic circuit)
  • The MCU circuit (This does all the hard work)]
  • The switch panel (This provides the 5 buttons which are needed to operate the unit.)

However you decide to build the circuit take great care to connect the correct switches to the correct ports on the MCU.  You should also give thought to reserving a rail on the strip board for 5v and the ground plane as there are a few connections needed to go to these. Also note the linear potentiometer.  This is required to control the contrast on the LCD screen. You may need to use a higher or lower resitance for your particular LCD .  Pay particular attention to the data sheet for your LCD controller for specific directions with regard to this.  Note the circuitry is unlikely to work with any LCD which doesn't implement the HD44780 (Hitachi) standard.

Keep in mind that the MCU is a static sensitive device.  Implement static safe work practices to avoid damaging the unit.  Ground yourself by touching an earthed metal object such as a radiator or use an anti static wrist strap (best).  Also do not handle the MCU by the pins.  Take care to insert it into the socket the right way up!!!!!

 

Parts List

Description (RS stock number where known)

  • 1 x 16x2 LCD display (HD44780 compatible)  (RS:294-8774)
  • 1 x Power Connector socket for 12VDC in.
  • 1 x 1N4007 diode (RS:261-980)
  • 1 x 220uF capacitor (RS:228-6773)
  • 3 x 100nF ceramic capacitors
  • 1 x uA78L05ACLP 5V Voltage Regulator. (RS:810-295)
  • 1 x LM78L12ACZ 12v Voltage Regulator . (RS: 535-9981)
  • 2 x 1N4148 signal diodes (RS:436-7357)
  • 1 x PIC16F628-04/P MCU (RS:379-2869)
  • 1 x 18 Pin DIP socket (RS:479-8543)
  • 1 x 4Mhz Crystal (RS:226-1550
  • 2 x 22pF ceramic capacitors.
  • 5 x Push To Make (PTM) tactile switches (and caps if desired)(RS:378-6729, CAPS:RS:378-6943)
  • 1 x 9PIN Sub D socket.
  • 6 x 16K resistors
  • 1 x 5V LED
  • About 1 metre of signal wire
  • Stripboard about 100mm x 150mm will do

You will also need a PIC programmer to load the firmare onto the MCU.  If you don't have one you can do a couple of things.

  • Buy One (duh!)
  • Build One.
  • I can supply a pre-programmed MCU for cost plus shipping.
    • €6.00 Ireland/UK
    • €7.00 European Union
    • €9.00 Rest of the world

The above just covers my cost for the MCU and postage. (Please note due to a bug in the firmware, I will ship v1.2 MCU's in early January 2007.)

To purchase send me an email via my contact page.  Include your name postal address.  I will reply to your mail with a paypal request for payment.  You can then pay this via Paypal. I will then send you on the programmed and tested MCU.  Please note:  Most times I can send the next working day, however during busy periods at work (i got a full time day job like the rest of you) it may take me up to three days to post.  I will send you an email once the MCU has been posted.

The Software (FIRMWARE)

I provide fully featured PIC code to drive the unit.  As mentioned above you will need a way to program the code onto the MCU.  I wrote the code in PIC Basic.  The compiled code is designed to fit in the 2K of memory provided by the 628MCU.

So how do you get the software?  Before I tell you that I want to tell you about my motivation for publishing all of this.  As mentioned in the beginning I am primarily an amateur astronomer.  Secondly I am an electronic hobbyist.  I enjoy nothing more than integrating my two hobbies and coming up with gadgets to do useful stuff for astronomy.  I would be thrilled if a few people made and used this unit.  I would be even more happy if with the help of people out there we could jointly work together to add even more features (maybe support for more cameras).  If you fell you can help with this aspect please let me know.  So whats all this got to do with the software?  Well to ensure that this gets used in proper spirit of public domain I am publishing it with some simple terms which you must agree to before downloading the software.  Basically I want you to agree that you will not use my work for profit and you wont blame me if you get it wrong!  Many of you will be familiar with the excellent work of Steve Chambers who provided us all with instructions for modifying webcams.  All Steve asked was that the spirit of open source be honoured.  My little contribution is nowhere near as significant as Steve's.  However I do think it is useful.

 

Instructions For Use.

I've tried to keep the operation of the device as simple as possible.  When the device is powered up first you should see the following message on screen.  You need to use a 12vDC power supply which can deliver no less than 500milliamps (mA).  The power supply should be centre positive.  If you get the polarity wrong, a diode is in place to prevent damage to the LCD or MCU.

You should see this this text  when you first power on the device.  If you don't, try adjusting the potentiometer on controlling the contrast display of the LCD panel.  If you still dont see anything on screen you need to go back and check your hardware and that the PIC device has been programmed correctly. Once you see this message you know your device is working pretty well.

At any time while the above message is on screen press button1 (see button diagrams below) to enter setup mode.  Here you will ba able to select your camera type and set an adjustment for mirror lockup.  NOTE: You still need to set mirror lockup in your camera.  The device only allows for the extra time taken for mirror lockup in the exposure sequence.

The above diagram shows how the setup feature works.  Buttons one and two scrolls through the menu options whil button 5 selects an option/setting.  You should only need to enter setup occassionaly as the settings you choose are stored permanently in the device.  The options are;

  • Camera Type - Canon 300D/DR or Canon 350D/XT
  • Mirror lockup - On or Off
  • Mirror Lockup Time (In seconds)
  • Exit Setup.

Once setup is complete its time to setup your exposure sequence.  The following shows how the buttons work once you have left setup mode.

The above is fairly self-explanatory (I hope).  Buttons 1 and 2 increment and decrement the minutes.  Buttons 3 and 4 control the seconds.  While holding down the shift button, buttons 1 and 2 control the number of exposures and buttons 3 and 4 control the delay between exposures.  When button 5 is pressed the sequence is stored to memory (so you don't have to re-enter if you reset the device) and the exposure sequence begins.  Below is an example of what the sequencing screen looks like;

 

NOTE:  I have found a bug in v1.1 of the firmware.  If you press begin and nothing happens this is caused by a bug in the firmware.  I will fix this in version 1.2 coming soon.  Until then you can workaround by entering setup, changing the camera type, and then changing it back again.  The camera should now fire correctly.

Also in version 1.2, I plan to implement shift - button 5 to cancel an exposure sequence.  For now just reset the device.

PLEASE READ THE FOLLOWING CAREFULLY BEFORE DOWNLOADING

 

The firmware provided for DSLR Master is provided (as is). Although every effort has been made to ensure it's function. The author cannot be held responsible for any errors or omissions. The firmware is available free of charge however it is not freeware. You can reverse assemble the code if you want. You may modify it anyway you want. However you agree to send me (Dave Grennan) a copy of any modifications you make for the benefit of others. You MAY NOT sell this software in any shape or form. It may not be used as part of any commercial product unless the sum of five european euros, per unit sold, is donated to the charity GOAL which works to alleviate suffering in some of the poorest places in the world. Should you like this device and feel like contributing, please make a contribution to GOAL. You are under no obligation to make any contribution if you receive no more money than the cost of the component parts. In short if you profit from selling this device you must contribute to this particular charity. I have a number of other useful devices which I will share with the community in future. However if anyone abuses that by making money from my work then it will not happen.

 

BY DOWNLOADING THE FIRMWARE YOU AGREE TO THE TERMS ABOVE.

 

 

Download dslrmasterv12.hex(v1.2)

(Right click and choose 'Save Link As')

 

Latest Images