Description as a Tweet:

48% of sunlight is absorbed as heat but goes unused when our blinds stay closed. A 1 m^2 window produces half a heater’s worth of power per lux! With Flippy, an Arduino-operated blind accessory, your blinds respond automatically to natural light or manually via mobile app.

Inspiration:

As people who spend a lot of time working at our desks, we wanted a way to increase our exposure to natural daylight while we were indoors. Thinking about this caused us to realize how commonly window blinds are neglected, and we wondered how this could be combatted with tech. Along the process of planning scheduled blind motions via a Google Cloud queue and automatic blind responses to daylight via photoresistor sensor, we continued to discover many more impacts of this development, from its dramatic energy-saving power to its multiple health benefits.

What it does:

Flippy is essentially a means of both automatically and manually (remotely) controlling the openness of window blinds. It is operated via an Android application wherein one can choose to toggle between the automatic and manual modes. In the automatic mode, the photoresistor measures daylight and instructs the Arduino Uno to trigger a stepper motor that opens and closes the blinds accordingly. One can toggle the mode to manual to override this process, however. Then, the user’s desired instructions (of opening/closing the blinds) can be transmitted via a Google Cloud Platform App Engine-hosted Flask endpoint to a local server on a computer connected to the Arduino via Serial USB. When this is done, again the appropriate rotation will be executed by the motor. We also set up a Google Cloud Function that would dynamically run the delivery of instructions at specific times to the local server based on a user-set schedule.

How we built it:

For a circuit schematic and CAD screenshots, check out our GitHub README at https://github.com/apangasa/hackumass-blindcontrol. As far as the hardware goes, we built the electronics simply using a resistor of known value in series with a photoresistor (so we could compute the resistance across the latter) and based on a empirically determined threshold we ran an Arduino script to move the stepper motor clockwise or counterclockwise. Mounting the stepper motor was an important part of this phase, as we wanted a cleanly packaged solution. Using a digital caliper, we first took several dimensions of the blind workspace. Then, we created CAD models for a mounting bracket for the motor as well as gears to interface between the motor and the rotational piece operating the blinds themselves. Finally, we 3D printed these pieces and assembled them, connecting the Arduino to the computer via Serial USB so that it could communicate with the internet (through a local server).

On the client-side, we used Android.js to create a mobile application that we packaged into an APK for users to download. This application made requests to a cloud Flask backend hosted on Google Cloud Platform’s App Engine, which could process the data coming from both the local server and the mobile app and route information in each direction. In this manner, the mobile application would always be able to tell the user the state of their blinds and the local script always knew whether to run automatically on daylight or read from a passed instruction file.

Technologies we used:

  • HTML/CSS
  • Javascript
  • C/C++/C#
  • Python
  • Flask
  • Arduino
  • Microcontrollers
  • Other Hardware
  • Misc

Challenges we ran into:

One of the major challenges we faced was our lack of a Wi-Fi module for our Arduino. Though we had a Bluetooth module, we really wanted to be able to communicate over the cloud rather than directly over Bluetooth. The reason this was so important was because the user should be able to change their blind settings no matter where they are; for example, if they leave the house and realize they forgot to close the blinds, they should be able to do so remotely. We resolved this by connecting the Arduino to a computer running a Python script that would read in and write out Serial USB data received from the local server (which in turn received it from the Google Cloud Platform App Engine endpoint). In this manner, the Arduino could communicate indirectly with the internet without a Wi-Fi module. Ideally, in production, this product would use a Wi-Fi module to interact with the cloud, but we are proud of our innovation and ability to create a functional prototype solution.

Accomplishments we're proud of:

The majority of the team was very unfamiliar with hardware, so we’re quite proud of how much we learned with respect to programming an Arduino and wiring circuitry. Also, we had never used Google App Engine previously, since we were used to deploying JavaScript and HTML web applications, so getting the Flask app up and running and communicating with all the systems with ease was very exciting. This was also our app developer’s first time making a mobile application at all, so he was very impressed with himself for building a successful Android.js application that updated the state immediately and sent user information smoothly. Finally, the hardware was pretty complicated, specifically because we had to custom 3D print gears and a motor mounting bracket that had to fit exactly with the blind specifications. While several hours went into this part of the project and the CAD model had to be revisited many times, eventually, we had a print that fit successfully and we’re very happy with how it came out.

What we've learned:

As stated in the previous section, this was our first time working with several of the technologies we worked with from Android.js to Google Cloud Platform App Engine. Despite our comfort zone being web application hacks, we learned a lot about mobile app development, electronics, and mechanical engineering by branching out into these new territories. We’re very excited to explore many more ideas with our newfound tech skills.

What's next:

The first development that we want to make is using a Wi-Fi module to connect the Arduino to the internet instead of connecting it to a computer with a local server via USB. Although our method worked for communicating between the cloud and the Arduino, the process flow would be a lot cleaner and more scalable with a Wi-Fi module, so if we had access to one, we would definitely use that instead. Additionally, we want to provide the user with more customizability and flexibility on the application end. For example, we would perhaps want to allow the user to set their custom threshold of daylight they want to let in, rather than using our empirically determined threshold value. Moreover, we could even increase the precision of the motor turning to allow in specific amounts of light. Another cool integration would be IOT expansion via Google Assistant or Amazon Alexa. Finally, we want to finish the full functionality of allowing the user to set a schedule of times to open and close by invoking our already written Google Cloud Function for doing so.

Built with:

We first took all the blind dimensions using a digital caliper and then created a CAD model of our motor mounting bracket and the necessary interfacing gears using Autodesk Inventor. This was then 3D printed and the CAD was adjusted in an iterative process until we had a set of parts that fit appropriately. We used the Arduino Uno kit’s photoresistor and stepper motor among other elementary electronics hooked up to the Arduino Uno. This was connected via Serial USB to a computer running a Python script, and the two scripts passed byte information back and forth over this Serial connection. The Python script read instructions for the Arduino from a local file that was written to by the local Flask endpoint that was the means of connecting the Arduino to the internet. This local endpoint was relayed to by an ngrok hosted instance. We created a separate Flask server that we deployed on the Google Cloud Platform App Engine to serve as our overarching cloud endpoint. This was communicated to by both the local server and the mobile application. Said mobile application was built with JavaScript, HTML, and CSS using Android.js.

Prizes we're going for:

  • Best Security Hack
  • Best Documentation
  • Best Web Hack
  • Funniest Hack
  • Best Mobile Hack
  • Best Healthcare Hack
  • Best Hardware Hack
  • Best Use of Google Cloud

Prizes Won

Best Mobile Hack

Team Members

Sohil Kollipara
Ramsey Hamed
Arnav Pangasa
Raghu Radhakrishnan
Nitin Ramadoss

Table Number

Table TBD