2.5-Axis Motion Control Keith Nygaard and Luke Dunekacke

advertisement
2.5-Axis Motion Control
Keith Nygaard and Luke Dunekacke
Camera Motion Control
Motion control rig for use in video production that can create and repeat a
consistent range of motions.
Controlled axis consist of Pan, Tilt, and Dolly
http://www.youtube.com/watch?v=hgs7FogzwTw
Top Level Design
Components
Dolly rail
Tilt and pan mount
Two servos
DC motor
Microcontroller Board
Top Level Pseudo Code
loop:
if state equals read input
read input
else if state equals user control
play
else if state equals record
record
else if state equals playback
playback
else
state equals reset
Subsystems
User Control
●
User controls all three motors independently without recording
Record
●
User controls are recorded into EEPROM chip.
Playback
●
The previously recorded motion is played back for the user
User Control
Allows the user to freely control the motion control rig with three potentiometers
Each potentiometer controls dolly, tilt, and pan independently
Pseudo Code:
while in user control mode:
read in analog values
map the pot values to a duty cycle (high count)
assign the new high counts and low counts to the motors
Recording
Position Based
● Capture the hicount of the output compare
Record over 100 times a second
About 11 minutes of record time
Recording Pseudo code
loop until the state has changed or memory is full:
wait for the RTI system to trigger
read in the analog values
update the position of the rig
write the position to memory
Recording Timing Diagram
Playback
Same principle as record
Pseudo Code:
loop until the state changes or when the recording is finished
get the next location from memory
wait for the RTI to trigger
write the new values to the motors
Playback Timing Diagram
Problems and Solutions
PWM pin use
●
●
16-bit precision required the use of two T ports per motor
Output compare was used for PWM generation
Recording - timing
●
Interrupts firing too often to make sure there is consistent timing.
Only one microcontroller
●
●
DC feedback could not be implemented due to pin restrictions.
Too much happening at one time for one microcontroller
Next Steps
DC motor feedback control
SCI system
Editing paths in computer software
Adding addition axis of controlled motion
Project Progress
Questions?
Download