Uniaxial Steadicam

From Microduino Wiki
Jump to: navigation, search

Overview

Anywhere motion-servo.jpg

Make a uniaxial Steadicam with motor module and motion module, and control the motor to spin through leaning the platform right or left.

Module List

Module

Module Number Function
mCookie-Core 1 Core board
Battery box 1 Program download and power supply
mCookie-Hub 1 Sensor adapter plate
Servo 1 Servo
Servo Connector 1 Servo connector
Motion module 1 Detect motion, equivalent to a gyroscope

Other Equipment

  • USB cable*1
  • Building blocks or other fixation structures
Anywhere motion-servo-module.jpg

Module Setup

Setup

Anywhere motion-servo-step.jpg
  • Assemble modules and sensors together:
    • Connect the servo to pin 6/7 of Hub through servo connector, note that connect it to the lower pins of the connector;
    • Stick the red core module, green Hub and yellow motion module to the yellow battery base;
    • Plug one end of the USB cable into the battery base and connect the other to the computer;

Programming

Programming Thought

Pitch: when the X axis arrow points to the horizontal direction, the pitch degree is 0; when it points to left horizontally, the pitch degree is 0; when it points to top vertically, the pitch degree is 90; when it points to bottom, the pitch degree is -90.

Mixlymind motion-servo1.jpg

When the base of the platform is level, the servo should be kept at 90 degrees, at this moment, the pitch degree is about 0 degree.

Mixlymind motion-servo2.jpg

When the base leans up (the arrow of X axis of the motion module points to top), the pitch degree is between 0-90, the degree of the servo is the sum of 90 degrees and the pitch degree. The degree of the servo is between 90-180.

Mixlymind motion-servo3.jpg

When the platform leans downward (the arrow of X axis of the motion module points downward), the pitch degree is between 0-90 degrees, the degree of the servo is the sum of 90 degrees and the pitch degree. The degree of the servo is between 90-0.

Mixlymind motion-servo4.jpg

Required Program Blocks

Start to Program

Motion DMP solution, the degree of pin 6 servo is the sum of pitch degree +60

Mixly-ctrl-motion-servo-code.jpg



Test the result
After powering on, keep the motion module level for 5s, lean the platform at pitch direction, and the servo can make the platform level always.

Anywhere motion-servo.jpg



Q: If the motion sensor is stuck to the other end of the battery base, what will happen?
A: Under that situation, the pitch degree of the motion module is just opposite to the original one, you can change the 90+pitch degree in the code into 90-pitch degree.

Send the pitch degree to the serial monitor

Mixly-ctrl-motion-servo-code1.jpg

Technical Specification

  • For more about motion module, please refer to: Motion Module
  • For more about servo, please refer to Servo

Relative Cases

FAQ