John Stockton's Home Project Wiki
Challenging technology projects that my kids are interested in
 
 
Jan 7, 2011
1. Motor Control Unit Overview
  A view of the real-time control part of the project
 
Motor Control Unit

Introduction:  The Motor Control Unit is based on an Arduino Pro board and is responsible for the motor speed control, battery monitoring, and Z-height control via sonar sensor.  It receives a serial command stream from the IMU which tells it what the overall motor speed should be as well as a delta speed to cause a change in roll, pitch or yaw.  The MCU listens to this serial stream for motor speed commands and also implements a Z-height management loop meant to prevent the helicopter from crashing into something.  The Z-height control gets a minimum height from the IMU and uses the sonar sensor to try to maintain it.

Inputs:  The board takes the following inputs from the other electronics in the helicopter:
  • Battery voltage
  • Motor current sense (4x)
  • Z-height via sonar sensor
  • Serial data stream from IMU for control/setup

Outputs:  The board provides the following outputs for other elements of the system:
  • Individual motor speeds (4x via PWM outputs)
  • LED Light control bits (via IIC serial bus)
  • Serial data stream back to IMU with platform status

Function:  The board performs the following functions:
  • Generates motor velocity commands based on serial input parameters
  • Monitors sonar sensor for minimum height control loop
  • Performs averaging of sonar sensor data to minimize extraneous noise
  • Monitors battery voltage and motor current (when using the appropriate driver board)
  • Controls LED navigation lights (again with appropriate driver board)
  • Flashes LED lights when battery voltage is becoming critically low
  • Reports back data to IMU via serial link
 
Testing:  We performed a number of simple tests on the MCU to see how well it performed.  Here is a summary of those tests:

Test 1: We implemented the MCU board along with a hand wired breadboard of the Motor Driver circuits and connected it to the helicopter airframe via a 6 foot long ribbon cable.  Then we put the airframe attached to a dead weight on a digital scale.  We zero'd the scale and then commanded the motor speeds to go from zero to maximum.  In this test configuration we could only generate about 350 grams of lift, which would probably not be enough to lift the completed helicopter.  

Test 2: We disconnected the driver board from the airframe and connected a single motor to our lab power supply.  We attached a dead weight to the single motor and put the airframe back on the scale.  We physically balanced the airframe on a cardboard box so we could measure the lift created by a single motor.  From this test we could get between 250-300 grams of lift.  From this we concluded that we would be able to easily lift a total of 1 kg.

Test 3: We connected the sonar sensor to the MCU and ran the software loop that tries to maintain a minimum Z-height.  The loop is designed so that at normal operating speed and at a height above the Z-minimum the software doesn't change anything.  When a change in Z-height is detected so that the minimum value is infringed, the control loop increases the motor speed proportionally to the difference in target Z and measured Z-height.  This is a simple proportional loop at the moment, but in the future we will change this to a proper PID loop.  By moving your hand towards and away from the sonar sensor we could see the motor speed change when we got to the minimum Z spacing.  We have only done this static test so far, but dynamic (hovering) tests will be done when we get the new motor driver circuits completed.

Conclusions:  The MCU has only been statically tested on the bench, but it performed pretty much as we wanted, except for the overall lift which we believe was limited by the drivers being separated from the motors by a long ribbon cable.  Each motor draws an average of 1-2A, so the long cable length and the #30 wire probably were the limiting factor.  When we get the new driver boards completed we will retest the lift performance.


Document Links:
 
Category: AHP 2.10 Submitted by: John
Back