Lab 5 System Design Thomas Watteyne EE290Q – Spring 2010

Slides:



Advertisements
Similar presentations
Lab 1 I/O, timers, interrupts on the eZ430-RF2500 Thomas Watteyne EE290Q – Spring 2010
Advertisements

Interrupts, Low Power Modes and Timer A (Chapters 6 & 8)
Chung-Ta King National Tsing Hua University
Chung-Ta King National Tsing Hua University
Digital Thermostat and Data Logger Brandon Wagner and David Southwick.
Swish Sleeve Software Design Narrative Team 7: Stephen MacNeil, Michael Kobit, Sriharsh Achukola, Augustus Hong 1Team 7 - Swish Sleeve.
Comm Operator Introduction Serial Port Tool
2008EECS Dealing with Analog Signals A Microcontroller View Jonathan Hui University of California, Berkeley.
7/13/2007AIIT Summer Course - D#1 Wireless Embedded Systems and Networking Lab Day 5: Part 1: TinyOS Programming on Open Source Distribution Jaein Jeong.
Software Design Project
EE 4272Spring, 2003 Chapter 14 LAN Systems Ethernet (CSMA/CD)  ALOHA  Slotted ALOHA  CSMA  CSMA/CD Token Ring /FDDI Fiber Channel  Fiber Channel Protocol.
June 2008 WEI - L05 sense 1 Wireless Embedded InterNet working Foundations of Ubiquitous Sensor Networks Triggers and Sensing David E. Culler University.
CSULB EE400D TECHNICAL DOCUMENTATION ARDUINO/ARXTERRA PROGRAMMING PART II - TELEMETRY.
1 Application Accessory For Cellular Phone - Final Presentation - Performed by: Omer Kamerman Avi Feldman Project instructor: Boaz Mizrachi Technion –
Robotics Research Laboratory Louisiana State University.
Parallax 4x20 LCD (part number 27979) with Arduino Duemilanove
EE 1106: Introduction to EE Freshman Practicum
Project #2 Mobile Multiplayer Game: Tic-Tac-Toe Project #3 TinyOS Sensing Application EE194WIR Matt Magpayo
MSP 430 Project ECE 300 Spring 2004 William S. McLemore Ruben D. Briano Cheng-Han Tsai.
Architectures and Applications for Wireless Sensor Networks ( ) Sensor Node Programming II (UART and Radio) Chaiporn Jaikaeo
Introduction to PIC-C. Required Software PIC-C Compiler Firmware Downloader Driver for the USB->Serial Adapter.
MCU: Interrupts and Timers Ganesh Pitchiah. What’s an MCU ?
CS4101 嵌入式系統概論 Analog-to-Digital Converter 金仲達教授 國立清華大學資訊工程學系 ( Materials from MSP430 Microcontroller Basics, John H. Davies, Newnes, 2008 )
MSP430 Semester Project ECE 300 Circuits. MSP Bit RISC Micro-controller Low Power 12 Bit A/D Converter 6 Digital I/O ports (8 lines per port) 2.
LAB 8: Program Design Pattern and Software Architecture
3/2/2015IoET - L05 sense1 Wireless Embedded InterNet working Foundations of Ubiquitous Sensor Networks Triggers and Sensing David E. Culler University.
Ultra-low Power Motion Detection using the MSP430F2013.
Robotics Research Laboratory Louisiana State University.
Data files and databases. Need a control to browse to a file Standard controls for drive folder and list not much use The CommonDialogs control offers.
Simulation of Distributed Application and Protocols using TOSSIM Valliappan Annamalai.
Development of a microprocessor project with LPC2388 development board.
Project 2 Mobile Game: Hexagon Zhong Zou, Joseph Ferrara EE194 WIR.
Introduction to PIC-C. Installing PIC-C Goto Username/pass = guest/cpecmu Download and install:  IDEUTIL  PCWHD.
Slide 1 Project 1 Task 2 T&N3311 PJ1 Information & Communications Technology HD in Telecommunications and Networking Task 2 Briefing The Design of a Computer.
WISP.
Engineering H192 - Computer Programming Gateway Engineering Education Coalition Lect 29P. 1Winter Quarter Software Design Project Lecture 29.
UBI >> Contents Lecture 8 SAR ADC MSP430 Teaching Materials Texas Instruments Incorporated University of Beira Interior (PT) Pedro Dinis Gaspar, António.
BFF Flowchart – LINX V1 START SleepMs Transmit Initialize Ports Listen
ARDUINO 1. Basics  Comments  /* * Blink * * The basic Arduino example. Turns on an LED on for one second, * then off for one second, and so on... We.
Basic Circuits – Lab 4 Serial and OSC (maybe some theory too) Xmedia Spring 2011.
A.M.E.N. Autonomous Meteorological Embedded Network for Fire Fighting Fan Zhang, Dmitry Stomakhin, Flavio Sira, Brian Hansen.
CSCI1600: Embedded and Real Time Software Lecture 16: Advanced Programming with I/O Steven Reiss, Fall 2015.
SYSTEM SOFTWARE DESIGN JAMES ZUROSKE Pet Proximity Sensor.
Lab 3: ADC.
INTERNET OF EVERYTHING SDU 2016 Week 4. Simple Digital and Analog Inputs  The Arduino’s ability to sense digital and analog inputs allows it to respond.
Preliminary Design Review By: Alireza Veiseh Anh-Thu Thai Luai Abou-Emara Peter Tsang.
Introduction to the DE0 Board Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Computer Logic Design.
Casne.ncl.ac.uk Taking care of the CrumbleBot Please do NOT stress the robot's motors 1.Do NOT push the robot 2.Do NOT hold the.
Microcontroller basics Embedded systems for mortals.
Programming and Debugging with the Dragon and JTAG Many thanks to Dr. James Hawthorne for evaluating the Dragon system and providing the core content for.
Final Design Review By: Alireza Veiseh Anh-Thu Thai Luai Abou-Emara Peter Tsang.
Why does it need? [USN] ( 주 ) 한백전자 Background Wireless Sensor Network (WSN)  Relationship between Sensor and WSN Individual sensors are very limited.
1. PIC ADC  PIC18F877 has 8 analog input channels i.e. port A pins(RA0 to RA5) and port E pins(RE1 and RE2). These pins are used as Analog input pins.
Lab 4 CRC, PDR vs. distance, preamble sampling Thomas Watteyne EE290Q – Spring 2010
Recall the Container Thermometer
Chip Config & Drivers – Required Drivers:
Assist. Prof. Rassim Suliyev - SDU 2017
Introduction Why low power?
3DoT Technical Documentation
CS4101 Introduction to Embedded Systems Lab 6: Low-Power Optimization
Microcontroller basics
Prof. Chung-Ta King Department of Computer Science
COMP211 Computer Logic Design Introduction to the DE2 Board
National Tsing Hua University CS4101 Introduction to Embedded Systems Lab 6: Serial Communication Prof. Chung-Ta King Department of Computer Science National.
MSP430 Teaching Materials
Programming 2: The Arduino IDE & First Sketches
Lab 1. Introduction to the DE2 Board
Lecture 4. Introduction to the DE2 Board
Prof. Chung-Ta King Department of Computer Science
Introduction to Arduinos
Presentation transcript:

Lab 5 System Design Thomas Watteyne EE290Q – Spring

2 Result

3 sniffer Topology originX Y node gateway displays raw bytes in hex format sends packet every 1+U(2) seconds displays GUI

4 Packet Structure 0length 10x source 50x destination 9x_coord 10y_coord 11type 12temperature 13battery choose 0x01 measure by hand (unit: feet) 0x01 ADC

5 Medium Access Pure Aloha Wait for 1+U(2) seconds Send a packet Listening not required

6 SubProjects 1.Send an empty packet with the right format 2.Measure the battery’s voltage 3.Measure the temperature 4.Obtaining a random number 5.Program a sniffer (with text based output) 6.Program a gateway (binary output) 7.Program the GUI

7 1. Send Empty Packet with the right format Create project lab5_node with C file called system_node Define global variables MYADDR, MYX, MYY at the beginning of the file In main(): – Initialize the board – Initialize the radio – Initialize a timer which fires regularly (e.g. every 2s) When timer fires – Fill all the fields except temperature and battery – Transmit the packet LEDs: – red: I send – (green: I receive)

8 2. Measure the battery’s voltage Create a simple project which reads the voltage when you press a button. You can use the debug mode of IAR to freeze the MSP and read the value The following functions returns the battery voltage, make sure you understand every line! uint8_t get_battery() { int battery=0; ADC10CTL1 = INCH_11; // AVcc/2 ADC10CTL0 = SREF_1 + ADC10SHT_2 + REFON + ADC10ON + ADC10IE + REF2_5V; for( battery = 240; battery > 0; battery-- ); // delay to allow reference to settle ADC10CTL0 |= ENC + ADC10SC; // Sampling and conversion start __bis_SR_register(CPUOFF + GIE); // LPM0 with interrupts enabled battery = ADC10MEM; ADC10CTL0 &= ~ENC; ADC10CTL0 &= ~(REFON + ADC10ON); // turn off A/D to save power battery = (battery*25)/512; uint8_t batterybyte = battery&0xFF; return batterybyte; }

9 3. Measure the temperature Create a simple project which reads the temperature when you press a button. You can use the debug mode of IAR to freeze the MSP and read the value The following functions returns the temperature, make sure you understand every line! uint8_t get_temperature() { int degC; volatile long temp; ADC10CTL1 = INCH_10 + ADC10DIV_4; // Temp Sensor ADC10CLK/5 ADC10CTL0 = SREF_1 + ADC10SHT_3 + REFON + ADC10ON + ADC10IE + ADC10SR; for( degC = 240; degC > 0; degC-- ); // delay to allow reference to settle ADC10CTL0 |= ENC + ADC10SC; // Sampling and conversion start __bis_SR_register(CPUOFF + GIE); // LPM0 with interrupts enabled degC = ADC10MEM; ADC10CTL0 &= ~ENC; // oC = ((A10/1024)*1500mV)-986mV)*1/3.55mV = A10*423/ // the temperature is transmitted as an integer where 32.1 = 321 // hence 4230 instead of 423 temp = degC; degC = (((temp - 673) * 4230) / 1024); if( tempOffset != 0xFFFF ) { degC += tempOffset; } return (uint8_t)(degC&0xFF); }

10 4. Obtain a random number Create a simple project which blinks the LED with a period of 1+U(2) seconds. The key function is MRFI_RandomByte(), explore in the drivers how it is implemented Use the scope to measure the timing; evaluate how uniform the distribution isreads the temperature when you press a button. You can use the debug mode of IAR to freeze the MSP and read the value

11 5. Program a sniffer Create project lab5_sniffer with C file called system_sniffer.c In main() – Initialize the board – Initialize the radio – Enable serial communication When you receive a packet, output every byte to the serial port using the following format: “ : \r\n” Check the content of the packets using PuTTY

12 6. Program a gateway Create project lab5_gateway with C file called system_gateway.c In main() – Initialize the board – Initialize the radio – Enable serial communication When you receive a packet, – In text mode, output every byte to the serial port using the following format: "from to XXX: T=XX.XC B=X.XV\r\n“ – In binary mode, output a string of uint8_t values using the following format: output[0] = src; output[1] = dest; output[2] = x_coord; output[3] = y_coord; output[4] = type; output[5] = temperature; output[6] = battery; Pushing the button should switch the output mode

13 7. GUI Create a Python GUI called system.py which opens the serial port and receives lines from the mote in the format: output[0] = src; output[1] = dest; output[2] = x_coord; output[3] = y_coord; output[4] = type; output[5] = temperature; output[6] = battery; Followed by \r\n Display the motes in space, using x and y, and display the temperature and battery voltage