Arduino and the Taos TSL230R Light Sensor: Getting Started

•November 13, 2008 • 84 Comments

The TSL230R light sensor IC is an interesting package: a light sensing circuit wrapped up in a clear plastic casing. This neat little device will convert irradiance (the light energy on the surface of the sensor) into frequency. Working with a simple input concept like a frequency means that we won’t have to build any extra circuitry to get the full range of information from the circuit, and having an accurate measure of radiance means that we’ll be able to convert easily over to illuminance, which is how the light looks to us. Obviously, once we can answer the question about how light looks, we can use this information to control other things. (Some great examples are: camera exposure, dimming displays, machine vision, etc.)

This guide is intended to walk you through the basics of interfacing the TSL230 series of chips from Taos with your friendly Arduino microcontroller. The specifics of the chip’s operation may not be painfully obvious the first read over the datasheet, but this guide expects you’ve at least read the important parts: which pins are which, that you can change its sensitivity, and that you can change the scale of the output.

Continue reading ‘Arduino and the Taos TSL230R Light Sensor: Getting Started’

Big Bend National Park – little places

•October 10, 2008 • 6 Comments

Time-lapse clips from my recent trip:

Back from Big Bend

•October 3, 2008 • 2 Comments

Went out to Big Bend National Park this past Sunday, and got back last night. Nothing like four, quiet-filled nights of complete solitude in the desert to get a man back on his feet and ready to return to the city! Returned from my third yearly exodus to the Chihuahan Desert un-harmed, save a few cactus spines and some bug bites here and there.

My original plan had been to shoot lots of photos and time-lapse, spending two nights in the Telephone Canyon area along the Old Ore Rd, and then moving onto one night at the base of Juniper Canyon, then a solo overnight trip up the canyon to the South Rim, to shoot sunrise/sunset with a great view, then back down and one night at the Fresno site near Mariscal Mine, to shoot some time-lapse of the mine there. However, by Tuesday, my plans had changed due to the complete lack of any clouds in the sky (I’m obsessed with good clouds when shooting landscape =), and the disturbingly thick haze. Visibility was limited to a few miles, and photography a much more difficult task. With a thick haze and no clouds, my plans to shoot time-lapse from the South Rim were largely dashed, so I changed my plans to spend half a day going out to Terlingua, then day-hike Juniper Canyon, and then skipping out on the mine (which I’ve been to every time I’ve been there), to spend some time nearer the basin at Croton Springs.

On my first day-hike, I had intended to leave at sunrise and hike up the Telephone Canyon trail to either the Strawhouse trailhead or the canyon its self by lunch time, and then turn back. Expecting to make good timing, I took a liter and a half of water, and set out. Of course, the morning is always beautiful on the TC trail, but like last year, my plans were quickly dashed. Last year, my best friend and I tried the same hike, but got distracted before we’d even made it a quarter of a mile down the trail — we set off down a gully on an attempt to climb Alto Relex, which of course we succeeded in – eating our lunch on the mountain top. This year though, I was first slowed down a bit by the difficulty in following the rarely-hiked trail through the rocks and thick brush – trying to squint into the rising sun to find the cairns. As soon as the terrain got easier, and the trail less difficult to follow, I moved into a brisk 4 1/2mph walk – expecting to make up my lost time this way. Given that it’s still morning, I’m of course looking at any rocks in the sun in my path for sunning snakes. I’m not, however, looking down in the shady spots like the little gully crossings, and this almost proved to be the trip’s undoing. Moving a little less carefully than I should, down into a gully I get one of those “internal danger” alerts. You know, that feeling you get right before you do something incredibly silly that results in broken bones or your girlfriend scowling at you for a week… I stop my step, and pull back, to see that I had come within six inches of stepping right on a black-tail rattlesnake. Too cold and too reliant on his camouflage to even rattle, I would’ve certainly had an issue had I stepped on him. Realizing that I should slow down, I brought the pace back to just below 2mph, and there went all of my plans for the hike. By 11am, I had just made it to the first trail intersection, barely even halfway to the Strawhouse Trail, with almost 4 miles to go to the canyon. Without a cloud in the sky at the moment, and already sweating and having drunk a half-liter of water, I sat down, ate a snack, and then turned my happy butt back around. The TC trail is not one to push yourself on, given that it may be a week or more before anyone else tries it this time of year – and they’ll likely stop in the first couple of miles and turn back, as I just did.

That afternoon, I would head back up to Roy’s place ruins, and shoot some time-lapse there, while the last clouds I’d see for the week passed over, and then explored to creek bed to the north of the Telephone Canyon 2 site. (Just follow the old, blocked off road north for a few hundred yards, and then a wonderful creek bed can be hiked east quite a ways.) The last night at Telephone Canyon would be spent shooting some sunset time-lapses and drinking beer.

Tuesday morning, I made a quick drive out of the rest of the Old Ore Rd, southbound, not spending much time to explore, as last year we had done plenty of that here. Of course, you should spend time to check out the large creek bed with lots of Tinaja’s about halfway down the rd. Just notice when you head down into a tiny valley, and then see a large gravel wash to your left. Park in this wash, and then head down the creekbed, a few spots require careful footing to continue down, but reaching the bottom is well worth it, with every other rock having a fossil in it.

Made it back to panther junction and informed them of my plan changes (they were warning me against taking the juniper canyon trail to the south rim, they seem overly cautious, but they’re probably used to less well-prepared travelers. Their warnings of “oh, that’s a 4×4 only road” [of course, I have a great 4×4, and there’s nothing out there that actually requires me to put it in 4-wheel-drive.] were usually found to be a wide, beautiful, fast-driving gravel road.), and then headed on to Juniper Canyon, and made a quick 2-hour hike of the first half of the trail. Almost regretted ditching my plans to backpack up it, but not having to assemble my pack seemed like a good compromise. =) Twisted Shoe is a great campsite well away from all of the others – the kind that can offer peace and quiet even during the crowded winter season. The road leading there, again, rough riding but easy enough for almost any vehicle to make it.

The next day took me to Terlingua Ranch and Terlingua. Neither feeling worth the drive, but the drive through the Terlingua Ranch Road, and the Christmas Mountains worth the let-down. Terlingua can barely lay claim to being a ghost-town as the do, but the cemetery offered some great photo opportunities. It was hot on the Old Maverick road that afternoon, reading 91F ambient (feels like 120 in the sun), but the ability to hold a high speed on this easy road kept the roof temperature pretty low… The Jeep JK is well-known to become a bit of an oven with the black, uninsulated fiberglass freedom top. Out here, it’s better to just roll the windows down than run the A/C – the moving air will do a better job to clear the heat out of the upper reaches than the A/C will.

Finally, camping nearer to civilization at Croton Springs, I took an easy evening hike up the creek beds until some water made it impassible, then hiked the nearby rises until I had just enough light to make it back. A nice dinner and some decent sunset time-lapse rounded out the trip.

Can’t wait to go back! Just wish it wasn’t 600 miles away =(

Here’re a few snapshots, I didn’t take many of these, but I did shoot over 40 gigs of time-lapse and landscape shots. Anything worth keeping will find its way to my photo blog.

Old Ore Rd Near McKinney Springs

Old Ore Rd Near McKinney Springs

Approaching Alto Relex in the McKinney Hills

Approaching Alto Relex in the McKinney Hills

Roys Peak from the Telephone Canyon Trail

Roy's Peak from the Telephone Canyon Trail

Black Tail Rattlesnake

Black Tail Rattlesnake

TC #2 Campsite

TC #2 Campsite

Creekbed NorthEast of TC#2 Campsite

Creekbed NorthEast of TC#2 Campsite

The Jeep Poses in the Sunset

The Jeep Poses in the Sunset

Time-lapse Shooting

Time-lapse Shooting

At 2.7lbs, a Veritable Taj Mahal

At 2.7lbs, a Veritable Taj Mahal

Southbound Old Ore Rd

Southbound Old Ore Rd

Rd. to Juniper Canyon

Rd. to Juniper Canyon

Trail Into Juniper Canyon

Trail Into Juniper Canyon

Campsite at Twisted Shoe

Campsite at Twisted Shoe

Terlingua Ranch Rd.

Terlingua Ranch Rd.

A Stones Throw From Mexico

A Stone's Throw From Mexico

Sunset at Croton Springs

Sunset at Croton Springs

DIY AC Adapter for The Pentax K10D and K20D

•September 26, 2008 • 15 Comments

Milapse pointed me out to this image showing the part # from digikey that works perfectly as a male cable end for the K10D’s 8.3V DC input. So, a few parts later, and a couple of hours of soldering and testing, and I now have a power supply for the K10D that lets me hook up to:

  • 12V Cigarette Lighter Plug
  • 12V AC->DC adapter
  • Any one of my 12V SLA batteries

Note: The K10D and K20D share the same AC adapter (D-AC50), so this design will work for both cameras.

All can be done for less than the price of the standard Pentax D-AC50 AC adapter, and a few hours of sweating over a hot iron =) Namely, I can now run the camera from the same 8Ah battery I run the TLA from, meaning I only have to charge one battery out in the field! (Try getting enough engine time to charge the big SLA, three NiMH’s, a laptop, etc..) And, you know, I can run it on AC inside of the studio!

So, here’s my DIY guide for building the adapter based around an LM338 adjustable voltage regulator.

Circuit: (adapted from the LM317 Application guide)

Circuit Diagram

  • D1 prevents shorting in case of failure condition in the LM338
  • D2 prevents damage if the power is hooked up backwards.
  • Ci = 0.1 uF disc capacitor
  • Co = 1 uF electrolytic capacitor
  • R1 = 390 Ohm
  • R2 = 2.2 kOhm

Actual voltage is around 8.4V, but works perfectly with my K10D.

The following parts are needed:

  • Hardware:
  • 1x approximately 3.5x2x1.5 project box
  • 1x 2.5×5.5mm DC power jack (panel mount)
  • 1x 3.5mm mono audio jack (panel mount) (use different mounts for camera out and input to prevent confusion)
  • 1x Hirose H10485-ND 3 Pos Connector Plug (K10D male power plug)
  • 1x MPD APP-002-ND cigarette lighter plug
  • 1x AC->DC 12V 3A power inverter
  • 1x 3.5mm mono cable with soldered tails
  • 2x 2.5×5.5mm male DC power cable with soldered tails (one is used to hook up to the lighter plug, the other you can use to hook up to any 12V DC source)
  • Step 0: Breadboard the circuit and make sure everything works fine =)
  • Step 1: cut perf board to size for project box, and drill mounting holes
  • Step 2: place and solder all components, take care to check all bridges and connections
  • Step 2.1: Test, test, and test again
  • Step 3: Drill holes in either side of project box for panel-mount jacks (size depends on type you get)
  • Step 4: Attach input and output leads from circuit to panel-mount jacks. (preference for DC jacks is center pin is +V and shield is GND, preference for mono jack is tip is +V and ring is GND)
  • Step 5: wire lighter cable. The center pin (fused) on the cigarette plug is +V. Be cautious as there is a spring and a few other small parts when disassembling the plug.
  • Step 6: Wire Hirose connector. Note that the GND is the top-most pin when the plug is inserted into the camera, the +8.3V is the bottom most pin when plugged in. Center pin is unused. Use extreme caution, these plugs are easy to damage when soldering. You may have to strip part of the cable’s coating and replace it with heat-shrink to fit into the stress-relief end of the housing.

That’s it! You now have an adapter for the K10D that runs off a cigarette lighter plug, a 12V AC->DC adapter, and any old 12V battery!

Here’re some photos of the finished product:

circuit, top (LM338 on bottom)

circuit, top (LM338 on bottom)

detail of camera output jack

detail of camera output jack

detail of DC input jack

detail of DC input jack

the box and all connectors

the box and all connectors

Note: the original design used an LM317, the K10D requires more power than the LM317 can support in a simple configuration, so the design has been updated to utilize the LM338 which can handle up to 5A of current draw.

TLA – Prototype V2 – Pan Stage Complete

•September 24, 2008 • 6 Comments

I guess I didn’t mention that I was completely re-building the robot, did I? Well, now I just have!

Here’re the new specs:

Gearing: ~ 20.8:1 (vs. ~ 3.4:1 of the previous prototype)

Minimum movement degrees: ~ 0.011 (vs. ~ 0.067 of the v1 proto)

Housing: 1/4″ Translucent Bronze Cast Acrylic (vs. 5/32″ white opaque cast acrylic)

For trucking motion, the previous model used a hacked-together worm drive from low-quality parts, and suffered dramatic issues due to it, after much tuning and hassle, I decided I was either going to have to replace the low-quality parts with high-quality parts ($$$!) or choose a different means of achieving lateral motion. Not of the mind to spend at least $200 more on quality Acme components, I decided I’d throw my money in another direction, I would go with a linear rail system. So, finding VXB having a great deal on a 55″ long 20mm Linear Rail Guideway System, I bought one and with fast shipping it showed up a few days later. I still haven’t gotten to work on the new trucking setup, but essentially it will have an “outrigger” attached to the guideway that will serve as a friction plane, for a friction wheel that will be driven by a stepper motor. As the slide units have some rotational slop (pitch), this will be compensated for by hanging the truck motor off the side of the housing that contains the pan unit and motor control unit (rather large, see photos below), such that the motor its self is a few inches out past the outrigger plane. This will increase lever forces to both apply extra pressure to the friction wheel, preventing slippage, and also increase the amount of force necessary to pitch the pan unit in the opposite direction.

As my trip to Big Bend was delayed a week by hurricane Ike (I was supposed to leave this past Friday, and return this Friday, now I leave this Sunday and return next Saturday), I decided I wanted to get something completed before I went out there, thus the pan/control unit took first priority.

So, the fabrication was easy once the parts arrived, due to the fact that I sketched everything up in 2D CAD while I waited for my orders to come in, this let me have a very good idea of hole placement, etc. (Well, with some caveats I’ll go into below =) well before I put a single piece of acrylic on the drill press. The net result was the only thing that was needed in the end was some fine-tuning, and the correction of a bad assumption.

The bad assumption was that I could attach the acrylic pieces directly by drilling and tapping the sides dead-center on their thinnest plane. This might’ve worked, had I a milling vise for the drill press, but hand-holding the pieces made it nearly impossible to drill the holes on the bottom panel in a straight line, so some holes were too near to the sides to effectively tap them, and my choice of a #6/32 screw as the primary fastener meant that the threads were too fine to hold being screwed in and out more than a few times, so I went back to the old aluminum bracket method of holding the panels together. The acrylic panels were ordered pre-cut from Professional Plastics. They offer good pricing on pre-cut panels (make sure to adjust your count, the minimum line-item price makes them seem expensive, but you can keep upping the count until you start to exceed the minimum line item price) and a quick turn-around.

An increased resolution of movement in the pan capabilities is achieved by adding a second stage of gearing. The first stage, from the stepper, is 3.33:1 using 32pitch gears (as I had some handy already), and the second stage is 6.24:1 using 42 pitch gears (best ratio I could get using the 150 tooth gear I had, and a very small 1/4″ shaft press-mount gear), giving me roughly 20.8:1 gearing, or approximately 0.01 degrees/step. That is, 360 / 1600 / 20.8 – 1600 is the steps of the stepper using the micro-stepping driver. The first stage uses a 1/4″ shaft, and is run through a ball-bearing, and the second stage uses a 3/8″ shaft and two bronze bushings, one inside and one placed through the top of the housing. My choice to use the bushings instead of bearings is based on sizing issues and cost – namely, I didn’t want to spend any more money on the pan stage than I already had =) I’ll probably add a thrust bearing later to reduce friction, but with the massive amount of torque being elicited through the gear train, I’m not losing a lot here. Gears, hubs, etc. were ordered from ServoCity, who has been nothing but excellent to me as a customer.

Each gear stage is held up by an acrylic platform. The platforms are raised through the use of 3″ #6/32 bolts that are run through 2.25″ long, 3/8″ brass tubes (cut from a longer tube). The brass tubes add a lot more stability to the platform and prevent twist (the screws alone will not) of the platform under torque load.

There is some mis-alignment to the top panel, this is due to me measuring the placement for the final shaft while test-assembling (before I removed the paper from the acrylic). The final assembly found the gears slightly out of alignment, and therefor had to be re-adjusted, resulting in the top being ever slightly off. If you’re wondering how the top is held on, as you’ll see in the pics below, thumb screws are screwed into speed-nuts attached to angle brackets.

One tip for those reading this thinking about building their own system of this sort and who, like me, are anything but “master craftsmen” — drill the holes for your critical attachments just slightly larger than you need, this will allow you to make fine adjustments by moving screws to one side or another. Washers will cover up the slop and help to prevent excess stress on a cut area of acrylic. Another note about acrylic: you should only be working with cast acrylic. Don’t buy the cheap extruded variety, it doesn’t handle drilling, cutting, or stress nearly as well! Almost all cast acrylic I’ve seen comes with a paper coating, vs. plastic coating. This is by design, as it’s easer to draw on, drill, machine, etc – the plastic coating will peel up on you often and occasionally melt as well.
So, without further ado, here are some photos… Scroll down to the bottom for the first test video and some talk about the issues it presented and what I have done / am doing about them.

Top view

Top view

Detail - quick release mount

Detail - quick release mount

Side view - outputs for tilt/truck motor, power hookup, remote cable, and USB connection to computer

Side view - outputs for tilt/truck motor, power hookup, remote cable, and USB connection to computer

Top View

Top View

Top plate, detail

Top plate, detail

Further top detail, bottom side

Further top detail, bottom side

Arduino inside

Arduino inside

EasyDrivers

EasyDrivers

Opto-isolator with room for lots more for other inputs/outputs

Opto-isolator with room for lots more for other inputs/outputs

Gear Platform Detail

Gear Platform Detail

Stepper Motor

Stepper Motor

Guts, laid bare

Guts, laid bare

Outside, Looking in

Outside, Looking in

And, here’s the first test video. It was shot at a rate of 1 shot every two seconds, with a single step between shots. Below the video I’ll discuss the issues encountered and what has been done already, and what will be done.

So, there are three primary problems with this video:

Horizon drop due to the camera platform not being perfectly level throughout its entire rotation

This was caused by a number of factors, originally the 3/8″ final shaft rested on the bottom plate, this meant that the bottom of the shaft had to be perfectly flat to prevent vertical wobble. It wasn’t.  Next, the hole through which the top bushing went through wasn’t _perfectly_ straight, resulting in a barely noticeable, but impactful rise on one edge of the bushing (about 1/64″ !) causing further wobble.  Correcting these issues (shortening the shaft so that it did not rest on the bottom, and fine-tuning the upper bushing mount) reduced the level issues by 90%.  (this can be tested by leveling the device and then slowly rotating the camera mount, noting the position of the spirit bubbles every few degrees of rotation.)  Not exactly perfect, but good enough.

Camera wobble due to high winds

This was a two factor cause, the first being that my original shaft design had the final shaft rising up and out a couple of inches – causing the camera to move as if at the top of a flag-pole.  My previous fix brought the camera as close to the top plate as is possible, reducing this effect.  The second factor being that it was attached to a single tripod via a single point (a plate was made out part of the v1 prototype body bottom plate, and a hole screwed and tapped to allow a quick-release plate for my geared head to be attached.  This causes this bulky item’s weight be secured by a single point.  The final version, attached to the linear motion slides will result in it being attached to a longer system at 8 points, reducing the likelihood of this occurring.

Slow take up before movent

No, that’s not a sloppy ramping implementation, its the combined effect of the backlash in the gear train – that is, backlash is amplified as you add more gears.  The backlash must be taken up before actual movement can occur.  This is easily dealt with by “preloading” the gears into a particular direction with the manual control mode.

Overall, I’m much happier with this prototype, and very pleased with the results.  Some short testing has brought back to life my belief that I can slow it down even further by skipping shots, as it turns out the jerkiness was caused by my incorrect use of Vegas, and not so much a failure of the assumption.  Will post some videos later that show the varying speeds of movement available.

TLA – First Test Video

•September 2, 2008 • 4 Comments

Got the unit up on tripods this weekend, and took to the parking lot out in front of my studio to take some test videos.  Even at 9am, the heat is rough, the first day shooting around 2pm I had to call it early, given that it was about 110F on the concrete in the sun, and I just wasn’t up for being out there.  The first test indicated that post-shutter delay before motor movement was essential, so I spent a few minutes enabling it in the UI (it was already enabled in the motor control unit, just no way to set it up) and got to test it again on Sunday.

Well, the test went ok – I found some serious design flaws with the trucking motion, primarily that I didn’t use an anti-backlash nut, meaning that the slop in the flange nut I used was enough to pretty much eliminate all possibilities of movement horizontally when moving in such small scales.  I have some vertical lift in the imperfection of the two ends of the drive rod, so the only captured motion was a slight circulation up and down (I did allow for vertical motion elimination through a slip cut into the attachment bar for the cart, but the new design of the cart used a shorter angle bracket, eliminating pretty much all of the vertical slip capabilities) due to this lift and the backlash on the nut.

My calculations as to what was a “reasonable” pan movement degree range was largely based on the use of a wider-angle lens than what I used for this test (see below), so it’s not going to allow for very slow movement with even a “normal” F/L lens.  My assumption about skipping motion between shots also doesn’t play out well, at least I think it doesn’t, as the video shows below when it switches to once every other shot.  Moving every third shot makes it even jumpier, so I may just eliminate that feature all together, and instead re-gear the pan motion to something closer to 9:1.  I’m not looking forward to re-building the top plate of the cart again, but it shouldn’t be a huge deal.

I’m not certain that it’s going to be field-ready at this point before I leave for Big Bend, but maybe some new tests and an anti-backlash nut will make it pan out.  (That’s a very little joke, see?)

So, for the video specs:

Camera: Pentax K10D

Lens: SMC-A 50/2

Motion Control: Panning approx. 0.07 degrees between each shot, and then moving to the same movement every other shot about 3/4ths the way into the video

Shot Interval: 1.5s

TLA – Program Operation, User Interface and notes on Time-Lapse Motion

•August 30, 2008 • 7 Comments

I’d like to take this chance to explain how the software works (as in, end-results, not a code analysis!) to facilitate motion control in the time-lapse automaton.

First, let’s talk about the essence of a dSLR time-lapse motion control system:

  • It must provide predictable motion in one or more axis (pan, tilt, dolly, truck, lift, drop, etc.)
  • This motion must occur at a rate relative to:
    • The overall distance to be moved (e.g. 5 inches, or 30 degrees)
    • The “real” time-scale of the time-lapse film (e.g. 1 hour)
    • The “perceived” time-scale (e.g.: film is 1 minute)
  • If motion occurs while the shutter is open, it must not move at a rate > 1 pixel during the exposure time
    • Measure of how much movement represents a pixel is based on sensor size and FOV of camera lens
      • e.g. if my sensor is 2000 pixels wide, and my lens has an FOV of 90 degrees, a movement of > 0.045 degrees during exposure time would result in movement of greater than one pixel
    • This prevents the perception of blur in non-moving objects, and increases output quality

There’s really not much more to it – you want to move, you want to control the rate you move, and you want to make sure that you don’t effect the quality of your output through movement.

Now, let’s talk about the TLA software:

Rather than worry about evaluating movement to prevent blur given the present exposure time, we make our movements between camera exposures. This means that it is literally impossible to introduce blur from programmed movement. This does, however, create a requirement that we know our exposure time and that we know when the exposure begins. To solve this requirement, we take control of the camera directly in the same microcontroller that operates the motors. This also means (for the current version) that we are limited to pre-programming our exposure time in the microcontroller. That is, we’re using ‘bulb’ mode in the camera. (I have already added support to the camera/motor controller to handle a manually-set exposure in the camera, but this is not yet supported in the UI. Later revisions will also include the ability to handle ramping exposures as light changes, such as day->night transitions.)

A Quick Break to Talk About Calculating Values:

Given that a time-lapse video is designed to compress a given length of “real” time to a final length of “perceived” time, we have to determine on what interval to create each exposure.

I = r/(sF)

(I being shot interval, s being seconds of “perceived” time, F being frames per second of output format, and r being the “real” time in seconds.)

So, if we want 60 seconds of output covering 1 hour of input, at 24 fps, we get:

2.5 = 3600 / ( 60 * 24 )

Or, more simply, we must fire a shot every 2.5s

edit: Thanks Bert for reporting the miscalculation in the original post

( The TLA software does not yet do this math for you, you must dial in the exposure time in ms and the interval time in ms. As I enhance the UI later, I’ll take care of these calculations internally. )

Ok, so what about motion?

For motion, we have to make a similar calculation for “continuous” motion:

M = t/r

(M being motion to be made each second, t being total motion occurring in the final film)

So, assuming we want to move 100 degrees (pan) in our 1-hour film:

0.028 = 100/3600

That means every second, we need to move 0.028 degrees.

And here’s the formula for calculating motion between shots:

M = t/(sF)

So, assuming we want to move 100 degrees (pan) in our sixty-second film at 24 fps, we get:

0.069 = 100 / (60 * 24)

That is, we need to move an equivalent of 0.069 degrees at or around each shot.

Therein lies the benefit of the ‘move between shots’ method, is that to extend our movement over a longer period of time (say 0.21 degrees in 15 shots) we only have to change the how often we move, not how fast.

edit: after some experimentation, this doesn’t always pan out. by reducing how often we move beyond once every other shot or so, the motion begins to seem jerky to the viewer. this is what experimentation is for =)

Back to the TLA Software:

The following describes the workflow for “bulb” (having the mC control the camera exposure time shooting) mode automation:

  1. Execute program
  2. Open camera shutter
  3. Delay exposure_time ms
  4. Close camera shutter
    1. Set interval elapsed time back to zero mS
  5. Determine which motors need to move
  6. Move motors prescribed amount
    1. motors can move at a rate of 2,000 steps/second
  7. Monitor interval time passed in mS
    1. If interval time passed >= shot interval time
      1. Open shutter, repeat cycle
    2. If interval time passed < shot interval time
      1. Loop until interval time passed >= shot interval time

Note in there that we don’t delay() for interval time – the reason is that if we did, the total interval time would be (interval time + motor move time + any other code execution time between the delays). That is to say, if our interval is 1s, and it takes 250ms to move the motors, and 1ms to execute all the code between, then we end up with a total interval time of 1,251ms. That’s more than 25% greater than our expected interval time. In this design, the worst case scenario is that our interval time is either our exact interval, or the time (motor move time + any other code execution time) — which ever is longest. I like to call this optimistic intervalism as it is the interval most likely to match the interval you requested. Of course, you could put an interval in that neither your camera supports nor can you make the movements you desire in, in that case, you get the next best interval.

Now, earlier in the workflow, it states “determine which motors need to move” – there’s more to this than “just pan, just tilt, or just truck”. We can create even smoother senses of motion by spreading out our total motion on shot intervals. That is to say, we can say “move one step on every 5th shot.” This is referred to as the <motor> shot cycle in the TLA UI, where the name of the motor is shown. We can also control the motor direction.

So, the program configuration options available are:

  • truck move steps
  • truck end step
    • The final count of steps to take (stop moving here)
  • truck shot cycle
  • truck dir
  • pan move steps
  • pan start step
    • How many steps should the truck motor have taken before starting to move the pan
  • pan end step
  • pan shot cycle
  • pan dir
  • … you get the idea

Once a program is configured, it is transferred to the camera/motor controller by pressing ‘3’ on the keypad. A program can be started by pressing ‘1’, or stopped by pressing ‘2’.

It’s worth noting, that we can prepare the next program while the current one is running.

The following video shows us configuring and transferring a program:

Not only can a program be created and transferred, it can be saved to non-volatile memory (eeprom) or loaded from non-volatile memory. This allows the programs to be created in the field, or created at home and repeated later. There are 16 memory slots available (numbered 0-15), and you can save to them or read from them. You can also configure the remote unit to load a particular program slot automatically on startup.

The

So, What About Absolute Positioning?

Obviously, since we’re dealing with stepper motors, we can’t really say for sure where we are when the program begins. And, well, we really want to say where we begin, not necessarily where the last program left off. For this reason, a manual control mode is provided. It is entered by pressing ‘0’ on the keypad from the main screen. In this mode, we can choose which motor to move (‘5’ on the keypad), and a pre-set number of steps or continuous motion (0 steps are entered). Pressing ‘1’ moves the motor left and ‘3’ moves it right. If moving a pre-set number of steps, you are locked out of the UI until those steps are completed. If moving continuously, the UI is active, and you can stop by either pressing ‘2’ to stop, or ‘0’ to exit manual control.

TLA Control Specs:

Minimum Movement Pan/Tilt: 0.07 degrees

Minimum Movement Truck: approx 0.001 inches

Maximum Shot Interval Time: approx 36 days

Maximum Camera Exposure Time: approx 36 days

Minimum Exposure Time: approx 1/1000s

Minimum Shot Interval Time: approx 1/100s

Maximum Motor Shot Cycles to Skip: 255

Absolute Slowest Movement pan/tilt: 0.07 deg every 25.15 years

Maximum Truck Travel Distance: approx 32 inches

Maximum Pan Rotations: unlimited

Maximum Tilt Travel: undefined presently (still under construction)

Power Input: 12V @ Approx. 2.8A