Group 3
Fall 2010
David Malgoza
Engers F Davance Mercedes
Stephen Smith
Joshua West
Design a flying robot
Robot must be able to:
◦ Avoid Obstacles
◦ Navigate to GPS location
◦ Communicate Wirelessly
◦ Wireless Manual Control
◦ Stream Wireless Video
The Big Question, WHY?
Wanted to design an aerial vehicle for surveillance purposes
Wanted to do a project with fair amount of hardware and software
Most of all wanted to do something cool and fun!
To do this we must:
Design and code a control system for the
Quad-Copter (move up, avoid this, etc…)
Design and code a sensor fusion algorithm for keeping the copter stable
Design and code a wireless communication system (send commands)
Design and build a power distribution system
Design and build a chassis
FLY
The Quad-copter must be able to remain stable and balance itself.
The copter must be able to move forward, rotate left and right, rise and descend
The copter must be able to signal when power is running low (audible)
Lift at least 2 kg of mass
Navigation accuracy within 3m
The Quad-Copter must communicate wirelessly at least 100m
The Quad-Copter must flight for a minimum of 5 minutes
The Quad-Copter must be able to detect objects from at least 18 inches away
The Quad-Copter must have video capabilities at
100m
Goals:
Create a lightweight chassis for the Quad-Copter
The chassis must support all batteries, external sensors, motors, and the main board
Cost Effective
Requirements:
Create a chassis with a mass of 800g or less
The area the Quad-Copter cannot exceed a radius of
18in.
Must be able to support at least a 1.2kg load
There were 2 lightweight materials we considered for the chassis: Aluminum and Carbon Fiber
Both have capabilities of being entirely used as a chassis and meet the maximum mass requirements
Advantages
Carbon Fiber Aluminum
Excellent Strength and Stiffness.
Durable.
Easily
Replaceable.
Less Costly.
Disadvantages Can chip or shatter.
More costly.
Can easily bend or dent.
2 aluminum square plates will be used as the main structural support
4 rods will be screwed to the top square plate at and secured at the corners
Below the 2 plates, a lower plate will be placed 1.5in below to support all batteries, as well as secure the range finder sensors and video system
Landing gear will be shaped as standard helicopter legs.
A layer of foam will be used for padding the landing gear
Goals:
To use lightweight motors for flight
The motors must be cost effective
Requirements:
Use motors with a total mass of 300g
Each motor must be able to go above 2700 rpm
Each motor is to be controlled via PWM signal from the processor
1.
2.
Advantages
1.
Less friction on the rotor
2.
Typically faster RPM.
3.
PWM or I2C controlled by an electronic speed control (ESC) module.
Disadvantages
1.
Require more power.
2.
Sensorless motors are the standard
3.
Typically more expensive
• Minimum required voltage: 10.5V
• Continuous Current: 8.4A
• Maximum Burst Current: 13.8A
• Mass: 55g
• Speed/Voltage Constant: 840 rpm/V
• Sensorless ESC required for operation.
The ESC translates a PWM signal from the microprocessor into a three-phase signal, otherwise known as an inverter.
Based on a duty cycle between 10% and 20%, the ESC will have operation.
Based on the requirements given by the manufacturer, the PWM frequency will be 50Hz.
Goals and Objectives:
•
The ability to efficiently and safely deliver power to all of the components of the quadcopter.
Requirements:
• The total mass of the batteries should be no more than
500g
•
A total of 3 low-power regulators are to be used.
• Must be able to sustain flight for more than 5 minutes
Type
NiCd
NiMH
LiPo
Advantages
Easier and faster to recharge.
Inexpensive
Easily rechargeable.
Reliable.
Inexpensive.
3-cell standard voltage:
11.1V.
Typically higher charge capacity.
Disadvantages
Standard sizes below
10.5V.
Reverse current issues.
Lower expected battery life.
Lower charge capacity.
Standard sizes below
10.5V.
Longer charge time.
Lower charge capacity.
Easy to damage from overcharging.
Longer charge time.
Expensive.
Specifications on the EM-35
Rated at 11.1V
Charge Capacity: 2200mAH
Continuous Discharge: 35C, which delivers 77A, typically.
Mass: 195g
6V – 4 AA
LM7805
LD1117V33
Wireless
Processor
Transceiver
LM317
Gyroscope
11.1V LiPo
Ultrasonic
Ultrasonic
Accel.
11.1V LiPo
Digital
Compass
GPS
Main
Processor
Motor
Motor
Motor
Motor
5V LDO regulator, rated at 1A maximum.
The LM7805 regulator is used for the GPS, the main processor, and the digital compass module.
300mA required for all components.
3.3V LDO regulator, with 500mA maximum.
Will be used for powering the transceiver and the wireless system, and most of the analog components.
The regulator has a maximum current rating of 1A.
TO-220 packaging is preferred if the application of a heat sink is later required.
This will be used as a 3-V regulator for the gyroscope.
Allows for step-up and step-down in voltage when data travels between a lower referenced voltage signal to a higher referenced voltage signal.
This will be used to communicate the GPS and the wireless communication system with the main processor
Source: http://www.sparkfun.com/commerce/product_info.php?products_id=8745
Flight stability sensors
◦ Monitor, correct tilt
Proximity sensors
◦ Detect obstacles, ground at low altitude
High altitude sensor
◦ When higher than proximity sensor range
Direction/Yaw sensor
◦ Maintain stable heading, establish flight path
Navigation/Location sensor
◦ Monitor position, establish flight path
*Minimize cost and weight for all choices
Goals/Objectives
◦ A sensor system is needed to detect/correct the roll and pitch of the quad-copter, to maintain a steady hover.
Specifications/Requirements
◦ Operational range 3.0 – 3.3 V supply
◦ Weigh less than 25 grams
◦ Operate at a minimum rate of 10 Hz
Options (one or more)
◦ Infrared horizon sensing
Expensive, unpractical, interesting
◦ Magnetometer (3-axis)
Better for heading than tilt, little expensive
Accelerometer
Measures g-force, magnitude and direction
Gyroscope
Measure angular rotation about axes
IMU (Inertial Measurement Unit)
◦ Combination of accelerometer and gyroscope
◦ ADXL335 - triple axis accelerometer (X, Y, Z)
Analog Devices
◦ IDG500 – dual axis gyroscope (X and Y)
InvenSense
◦ 5 DoF (Degrees of Freedom) IMU
◦ Sensor fusion algorithm
Combines sensor outputs into weighted average
More accurate than 1 type of sensor
ADXL335 - triple axis accelerometer
◦ +/- 3 g range – adequate
◦ 50 Hz bandwidth – adequate, adjustable
◦ 1.8 – 3.6 V supply
◦ Analog output
IDG500 – dual axis gyroscope
◦ Measures +/- 500 º/s angular rate
◦ 2 mV/deg/s sensitivity
◦ 2.7 – 3.3 V supply
◦ Analog output
Surface mount soldered to main PCB
3.3 V supply filtered by .1µf cap
.1µf caps at C2, C3, C4 that filter > 50Hz
X, Y, Z outputs to MCU A/D converters
S1 self test switch
Soldered to main PCB
3.0V supply
X & Y gyro outputs with low pass filter, to A/D
C5-C6 for internal regulation
Accelerometer vector R projected onto the xz and yz planes forms angles Axz and Ayz (yellow), which represent current tilt
Gyro yields instantaneous velocity and direction of the same angles at regular interval T
Results merged into an improved estimated angular state
The algorithm’s output is the input to the linear control system
IMU simulation in C
◦ Calculates improved angular estimation from simulated 12-bit A/D outputs
◦ Lacks port definitions, timing constraints
Goals/Objectives
Reliably detect different shapes, surfaces
Under various light and noise conditions
One facing down, one facing forward
Specifications/Requirements
Detect the ground at 1-15 feet
Obstacles 30˚ arc forward 1- 8 feet
6 inches resolution
Options
◦ Infrared proximity sensor
Cheap, ineffective in sunlight
◦ Laser range finder
Too expensive
Ultrasonic range finder
Affordable
Reliable
Good range
Maxbotix LV-EZ2
◦ $27.95 each
◦ 1 inch resolution
◦ Max range 20 feet
◦ Detection area depends on voltage, target shape
person ≈ 8 ft.
wall ≈ 20 ft.
wire ≈ 2-3 ft.
3 header pins on PCB
◦ 3.3 V supply
◦ Output to A/D
◦ Analog ground
Low pass filter
◦ Reduce noise
◦ 100 uf cap, 100 Ω res.
6 – 12 inches wire
◦ front sensor must have clear field i.e. no interference from propeller
Goals/Objectives
◦ Measure higher altitudes, beyond the range of the ultrasonic sensor
◦ Ensure that the copter stays under control
Quad-copter could fly beyond radio control range
AI protocol to limit altitude
◦ Overridden by ultrasonic when applicable
Requirements/Specifications
◦ Measure Altitude from 15 – 200 ft.
◦ 10 ft. or better resolution/accuracy
Options:
◦ GPS vertical component
unreliable
Barometric altimeter
Determines altitude from air pressure
More effective at higher altitudes
Won’t recognize uneven ground
HDPM01 – Hoperf Electronic
dual function altimeter/compass module with breakout board
Cost efficient solution
$19.90 vs. $45.00 (separate)
Goals/Objectives
◦ Establish an external reference to direction
◦ For maintaining a stable heading, turning, and establishing a flight path in autonomous mode
◦ The module should not suffer from excessive magnetic interference (compass)
◦ The module should be separate so that it can be placed away from interfering fields and metals
(compass)
Specifications/Requirements
◦ Accurate to within 3 degrees
6 header pins from PCB
◦ Supply at 5 V
◦ Digital ground
◦ Master clock
◦ I 2C serial data line
◦ I 2C serial clock line
◦ XCLR – A/D reset
◦ Pull-up resistors
High to transfer
Goals/Objectives
◦ Needed for autonomous flight mode
◦ The system should establish an external reference to position (latitude and longitude)
◦ The system should have a serial output compatible with the MCU, UART preferred.
◦ Should be compact, requiring minimal external support (internal antenna)
Requirements/Specifications:
◦ The system should be accurate to within 3 meters
(latitude and longitude).
◦ The update rate should be at least 1Hz.
Options
◦ No practical alternative to GPS module
With a GPS system, the quad-copter can autonomously move toward a given coordinate
And, return to point of origin
MediaTek MT3329 GPS 10Hz
$39.95 for module + adapter (special offer)
Integrated patch antenna (6 grams total)
1-10 Hz update rate
UART interface
MediaTek chip
◦ Sensitivity: Up to -165 dBm tracking
◦ Position Accuracy: < 3m
◦ Coding/Library support available from DIYdrones
Adapter board (wired to main PCB)
◦ Facilitates testing, easily switched from prototype board to final board
◦ Backup battery
◦ LED: blinks when searching, lit when locked
Main PCB will have an EM406 connector (6 pins)
Rx and Tx to MCU
5.0 V supply, 3.0 V enable, digital ground
20 cm EM406 compatible connector cable
Module can be attached to the frame (tape/Velcro)
Able to produce PWM signal
Send/Receive UART signals
Hardware ADCs not just comparators
I2C capability
16-bit timers with 4 output compare registers
2 UART ports
8 ADC ports (minimum 10-bit accuracy)
0 – 16Mhz @ 4.5 – 5.5 volts
256 KB Flash memory
4 KB RAM
4 16-bit timers
16 10-bit ADC
4 UART
TWI (I2C)
The main MCU will be programmed through the SPI pins using the AVRISP-
MKII.
AVRStudio 4.18 is the IDE that will be used for development
The main MCU will be responsible for the obtaining sensor data, updating the control system, and talking to the wireless communication unit
struct PID_Status { desired_value;
Kp_Gain;
Ki_Gain;
Kd_Gain; max_error; max_summation_error;
}
Init_PID(struct PID_Status *PID_S, Kp_Gain, Ki_gain,
Kd_gain); updatePID(struct PID_Status *PID_S);
A PWM signal will be produced by the
MCU to control the motors
Once the PWM signal is setup, they run independent of the MCU
Functions:
◦ PWM_Setup( );
◦ updateMotor(uint8_t motor, uint16_t speed);
◦ startMotors( );
◦ stopMotors( );
The ADC will be used to retrieve data from the sensors.
A switch statement will be used to gather data correctly
Functions:
◦ ADC_Setup( );
◦ ISR(ADC_vect);
Possible sensor data structures to store sensor data:
Struct struct sensors{ uint16_t accelX; uint16_t accelY; uint16_t accelZ; uint16_t gyroX; uint16_t gyroY;
};
Array uint16_t sensors[5]; sensors[0] = accelX; sensors[1] = accelY; sensors[2] = accelZ; sensors[3] = gyroX; sensors[4] = gyroY;
I2C will be used to retrieve data from the compass and barometer
◦ MCU – master
◦ Compass/Barometer – slave
Functions:
◦ I2C_Setup( );
◦ ISR(TWI_vect);
UART is going to be used to retrieve data from GPS module and send/receive data from the wireless communication module
Functions:
◦ UART_Setup( );
◦ ISR(USART1_RX_vect);
◦ ISR(USART1_TX_vect);
◦ ISR(USART2_RX_vect);
◦ ISR(USART2_TX_vect);
To communicate with the computer via
UART, a UART to USB chip will be used
◦ The FT232RL will be used to create this link
◦ This chip creates a virtual communication port on the computer which can be accessed easily using C#
Picture used with permission from Sparkfun.com
Schematic of FT232RL:
Picture used with permission from Sparkfun.com
C# will be used for coding the GUI
Standard Libraries for serial port communication
Easy to learn
Function of GUI
◦ Retrieve sensor data
◦ Monitor control system
◦ Send GPS locations to copter
Wireless
Comm
Compass/
Barometer
UART
I2C
ADCs
GPS
PIDs
IMU
PWM
Update
Work on the 2.4 GHz band
Data rate of minimum 56 Kbs
To have a range of 100 meters
To cost less than $70
The transceiver is TI’s CC2520
The CC2520 has a range of 100 meters
The data rate of the CC2520 is 250 Kbs
For the protocol TI’s SimpliciTI will be used
The microcontroller to control the
CC2520 will be the MSP430F2616
Antenna at 2.4 GHz
Dipole Antenna
Works at the 2.4 GHz frequency
Has a gain of 5 dBi
50 ohm impedance
The is big and heavy
If weight becomes an issue a smaller antenna will be used
Interface the CC2520 with a 50 Ohm antenna
Need to match the impedances of the
CC2520 and the antenna
Murata chip Balun LDB182G4510C-110
This design reduces the impact of the
PCB design on performance
Interfaced through a SPI connection
MSP430 as master and CC2520 slave
Is a small and simple protocol
6 functions to get a basic peer to peer network
Available for free for TI’s chips
Programming will be through Eclipse using the open source MSPGCC compiler
The MSP430 will be flashed using TI’s debugger MSP-FET430UIF
SMPL_Init(&linkID)
SMPL_Link(&linkID)
SMPL_LinkListen(&linkID)
SMPL_Send(&linkID, uint8_t *msg, uint8_t len)
SMPL_Receive (&linkID, uint8_t *msg, uint8_t *len)
SMPL_Ioctl()
Struct smplStatus_t.
Name
SMPL_SUCCESS
SMPL_TIMEOUT
SMPL_BAD_PARAM
SMPL_NOMEM
SMPL_NO_FRAME
SMPL_NO_LINK
SMPL_NO_JOIN
SMPL_NO_CHANNEL
Description
Operation successful.
A synchronous invocation timed out.
Bab parameter value in call.
No memory available. Object depend on API
No frame available in input frame queue.
No reply received for Link frame sent.
No reply received for Join frame sent
Channel scan did not result in response on at least 1 channel.
SMPL_TX_CCA_FAIL
SMPL_NO_PAYLOAD
SMPL_NO_AP_ADDRESS
Frames transmit failed because of CCA failure.
Frame received but with no application payload.
Should have previously gleaned an Access Point address but we none.
Developing this is harder then using an
Xbee
Open source software
TI’s Code Composer
IAR Workbench
Hardware is done
Software will take time
Range of 100 meters
Weight less then 20 grams
Be powered by any of the powered by a standard battery
Not interfere with the 2.4 GHz wireless communication
Pre-packaged video system: 24ghzmiwicoc
Mount camera with transmitter on Quad-
Copter
Power Supply will be a 9 volts battery
Receiver connects to TV or Display with composite connectors
Subsystem
Main Software
Linear Control System
Frame
Motors
Power Supply
Microcontroller
Sensors
Wireless Communication
Video System
PBC Board
Autonomous Algorithm
Responsible
Josh
Engers
All
David
David
Josh
Steve
Engers
Steve
All
All
Goal was to be under $700
Current spent $460.61
Difference $239.59
Parts Acquisition at 80%
Doing well!
Research: 90%
Design: 75%
Hardware Acquisition: 80%
Programming: 20%
Testing: 20%
Prototyping: 20%
Overall: 30%