Connected Devices Final Project

 

github:

https://github.com/Sidchou/thermostat-and-tracker

The goal of this project is to create a device which log the temperature every hour then send to the server, and also be able to show the current “temperature settings” compare to the temperature detected, the machine should turn on the heater/air condition, or not. The device is not actually connected to the heater or air condition, just a hypothetic practice.

IMG_1952

 

The most trouble that I had is probably successfully push to the server. We are using a server that our instructor, Tom Igoe, set up, and only been told that we are supposed to sent the request as a JSON. but after hours of trouble shoot me and some classmates are only able to send “hello world” via terminal. Finally I found out the smallest thing that i needed to change, which is double quote ” on the outside, and single quote ‘ on the inside.

Screen Shot 2019-02-22 at 10.40.19 PM

Screen Shot 2019-02-22 at 10.41.51 PM

Screen Shot 2019-02-22 at 10.43.20 PM.png

 

I decided to put my device in the wood shop, so I also included a dust sensor.

 

 

dust sensor datasheet:

https://www.sparkfun.com/datasheets/Sensors/gp2y1010au_e.pdf

how it works:

http://www.sharp-world.com/products/device/lineup/data/pdf/datasheet/gp2y1010au_appl_e.pdf

instructables:

https://www.instructables.com/id/How-to-Interface-With-Optical-Dust-Sensor/

another tutorial:

http://www.howmuchsnow.com/arduino/airquality/

temperature sensor (gp2y1010au0f) datasheet:

https://www.arduino.cc/en/uploads/Main/TemperatureSensor.pdf

 

Because I have a dust sensor, i need some air flow, which i taken it as a consideration while designing my fixture. In the instructable post, he mentioned having a fan would help the air flow, but it should work without one, so I decided not to include it. But after not logging much information from the dust sensor, I will include it in the next version.

 

IMG_1947  IMG_1949

 

IMG_1950  IMG_1951

 

I decided instead of showing the current temperature, users can decide what temperature they want to set the room to be, and the device will show red if the temperature is set higher than current temperature (heating) or blue if its lower (cooling). Similar to traditional thermal stat but with a bit more feed back.

IMG_1961  IMG_1960

⇧showing cooling and heating⇧

IMG_1963

IMG_1965

 

 

Advertisements

Mobile Lab – iBrush

For the final project of my mobile lab, inspired by my web socket project, i decided to make another app with a physical element. and when we are introduced ar kit, i thought of this project. Its an AR drawing app that let you draw in the 3d space, similar to tilt brush and light drawing.

f239e1ed88c4d7e17b6ac4d3f9aefb1b 39bc1f9a19821f3ba5876fcdd6d6e154

I started with the AR kit example for the class, and modify the original function that let you place 3d model in the space, so it reoccur on its own, and increase the speed its drawing until it looks relatively smooth. Then i changed the asset selection to some sample brushes, just simple geometry like spheres, cubes, planes and a 2d brush i made. Continue reading “Mobile Lab – iBrush”

Energy – sound train

For the final project, i teamed up with Simon Shi, We decided to make a battery magnetic train. This video explains the mechanism pretty well.

TLDR when current go through a coil, it creates a magnetic field, which repulse the real magnet push it forward.

sol3 . images.jpg

To make it a better experience, we put some more magnets next to the tracks in glass bottles to make them produce sound when the train goes through.

Energy – Solar Energy

For the solar portion of the project,  I teamed up with Timothy Lobiak. Extending our projects from connected devices, we make our thermal states solar powered.

To extend the battery time that our thermal states, change it to a temperature logging device. We decided to use the low power library, but with the mkr 1010 it wasnt very successful, with sleep we are still drawing 100 mA while sleeping. After talked to Tom Igoe, we are recommended to switch to MKR 1000.

IMG_6164-1024x768.jpg Continue reading “Energy – Solar Energy”

Energy – Kinetic Energy

For the first project for energy, we are focusing on using kinetic energy to generate electric energy. I partner up with Sukanya Aneja and Emily Lin.

We started with directly hooking up the motor to a led light, and by turning the shaft of the stepper motor, the led light flashes. Next, we added a rectifier to rectify the current. Finally, we add in a capacitor to smooth out the light, but it also become dimmer.

Continue reading “Energy – Kinetic Energy”

Connected Devices Week 2

This week, we are exercise to control a smart device (Hue light) with front end javascript.

I downloaded a example code from tom’s github, and then try play with it a bit.

And then I tried to control the light with a p5 sketch. so i combine some of the code i wrote before to a particle simulator. code here.

from the p5 code, i detect the center pixel’s color. and try to use that color to control the light. Because p5 pixel out put RGB color, I found a code to convert RBG to HSB.

And then combining three code, i was able to create this.

Screen Shot 2019-02-09 at 8.44.00 PM

In the beginning , i kept getting error “Internal error, 404”. It would success in the beginning when i run it for a bit, then give me that error message. So I thought that might be because I send the message too fast, which is the case, when i slow down the rate of the data put, it work. but the color didn’t change as much as i expected. When i go back to the source code, i notice the max of saturation slider value is set to 65535 instead of normally 360. So changing that, it work perfectly.

heres the code

https://github.com/Sidchou/hue-exercise/blob/master/public/client-backup.js