John Stockton's Home Project Wiki
Challenging technology projects for home
Found: 3 Entries
Jan 5, 2011 Format for Print
1. Project Plan
  Autonomous Helicopter Project
Helicopter Project Plan
Version 0.1

The following is an outline for the Helicopter Project Plan.  Each section will be linked as it is completed to make for easy document navigation.
  1. Airframe Design
    1. Physical dimensions, size, weight; weight budget
    2. Payload mount
    3. Component suppliers & prices
  2. Electronics Design
    1. Motor Control Unit Design (based on Arduino Pro board) [link]
    2. Motor Driver Circuit Design (PWM driver, current sense & navigation light) [link]
    3. Inertial Measurement Unit  Description (GPS, roll sensors, XYZ accelerometers) [Arduino board]
    4. RC Receiver Interface
    5. Component suppliers & prices
  3. Payload Design
    1. Camera and RF Data Link
    2. Component suppliers & prices
  4. Orientation & Stabilization control software
    1. Motion Stabilization & control
    2. Obstacle avoidance
  5. Navigation Software
    1. GPS Waypoint list management
    2. XYZ location management
    3. PST orientation management
  6. Ground Station Design
    1. Component suppliers & prices
  7. Testing
  8. Performance Analysis
  9. Bill of Materials
  10. Summary Report
Category: AHP 1.00 Submitted by: John
Jan 7, 2011 Format for Print
2. 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
Jan 15, 2011 Format for Print
3. Motor Driver Circuit Design
  Multi-Project PWB test board
Motor Driver Circuit Design

Introduction:  The motor driver circuit takes a PWM speed control signal from the Motor Control Unit and creates a drive current sufficient to power the motor/propeller assembly.  The PWM signal is a 5KHZ 0-100% square wave from the MCU.  This circuit converts the low voltage TTL level signals to the 11.1V Vbat level and drives a low on-resistance power FET.  The FET includes an internal reverse bias protection diode, so virtually the only extra component needed is an energy storage capacitor to reduce the harmonic content of the drive signal to the motor.

Multi-Project PWB: Since it wasn't clear how complex the driver circuit needed to be, I designed a number of driver circuits ranging from a simple buffer-FET driver all the way up to a full H-bridge driver with current sense.  There are a number of options along the way, including the design I think we will ultimately use, which is a buffered FET driver with current sense.  Figure 1 shows the circuit board layout that we sent to the PWB shop.  Notice that on the PWB some designs are replicated twice.  This is because for the lowest cost order from the PWB shop you can get three copies of a fixed size PWB for about $80 including shipping, but we need four driver boards for the helicopter application.  While space on the board was at a premium, I put two copies of the high probability designs on each board (noted in the list below with an asterisk * character), but only one copy of the designs I thought were more experimental.  If the experimental design is best, we'll do a respin of the board to replicate the best design and probably put something else on the board that we are experimenting with at the moment.

The layout of the PWB is shown in the figure below.  

Figure 1 - Multi-Project PWB design containing five different experimental motor driver circuits.

The PWB design includes five designs labeled motCtl v0..4.  Here is a summary of what each design is set out to do.
  • V0*: This is the most basic FET driver with current limit resistor for the gate drive of the FET.  If it works OK, it is the simplest of all designs since it only uses a FET, a resistor and a capacitor.  There is space for an external reverse bias diode in case the internal diode isn't sufficient.
  • V1: This is a simple variant of V0 where a second FET is added in parallel to the first.  When we were testing the hand wired version of the motor driver using relatively cheap power FETs (IRF501s), a single FET would get pretty hot when driving the motor with 12V at 2A, but putting a second one in parallel solved the heating problem, at the cost of an extra component.  This design uses FETs that were picked for their very low on-resistance, so hopefully this design won't be needed.
  • V2*: This design uses a two transistor buffer to add gain to the gate drive signal of the power FET, in case the gate capacitance load is too high for the MCU to drive directly.  It also includes a LM389 op-amp to form a current sense circuit to provide feedback to the MCU of motor current.  Hopefully we will be able to use this to sense motor stalls and then have the MCU do something like stop the motor for a few tenths of a second and then try to restart it (assuming that it bumped into something and by stopping the motor it can fall slightly and get clear of it).  The op-amp needs to generate an output that is in the range of the A/D converters on the MCU, so an on-board 7805 power regulator was included.
  • V3*: This one is a simple variant of V2 that includes a place to mount a smart LED module at the top of the board.  The module uses IIC signals, plus 5V power and ground, so these signals are passed from the bottom connector to the top.
  • V4: This version gets a little bit more aggressive and uses four FETs in a full-bridge circuit with one set of buffers driving the PWM signals to the bottom transistors and another set selecting the polarity of the power being driven to the motor to allow it to spin forwards or backwards.  This would potentially enable the helicopter to do aerobatic rolls, etc.  The circuit also includes a current sense circuit that has a reference bias set to 1/2 way between the 5V supply and ground.  The output signal will be 2.5V for no current and then plus/minus depending on the current and direction of motor spin.
The PWB has been fabricated and is back from the PWB shop.  Figure 2 below shows what we got back in the mail.  Before building up and testing the circuits, the PWB will be cut and each design separated using a bench top break tool (Harbor Freight special).

Figure 2 - Multi-Project PWB board back from fabrication house.

Figure 3 below shows the V0 circuit being prototyped and tested.

Figure 4 below shows the V1 circuit prototype/test.

Figure 5 below shows the V2 circuit prototype/test.

Figure 6 below shows the V3 circuit prototype/test.

Figure 7 below shows the V4 circuit prototype/test.

Summary:  [tenative] The helicopter drive circuits proved that with low on-resistance FETs the motor control circuits can be mounted directly on the Motor Control Unit.
Category: AHP 2.20 Submitted by: John
Home Projects
About this Wiki

This wiki is for the development of a few home projects. The idea of a wiki is a place where it is easy to post and edit documents on the web. Anyone can read the documents, but posting and editing is limited to those authors that have password access.

Category Search
  • Autonomous Helicopter
  • CNC Mill Project
  • tFM File Manager Project
    Contact Information

    John Stockton
      4233 Hidden Canyon Cove
      Austin, TX 78746-1256