86fd53b55d35b487d82748ccc8eefd44.ppt
- Количество слайдов: 23
Using a Web 2. 0 Approach for Embedded Microcontroller Systems J. O. Hamblen and G. M. E. Van Bekkum School of Electrical and Computer Engineering, Georgia Institute of Technology, Atlanta, Georgia, USA
Microcontroller-based Embedded Systems Courses • Similar undergraduate courses can be found at many schools (including EE, Cmp. E, and CS) • Most new design activity is now focused on 32 -bit devices • C/C++ remains the most widely used language in industry • Networking support is often needed – “Internet of Things” • Many hard adoption choices to make initially: – – – Textbooks Microcontroller Tool chain Development board Sensors and I/O Devices Software Support Infrastructure (Drivers and Code Examples)
ARM’s mbed Rapid Prototyping Platform • Hardware & Software, using a Web 2. 0 Solution Website with code examples High-level Peripheral APIs C/C++ Cloud Compiler DIP Prototyping Form-Factor
ARM mbed microcontroller module • ARM 32 -bit Cortex-M 3 MCU in a Prototyping Form-Factor – – – 0. 1” pitch 40 -pin DIP module with “USB Flash Drive” interface to PC Nothing to install or configure, practical for breadboard and PCBs Powered from USB cable, battery, or external power supply Module cost is about half the price of a current college textbook Free accounts for students in a class via email
Microcontroller Hardware Features • NXP 1768 32 -bit ARM Cortex-M 3 SOC running at 96 MHz • 512 KB FLASH and 64 KB RAM on-chip • Ethernet, USB, CAN, SPI, I 2 C, Serial, PWM, ADC, and DAC I/O interfaces are all on-chip
Easy to extend it to store lots of data • A final system might want to store lots of data • Hardware for an SD Card is minimal – – SPI Port connection using simple breakout Only 4 wires & power needed File system code provided Can also use a USB flash drive GND MISO SCL Vcc MOSI n. CS – p 6 - p 7 – p 5 - p 8
Baseboard or Breadboard? • A baseboard contains the common I/O connectors and a small prototyping area, so for basic labs there is nothing to wire up. • A breadboard will require wiring some connections, but is more flexible for custom hardware designs and design projects. Most external I/O devices are serial (i. e. , Ethernet, USB, SPI, I 2 C, RS 232) and will only need a few jumper wires.
Breakout Boards for Student Breadboards • Breakout Boards make it easy for students to use modern surface mount devices on a breadboard – Low-cost, preassembled, and commercially available – Wide selection of devices for the new large hobbyist market
Popular Breakout Boards for Student Projects Purpose Display ASCII text Display text and graphics VGA display on a monitor Add digital audio output Touch switch or keypad Measure motion or orientation Measure environmental data Location and speed Direction Measure Distance Ultrasonic Range Cell phone network for data Wireless data transmission Displays 230 colors on LED Use PWM to drive DC motors Add networking Connect to a serial port Add USB thumb drive Add flash file system Add mouse and/or keyboard Sensor or Device B&W Text LCD Display Color LCD graphics display VGA controller MP 3/AAC/WMA decoder Touchpad controller MEMS Gyro & Accelerometer Temperature & Humidity GPS receiver Electronic Compass IR reflection Sonar (longer range than IR) Cell Phone modem module Zigbee/XBee RGB LED & driver H-bridge driver Mag. Jack connector RS 232 level convertor USB A connector Micro SD card connector PS/2 connector Interface, IC, and comments Parallel Digital - HD 44780 SPI – Nokia 6100 128 x 128 TTL Serial – PICASO-SGC SPI - VLSI VS 1033 I 2 C – Freescale MPR 121 I 2 C – ITG 322 & ADXL 345 Serial - Sensirion SHT 15 RS 232 Serial NEMA - various I 2 C - Honeywell HMC 6352 Analog or Digital - Sharp GP 2 xx Analog or Serial - Max. Sonar XL EZx RS 232 Serial, need SIM - various Serial – Digi XBee XBPxx SPI - Allegro A 6281 on Shift. Brite PWM – STMicro VNH 3 SP 30 Ethernet RS 232 Serial - various USB – various SPI – various PS/2 serial protocol
Web 2. 0 Tools • Dedicated Developer Web Platform – Custom Web 2. 0 tools and Cloud Compiler – User “Forum”, API Documentation in “Handbook” – Wiki Code Examples in “Cookbook”
Cloud Compiler • Cloud-Based C/C++ Compiler – – – Web 2. 0 browser-based IDE with personal file space “in the cloud” Nothing to install or configure, login from anywhere Based on the Keil Tools C/C++ compiler widely used in industry Javascript (AJAX) based environment for compiling code Only two mouse clicks to compile and download flash to run code
mbed I/O API Library • High-level I/O Peripheral APIs – – – Trades a bit of memory and CPU performance for ease of use Abstract software interfaces for controlling microcontroller hardware Intuitive peripheral access, encapsulation of implementation details Treat hardware and software the same Online “Handbook” with documentation & code examples for all APIs
Cookbook Wiki • User contributed code examples and hardware designs • Easy to import libraries and projects via web • Support for networking, displays, and many different types of sensors and I/O devices
Debug Support • No hardware breakpoints! – Would be nice, but can live without it given the other advantages – Not as big a drawback as we expected – Can also emulate small code segments using free Keil Tools offline • Four onboard easy to user LEDs – LEDs will also flash on a run time error • printf() prints over USB to any PC Terminal Emulator Program – module works like a USB Virtual COM Port
Student Design Projects • Teams of two students with two weeks for mini design project • Design project comes after two introductory labs
“Internet of Things” Student Projects • An internet enabled clock that syncs to a time server • Text LCD and network magjack breakout boards • Based on LCD and network drivers from the Cookbook
“Internet of Things” Student Projects • An internet radio receiver • MP 3 decoder chip, audio jack, network jack, and USB flash driver breakout boards • MP 3 and network drivers adapted from Cookbook examples
“Internet of Things” Student Projects • Universal Translator • MP 3 decoder chip, Text LCD, audio jack, network jack, PS/2 jack, and Micro SD Card breakout boards • Uses Google’s Internet APIs for translation and speech
Graphics and Games • • Classic Pong Game Nokia Cell Phone 130 by 130 Color LCD breakout board Small low-cost VGA breakout boards are also available Graphics driver used from Cookbook
Control Systems • A self-balancing two wheel robot using two low-cost geared DC motors with a built-in quadrature encoder feedback • H-bridge MOSFET driver, MEMs Gyro and Accelerometer breakout boards • Uses PWM for motor control, MEMs IMU, and a PID control loop - all from Cookbook code examples
Assessment Data 1 -strongly disagree … 3 -Neutral … 5 -strongly agree • • • I think the experience with labs that used breadboards with breakout boards was worthwhile. - 4. 4 I would prefer labs where everything was already connected on a circuit board even though I might have somewhat less flexibility to do different things on projects. - 1. 87 I would prefer an mbed design project rather than a third traditional lab assignment for mbed. – 4. 0 I would prefer the “cloud compiler” web browser approach versus a more traditional development tool that was only available for use on the laboratory PCs. (Assuming they have the same features) - 3. 6 I would prefer electronic copies of course materials versus traditional printed course materials and printed textbooks. (Assuming content and cost are about the same) - 3. 8 I prefer a team design project with presentations over a more traditional final exam. - 4. 86
Conclusions • There is some value in returning to a Student Breadboard approach for embedded systems labs • The cloud compiler approach works well for student labs and greatly reduces the computer support issues • Higher-level I/O support APIs work well for the new generation of microcontrollers and save development time • Networking is needed in these courses and leads to more interesting “Internet of Things” design project options • For such a course, having the all of the resources online may be a better option than printed textbooks and lab manuals. Students now appear to prefer online electronic copies.
References [1] M. Barr, “Real men program in C”, Embedded Systems Design, 2009 [Online]. Available: http: //www. embedded-systems. com/design/218600142 [2] ECE 4180 Embedded Systems Design [Online] Available: http: //www. ece. gatech. edu/~hamblen/4180 [3] Ashlee Vance, “You Too Can Join the Internet Of Things”, New York Times, September 20, 2010. Available: http: //bits. blogs. nytimes. com/2010/09/20/you-too-can-join-the-internet-ofthings/ [4] S. Ford, Rapid Prototyping for Microcontrollers, [Online]. Available: http: //mbed. org/media/press/mbed_whitepaper. pdf [5] ARM University Program [Online]. Available: http: //www. arm. com/support/university/ [6] J. Hamblen, “IC Sensor and Driver Breakout Boards” [Online]. Available: http: //mbed. org/cookbook/IC-Sensor-and-Driver-Breakout-Boards [7] Mbed Cookbook Wiki [Online]. Available: http: //mbed. org/cookbook/Homepage [8] Mbed Educational Program [Online]. Available: http: //mbed. org/handbook/Education [9] Mbed Handbook [Online]. Available: http: //mbed. org/handbook/Homepage [10] Mbed Forum [Online]. Available: http: //mbed. org/forum/ [11] J. Hamblen, “Mbed Student Projects”, 2011 [Online]. Available: http: //mbed. org/cookbook/Student-Projects
86fd53b55d35b487d82748ccc8eefd44.ppt