Design Constraint Analysis

advertisement
ECE 477
Digital Systems Senior Design Project
Rev 8/12
Homework 3: Design Constraint Analysis and Component Selection Rationale
Team Code Name: ___Doodle
Drive__________________________ Group No. 6__
Team Member Completing This Homework: ___Jun Pan_________________________
E-mail Address of Team Member: ___pan19_______ @ purdue.edu
NOTE: This is the first in a series of four “professional component” homework assignments,
each of which is to be completed by one team member. The body of the report should be 3-5
pages, not including this cover page, references, attachments or appendices.
Evaluation:
SEC
DESCRIPTION
1.0
Introduction (including updated PSSC)
2.0
Design Constraint Analysis
MAX
10
-
2.1
Computational Requirements
10
2.2
Interface Requirements
5
2.3
On-Chip Peripheral Requirements
10
2.4
Off-Chip Peripheral Requirements
5
2.5
Power Constraints
5
2.6
Packaging Constraints
5
2.7
Cost Constraints
5
3.0
Component Selection Rationale
20
4.0
Summary
5
5.0
List of References
10
App A
Parts List Spreadsheet
5
App B
Updated Block Diagram
5
TOTAL
Comments:
Comments from the grader will be inserted here.
100
SCORE
ECE 477
Digital Systems Senior Design Project
Rev 8/12
1.0 Introduction
Our design is Android tablet/phone application used to move a small vehicle. There will two
modes: indoor and outdoor mode. Paths will be drawn on the Android device while Google Maps
is displayed in outdoor mode. The vehicle will follow that drawn path using GPS. Indoor mode
will be a simple direction/speed control mode.
PSSCs
1.An ability to send and receive encoded data to an Android Device via Bluetooth
2.An ability to make a turn without stopping
3.An ability to navigate to a designated GPS coordinate with some approximation (GPS
uncertainty of about ~5m)
4.An ability to monitor the battery power level
5.An ability to detect distance to an obstacle and stop to avoid crashing
2.0 Design Constraint Analysis
Since our design is a mobile vehicle, the major constraint of it is the power component.
The power design should be small, efficient, rechargeable and reasonably durable, which
requires our circuit to have less power consumption than of the AC power design. The
second important constraint is that the wireless range should be reasonably large, a class 1
Bluetooth could be used to compensate/extend the communication range between vehicle
and the short range class 2 Bluetooth in the tablet [10]. Due to the navigation calculation, the
microcontroller should have floating point math library supported. Cost is not a major
concern of our design since no comparable design occurs in the market.
.
2.1 Computation Requirements
Although the whole design does not include graphic display, which is normally
considered very computational intensive, the geometrical calculation with floating point for
GPS coordinates transformation and route calculation inside microcontroller will be the
major computation parts in our design. Although the GPS coordinates and compass data will
be sent back as a string of characters, the library provided will store them in floating point
-1-
ECE 477
Digital Systems Senior Design Project
Rev 8/12
format. Also geometric operation such as sine, cos, tan, etc might be used in our program.
Floating point calculation is not supported by hardware but software library in most of the
microcontrollers. One floating point operation uses about 50 cycles in software versus 2
cycles in hardware.
The intensity of the computation also depends on how frequent the vehicle wants to
check the GPS and compass, recalibrate the route. Higher recalibrating frequency could
increase the accuracy of the route. But the calibrating frequency is limited by the refresh
rates of GPS and compass, and the respond time of mechanical part. GPS, which has the
slowest refresh rate among all the electronic components that we need, has a refresh rate of
10 HZ [2]. In worst case, the microcontroller has to finish 1 round of computation in 0.1s,
which is sufficient. In addition, the microcontroller is responsible for communicating with
Bluetooth module and GPS module periodically.
Different kinds of interrupts will be utilized in the program very frequently. Fast interrupt
handle is required by the architecture of the microcontroller.
2.2 Interface Requirements
The microcontroller is required to interface with Bluetooth and GPS module via UART
interface. The compass could be interfaced via I2C. The H-bridge is connected to PWM
pins. Either GPIO pins or ADC could interface Ultrasonic. Multiple status LEDs for
debugging could be directly driven by the GPIO pins of the microcontroller based on the
LPC 17xx datasheet ([1],page 45). The motors are controlled directly by H-bridge. The Hbridge includes optical isolation, which isolates the motor and microcontroller. 6 GPIO
pins(interrupt output, output A, output B for each encoder[3]) will be connected to 2 optical
encoders for measure the speed of both sides of the motors. All I/O interfaces will be
operated on 3.3V level. The logic part of H-bridge is powered by 5V but it is 3.3V input
tolerant.
2.3 On-Chip Peripheral Requirements
The design will require minimum of 2 UART, 12 GPIO pins 2 8-bits PWM and 1 I2C. 2
channels of UART are required for communicating with Bluetooth module and GPS
Module. DMA controller could help reduce overhead of MCU on data transfer between
-2-
ECE 477
Digital Systems Senior Design Project
Rev 8/12
UART and SRAM. But it is not required. 2 PWM channels are for interfacing with Hbridge. 1 I2C master is required for configuring and reading from digital compass. The
reading of each of 3 ultrasonic sensors could be done via 3 GPIO pins. 3 Input capture timer
channels are also required to collaborate with ultrasonic sensors. Finally, 2 pulse counter
channels are needed for measuring the motor speed via optical encoder.
2.4 Off-Chip Peripheral Requirements
The design will require several off-chip peripherals. A Bluetooth module will be used to
communicate with tablet via UART. A GPS module with 2.5~5 m accuracy will be used to
receive GPS coordinates of the vehicle location. Digital compass module is used for
determining the head direction of the vehicle. 3 ultrasonic sensors are used for detecting the
obstacles to the front and side. A H-bridge motor driver will be used for controlling the
motor of the left side wheels and right side wheels. Finally, 2 optical encoders are needed to
measure the speed of the motors.
2.5 Power Constraints
Since our design is portable, it will be a battery-powered vehicle. The battery pack that
we choose should be rechargeable. An IC for charging will be integrated to our design. In
addition, the battery pack should be small enough to fit in a 20cm*20cm area, which is the
approximate size of our vehicle. It has to be light enough not to contribute much weight to
the vehicle. Based on the DC motor that we choose, a battery pack with 7 to 12 Volts
voltage could be considered. Voltage regulator is needed to convert unregulated battery
voltage to 5V and 3.3V. All the components except H-bridge requires 3.3V supply. The Hbridge requires 5V supply but can be driven by 3.3V logic output from microcontroller ([4],
page 5).
Here is current estimation of each component ([1][3][4][5][6][7][8][9]):
Component
Voltage (V)
Current (mA)
Power (mW)
Micro
3.3
50
165
Bluetooth
3.3
30
99
-3-
ECE 477
Digital Systems Senior Design Project
Bluetooth Antenna
Rev 8/12
32 (15dBm)
Compass
3.3
0.83
2.7
GPS
3.3
Ultrasonic
3.3
20x3
198
Motor
9
210*2
3780
75
Total
4351.7
The major power-draining component in our design is definitely the motor. The battery
pack needs to be selected such that it could support minimum of this amount of power listed
above. Heat dissipation should not be a big problem in our case. The total power dissipation
is not very large. The vehicle should have large enough space for this amount of heat
dissipation.
2.6 Packaging Constraints
Due to limited torque provided by the motors, the weight of the vehicle could not be too
large. The whole PCB should be fit in the tray inside the vehicle kit. Additional space needs
to be left for placing the ultrasonic sensor. The wheels of the vehicle need to be strong
enough to spin on the bumpy road.
2.7 Cost Constraints
Since there is no comparable product in the market, no price competition needs to be
concerned. The microcontroller could be sampled from manufacturer directly. The major
parts of the cost will be the vehicle kit, GPS module and Bluetooth module. The vehicle kit
would be the major cost of the design. For easy prototyping purpose, breakout board will be
bought. It will cost much more than chip itself. The costs are listed in Appendix A.
3.0 Component Selection Rationale
Since we will be using floating point in our program, a 32-bits microcontroller with
enough peripherals and floating point math library will be our best choice. We decide to
pick from two different microcontroller from different manufacturer with different
architecture: LPC1768, an ARM Cortex-M3 based microcontroller and
PIC32MX360F128L, a PIC32 based microcontroller. Firstly, the cost is not a problem since
-4-
ECE 477
Digital Systems Senior Design Project
Rev 8/12
we can sample them for free. Both of them have enough on chip peripherals, but LPC1768
has 1 addition UART for us to use as on board debugging feature. Also LPC1768 has more
timer module than PIC32MX360F128L. LPC1768 includes an 8-channel DMA controller
that we can use to efficiently transfer data to UART. From programming environment
perspective, ARM provides better library support. It provides optimized floating point
library. The printf command to terminal will run quicker in LPC1768. Consider the facts
above, we choose LPC1768 as our microcontroller [1][9].
For Bluetooth module, we have Bluetooth USB dongle, RN42 and RN41 in our list.
Bluetooth USB dongle is easy to interface, but it doesn’t have any IO pin to indicate the
status of the Bluetooth. RN41 and RN42 are virtually the same thing. But RN41 provides
longer range connection than RN42, which is the reason we choose RN41 as our Bluetooth
module.
The third important part is GPS module, We decide to choose from UP501 and LS20031.
After comparing the features and specifications, UP501 has faster update rate(10 hz) and
more accuracy reading(2.0~2.5m with SBAS enabled). These two parameters are very
important to our design. Most importantly, LS20031 is out of stock. Thus we choose UP501
as our GPS module.
4.0 Summary
This project could be one of the conceptual prototypes, which redefine the world of
driving. The process of choosing between the microcontroller has been discussed. The
microcontroller we choose is sufficient to finish the task. All the peripherals chosen are
suitable for the design. The power constrains will guide our future power design.
-5-
ECE 477
Digital Systems Senior Design Project
Rev 8/12
5.0 List of References
[1] LPC1769/68/67/66/65/64/63, 32-bit ARM Cortex-M3 microcontroller[Online]
http://www.nxp.com/documents/data_sheet/LPC1769_68_67_66_65_64_63.pdf [Accessed:
Jan. 27, 2013]
[2] Sparkfun GPS Buying guide[Online]: https://www.sparkfun.com/pages/GPS_Guide
[Accessed: Jan. 27, 2013]
[3] How to use a quadrature encoder[Online]:
https://www.http://letsmakerobots.com/node/24031[Accessed: Jan. 27, 2013]
[4] L293, L293D QUADRUPLE HALF-H DRIVERS[Online]:
http://www.datasheetcatalog.org/datasheet/texasinstruments/l293d.pdf[Accessed: Jan. 27,
2013]
[5] RN-41/RN-41-N Class 1 Bluetooth Module [Online]:
http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Wireless/Bluetooth/rn-41-dsv3.3r.pdf[Accessed: Jan. 27, 2013]
[6] LSM303DLHC [Online]:
http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATU
RE/DATASHEET/DM00027543.pdf [Accessed: Jan. 27, 2013]
[7] UP501 Fastrax GPS antenna module [Online] http://www.ublox.com/images/downloads/Product_Docs/UP501_PS.pdf [Accessed: Jan. 27, 2013]
[8] Dagu Rover 5 Tracked Chassis with 2 Encoders 2WD robot chassis[Online]
http://www.mhobbies.com/dagu-rover-5-tracked-chassis-with-encoders.html [Accessed:
Jan. 27, 2013]
[9] PIC32MX Family [Online]
http://ww1.microchip.com/downloads/en/devicedoc/pic32mx_datasheet_v2_61143b.pdf
[Accessed: Jan.28, 2013]
[10] Class 1 Bluetooth Dongle Test [Online]:http://www.amperordirect.com/pc/r-electronicresource/z-reference-bluetooth-class1-myth.html[Accessed: Jan.28.2013]
IMPORTANT: Use standard IEEE format for references, and CITE ALL REFERENCES
listed in the body of your report.
-6-
ECE 477
Digital Systems Senior Design Project
8/12
Appendix A: Parts List Spreadsheet
Vendor
Manufacturer
Part No.
Description
Unit Cost
Qty
$35
$45.34
$79.95
$33.27
Sample
$14.95
Roving networks
Roving networks
Dagu
ST
740-1007-ND
740-1034-ND
RPDR5D
511-STEVAL-MKI106v1
RN-41 class 1 Bluetooth
RN-41 class 1 Bluetooth breakout board
Robot Chassis and motors/Encoders
LSM303DLHC adapter for prototyping
NXP
sparkfun
Mouser
ST
NXP
sparkfun
Fastrax
ST
LPC1768
ROB-10555
916-UP501
497-2940-5-ND
32-Bits Cortex M3 based microcontroller
wheels
UP501 GPS module with antenna
$31.35
L298HN Hbridge
Sample
2
$31.35
$0
Maxim
Maxim
Maxim
Maxim
Maxim
Maxim
MAX17502E
MAX17502F
DS2782
Buck DCDC Converter (to 3.3V)
Buck DCDC Converter (to 5V)
Stand-Alone Fuel Gauge IC
1
1
1
$0
$0
$0
Sample
Sample
Sample
TOTAL
-7-
1
1
1
1
1
Total Cost
digikey
digikey
Mhobbies
mouser
2
1
$35
$45.34
$79.95
$33.27
$0
$29.90
$254.82
ECE 477
Digital Systems Senior Design Project
Appendix B: Updated Block Diagram
-8-
8/12
Download