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.
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.
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.
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.
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.
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.
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.