Sunday 28 October 2012

Motion Control and Timelapse - My short (long) history

Timelapse - Part 1 - The Beginning
Originally written in June 2012

Starting back at Art School I was interested in time lapse and how this captured an unseen world. I started out manually shooting with Bolex 16mm film cameras. I used a simple system of counting a beat and triggering the shutter manually. It was of course quite labour intensive.

Move along a few years after I had left University and started to work for Digital Arts Film and TV. Digital Arts started out doing time-lapse film work and also constructed their own motion controlled cameras. At Digital Arts I worked with a great Cinematographer, Tony Clark who taught me lots about film and the industry. We both went on later to create Rising Sun Pictures along with Wayne Lewis and Gail Fuller.

Moving along to about 7 years ago and a change of career from film to music I started to fiddle around with digital cameras since they now had become  affordable. I saw time-lapse as a great visual partner to  music I was composing in Amongst Myselves.

My first digital camera was the Olympus C70 / C7000. This camera was quite expensive for a compact but it had all the vital controls - external power and total manual control over shutter, aperture and exposure. The only thing it didn't have was a simple way of triggering the shutter. This I had to do with a modified infra-red trigger. The other failing of this method of shutter trigger was the controller could only manager a minimum interval of about 3.5 seconds. All said this was a great camera. Being a compact it didn't suffer from shutter or iris flicker that all DSLR time-lapse people have to deal with today. Here's a link to the forum talking about timelapse and flicker

My first intervalometer that was used to control the Olympus camera was a simple circuit running a 555 timer circuit which triggered the infra-red controller. This controller I managed to velcro onto the front of the camera. The circuit came from somewhere on the web and was for a Super-8 film camera. Here's the original scan from the magazine that the article appeared in.

This circuit used a simple pot for the interval timing but I wanted something that was a little more accurate and easy to setup so I devised and calculated a system of switches with times adjusted with trimpots. The array of trim pots was arranged in series so if I wanted an interval time of 13 seconds I would switch on the 8, 4 and 1 second switches. To control the infrared remote I had a relay (like the circuit diagram) attached. I would now use a opto-isolator chip.

One failing during the construction was that I thought I got the shutter timing correct when testing. Like a DSLR shutter trigger you need to switch the shutter on for a very short period of time say 40ms for it to register a trigger pulse. I made it a little too short and the shutter failed to activate every time. So I had to change a couple of components to make the shutter pulse longer. Problem was this also changed the interval values and I ended up replacing all the expensive 10 turn trim pots. Apart from that it was all good.

I'd like to highlight that today anyone can simply buy a really nice intervalometer "knock off" on Ebay for $10 like the Canon one's I now have for this purpose. But back in 2005 they just didn't exist.

Timelapse - Part 2 - The Track and Dolly

After doing quite a lot of shots with this setup I was eager to get some movement happening and to create a dolly / track arrangement. For this I took some inspiration from Ron Dexter. A legend of the film industry and complete gadget man. I was inspired by Ron's simple drill controlled dolly. He'd created an on the spot motorised dolly simply using some PVC piping and a cordless drill. It was the cordless drill which he mated with the PVC piping via a skate wheel that got me thinking.

The UM7 dolly on it's track
 Above is the UM7 on it's track. At the far end the track is held up with a Manfrotto 190D tripod whereas at the near end it's my Meade LXD75 tripod which is very sturdy and heavy.

The rear view of the UM7

Closeup of the Tamiya Orbital gear box used to slow the stepper motor

Front view of the UM7

Front panel of the UM7

What I came up with is a variation of this idea. This is my first MOCON dolly that I named UM7-MOCON. I used a Tamiya model car gearbox and rubber wheel. The rubber wheel simply ran on the rails using friction to move the dolly along. It wasn't overly accurate and the backlash in the gear box was enormous but as long as you were pushing up hill with the dolly it was perfect. So accordingly I would always setup the track higher (only slightly) at the end to which I was travelling to. This was connected to a small stepper motor and controller. This in turn was controlled by a microprocessor known as a PICAXE. As you can see it's reasonably simple. You can choose from a set of preset intervals, change the direction of the dolly. The panel shows other controls that weren't ever set to work eg. Linear / Log movement controls.  The PICAXE processor was quite simple and I doubt the simple programming language could have pulled what I called a logarithmic move off.  The 2 metre long tracks were a couple of 20mm aluminium hollow tubes with wood inners to strengthen. It was all a little wobbly sometimes especially when it was windy. These tubes were mounted via a couple of home made brackets onto a Manfrotto tripod and my telescope's mount. The telescope's mount was very sturdy and helped to minimise the wobble. To do a movement the computer didn't count the steps as the processor had a limit number of variables which was 16 I think. So I just left the setup to loop. I would have to time my return to the unit so that the dolly didn't run off the end of the tracks. The PICAXE microprocessor is a very simple BASIC computer language driven unit which worked fine for this sort of basic work. But of course I wanted MORE !!!!

(Put a movie of the dolly in action - nice Moxam's one will be good)

The short lived UM9
Before I stepped up to a much more flexible processor I built an intermediate version named the UM9-INT-V2 (PICTURE ABOVE) which was planned to control the dolly and my wonderful pan / tilt head. I had a plan for the pan / tilt head but the lack of engineering ability kept seeing it put off. It did however manage to control my Meade LXD75 telescope. Thanks to the work of Jay Burlage and his Milapse pan / tilt system based around a small Meade telescope system. Jay's code led me to dig a little deeper into the LXD75 and I managed to reverse engineer some software that was used to control it from a PC. Simple really, just listen to what the serial line is doing and emulate it. You can make the LXD75 pan or tilt to 9 different speeds although only 3 are usable for time-lapse the others are too fast.

I have now separated the computer from the dolly. As you can see there is a sort of matrix with leds across the top and down the sides. My goal here was for a control interface that was simple for both the user and the PICAXE to handle. So for any specific project I was working on, I could simply reprogram it to the new requirement. For me the achievement here was more complex I/O control and circuit construction. The unit is full of veroboards which I designed with the help of TinyCAD and VeroCad. I think it was a necessary step towards the UM12. It also has it's own small SLA battery and voltage regulator to power either the Olympus compact camera or my new Canon 1000D DSLR.  I had great plans for the UM9-INT-V2 but the PICAXE range of processor are very basic in their abilities and quite expensive. Then I discovered a processor which had was much better, cheaper and great support. Later with that though.

It was also during the stage when I had bought my first DSLR, the Canon 1000D, where I learnt the failings of using a DSLR for timelapse which are the dredded flicker.


At this same time I built the UM11-Dolly2 (shown above). I took things a little more seriously and looked towards the future for a full system which included pan / tilt. I wanted a dolly that could do multiple passes in both time-lapse and real-time as I had a project in mind at the time. The accuracy is all down to the stepper with a microstepper controller running in 3600 steps per rotation mode locked to a stretched cam belt as a drive mechanism. It works really well. Quality stepper motors start at 200 steps per rotation but using a microstepper controller you can get up to 25000 steps per rotation using a method of goat sacrifice and black magic. This idea of motion came from one of the systems I worked with back in the days of Digital Arts. Unlike the first dolly (UM7) this unit uses bearings as wheels which run along the aluminium tracks but the movement is all done via a cam belt and cam gear. The tracks have also been updated to 3 metres in length and the tubing has 5mm thick walls. Unfortunately this still needs to have 3 tripods to avoid the tracks sagging in the middle. One of the failings of my approach is instead of the camera being mounted on a tripod which is on a dolly I've decide to elevate the track instead. This does make for a smaller and lighter weight dolly.

It's a habit I can't get away from. No sooner have I finished a project, I'm starting to think of a more complex unit to replace it. It's all a part of my learning process. But I needed to make the UM9-INT-V2 as it was the first time I'd designed up some boards, albeit on veroboard. The plan was now to create something with which I could expand by means of software and the hardware would be created in the initial place to control a more complex system of dolly, pan, tilt, lens (focus / zoom) and more. What was holding me back is the microprocessor, the PICAXE, as it was never really intended for much more than a learning tool. I needed something that was no going to limit my needs.

Timelapse - Part 3 - The Final Frontier - well maybe ...

UM12vB - note the removal of the Data Entry knob and additional push buttons

The UM12-MOCON is probably the be all and end all for me. The initial map for this unit is to have a key frame based time-lapse and real time motion control computer. The unit has had an upgrade in the processor department as well. I'm now using the wonderful Arduino Mega2560 processor. Lots of memory, I/O and speed. The initial version of the software is reasonably basic. You can set up start and end points along the dolly and set any number of frame intervals. Much of the testing and ground work for the final unit is done though I've only implemented this basic system. The unit is also setup for real time which I used for the Amongst Myselves - Ambient,Landscape and Space DVD. This we shot in real-time using my new camera, Canon 5D Mk2, in video mode and did numerous passes. It was incredible how accurate it was. As you can see the new controller has lots of buttons and LEDs. The programming language of the Arduino is C which is pretty straight forward and easy to work with. The extra circuit work has grown but still reasonably easy to work with but simpler than the previous PICAXE system. This unit has all the I/O's to work with 6 axis of control of which could be expanded.

Last year I splurged out and purchased a ServoCity 785 Series Pan/Tilt  head. This unit ships with servo motor control and is intended for video work but I was confident that I could get it working with stepper motors instead. Along with the pan / tile order I ordered a couple of 203 tooth gears (one for the pan and one for the tilt) to help with the step count . Along with a microstepper controller on the stepper motors running at 3200 step per revolution I think we can get timelapse to be smooth. I've already tested out the tilt and I've managed to get NO backlash which I found amazing. I've a small 1kg torque stepper moving the tilt quite fast carrying my Canon 5D along with a 17-40mm L lens. The plan for the project this year is to get both the pan and tilt working. I'm pretty confident the Pan will be just as easy though it's a question of the stepper motor size due to added weight.

The question of the track system is one of my major concerns. The weight is starting to add up. One idea I have is to use some lighting truss with which I can attach my tracks to. This will give me the strength and keep the tracks straight and stop any sagging. As for the tripods beneath this weight I'm still thinking about that one. The rest of the world elevates the camera and not the track but that leads to a large dolly and hence large tracks. OCT 2012 UPDATE - The track has now been built which is a heavy duty ladder with the tracks mounted onto it.

So the plan for 2012 is to complete the 3 axis system. The system will be key frame based, can have linear and smooth movements in both time-lapse and real-time. All parameters can be animated via the key frames including interval and exposure times. Store moves. The list is endless.

Of course now I've a plan to change the connection between the UM12 controller and the UM11 dolly. I was starting to worry about the number of cables the dolly would be pulling around so... the wonderful world of wireless comes into play here. Arduino's apparently work well with Xbees. Xbees are point-to-point wireless radio modules and communicated over the airwaves and use basic serial protocols. So the plan is for all the controlling to take place over the airwaves and have another Arduino in the dolly. The controller box will do all the programming and once a final shot movement has been previewed and accepted the data is transferred to the dolly computer and run from their. No need for the main controller. This then leaves the dolly with just the 24vdc power from the battery pack. Nice but all theory at the moment.

There are some great off the shelf units designed and made by people like Jay Burlage like the Digital Perception dolly which runs under the Open Moco system developed for the Arduino. But for me part of the challenge is to make my own system and for the life of me I can't find an affordable track / pan and tilt system.

Check out these places for more information:-

September 2012 Update

I can happily say that I am about 80% through the completion of the UM12vB. Yes it's version B. I've updated the hand controller with extra keyframes, control buttons and I've also removed the dial.

Currently I have a full keyframe system working using a simple ease in and out method based on some code thanks to Dan Thompson which I think may need changing in the long run. Essentially it is a point to point system. There are 7 keyframes which are these point. What I don't have the ability to do is to place a point within a move. This would need a more complex bezier type system which I am willing to investigate once this system is working. To implement a bezier system will be much easier once the system in complete as all I will be doing is modifying the keyframe system within it's current limits. But I will probably attempt to do bezier in the future.

The dolly or master controller contains a ChipKit Mega32 processor which is essentially a Arduino but running at 10 times the speed and has 256K of SRAM. This was all needed to achieve real time movement. But I think the whole realtime movement is only going to be good enough for previewing of timelapse shots. The whole structure of the dolly is too large and the wobble of movement is quite excessive. I will look into modifying the dolly structure to limit this but only if I can see the real time method being made fully possible and usable as a filming method.

The whole wireless process works well but I've not implemented a proper ACK and NACK system. Although my method gets around this. The hand and master controllers are constantly updating each other with position data which does check for inaccuracies.

I've implement a zoom and focus motor into the equation. I've only just recently got one of the motors working.

The track question has been solved. What I have done is mount the two 3 metre tracks to an aluminium ladder which gives us the vertical strength that is needed to move this large 10kg dolly. I've also decided that it will mostly live on the ground with the help of small sand bags. I've a plan to test out elevating one end of the track onto the telescope mount. This will give a nice elevation element to shots but I will need to modify the dolly plate to counteract the angle. My main concern here is the power of the dolly motor to be able to move this weight at the elevated angle. Stay tuned.

Current State - September 2012

I've just gone through a method to smooth out the real time as much as possible in software by loading up an array with the pulse values. I'm not so sure this is better than the previous method of calculating on the go and that the hardware is possibly more to blame as far as stability is concerned.

The next software step is to implement the timelapse running routine which includes the use of the variable interval and exposure keyframes. This should be straight forward.

The hardware front I need to modify the focus motor assembly as I've recently replaced the motor gear with something much smaller. I need to make up an identical zoom motor assembly.

I've just added some rubber to insulate the tracks from the ladder runs to avoid friction. These need to be cable tied down. I also need to make up the middle track guide. One concern with the ladder assemble is that it had a horizontal movement and may need some bracing but this is reasonably easy affair. I also want to add some sort of rubber feet at the base of the ladder. Once this is completed I can test to see if the whole elevation method is possible and if so will continue on to make up mods for this to work. Again the dolly will need to be modified and I have already researched a method on how to make this assembly.

Better late than never

In a vain attempt to keep up with the modern world and ways of presenting my work I've started up this rather late blog for my interest in Timelapse motion control photography.

My current hardware project - UM12, is about 75% the way towards completion.

The requirements of the this unit is for timelapse using a DSLR camera with realtime movement for preview purpose. Not to rely on mains power or a laptop computer due to remote locations that it's likely to find itself in.

What I'll put up here is all my problems and solutions to both hardware and software.

But first I'll list off the basics of the hardware in the current version I'm working on as of this moment.

The system has Track, Pan, Tilt, Focus and Zoom which are all controllable. Added to this is also the ability to animate (control) Interval and Exposure.

The hardware itself is based around a Servo City 785 Pan and Tilt system attached to a custom made dolly running on a simple pair of 25mm aluminium tracks mounted to a ladder.

Closeup of current controller on Dolly which contains the ChipKit Max32 processor and 5 Easydrivers

All the motors are stepper. All motors are controlled by EasyDrivers v4.1 except the Track which is controlled by a Leadshine M542 which gives higher microstep abilities. This said I'm in the process of purchasing replacement controllers for all the steppers except the Track. The reason is I've recently realised that the EasyDrivers 1/8 step mode (1600 steps/rotation) is way too large for my system. I will replace all these with Leadshine "DM422 Anti-Resonance Stepper Motor Drivers" which has a higher stepper rate up to 51000 per rotation, although I plan to use about 12,000 steps/rotation.

There are two computer controllers in the UM12. One is mounted on the dolly and this is centred around a ChipKit  Max32 board. I call this the Main Controller. The other processor is an Arduino Mega2560 which is contained in the Hand Controller. The two units talk to each other via Zbee wireless. The reason for using a ChipKit Max32 over an Arduino board is that it runs several times faster which is necessary for realtime movement, and has much more SRAM for storage. It also runs Arduino code making for easy programming.

The older version of the Hand Controller - the new version has 7 Keyframe buttons and extra Command buttons. Note that I also removed the Data Entry wheel at the top left.

The reason for splitting the processors like this was to avoid having too many cables dragged by the dolly when moving along the track. At the moment the only cable that does hang from the dolly is the power line which is both 12 and 24 vdc coming from a battery pack.

As mentioned, one of the main requirements for this system is that it doesn't rely on an external computer like a laptop or need a mains power supply. Many of the places I travel to for timelapse doesn't have mains power. Of course charging the batteries is still an issue but I do have plans for a solar panel to deal with this. Another related problem is I still need something to download my gigabytes of photos to ?

The dolly mounted on it's new track system for the first time
As you can see from the above picture the dolly is moved along with the help of a cam belt. The motor for the dolly is mounted underneath the dolly. Three metal bearings on each side of the dolly run on the tracks.

The Pan and Tilt axes have a 203 tooth gear meshed to a 20 tooth gear mounted on the stepper motor to allow for finer movements but currently this is insufficent until the stepper controllers are replaced.

The dolly's processor or Main Controller also contains the shutter controller and power regulator to supply power to the camera. I currently plan to run 2 different cameras on this dolly, a Canon 450D and 5Dmk2. The 5D is primarily used for night time star work and the 450D will be used for most other work.

The current, portable power supply is two 12v sealed lead acid battery rated at 18 amps which are wired in parallel to give the 24vdc. This can be seen in the above photo sitting against the window. It's all mounted inside a plastic toolbox which also contains another project I built for use with my telescope.

The Hand Controller can have 7 keyframes which represents a position per axis which includes Interval and Exposure. The movement types are currently linear or a simple ease in / ease out movement with various weighings. I plan to also look into bezier type movements once the system is up and running. Added to this, each keyframe per axes can have a pre and post hold frame value. I can vary the number of total frames, sub start and end frame position, save shots and load saved shots back in. Since the types of moves are more complicated than a simple dolly move I have a real time preview ability as to show what the shot will look like.

So that's the basics. There are several issues at the moment. As mentioned above the replacement of the stepper controllers is needed and I am having issues with wobble due to the bulk of the unit which I'm looking to reduce.