Presentation is loading. Please wait.

Presentation is loading. Please wait.

ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 11 Design Examples.

Similar presentations


Presentation on theme: "ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 11 Design Examples."— Presentation transcript:

1 ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 11 Design Examples

2 ENTC-489 Embedded Real Time Software Development Today’s Agenda Review – Modification to final Homework Assignment UAV Example will still be accepted Logger Example (new) will be accepted for same credit – Questions from last week, if any – Example Design

3 ENTC-489 Embedded Real Time Software Development UAV Final HW Assignment User Interface (serial port) has two modes – SP1 – Sends XY location to serial port every 5 seconds – SP2 – (default) Can receive commands from serial port “Dump” dumps the logged information RGB LED – solid red if Z axis deviates 5 degrees from vertical – otherwise, blinking green Accelerometer – Must be read often (100Hz or faster) to compute current XY and tilt EEPROM Logging – xy position of darkest location and light level – xy position of brightest location and light level – Latest xy position, every 5 seconds – Logging disabled in SP2 – Yellow LED on for 1 second when a higher or lower light level is logged. Switch monitoring – Debounce switches – SW1 Clears the XY location and log information and puts unit in SP1 mode – SW2 Puts unit in SP2 mode, stops logging 10% Position accuracy over 50 foot course is good for a 10 point bonus

4 ENTC-489 Embedded Real Time Software Development Logger Final HW Assignment User Interface (serial port) has two modes – SP1 – Sends time, temperature, humidity and light level to serial port every 5 seconds – SP2 – (default) Can receive commands from serial port “Dump” dumps the logged information “Erase” clears all entries from the log “Interval ??” sets the log interval to ?? seconds RGB LED – Solid red if light sensor is completely covered – Blinking blue at a rate chosen by student if the EEPROM log is full – Otherwise blink green at a rate chosen by student EEPROM Logging – Log Temperature, Humidity and Light Level at the rate set by the “interval” command, 15 second is the default – Log Time of S1 or S2 button press on sensor board and length of press (log on release) – Logging disabled in SP2 – Once EEPROM memory is full, stop logging Switch monitoring – Debounce switches – SW1 on main board, puts unit in SP1 mode, starts logging – SW2 on main board, puts unit in SP2 mode, stops logging – S1 and S2 on sensor board monitored for status and length of press Bonus LED (10 points) – Use accelerometer to determine angle of the board. If the angle exceeds 20 degrees yellow light is solid, otherwise yellow light blinks and a rate determined by student

5 ENTC-489 Embedded Real Time Software Development Example Design Cellular Data Logging – Server Interface Cellular Modem TCP/IP Connection – Analog Sensors – Digital Sensors – Store Data in local flash

6 ENTC-489 Embedded Real Time Software Development Server Interface Requirements Continuous connection (when possible) to server via tcp/ip socket Information sent to server is acknowledged with a check sum When establishing/re-establishing server connection all un-acknowledged messages are sent Failure of server to acknowledge causes up to 3 retries, after 3 rd retry (4 th attempt) – Disconnect tcp/ip – Disconnect from the network – Power off modem – Wait for 15 minutes, then reconnect

7 ENTC-489 Embedded Real Time Software Development Analog Sensor Requirements Monitor at 1 Hz Compare to upper/lower limit values – If outside range send a TCP/IP message to server if connected – Log if not connected

8 ENTC-489 Embedded Real Time Software Development Digital Sensor Requirements Monitor using interrupts Debounce inputs, ignore changes less than 100mS Any status change sends TCP/IP message to server if connected Log if not connected

9 ENTC-489 Embedded Real Time Software Development Cellular Modem Requirements AT Commands to operate Asynchronous status messages – Lost network connection – Lost tcp/ip connection – Received tcp/ip packet – Connected to network All commands respond with “…OK\r\n” All Async messages end with “\r\n” and will not “insert” into a response from an AT command, all start with a “Tag String” and we know all the “Tag Strings”. TCP/IP AT Commands… – AT TCPOPEN – opens a tcp/ip socket – AT TCPSEND – sends a packet through a tcp/ip socket – AT TCPRECV – reads a packet received from a tcp/ip socket – AT TCPCLOSE – closes a tcp/ip socket Startup sequence involves several AT commands, takes 10s of seconds


Download ppt "ENTC-489 Embedded Real Time Software Development Embedded Real Time Software Development Week 11 Design Examples."

Similar presentations


Ads by Google