General Overview
Function
This gimbal design lets users balance the camera in an upright position (with all servos at 90 degrees) or adjust the locked position using the joystick. Press the joystick button to toggle between manual (joystick) and auto (IMU) servo control.
Main Components
- Raspberry Pi Pico Microcontroller: Controls and receives input from IMU, servos, and joystick module.
- IMU BNO085: Gives linear acceleration (Accelerometer) and rotational velocity (Gyroscope) data across the X, Y, and Z axes.
- High Torque Servos: Control the gimbal's axes, stabilizing the camera by counteracting position changes detected by the IMU.
- Joystick: Toggles between manual and auto servo control modes.
CAD
Main 3D Printed Pieces (STL Files Provided Below):
- Piece 1. Houses breadboard circuit and serves as base for Servo Y.
- Piece 2. Serves as base for Servo Z
- Piece 3. Serves as base for Servo X and supports platform for camera system.
Direction of Axes
- Servo X corresponds to X-axis (tilting forward/backward), like "pitch" in an airplane.
- Servo Y corresponds to Y-axis (tilting left/right), like "yaw" in an airplane.
- Servo Z corresponds to Z-axis (rotating left or right), like "roll" in an airplane.
- Pushing joystick up/down corresponds to tilting forward/backward on X-axis.
- Pushing joystick left/right corresponds to tilting left/right on Y-axis.
Design
Wiring
General
- Power Pins: All components must connect to power pins (3VO, 5V) & ground pins (GND).
- ADC Pins: Reads analog outputs from joystick potentiometers (x-axis and y-axis).
- I2C Pins: Sends and receives data with two lines, a serial clock pin (SCL) and a serial data pin (SDA).
- PWM Pins: Generates a pulsed signal to control the servo position by varying the duty cycle.
- Push-Button Pin: Pressing the joystick down closes and opens the switch, changing the output between high and low.
Pin Overview (Raspberry Pi Pico)
- Power Pins: 3VO, GND
- ADC Pins: GPIO26 (to VRx), GPIO27 (to VRy)
- I2C Pins: GPIO4 (to SCL), GPIO5 (to SDA)
- PWM Pins: GPIO16 (to Servo X), GPIO17 (to Servo Y), GPIO18 (to Servo Z)
- Push-Button Pin: GPIO13 (to SW)
Code
- Full CircuitPython code provided in instructions.