ECE 477 Digital Systems Senior Design Project Rev 8/11

Total Page:16

File Type:pdf, Size:1020Kb

ECE 477 Digital Systems Senior Design Project Rev 8/11

ECE 477 Digital Systems Senior Design Project Rev 8/11

Homework 3: Design Constraint Analysis and Component Selection Rationale

Team Code Name: VIPER Group No. 1 Team Member Completing This Homework: Justin Huffaker E-mail Address of Team Member: jhuffake @ 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:

SCORE DESCRIPTION Excellent – among the best papers submitted for this assignment. Very few 10 corrections needed for version submitted in Final Report. Very good – all requirements aptly met. Minor additions/corrections needed for 9 version submitted in Final Report. Good – all requirements considered and addressed. Several noteworthy 8 additions/corrections needed for version submitted in Final Report. Average – all requirements basically met, but some revisions in content should 7 be made for the version submitted in the Final Report. Marginal – all requirements met at a nominal level. Significant revisions in 6 content should be made for the version submitted in the Final Report. Below the passing threshold – major revisions required to meet report * requirements at a nominal level. Revise and resubmit. * Resubmissions are due within one week of the date of return, and will be awarded a score of “6” provided all report requirements have been met at a nominal level.

Comments: Comments from the grader will be inserted here. ECE 477 Digital Systems Senior Design Project Rev 8/11

1.0 Introduction VIPER is a virtual/augmented reality system. It will track a user’s head location and orientation and display an image based on that data. As the user walks around the table top environment there head will move which in turn moves the corresponding virtual camera changing the user’s perspective of the virtual environment. Tracking a user’s head location requires the use of filters to clean up noisy signals. For VIPER it was decided to use a Kalman filter. This requires data to be collected from an accelerometer, gyroscope, magnetometer, camera, and ultrasonic system. Since the primary goal of this project is to allow the user to experience a virtual environment, the head tracking system needs to accumulate as little error as possible. So the primary constraint for this project is on the data collection and Kalman filter implementation. The second guiding constraint is to make the package as portable as possible. The updated PSSCs for this project are as follows, 1. The ability to communicate time stamp data wirelessly between the base unit and head unit. 2. The ability to display images to the video glasses. 3. The ability to calculate estimate of angle and position of head with respect to a origin point unit using accelerometer, gyroscope, compass, visual data, and ultrasonic data. 4. An ability to find angle displacement of head relative to IR beacon origin using glasses mounted camera. 5. An ability to find distance from base to head unit using ultrasonic emitter and receiver. The updated block diagram is available in Appendix B.

2.0 Design Constraint Analysis In this report several major design constraints are outlined that guided part selection. First the computation requirements of our sensors, microcontrollers, and processor are considered. Next the interface requirements and peripherals of our microcontrollers, sensors, and microprocessor are evaluated. After that the power requirements of the system are evaluated. Then the packaging requirements are considered. This is followed by the cost goals being outlined. Finally considered parts are compared based on the required constraints.

-2- ECE 477 Digital Systems Senior Design Project Rev 8/11

2.1 Computation Requirements The primary design constraint for this system is the update rate required by the Kalman filter so that smooth motion is achieved. For a Kalman filter developed in part by Greg Welch [2], that uses optical positioning sensors the optimal update speed was 40 Hz. We set this as our sensor update constraint saying that all of the sensors should optimally update faster than this rate. Since we are implementing a Single Constraint At A Time Kalman Filter, as soon as new sensor data is available the Kalman Filter can run through its update process. This requires that the microprocessor that is doing the update sequence is fast enough to perform the required updates at the sensors sample rate. Again based off of the Kalman filter equations we estimated that each update cycle will take between 100 – 500 floating point operations. The range depends on the sensor being updated, for example updating due to a Gyroscope is faster than for an Accelerometer. Assuming an average of 250 floating point operations per update per sensor, and assuming that all five sensors, three of which have three axis, update at 40 times per second. A total number of 110,000 floating point operations are needed by the Kalman Filter each second. Also along with these computations the microprocessor has to output about 30 frames per second of image data to the video display glasses. The other major computational requirement is the image processing microcontroller. The micro has to transfer pixel data from the camera and compute the focal point of the recovered image. For the camera we selected, the output data bus is limited by the speed of the attached microcontroller. To achieve 40 fps at 126x68pixels the required pixel output speed is about 400 kHz. Since this might be impractical for a microcontroller to perform at we decided that the optical system will update at 20 fps, the pixel output speed halves and becomes about 200 kHz. This might still be too large so a buffering system might be employed to maximize the output pixel rate. The Beacon board microcontroller needs to operate at 80 kHz so that a 40 kHz PWM signal can be generated. Last the IMU microcontroller needs to operate at a speed capable of receiving and outputting the incoming sensor data. 2.2 Interface Requirements First the Microprocessor needs to be able to communicate with the IMU and visual processing microcontrollers. This can be done with RS-232 or I2C. Also the video glasses accept composite

-3- ECE 477 Digital Systems Senior Design Project Rev 8/11 or VGA input. For the IMU microcontroller three I2C interfaces are required for communicating to the accelerometer, gyroscope, and magnetometer. Also a UART connection is need for communication with the XBee module, as well as a standard data in pin for input from the ultrasonic receiver. Finally the previously mention SCI or I2C interface to communicate with the microprocessor. For the visual processing micro, a serial pixel dumb interface will have to be implemented with 10 standard I/O pins and one I2C interface to send the camera commands. For communicating with the microprocessor a SCI or I2C interface is required. For the Beacon Board a two PWM outputs are needed to drive the ultrasonic emitter and IR LED. Based off information in [4] and [6], the voltage swing of the ultrasonic emitter driver was found to be 5 to 10 volts, so it will need to be optically isolated from the driving chip. Also a UART interface is needed to communicate with the XBee module. For I2C, RS-232, and UART communication interfaces the expected voltage swing will be from 0 V to 3.3 V.

2.3 On-Chip Peripheral Requirements The IMU and Visual processing microcontrollers both need a channel of RS-232 serial I/O or a channel of I2C. For the IMU micro 3 additional I2C channels are needed as well as a standard I/O channel. For the Visual processing micro along with the I2C or RS-232 channel, another I2C interface is needed along with 10 standard IO channels. For the beacon board micro 2 8-bit PWM channels are needed as well as 1 UART channel. Each of the sensors requires 3-axis 12-16 bit PWM channels to read incoming data precisely. Finally the microprocessor needs a VGA, DVI, or Composite channel, and it needs two RS-232 or I2C channels.

2.4 Off-Chip Peripheral Requirements There are no required off-chip peripherals. Some analog circuits are needed to amplify some output signals as well as most of the sensors have built in PWM peripherals. 2.5 Power Constraints Since this system will be battery powered and will be worn by the user. As little power consumption as possible is required. Since our primary goal is to make an excellent combination of sensors, we decided that our goal for the power consumption of the device is to have it run uninterrupted for an hour before requiring batteries to be replaced. As for heat dissipation we do not want the user to feel uneasy or excessively uncomfortable while using our device. So the

-4- ECE 477 Digital Systems Senior Design Project Rev 8/11 device should not heat up beyond what a user would find dangerous or unnerving. For this project we decided that the system temperature should stay below 80 degrees Celsius.

2.6 Packaging Constraints Since this device will be worn by the user, the IMU and Camera module have to be small enough to be mounted on the glasses without the glasses weight being significantly changed. The microprocessor needs to be able to fit easily into a backpack. The difference in weight due to the addition of this system should be less than 10 pounds. The Beacon board will be placed on the table so it shouldn’t be unreasonably big but doesn’t have very tight size constraints.

2.7 Cost Constraints We currently do not know any commercial products that our product will compete against. So our cost constraint is based on our group “Investor” budget of $1000. Since our product requires the use of a pair of video glasses we do not want our system to cost more than triple the cost of the glasses.

3.0 Component Selection Rationale The first components that were selected were the sensors. The MMA8452Q accelerometer was chosen because it was high precision, cheap, and it monitored all three axis. The MAG3110 magnetometer was selected for similar reasons. Finally the ITG-3200 gyroscope was chosen because it was the cheapest three axis gyroscope available. Each of these sensors have a wide operating range of 2V to 3.6V so should interface nicely with our selected microcontroller. XBee modules were selected for wireless interfacing because of ease of implementation and it allowed us to not create our own RF communication protocol [1]. The 40TR12B-R ultrasonic sensor set was chosen based off implementation information found in [4] and [6]. The CMOS camera sensor TCM8230MD was selected for its wide range of fps, resolutions it can be run at, and cheap cost. It was also very small which is optimal for being unencumbering for the user, and had low power requirements. After finding breakout board information in [5] this sensor was considered to be the best possible choice.

-5- ECE 477 Digital Systems Senior Design Project Rev 8/11

As for interfacing with the camera two microcontrollers were chosen as possibilities, AT91SAM7S64C and AT91SAM9XE256. We found implementation details for interfacing AT91SAM7S64C with TCM8230MD in [3]. The researcher was able to achieve 10 fps of data from the camera but was at the limit of the microcontroller. He actually mentions that using an ARM9 would allow for faster data rates but would be more expensive. This is why we selected AT91SAM9XE256 as the chip to be used because it has a clock speed of 180 MHz compared to the ARM7 chip which had a clock speed of 55 MHz. Since the research was only able to achieve 10 fps and our constraint is to collect 40 fps the faster operating speed is required. Other than the different operating speeds and that one chip is an ARM7 and one is an ARM9 the interfaces, operating voltage, SRAM memory, and flash memory were all comparable or superior in the ARM9 micro. For the IMU microcontroller the primary requirement is having four I2C interfaces, a UART interface, and a data-in that might have to be an analog to digital converter. Since four I2C interfaces are rare on a microcontroller there were not many options. PIC32MX534F064 was selected as being suitable because it operated at a high frequency 80 MHz, was cheap, and had all of the required interfaces. For the Beacon board microcontroller the cheapest 16 bit microcontroller with 2 PWMs, a UART, a standard 3V to 3.6 V operating voltage, and a reasonable clock speed was selected. Two microcontrollers were compared for this selection PIC24FJ16MC101 which ran at 40 MHz and the slightly more expensive PIC24FJ16GA002 running at 32 MHz. PIC24FJ16GA002 was selected because it was realized that PIC24FJ16MC101 could not run its PWM’s at the required frequency. The video display glasses Wrap 920s were selected based off of them being the cheapest glasses we could find that had the required interfaces and a decent resolution. Finally for the microprocessor unit two options were considered, the BeagleBoard-XM which runs a 1-GHz ARM Cortex-8™, it has a composite video out and a DVI out. It was considered a good option because it possesses a 3d graphics accelerator and has opengl support. Its small footprint was considered good because of the packaging constraints. Also it has support for I2C and RS-232 for communicating with the microcontrollers as well as a low input voltage requirement of 5V. Finally it has built in floating point hardware for the 3D graphics and the required Kalman filter computations. The other option looked at was the NX530Z motherboard

-6- ECE 477 Digital Systems Senior Design Project Rev 8/11 manufactured by bcm advance research. The motherboard has an Intel® Atom™ Z530P 1.6 GHz processor, and supports VGA as well as several com RS-232 ports to communicate with the microcontrollers. It has low power consumption but requires a larger input voltage of 12 Volts. The main reason for analyzing this board was because it was considered advantages to have the higher processer speed. Comparing the cost of the two motherboards the Beagleboard cost about $150, and the NX530Z cost $323. So the cheaper of the two was decided upon.

4.0 Summary This report describes the constraints that guided the selection of components for this project. The interface requirements, peripherals, power, packaging, and cost constraints were all considered. With the constraints outlined the selected parts to meet these constraints were discussed. For some of the part decisions options were considered with the better option being selected.

-7- ECE 477 Digital Systems Senior Design Project Rev 8/11

List of References

[1] Digi International Inc. XBee®/XBee-PRO® RF Modules[Online]. Available:http://www.sparkfun.com/datasheets/Wireless/Zigbee/XBee-Datasheet.pdf

[2] G. F. Welch, “SCAAT: Incremental Tracking with Incomplete Information,” Ph.D. dissertation, Dept. Comp. Science, Univ. of North Carolina at Chapel Hill, Chapel Hill, NC, 1996.

[3] J. L. Shumaker, "Interfacing the TCM8230MD CMOS Camera With an ARM7 Microcontroller," Army Research Labratory, Aberdeen Proving Ground, MD, Tech.Rep.ARL-TN-344, March 2009.

[4] K. Padmanabhan, “Microcontroller-based Ultrasonic Distance Meter,” Electronics for You, February, 2008, pp, 68-74.

[5] Mux. (2011, March 30). TCM8230MD Breakout[Online]. Available: http://sigalrm.blogspot.com/2011/03/tcm8230md-breakout.html

[6] T. K. Bhaumik, D. Sarkar, A Microcontroller Based Ultrasonic Range Finding Module for Target Detection from a Mobile Robot, Variable Energy Cyclotron Centre, Dec. 2009. [Online]. Available: http://www.vecc.gov.in/~sacet09/downloads/FINAL %20PDF/D22_TKBHAUMIK_VECC.pdf [Accessed: 30 Jan. 2012].

[7] Vuzix Coporation. Wrap 920 Video Eyewear[Online]. Available:http://www.vuzix.com/site/_photo/sheet/Wrap_920_Product_Sheet_329PB0005_ A.pdf

-8- ECE 477 Digital Systems Senior Design Project Rev 8/11

-9- ECE 477 Digital Systems Senior Design Project Fall2008

Appendix A: Parts List Spreadsheet

-10- ECE 477 Digital Systems Senior Design Project Fall2008

Vendor Manufacturer Part No. Description Unit Cost Qty Total Cost Digi-Key Circuitco Electronics 296-25798-ND ARM Cortex-A8 Beagleboard-XM 149.00 1 $149.00 LLC motherboard Sparkfun Freescale MAG3110 Triple Axis Magnetometer Breakout 14.95 1 $14.95 Sparkfun Freescale MMA8452Q Triple Axis Accelerometer Breakout 9.95 1 $9.95 Sparkfun InvenSense Inc. ITG-3200 Triple Axis Digital-Output Gyro ITG- 49.95 1 $49.95 3200 Breakout Sparkfun Digi WRL-08664 XBee 1mW Chip Antenna - Series 1 22.95 2 $45.90 (802.15.4) Sparkfun Toshiba TCM8230MD CMOS Camera - 640x480 9.95 1 $9.95 Jameco Jameco ValuePro 40TR12B-R Ultrasonic Sensor Set 8.49 1 $8.49 Vuzix Vuzix Wrap 920 Video Eyewear 249.99 1 $249.99 Digi-Key Atmel AT91SAM9XE256 MCU ARM9 256K FLASH 22.25 1 $22.25 Digi-Key Microchip PIC24FJ16GA002 IC PIC MCU FLASH 16K 2.84 1 $2.84 Digi-Key Microchip PIC32MX534F064H MCU PIC 64KB FLASH 64TQFP 6.82 1 $6.82

TOTAL $570.09

-11- ECE 477 Digital Systems Senior Design Project Fall2008

Appendix B: Updated Block Diagram

-12-

Recommended publications