Lapse Pi – Motorised Time-lapse Rail with Raspberry Pi

Here’s another article in the series of photography related DIY projects using the Raspberry Pi single board computer. This time it’s a Time Lapse rail.

In this case, I think it’s OK to start with the results, so here’s a video of a few time-lapse sequence that I’ve put together over the last few weeks. Make sure you play it in full screen, and High Definition if possible! :)

Backgroud Music by http://RoyaltyFreeKings.com

So, now that you’ve seen what it can do, here’s how it was done…  Oh, by the way, there’s a lot of pictures, so to save load time I’ve split the post across a few pages.

Page 1 – The plan and some construction shots and info
Page 2 – More Construction
Page 3 – The Circuits, the Code, and a video fo the rig in action

Update

Be sure to check out my updated version of the controller, which includes a touch screen interface!

The Plan

With all the talk about time lapse rails, I though I’d have a go at building one. Especially since the

cost of the commercial solutions were beyond my budget for something I’d probably only do from time-to-time. But now that I’ve got into it, I must admit I’m quite hooked on it! I actually started this before all the other projects, and I’d completed it some months ago, but I hadn’t gathered enough time-lapse footage to demonstrate it’s use properly. I now have a couple of minutes of decent footage, so here goes. Enjoy.

(Standard disclaimer applies, batteries are a fire hazard, wiring them up incorrectly can cause a fire, burning, etc., not to mention possible damage to equipment. Do so at your own risk, etc).

Here’s an image of the Canon 5D MkII on the DIY time lapse dolly, fully assembled, and ready to go.

The Construction

Here’s the finished rail in full.

It can also take a tripod on each end, so you can do rising panning shots. I prefer the low level, wide angle pans, though. The tripod attachments are taken from a pair of salvaged hotshoe tripod mounts, normally used for mounting a flashgun to a tripod. I took off the hotshot part, and bolted the remainder onto the metal plates at ends of the tail. This gives me the ability to put one or two tripods under the rail for elevated pans.

The construction was definitely the hardest part. Over the course of about 3 months, I’d do a bit, think about the next bit, do some more, etc. The legs were the last piece, as dragging along old buckets on which to prop the rail didn’t look cool AT ALL! I picked up the legs (some kind of wall hangers) at a local hardware store for €1 for a set of 2!

Here’s a close up of the dolly, with the tripod head. It’s attached with some 1/4″ threaded bar and a nut.

The Raspberry Pi in it’s clear acrylic case.  It’s powered from a 8 x AA battery pack underneath the dolly, run through the 12v-5v DC-DC converter. The same battery pack drives the motor as well as powering the Raspberry Pi. For the power connector, I used a Micro-USB connector I salvaged off the same car charger from which I got the DC-DC converter.

Another view of the Raspberry Pi on the dolly, this time with a Canon 5D Mark II. The camera is mounted on the head of an old Slik tripod which was too light for normal use, so I removed the head and made up a 1/4″ bolt to attach it to the dolly plate. This allows me to position the camera angle at any angle, and is especially important for the rising/falling pans. It’s important to keep the camera horizontal where there’s a horizon in view.

A low angle shot, showing the skate bearings on the rail.


Page 1 – The plan and some construction shots and info
Page 2 – More Construction
Page 3 – The Circuits, the Code, plus a video of the rig in action


This entry was posted in Computer Stuff, Photography, Tutorial.

56 Comments

  1. Gareth Jones March 7, 2013 at 9:59 pm #

    Great work – must admit I’m in the process (and may be for some time) of building the same thing -taken some inspiration from the focus stacking project, and got the stepper motor bit working. Now need to build the hardware, though I’m planning to invest in an Igus rail – I presume you’ve seen the Chronos project….

  2. Colby March 11, 2013 at 11:42 pm #

    This is incredibly neat! I just have a few questions: What program did you use to render the video? I presume ffmpeg?

    Also, how many shots per minute did you take? Thank you!

    • daveh March 12, 2013 at 9:11 am #

      The frames were stitched together using VirtualDub, which is a great little program for this type of thing.
      All sequences were planned for 24 frames per second, so that makes 1440 shots per minute. However, there are a couple of HDR sequences in there, so I did 3 shots for every frame, so that’s 4320 shots per minute. Kinda hard on the DSLR’s mirror mechanism! ;)

  3. trampa March 12, 2013 at 2:28 pm #

    very good, will try to make some myself, may use a threaded rod instead of a belt, we’ll see
    where did you get the legs? (I’m in Dublin in case you could share where you got them)

    did you say where you got the motor from? just curious

    • Divelikeastone November 29, 2013 at 4:51 pm #

      If you use threaded bar for this, then when rewinding the dolly, the nut on the threaded bar can overheat and seize, unless you cool it, bit too troublesome that with oil or coolant getting everywhere. Been there.

  4. daveh March 12, 2013 at 4:18 pm #

    Legs were in woodies, but they only had 2 left where I got them. Looked like some kind of wall hangers. €1 each!
    And eBay for the motor.

  5. mike March 13, 2013 at 2:27 pm #

    Great writeup…where did you get the chrome ‘pipes’?

    • daveh March 13, 2013 at 2:30 pm #

      Mike, Local hardware store, shower curtain rails! :)
      Dave.

  6. Brian Williams March 13, 2013 at 2:56 pm #

    Hello,

    I’m thinking that most of the parts you used are familiar to professional photographers, because nearly all of them are a mystery to me! I would love to build one of these, but I don’t have a clue about what these parts are or where to buy them:
    skate bearings
    dolly tubes
    timing belt
    mounting plate

    Would it be possible to make a list of parts with their original purpose and where you got them from please? Just a wee bit more detail?

    • daveh March 13, 2013 at 4:54 pm #

      Brian,
      None of those terms are photographic terns! :)
      I sourced most stuff from my local DIY store. mounting plate is simply a rectangular piece of steel, which I drilled myself. Tubes are pieces of pipe, timing belt from auto shop, skate bearings from ebay. Research, research, research! :)
      Dave.

    • Brian Williams March 13, 2013 at 9:22 pm #

      Thanks Dave,

      in that case, would it be possible to get a few more pictures of e.g. where the timing belt is connected at each end? (And what is a timing belt when it isn’t used for this job please?)

      Thanks!

      Brian

      • daveh March 14, 2013 at 1:25 pm #

        Brian,
        I’ll try and get a picture of the timing belt clamps. It’s all made with what I had available to hand, or available in the local hardware store.
        Wikipedia has a very good explanation of what a Timing Belt is.
        Regards,
        Dave.

  7. Emanuele Santoro March 13, 2013 at 3:40 pm #

    Hi!
    Some of the images are just beautiful!
    Is it possible to get them in digital format to use them as desktop wallpaper ?

    Thanks in advance,

    Emanuele

    • daveh March 16, 2013 at 9:59 am #

      Emanuele, let me know which scene, and the resolution you want, and I’ll send you one! :)

  8. Texy March 13, 2013 at 6:26 pm #

    Fantastic work again Dave.
    As the timing for the shutter isn’t quite as critical as for the water drop shots, you could use gphoto2 to control the camera via usb.
    Cheers,
    Texy

  9. Jake March 14, 2013 at 4:54 am #

    Thanks for sharing this, I feel inspired to try this myself and am wondering if you had considered trying curved pipes? I know that getting two pipes curved the same might require some metal fab equipment. But imagine the shot you could get as the time elapse pans over a shot with another axis in play.

  10. Texy March 14, 2013 at 1:32 pm #

    Hi,
    for the toothed pully and belt, try looking at the 3d printer spare parts on eBay.
    They are usually T5 pitch and can be bought together.
    At least, that’s my plan ,lol
    Texy

  11. Bob Pack March 14, 2013 at 3:44 pm #

    I’m wondering if any of your shots used the whole length of the rail and if so, how long it takes to run the complete sequence. Obviously it would depend on shutter speed, but what would be a ballpark figure for a daylight shot vs a night shot?

    I’m also guessing you have to take your laptop with you to start the pi off and adjust the variables according to conditions?

    Would really like to put something like this together myself so just trying to figure out everything that’s involved.

    Thanks for the excellent post though!

    • daveh March 14, 2013 at 4:19 pm #

      Bob,
      Rail length is 1.8m, so if you want 240 shots (10 seconds at 24fps), you’d move 1.8m divided by 240, or 7mm each frame. It doesn’t actually depend on shutter speed.
      If you’re doing 240 shots in day-time, and using 3 seconds between shots, that’s 12 minutes.
      If you’re doing 240 shots at night-time, and using 30 seconds between shots, that’s 120 minutes (2 hours).
      If you want to do a lapse with more frames, reduce the distance moved between each frame. 3.5mm will allow you to shoot twice the number of frames.
      Rgds,
      Dave.

      • Bob Pack March 14, 2013 at 5:07 pm #

        I’m still a little confused. Does this mean you’re just using the camera in bulb mode and controlling the shutter with the Pi? Or is the camera setup, and the Pi just triggers the shutter and waits until it’s done?

        I would have thought if the GPIO pin was set high for a certain length of time, this would be controlling the shutter.

        And how do you configure it on location?

        Sorely tempted to swing by Maplin and B&Q on my way home tonight :)

        • daveh March 14, 2013 at 5:20 pm #

          Bob, Camera is triggered, and then waits. Then moves the camera, and triggers again. You need to be careful that the delay is longer than the shutter speed. Have a read of the Python code, and it might be a bit clearer.

  12. scott m March 14, 2013 at 4:43 pm #

    Thank you – what an outstanding project! very nice tutorial!

  13. Simon D March 15, 2013 at 2:49 pm #

    Love it.

    By changing the track system you can have one with sleepers. This means that your track can be as long as you want. If you make it in sections then you can make a whole Hornby system and run it where you will.

  14. JimmyD March 17, 2013 at 5:55 pm #

    I’m planning on having the rPi trigger my camera as well, but it is a VERY long time since I last played around with electronics. Could you provide what transistor and resistor you have used?
    Thanks

    • daveh March 18, 2013 at 5:43 pm #

      Jimmy,
      I pulled the transistor from an old PC PSU, so I don’t exactly know. It’s a beefy enough one, though. As for the resistor, I think I used 1K.
      Dave.

  15. Isaac Rowberry March 18, 2013 at 1:51 am #

    Was there any welding required?

    • daveh March 18, 2013 at 5:44 pm #

      Isaac,
      I don’t have a welder. All nuts and bolts! :)
      Dave.

  16. Liam Welford March 18, 2013 at 5:58 pm #

    Can you provide any more details about the motor. Is this a stepper motor, or just a standard dc motor?

    If its a DC motor does it have to have a certain RPM, or does it need to be geared down, how are you making it turn (and then move the rig) an accurate amount.

    • daveh March 18, 2013 at 6:29 pm #

      12V DC motor @ 15RPM. Pulse 12V to it each shot. Have a look at the code to see the pulse sequence.

  17. Kasper Holst March 20, 2013 at 9:13 pm #

    This is a very nice time lapse rig. I’m impressed by the build quality.

    In the Shutter Release circuit, what is the purpose of the NPN transistor? Is it used as switch?

    • daveh March 20, 2013 at 9:35 pm #

      Yes, Kasper. It’s a switch. Thanks for the comment!

  18. Clive March 21, 2013 at 8:09 am #

    Thank you so much for sharing this build, I just stumbled across it chatting with someone at work. As I see it you are only restricted to the pole size and timing belt length for Hzl movement? This has really inspired me, thanks once again from Brisbane QLD, Australia.

  19. Darcade May 26, 2013 at 12:17 pm #

    Wonderful photos I will build it for me too :)

    Thx so much !

  20. DBanerjee July 2, 2013 at 5:39 pm #

    Hello David,

    I recently came across your blog and loved each one of the entries. I especially loved the things that you did with the Raspberry Pi. Awesome stuff! Now I am inspired to get on for myself and try the moving timelapse rig and the Drop Pi. I have a question: How did you wirelessly connect your PC to the Raspberry Pi.Did you use a wireless USB adapter? If so, then can you use it outside your home network?

    • daveh July 2, 2013 at 10:54 pm #

      Thanks! Yes, wireless USB dongle, set up as a hotspot, so I can connect in with laptop, phone, tablet, etc.

      • DBanerjee July 2, 2013 at 10:57 pm #

        I am not sure I understood completely. Do you use a wifi adapter to connect the pi to the home network. And then do you ssh to the pi? Sorry about asking so many questions!

        • daveh July 2, 2013 at 11:16 pm #

          No home network. Wifi in pi in master mode, then ssh direct to pi from laptop. Sorry short comments, on phone here.

          • DBanerjee July 2, 2013 at 11:18 pm #

            Got it. Thanks!

      • DBanerjee July 2, 2013 at 10:59 pm #

        Also, where did you buy the timing belt and the pulley from? I am trying to look up that item, not sure what width I would need. When you keep the dolly slanted, what keeps it from rolling down the rail? Is it a geared motor, or is the teeth of the timing belt is strong enough to hold it.

        • daveh July 2, 2013 at 11:18 pm #

          Pulley from eBay. 9mm wide should do. Geared motor, plenty of torque, but also a weight on a pulley to counterbalance camera.

  21. Olly July 9, 2013 at 3:22 pm #

    Hi Dave,

    Great work mate, I love your precision and your neatness. Also, I admire your patience with replying to everybody’s questions and enquiries.

    Talking of which, I have one regarding your timing belt and cog combo, do you know the pitch of the belt you used and the diameter / no. of teeth in the cog? Or was it just a matter of grabbing a belt and finding a cog that fitted?

    Cheers.

    • daveh July 9, 2013 at 6:34 pm #

      Htc 5mm pitch 9mm wide 14 tooth. Had to drill the hole for grub screw myself with a tap & die kit to attach pulley on to motor shaft properly. Short message, writing on phone. :)

      • Olly July 11, 2013 at 8:30 am #

        Awesome, rail in progress will report back with findings and results.
        THANK YOU!! :)

  22. Olly July 17, 2013 at 5:10 pm #

    Hi David,

    I’ve just hacked the remote for the 5d and obviously it has 3 wires, red, white and green (presumably +, – & GND) I’ve figured out that touching red and white together triggers the shutter. So that’s what I’ll be using in my circuitry but what should I be doing with the green wire??

    I’ve noticed that if green’s wrapped around red then there’s no noticeable difference but if wrapped around white then the camera doesn’t show a preview of the shot on the rear lcd screen.

    If left out of the equation altogether, again, no noticeable difference.

    Thanks

    • daveh July 17, 2013 at 8:42 pm #

      White is most likely ground, with red and green being shutter release and focus respectively. You don’t really need the focus for typical timelapses, as your lens will most likely be on manual focus. Rgds, Dave.

  23. laurent August 14, 2013 at 2:04 am #

    Great David, thanks for all the tips.
    I m trying to control my Nikon through a cronjob calling gphoto2 every minute but I have to perform a USB reset after each shot. Would you have an easy solution at hand for this matter?
    thanks in advance

    Laurent

    • daveh August 14, 2013 at 8:14 am #

      Laurent, the latest version of gphoto2 has fixed this problem, version 2.5.2. Are you comfortable compiling the libs and binary from source ?

      • Texy August 14, 2013 at 8:50 am #

        Actually there is a very easy pain-free method of installing and compiling the latest version of gphoto here :
        https://github.com/gonzalo/gphoto2-updater
        Hope this helps,
        Texy

        • daveh August 14, 2013 at 10:12 am #

          Nice one, Texy! I’ll give that a go! :)

  24. Marcus Kösters October 14, 2013 at 10:49 am #

    Hey Dave,
    I really find your work pretty inspiring and fantastic.
    I am definately planning on building a timelapse-rig myself but since you pointed out that your’s is heavy and awkward to transport I will make slight changes to your setup.

    First of all, I’d prefer more security for my camera to prevent the dolly from falling of the rail. I was planning on adding some kind of security-catch or an additional set of skate-bearings under the rails, so that it’s impossible for the dolly to fall off when assembled.

    for the rails, i have too have the feeling that carrying around 2 tubes of 2m length is a bit too much. BUT I am happy to own one of these backdrop-systems: Walimex Background System

    they consist of 2 tripods and 5 connectable tubes of 90cm length each . Using 4 tubes would make 2 rails with 180cm length each. Plus: If you work clever, you could still use them als backdrop-kit.

    What kind of dc motor do you use? Can you perhaps name the model?

    Cheers,

    Marcus

    • daveh October 14, 2013 at 10:59 am #

      Marcus,
      Thanks for the comment! It’s a good point about the rail, I was thinking of getting some pipes that screw together so I can transport easier. But finding pipes that are smooth when assembled are hard to find. Do yours give a smooth surface at the join?
      On the motor, it’s a 12V DC reversible 15RPM model, very cheap on eBay. http://www.ebay.ie/itm/12V-DC-HIGH-TORQUE-High-power-Reversable-Electric-Motor-15-RPM-Gear-Box-/141087624043
      It’s not powerful to move the camera when the rail is at an angle, so I use a weight and pulley as a counterbalance.
      Regards,
      Dave.

      • Marcus Koesters October 14, 2013 at 5:59 pm #

        Hey Dave,

        I am pretty sure that they are pretty smooth (but not 100%) when assembled but doubt that there should be any problems with the dolly. I can try and send you closeup picture of those pipes assembled, as well a pic of the stuff used to put the pipes together.
        Thanks for the specs of the motor! Have you ever thought of using a steppermotor to get accurate steps?

        • daveh October 14, 2013 at 7:14 pm #

          Steppers require constant current for “holding” position, whereas in the DC motor there’s enough holding force to hold the position without current, so uses a lot less battery.
          It would be great to see a close up of the pipe you’re using. I might get one myself, as I could do with a portable backdrop as well! :)

          • Marcus Koesters October 16, 2013 at 3:52 pm #

            I uploaded some pictures of the pipes and the connectors as well.
            Backdrop-System

            a big plus is, that the pipes already have holes drilled in, so that you can non-destructively build a rail out of them.

  25. tommy October 25, 2013 at 4:09 am #

    Hey I am trying to build the same thing I am using this other guys website but I don’t really understand how the circuits are supposed to look can you plz email me a picture of them or something? and not the circuit that’s already on here because I don’t understand it. thanks :)

  26. daveh January 6, 2014 at 10:00 am #

    Great write up on an alternative version of the electronics for this by Per Magnusson here:
    http://axotron.se/blog/electronics-for-the-lapse-pi-motorised-time-lapse-rail/
    Thanks Per! :)

5 Trackbacks

  1. By Slo-Pi on March 13, 2013 at 8:38 pm

    [...] Dave je na svoj blog napisal tudi vodič kako sestaviti takšno napravo in dodal nekaj fotografij ter diagramov. Podobno zadevo pa so izdelali tudi pri SaratogaWeather, kjer so uporabili statično kamero, ki jo je upravljal RPi, tako da je zajel sliko vremena gore Mount Timpanagos v Utahu. Dinamične sistemi, kot je oblikovanje oblakov je pravzaprav težko preučiti v dejanskem času, vendar pri takšni hitrosti vzorci in strukture postanejo bolj jasne, tako da jih je veliko lažje analizirati. [...]

  2. By DISKIDEE on March 14, 2013 at 2:53 pm

    [...] Op zijn website heeft David Hunt de bouw van de gemotoriseerd Dolly gedocumenteerd. Je kan er nalezen hoe je deze DIY cameradolly zelf kan bouwen, met inbegrip van diagrammen en Python programmeercode. Hunt is niet aan zijn proefstuk toe, want vorig jaar bouwde hij een Raspberry Pi bordje in in de batterijgreep van een Canon camera. [...]

  3. By LapsePi on April 22, 2013 at 11:37 am

    [...] ที่มา http://davidhunt.ie/?p=2822 [...]

  4. By Pi-Rex on May 14, 2013 at 9:20 am

    [...] Lapse Pi -Motorised Time-lapse Rail with Raspberry Pi [...]

  5. By CameraPi on May 15, 2013 at 2:28 pm

    [...] Lapse Pi – Time Lapse rail using Raspberry Pi [...]