TLA – Changes

Some major changes to the time-lapse automaton project.

Unfortunately, the best I could get out of the servo was 0.35 degree movements by reading the potentiometer directly from the micro-controller. This made time-lapse video very choppy and generally poor looking. After some time spent thinking about how I had approached the project, I realized that the assumption that the micro-controller would not manage the camera made it much more difficult of a project than I had imagined. So, with some thought, I put my existing intervalometer aside, and decided to make it part of the TLA programming. Gone are the DC geared and servo motors, replaced by steppers w/ 200 steps per rotation, controlled via easydriver motor controllers. The easydrivers are chopping micro-step drivers, resulting in 1600 steps per rotation.

The key role that getting rid of the external intervalometer played in changing the nature of the TLA was that, now that I know when the camera is taking shots I can make any position changes between those shots. That is, before I had to guarantee slow, even movement that was minimal enough to never move more than one pixel on any axis during a shot. This made it nearly impossible to build a working system that would allow varying speed of movement. By changing the software to move a certain amount (or not) between shots, I could move as much or as little as I want, at a very high rate of speed if chose, giving me a lot of latitude for programming.

I split the motor/camera controls and UI functions into two different micro-controllers, and use two-wire interface for bi-directional communication. This allows me to add necessary delays to the UI and allows me to modify the next program to execute while one is running. It also doubles the EEPROM space for saved programs later.

The motor/camera control is designed such that a shot is taken at a timed interval (the allowed time is from less than a second up to 49 days between shots), and after the shot is taken, any motors are moved. The camera exposure time can be pre-programmed to any number of milliseconds, seconds, minutes, hours, or days, or can be set in the camera. The input to the camera is opto-isolated from the circuit to prevent damage. The camera will not fire is the motors are currently moving (to prevent blur should the camera delay time not allow for complete motor movement to next position). Each pan or tilt motor can move as little as 0.07 degrees in a single movement, or as much as 17.85 degrees. The truck motion can move as little as 0.01 inches, or as much as 2.55 inches between shots. You can also set each motor to only move once every n shots, up to 255. Meaning you could have as much as 34 years between movements (49 maximum days between shots * 255 possible shots skipped per movement), but that would just be absurd. =)

I went ahead and boxed up most of the UI, you’ll see photos below. The only things missing are the buttons for manual control of the motors, they will go in the area to the right of the keypad. The UI is connected to the motor control unit and power input via an ethernet cable.

Also below are pictures of a new cart built around the stepper motor. It’s made of 5/16th acrylic painted black, and aluminum brackets. The gear ratio is 3:1, meaning it takes 4800 total steps to turn the camera around a full 360 degrees. The final drive gear is attached to a 3/8″ shaft that runs through a lubricated bushing. An acrylic plate is attached to the same hub as the gear, and a giotto’s quick release plate is attached to that. Holes are counter-sunk on either side to prevent bolt heads from interfering with the plate or the gear movement. I still need to attach a piece of threaded rod that will slide in the attachment arm from the truck drive gear. It will also need a bit more re-enforcement from some metal plates before the tilt mechanism can be attached.

Keypad circuit

Keypad circuit

keypad soldered to circuit

keypad soldered to circuit

lcd circuit

lcd circuit

lcd soldered to circuit

lcd soldered to circuit

lcd, keypad, arduino installed in case

lcd, keypad, arduino installed in case

case put together

case put together

camera/final drive gear mount

camera/final drive gear mount

underside of cart

underside of cart

cart without gears attached

cart without gears attached

gears, camera mount attached

gears, camera mount attached

on track

on track

on track with camera

on track with camera

Advertisements

~ by c.a. church on August 17, 2008.

7 Responses to “TLA – Changes”

  1. Holy crap! I wish I could do that. Hell, one of the reasons I got into computers and programming was because I’m fascinated with the idea of writing code to control physical things!

    *runs off jealous*

  2. Very interesting project. I’m still trying to get the Arduino to control a servo and camera shutter without using the Pololu micro servo controller. Not easy for those of us outside of the programming field!

  3. Well done, that’s looking mighty fine!

    You’ve chalked up some serious workshop time in the process I’m sure. đŸ˜‰

    [m]

  4. I’m looking forward to seeing the results!
    [m]

  5. Marcel –

    Yeah, I got a chance to work on the hardware the past two weekends, and have been working on the software during the week. It’s getting close to being ready to shoot a video now, just waiting on a few gears (my servocity order seems back-ordered, I only have one set of gears on-hand) and to make a box for the truck motor and all of the circuits associated with the motors.

    I got the servo controllers mounted up today, but I’m not sure how much I like the way I did it (stacked them), need to re-do them so that they’re laid out next to each other. All of the software is functioning properly, putting the finishing touches on being able to save the programs to EEPROM tonight. (Will have 16 pre-programmable slots.)

    Power and heat seems to be two issues I’ll have to deal with. I’m currently using an LM317 to adjust down from 12V (my batteries and wall-wart are 12V. I had bought everything based around a 12-volt motor I was using.) to 6V for the steppers. Each motor draws 0.8A @ 6V. The LM317 only pushes 1.5A, so I’ll need to use 3 of them or one LM338. Considering the heat from one 317 is intense, I’ll probably take the 338 route. I hate losing that much power to heat when running on battery, but I’m not sure I want to buy another battery =)

    Phil –

    You’re using the pan+tilt kits from servocity, right? It’s pretty easy to run them directly (w/o polulu), presuming you already have a way of stepping down to the 6v they need, just hook the control line up to a PWM output and then you can use the Servo library. Just make it so that after you close the shutter for the camera, you issue the command to the servo to move to its next position. Since the servo library is very timing sensitive about when you call Servo::refresh(), you can’t use delays in your code. You’ll need to measure time by counting millis() changes. When you need to change state on something (like a pin to open the camera shutter) set up an unsigned long to keep track of the millis passed, and then change state when that exceeds a certain amount. Reset it back to zero or whathaveyou when you’ve completed your state change.

    !c

  6. On the 12V / 6V topic… I may well be wrong, but I believe you can happily run the steppers at a higher voltage with the EasyDriver board. (up to 30V ??)

    Because the EasyDriver is a ‘chopper’ driver — that is, it cuts off the voltage when the current drawn reaches your preset limit (pot) and the switches it back on again when the current (back emf?) dies down in the motors coils — you can run it at a higher voltage without harm to your motors. It can actually be beneficial in that it gives you higher torque!

    I’d check this out with EasyDriver’s Brian Schmalz to be sure but it would certainly make things easier and I dare say more efficient for you.

    hth

    [m]

  7. Hmm, thanks for the pointer Marcel! I checked w/ the arduino forum, and it seems that its pretty standard to run steppers at much higher voltage through choppers, so I’ll try it out tonight. I know the A3967 driver chip can handle way north of 12V, so it should be good.

    !c

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: