When thinking of an unusual switch, I looked for something that is less used in the kit and unconventional. I chose to explore how I can use the temperature sensor creatively as a switch. When thinking of the same, I realized most air conditioning units require manual input which may be an inconvenience to people who have specific and fixed room temperature requirements. I therefore decided to create a program that can be preset so that the AC unit can adjust automatically as it has been configured. For the MVP I had one LED light to show the change in temperature such that it lit when the temperatures went above a certain threshold and went off when the temperatures reduced below a certain level. I later added two more LED lights so that together with the three led lights could show the signal when the temperature was within certain ranges. Why is this important? This program could be modified and connected to a thermostat so that instead of only turning the A/C on and off, one could set it to self-modify the temperatures when the room temperature is at a certain level without necessarily changing it manually.
CODE HIGHLIGHTS
The only part that was slightly challenging was converting the reading from the TMP36 to voltage and later on to degrees celsius. I realized that the TMP36 sensor has a linear output of 10mV per °C, with an offset of 500mV at 0°C. And therefore to convert to volts and degrees I used the following block of code;
void loop() { reading = analogRead(A0); // read analog pin volts = reading * aref_voltage / 1023.0; // convert to voltage millivolts = 1000 * volts; // convert to millivolts degreesC = (millivolts - 500)/10; // convert to deg C degreesF = (degreesC * 9/5) + 32; // convert to deg F
IMAGES AND DEMO
REFLECTIONS AND FUTURE IMPROVEMENTS
Using the temperature sensors was fun but as the Professor noted in one of the classes it can be a boring tool in the sense that it takes long to actually test it’s efficacy owing to the rigidity of the independent variable – temperature. Going forward I’d love to make projects that are more user friendly and more interactive that is; makes more use of the physical things around us. Also, I definitely will be exploring the other items in the toolkit even more.
Demonstration Video
To analyze the thermal response of the circuit, I positioned it near the heat emission area of my laptop, then incrementally increased the distance to observe variations in temperature effect