Project Description Title: Room temperature monitoring based on ambient light level threshold Overview: An Arduino monitors the ambient light in a room.

Slides:



Advertisements
Similar presentations
ARDUINO CLUB What we’re really doing. BASICS The setup() and loop() functions.
Advertisements

The Dewi Sant Greenhouse Control Project Lesson 2.
Loops (Part 1) Computer Science Erwin High School Fall 2014.
Happy Home Helper Jeremy Searle Apr 28, 2004 A Learning Home Automation System.
James Tam Loops In Python In this section of notes you will learn how to rerun parts of your program without having to duplicate the code.
1 CSI 101 Elements of Computing Fall 2009 Lecture #4 Using Flowcharts Monday February 2nd, 2009.
PRE-PROGRAMMING PHASE
E102 LAB Temperature Control of Heated Block. Temperature Controller Specifications Design, simulate and test a control system for temperature control.
Embedded Programming and Robotics
Chapter 1 Pseudocode & Flowcharts
A walkthrough of the SageQuest Mobile Control Online & ESC integration.
ARDUINO PROGRAMMING Working with the Arduino microcontroller.
Arduino Part 2 Topics: Serial Communication Programming Constructs: functions, loops and conditionals Digital Input.
Colorado Space Grant Consortium Gateway To Space ASEN 1400 / ASTR 2500 Class #12 Gateway To Space ASEN 1400 / ASTR 2500 Class #12 T-58.
CSC103: Introduction to Computer and Programming
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
Should be on Up to hear patient button presses Down to mute. In either case the #1 and #2 lights should light with each button press. Leave the 5 to the.
MATLAB® While Loops.
4 May I/O Control. 4 May What is I/O Control? A Doors feature that allows you to program input events to drive output responses – for example:
Introduction to Robo Pro
ADVANCED EV3 PROGRAMMING LESSON
Gauge Operation and Software by Scott A. Ager. Computer Recommendations 750 MHz Pentium III 64 Meg SRAM 40 Gig Hard Drive 1024 x 768 graphics CD Writer.
Forging new generations of engineers
Slide No. 1 Course: Logic Design Dr. Ali Elkateeb Topic: Introduction Course Number: COMP 1213 Course Title: Logic Design Instructor: Dr. Ali Elkateeb.
Describe the Program Development Cycle. Program Development Cycle The program development cycle is a series of steps programmers use to build computer.
Python Repetition. We use repetition to prevent typing the same code out many times and to make our code more efficient. FOR is used when you know how.
Chapter 1 Pseudocode & Flowcharts
Introduction to Loops For Loops. Motivation for Using Loops So far, everything we’ve done in MATLAB, you could probably do by hand: Mathematical operations.
Pascal Programming Pascal Loops and Debugging. Pascal Programming Pascal Loops In our first brush with the while do loops, simple comparisons were used.
New Product Developments World Leaders in Combustion Management Solutions C.E.M.S., MCERTs & E.P.A. Exhaust Gas Analysers C.E.M.S., MCERTs.
New Product Developments World Leaders in Combustion Management Solutions C.E.M.S., MCERTs & E.P.A. Exhaust Gas Analysers C.E.M.S., MCERTs.
Your Brief: You are the lead programmer responsible for designing and implementing the control program that controls all input and output devices in the.
Copyright 2006 Addison-Wesley Brief Version of Starting Out with C++ Chapter 5 Looping.
Computer Programming 12 Lesson 6 – Loop structure By: Dan Lunney.
ISA CLICK CONTROL #38 – FALL 2014 ERIC BRUNNGRABER DRAKE ISABIRYE.
Arduino “Getting Started” Instructor : Dr Matthew Miss Khin Yi Kyaw
Sensor Information: while loops and Boolean Logic.
ROBOTC for CORTEX Teacher Training © 2011 Project Lead The Way, Inc. Automation and Robotics VEX.
Louisiana State University Radiation Safety Office
Sensors Control Systems with Flowol.
Introduction to Visual Basic 2008 Programming
Repetition Structures Chapter 9
fischertechnik® RoboPro Software for Gateway To Technology® RoboPro
Introduction To Flowcharting
Introduction to Arduino Microcontrollers
Java Programming: Guided Learning with Early Objects
Roller Coaster Design Project
What is Arduino? By James Tedder.
FeMaidens Programming
Chapter 4 LOOPS © Bobby Hoggard, Department of Computer Science, East Carolina University / These slides may not be used or duplicated without permission.
When I want to execute the subroutine I just give the command Write()
Flip-Flop Applications
Learning to Program in Python
Sensors and Logic Switches
While Loops and If-Else Structures
Chapter 2- Visual Basic Schneider
Chapter 1 Introduction of Arduino
Digital Chart Recorder Operation
Faculty of Computer Science & Information System
While Loops and If-Else Structures
While Loops and If-Else Structures
While Loops and If-Else Structures
Flowcharts and Pseudo Code
CTY SAR FCPS Shawn Lupoli, Elliot Tan
While Loops and If-Else Structures
Aeroponic Engineering and Vertical Farming
Arduino Uno circuit basics
While Loops and If-Else Structures
Setting up a basic program with Arduino
While Loops And If-Else Structures
Presentation transcript:

Project Description Title: Room temperature monitoring based on ambient light level threshold Overview: An Arduino monitors the ambient light in a room. When the light exceeds a certain threshold (for example, when someone turns on the light in the room), the temperature of the room is sampled, averaged, and logged. This continues until the ambient light falls below the threshold (for example, when the person leaves the room and turns off the light). The system then resets and terminates temperature monitoring until the light threshold is again exceeded. Data Stream Queries: Ambient light streaming from Arduino at (10) times per second. Query checks to see if the light exceeds an established threshold. The query will check that multiple light readings have exceeded the threshold within some window. This will prevent “false positives” where momentary light changes are caused by something other than the lights being turned on by a person. Ambient temperature is sampled throughout window. A 1-minute average will be computed and logged to MySQL. Graphic next slide shows process flow and logic

1. Arduino monitors ambient light Is light level > “on” threshold no 2b. Monitor temperature MySQL log average temp 2a. Continue monitoring ambient light Is light level < “off” threshold yes (person enters room and turns light on) 3. Calculate average temperature over 30 minute interval 4. Exit temperature monitoring loop yes (person leaves room and turns light off) Terminate temperature monitoring received? no yes

Project Setup Arduino with temperature and photovoltaic sensor placed in a box with the lid open/ closed to simulate lights off/ on USB connection to laptop Box lid closed (simulate “lights off”) light level is above threshold. Box lid open (simulate “lights on”) light level is below threshold. Note for testing purposes I illuminated the sensor with a flashlight (light level ~360). Realistic light change went from 980 (lights off) to 940 (lights on).

Python Code Monitors serial feed from Arduino. Streams data at 10 times / second Checks if lightLevel drops below threshold (1) that indicates lights have been “turned on”. Played with various levels Settled on 970 as the most reliable indicator for lights being “on” If lightLevel is not below threshold, nothing is logged. Program continues to monitor the stream (2) Once lights are “on”, the temperature readings for the last minute are averaged and output to MySQL database 1. Threshold for “lights on” 2. Threshold is not met. Output just sent to pyCharm console, not logged to MySQL

“Lights On” With threshold met (1), temperature is averaged for the last minute (2) and logged to database (3). 1. Threshold met 2. Average temperature calculated 3. Logged to database

Data Logged to MySQL Database From screenshot of MySQL database on right: One minute intervals Temperature is average over the last minute lightLevel is also average over last minute. All entries are less than the threshold (lights are “on”) Average temperature over last minute

Conclusions and Lessons Learned Needed to clear Arduino serial input buffer in Python code Light threshold varied and would need to be stabilized I intended to implement this in Spark to compare performance but unfortunately I never had a chance to complete this implementation and run comparisons This is a very interesting topic and the work associated with implementing data stream processing provides some interesting possibilities for research.