Midway Design Review Team Maji Safi December 1
Midway Design Review Team Maji Safi December 1, 2015 Department of Electrical and Computer Engineering Advisor: Professor Siqueira 1
Maji Safi Sequeira Advisor Prof Jason Arble (EE) Kaitlin Menzie (CSE) Department of Electrical and Computer Engineering Peter Balkam (EE) Minh Tran (CSE) Advisor: Professor Siqueira 2
Problem: Economic Water Scarcity ● Currently: ○ Many people in developing countries only have access to unimproved water sources, which they must walk a great distance to reach ○ Humanitarian organizations and environmental engineers can’t get the data they need to implement sustainable long term solutions ● Our solution: ○ Create a cheap, simple device to alleviate the effects of water scarcity before ○ Sensors will be housed in easily-deployable “bubble” ○ Local users can access data through SMS; the general public can get larger amounts of data through the web app Department of Electrical and Computer Engineering 3
Proposed MDR Deliverables Jason Layout of GSM interface PCB UART connection antenna Connection between sensors and microcontroller (via I 2 C, analog, etc. ) water sensor functioning Peter Design and Implementation of p. H sensor Developed SW interface for sensor and u. C Implementation and SW interface for temperature sensor Minh Prototyped, verified, hardware design of turbidity sensor Developed SW interface for turbidity sensor for u. C Research alternative/intermediary channels to interface with twilio Begin system Integration Kaitlin Web App (fully functional, if not pretty) End user UI (SMS) Scientist UI (Web) Admdin UI (Mobile web) Device connectivity (SMS) Investigate image based microbial detection Department of Electrical and Computer Engineering 4
Department of Electrical and Computer Engineering 5
Block Diagram Department of Electrical and Computer Engineering 6
Device Sketch Department of Electrical and Computer Engineering 7
Department of Electrical and Computer Engineering 8
MCUs: NXP LPC 1768 vs. Arduino Uno ● Plan: LPC 1768 ○ Better Performance: Faster, smaller, more Flash/Prog. Mem, SRAM ○ HW Features: RTC module, 4 External Interrupts, Sleep modes + PMU, I 2 C, SPI, UART, CAN, etc. ● Cons: We were unable to write a functioning driver for the GSM module on the LPC 1768 ● Arduino (temporary u. C): ○ GSM 2 library is available for the Arduino ○ Known interface with Sensors & GSM 2 ○ MDR demo program is on the Uno Department of Electrical and Computer Engineering 9
GSM Module: GSM 2 Click (Quectel M 95) ● Currently: Click <-> Arduino ○ Pros: Easy to get working (no AT cmds), demonstrates our use case ○ Cons: Under utilization of M 95 (Data GPRS, UART Interface) ● May utilize additional MCU as intermediary interface LPC 1768 Click ○ CDR 1: Use Arduino/Teensy 3. 1/RPi ■ Enables HW application to parse, prioritizes commands (implements user-privileges, direct traffic from multiple rcv’d commands) ■ Generate interrupt sig. on behalf of Click (reliable) ○ CDR 2: Hijack signal from Click’s Bo. B to use as external interrupt (unreliable) ■ Obviates intermediary MCU (used to generate interrupt signal) ■ Req. create adaptation of Click’s Arduino driver library for LPC 1768 Department of Electrical and Computer Engineering 10
Device Sensors & Test Samples Liquids & Agitation: Water, Sugar, Rice, Oatmeal, Garlic Salt Settled & Disturbed Department of Electrical and Computer Engineering 11
Water Sensor Original Design: ● ● ● Complex hardware Digital Input False Positives Revised Design: ● ● ● ● Simple Voltage Divider Output voltage is read as an analog input to MCU Water of various degrees of contamination create an impedance of 75 -100 kΩ over 1 cm Code interprets output voltage and makes binary decision Probes If( 1<Vout <2 ) there is water Minimal false positives For CDR - include p. H to help make decision Substance Impedance (1 cm) Output Voltage Tap water 86 kΩ 1. 50 V Sugar Water 99 kΩ 1. 65 V Oatmeal Water 75 kΩ 1. 36 V Garlic Salt Water 65 kΩ 1. 23 V Rice Water 90 kΩ 1. 55 V Mud 4 MΩ 4. 76 V Department of Electrical and Computer Engineering to MCU 12
Turbidity Meter (TSW-10) ● Used in washing machine, suspended solids (straight-line), $5 ● Simple circuit, poor documentation (no equation for curve), questionable accuracy ● Output read as analog voltage signal from Pin 2 ● Picked points from datasheet plot & polynomial curve-fit to relate voltage-pin mapping: NTU based on data sheet Department of Electrical and Computer Engineering 13
Turbidity Meter (Testing) Tap Water Sugar Water Rice Water Oatmeal Water Garlic Salt Water Unstirred 357 -422 NTU Stirred 336 -450 NTU Unstirred 342 -376 NTU Stirred 330 -350 NTU Unstirred 455 -480 NTU Stirred 950 -1050 NTU Unstirred 875 -1150 NTU Stirred -1 (~. 76 -1. 17 V) Unstirred 670 -800 Stirred -1 (~1. 6 V-2. 0 V) Turb. (LR: 5, 500); 2000+ NTU Department of Electrical and Computer Engineering 14
p. H Sensor ● Reports ph as an analog voltage from 0 -5 v ● Interpret this value into a ph and return that value Department of Electrical and Computer Engineering 15
Temperature Sensor-TMP 36 Department of Electrical and Computer Engineering 16
Total Budgeting/Dev. Cost Part Cost (USD) In-Final Delivery? LPC 1768 50 Yes Arduino Uno Free Maybe (Stripped down) TSW-10 (Turbidity) 5 Yes Water Sensor Free Yes Temperature Sensor Free Yes p. H Sensor 30 Yes GSM 2 Click 44 Yes Twillio 1 Yes Sim Card Free Yes Total 130 Department of Electrical and Computer Engineering 17
Department of Electrical and Computer Engineering 18
Summary of Arduino Code ● ● Arduino receives SMS text from server Records servers phone number Runs test of each sensor and compiles data into a string String is sent as SMS text to stored phone number Current design is useful for getting instantaneous data from the sensors Department of Electrical and Computer Engineering 19
Data Logging & Storage Plan: ● Create a command that users can text: take. Reading(sensor. List, duration (minutes), frequency (minutes)) > sensor. List: 00001111 (last nibble corresponds to a sensor) > duration: seconds/minutes > frequency: minutes/hours Hardware: Storage device + MCU controller to support data logging HDD + nf. R Transceiver + Raspberry Pi (Remote but local to deployment site) Rpi, Storage Device Department of Electrical and Computer Engineering 20
Web App Overview Twilio Bubble User (water gatherer) Twilio Data Users App (node. js) Website RDB (Postgre. SQL) Server (AWS EC 2 instance) Department of Electrical and Computer Engineering Mobile Site Device Admins 21
Cloud Application Method Parameters Route Name Route Purpose POST Device ID SMS from device Receive text from device and write data POST - SMS from user Receive text from user and reply GET Device ID Device info View the status, metadata, tests & results of device POST Device ID Metadata Update metadata for a device GET query (ie region) Collected data View data according to input parameters GET, POST Device ID Device Settings View/change settings for a device (& text device) POST - New Admin Make a new device admin POST - Login Admin Authenticate admin POST - Update Admin Add/change/remove data about Department of Electrical and Computer Engineering 22
Department of Electrical and Computer Engineering 23
Current Demo Layout SMS Server Cell Phone SMS GSM Arduino Sensors Temperature Digital I/O Analog In Water Serial Turbidity p. H Department of Electrical and Computer Engineering 24
Proposed CDR goals Tweak sensors, refactor code Enclosure, mechanical means to get water to sensors Any phone can text to it to get data Switch over to mbed for added storage Add methods to sample over a time period Power supply Department of Electrical and Computer Engineering 25
Proposed CDR Deliverables Jason ● Improve accuracy of water sensor ● Power supply using a renewable energy source ● Create deployable enclosure for current sensors, and MCU Minh ● Refactor & adapt main code to LPC 1768 Build strip down version of Arduino Implement external interrupts GSM 2 -LPC Include storage device interface (data logging) Corrections to turbidity sensor reading Department of Electrical and Computer Engineering Peter Build submersible temperature sensor Refactor & adapt main code to LPC 1768 Adapt GSM 2 Uno code to work on LPC 1768 Stripped down version of Arduino MCU Kaitlin ● Have web app in production, totally done ● Have prototype of image processing setup 26
- Slides: 26