Back to Parent

Outcome


This project was designed to activate my bathroom heater remotely when I wake up in the morning. 

My bathroom is FREEZING and made of solid tile, so it's especially chilly in winter mornings!

Using a Force Sensitive Resistor (FSR), when my head lifts off of my pillow, it activates the temperature sensor (TMP36) in the bathroom to read the temperature.  If the temperature is below 65 degrees Fahrenheit, then the bathroom heater is turned on.

*Note:  For demonstration purposes, I made the threshold temperature 85 degrees so that the "heater" would for sure turn on, as you can see in the code below.  I simulated the heater by using a blinking LED which only blinks once the "heater" has been activated.  If actually implemented, the blinking LED would still be present to give the status of the heater as being on or off.  

Contents of Project: 

- Spark Microcontroller

- Breadboard

- Jumper Wires

- A 1kΩ Resistor

- A 10kΩ Resistor

- A Force Sensitive Resistor (FSR)

- A single color LED (Light Emitting Diode)

A capacitor

- A TMP36 Temperature Sensor

Process Documentation: 

The biggest challenge I encountered was understanding how to trigger the bathroom temperature function from the actual pressure sensor.  This was quickly resolved with using "&&" in my if statement.  For example:   "if( temperatureF < 85 && pillowReading < 500 )"  --- it was simple enough, but it wasn't clicking for me at first.  Originally, I had written a separate pillow function and bathroom function but was having trouble calling one to activate on the other.  The final results can be seen in the code below.  

For circuitry and code examples, I used the Sensor Tutorials published by Daragh Byrne in the Google Drive folder for the IoT 2015 class, combining elements and information I learned from both the FSR and Temperature Sensor tutorial.  I went through about 4 iterations to get the project working, and combined code samples I had found in Google Drive with the logic tips found the Office Hours Powerpoint from Friday, January 23rd.

An example of the circuitry used is shown below: 

Img 6049
Show Advanced Options
Show Advanced Options
Screen shot 2015 01 27 at 3.17.06 pm
Show Advanced Options

You can see above that the system also updated cloud variables to give updates on the temperature as well as the impact of force being impressed upon the FSR.  

Show Advanced Options

Next Steps

Moving forward, the obvious next step would be to write the code necessary to actually activate a bathroom heater in my home. At this point, I'm not sure how this interface would work, and it would probably depend on the particular model of heater. With that additional hardware implemented, I would also add a function to shut the system off after I manually turn the heater off in the bathroom (since the temperature will eventually fall below the threshold again, and I won't be returning to bed to activate the pressure sensor).   


* The bathroom image above was sourced from http://bit.ly/1LfkY5H

Drop files here or click to select

You can upload files of up to 20MB using this form.