So... I've been working on this project with my friends for a year. It was for a contest(And we won. fuck yeah.)
Now since that shit's over, I thought that I should document it. So here it is.
So, Here's The Deal.
people sleep, right? And sometimes, when you're watching Netflix, or just normal TV, or just...whatever, you fall asleep with appliances on. Then those appliances use electricity. That's bad. For the environment, and for yer bills. So, what if there was a device that turned off appliances when you fall asleep? and turn the lights back on when you're awake? I mean, you gotta get up to turn the lights on. If you have bad eyesight, or you're old and can't see well in the dark, your house can be a fucking hazard. If the light turn on automatically when you're awake, that would be awesome. So, me and my friends decided to build a thing that did that.
Stuff We Used
![]() |
0.96'' I2C OLED Display |
![]() |
Accelerometer/gyro sensor(MPU 6050). |
Temp Sensor (MLX 90614). Fancy stuff. It can tell the temperature of an object right infront of it, as well as the ambient temp. |
Pulse sensor.(We ditched this sensor mid way.) |
Relay module. |
![]() |
DS3231 RTC module. |
![]() |
Adafruit Powerboost 1000C |
![]() |
18650 liion battery |
![]() |
Bluno Nano. Arduino Nano w/ intergrated bluetooth module. |
![]() |
Arduino Nano. |
![]() |
Raspberry Pi 3 Model B. |
+ random wires, resistors, capacitors, buttons,servo motors + metal brackets, EVA foam, glue, knives, tape, heatshrink tubing, solder, soldering iron, heatgun, lighter, cables, chargers, more shit.
MK.I
This thing. Like...WTF? |
This thing was just a piece of shit. It was shoddy, shitty, didn't have a battery or a screen, didn't have a pulse sensor, was made out of paper.... None of the wires were soldered, it was JUST for testing. didn't last a day. but we DID get data from that thing. MK.I was nothing more than a proof of concept, checking the software stuff more than the hardware stuff. And it served as a base for MK.II, which lasted Way longer, and was way more comfortable.
MK.II
Mk.III
Ditching Sensors
Look at these numbers. LOOK AT THE FUCKING GRAPH! JUST FUCKING LOOK AT IT! The thing's all over the place. The number ranges from 25 to 236. That's not human. Similar shit happened with the temperature sensor. Human peoples aren't supposed heat over 40 degrees Celsius. After multiple tries, and multiple failures, (and by multiple, I mean a shit ton) we decided to ditch the pulse sensor.
MK.IV
The code DID get a LOT dirtier.
Well. we made the thing out of EVA foam. it was a lot comfier. a lot sturdier. a lot better. We even added a battery. Velcro locking mechanism. Unfortunately, I don't have any solo photos of MK.IV. but I do have a photo of all the devices together. Looks cool in my opinion.(Mabye that's because I'm the one who took it.)
BOOM. |
Raspberry Pi Stuff
Okay. to be honest, The raspberry pi part wasn't my part. I don't know much of the details. I suck at python. The code receives the data transmitted from the armband thing. it calculates if the dude is sleeping via the accelerometer values, and chucks out a HIGH/LOW signal to a connected Arduino. It also chucks out a txt file. Cool shit, eh? My friend who wrote this code is a wizard.
Controlling Appliances
We used relay modules for this job. It's probably a terrible idea, since this method just cuts the power to the appliances, but I don't give a shit. Anyways, We cut open an extension cord, soldered on a 5v adapter, and connected a relay module.
We also made a switch-turning-off robot with a servo motor. What...Like....why....who.....
anyways, it kinda worked.
these are connected to a arduino which is connected (via USB) to a raspberry pi.
![]() |
This thing. the pot is there for testing. it came off later. |
Code And Shit
This is the schematic for the armband.
The code and stuff are here: https://github.com/flthtmtlf/2017STEAMRnE_HomeAutomation/tree/beta
No comments:
Post a Comment