Remote Controlled Sliding Camera Rail
Final Project for ECE 4180, Georgia Institute of Technology, taught by Dr. James Hamblen
Team Members
- Autumn Caraway
- Michael Marzano
Projcect Description
The goal of this project was to design and implement a remote controlled sliding camera rail using 2 Mbed microcontrollers that communicated with each other over a wireless serial connection. There were 2 parts to this project, the controller (Autumn Caraway) and the camera rail itself (Michael Marzano).
Parts List
Controller
- Mbed NXP LPC1768 Microcontroller
- XBee+Breakout Board
- Potentiometer Joystick+Breakout Board
- 2 Pushbuttons
Camera Rail
- Mbed NXP LPC1768 Microcontroller
- XBee+Breakout Board
- Movo Sliding Camera Rail
- STEPPERONLINE Nema17 Bipolar Linear Stepper Motor
- Mounting Bracket
- 8mm Lead Screw, Length 600mm
- Flexible Coupling
- 8mm Vertical Bearing
- 8mm Anti-Backlash Brass Nut
- Aluminum Sheet
- Assorted Nuts, Bolts, and washers
- Dual H-Bridge Motor Driver
- 12V Power Supply + Barrel Jack
Schematics
Controller
Camera Rail
Pin Outs
Controller
mbed | joystick | XBee | Button1 | Button2 |
---|---|---|---|---|
GND | GND | GND | - | - |
VOUT | VCC | VCC | PIN | PIN |
p16 | - | - | PIN | - |
p17 | - | - | - | PIN |
p18 | SEL | - | - | - |
p19 | HORZ | - | - | - |
p20 | VERT | - | - | - |
p21 | - | RESET | - | - |
p27 | - | DOUT | - | - |
p28 | - | DIN | - | - |
Camera Rail
mbed | XBee | H-Bridge | Motor |
---|---|---|---|
GND | GND | GND | - |
VOUT | VCC | VCC, PWMA, PWMB, STBY | - |
p17 | - | BI1 | - |
p18 | - | BI2 | - |
p19 | - | AI2 | - |
p20 | - | AI1 | - |
- | - | A01 | A (BLK) |
- | - | AO2 | A\ (GRN) |
- | - | BO2 | B\ (BLU) |
- | - | BO1 | B (RED) |
p26 | RESET | - | - |
p27 | DOUT | - | - |
P28 | DIN | - | - |
Note: The VM pin on the H-Bridge is a variable power input that is used to drive the output pins. It is rated for 5-15 volts. To get acceptable performance out of the motor, we had to use a 12V power supply to drive the H-Bridge.
Source Code
Controller
The controller uses interrupts and timers to sample inputs from the joystick and pushbuttons, then creates an ASCII command string that is sent out over a serial connection to the camera rail.
Import programSliding_Camera_Controller
Source Code for the controller for a Sliding Camera Rail. Reads in inputs from joysticks and buttons to send commands over a serial port
Camera Rail
The Camera Rail uses the Mbed RTOS to efficiently divide up responsibilities into three threads. The main thread uses the LinStepMtr library to control the motor, the second thread reads the serial port and converts the ACII command string into control states and control flags, and the third thread controls the LED status lights.
Import programSliding_Camera_Rail
Source code for a Sliding Camera Rail that receives commands from a controller over Serial connection to drive a Linear Stepper motor via an H-bridge.
LinStepMtr Library
The LinStepMtr Library is a custom library, written my Michael Marzano, that controls a STEPPERONLINE Nema 17 Bipolar Linear Stepper Motor via an H-Bridge. It provides a convenient API that allows the user to set the motor's speed in RPM, control the motor's direction, and set the motor to rotate for a given number of rotations. This library also includes the ability to set software stops to limit the clockwise (positive) or counterclockwise (negative) movement of the motor.
Import libraryLinear_Stepper_Motor_Nema17
API for a STEPPERONLINE Nema 17 Bipolar Linear Stepper Motor. Provides speed, direction, and revolution control.
Import library
Public Types |
|
enum | Direction |
Direction Control. More... |
|
enum | Step_Num |
Steps of motor for movement * In form A B A' B'. More... |
|
Public Member Functions |
|
LinStepMtr (PinName A_f, PinName A_r, PinName B_f, PinName B_r) | |
Create a linear stepper motor object connected to specified DigitalOut pins.
|
|
LinStepMtr (PinName A_f, PinName A_r, PinName B_f, PinName B_r, int m_rpm) | |
Create a linear stepper motor object connected to specified DigitalOut pins.
|
|
~LinStepMtr () | |
Destructor.
|
|
float | get_speed () |
Gets the current speed in RPM.
|
|
void | set_speed (float rpm) |
Sets the value of speed in RPM.
|
|
double | get_rev () |
Gets the number of revolutions since motor was initialized.
|
|
void | set_min_rev_cnt (double rc) |
Sets the value of min_rev_cnt.
|
|
void | set_max_rev_cnt (double rc) |
Sets the value of max_rev_cnt.
|
|
double | get_min_rev_cnt () |
Gets the value of the current minumum revolution count.
|
|
double | get_max_rev_cnt () |
Gets the value of the current maximum revolution count.
|
|
void | RESET_rev_cnts () |
Rests the revolution count limits to max/min of double.
|
|
Direction | get_dir () |
Gets the current direction.
|
|
double | rotate ( Direction d, float rev) |
NOT SUPORTED - Set the direction.
|
Video Demo
Please log in to post comments.