Solar challenge

For the Solar Challenge I created a prototype of a prototype - a data logger that records the ambient noise level (in volts) wherever it's located.

The project consists of the following elements:
  • Solar panel
  • LiIon battery (3.7V 2500mAh)
  • LiIon/LiPoly USB charger
  • Arduino Uno
  • Sparkfun microSD shield
  • 8GB microSD card
  • Various USB adapters
I am getting upwards of 8V from the solar panel in moderate sun. The entire system seems to only be drawing around 40mA. I suspect this is because the Arduino Uno draws about 40mA and the microSD shield draws a negligible amount in comparison.

Testing the panel + battery + charger 
Close-up of microSD shield 
Panel in a bag for weather protection
Action shot - on window ledge gathering sun + data
Consolidated package using found surveillance mount

Data is written to the microSD card every 200ms - a timestamp of milliseconds since startup and a reading from the electret microphone in volts. My latest test was foiled because the microSD card got wet and stopped logging shortly after startup, but I was able to get a solid chunk of real data last week and this is presented below.

Final project: Empathemes

Empathemes logoDownload here: Empathemes (unpacked)

My final project is Empathemes, a Chrome extension which changes the color scheme of the current web page based on the most prominent emotion detected in the textual content. My goal was to subliminally induce a higher level of empathy with any content a user views, without any extra action needed to be taken by the user.

I took interpretations of colors and their meanings and combined them with word counting and scoring techniques to produce a short script that calculates the most significant emotion.  The emotions currently available are Love, Fear, Grief, Anger, Anxiety, Surprise, and Trust.

I created lexicons for each of this emotions.  Each lexicon has three levels of significance, and a word in each level will score either 3, 2, or 1 point(s) on a "hit", depending on the priority given to that level. This way, the algorithm more accurately assesses vaguely emotional content. This is the current lexicon for Anger. The words in the first array are weighted more heavily than those in the third array because they are stronger.

anger[0] = ["anger","angry","fury","acrimon","affront","belligerent","bitter","enrag","fuming","furious","heated","incensed","infuriat","intens","outrage","provok","provoc","seeth","storming","truculen","venge","vindictive"];

anger[1] = ["violen","outrage","hatred","enmity","aggravat","annoy","antagoni","crabby","cranky","exasperat","fuming","grouch","hostil","ill-tempered","indigna","irate","irritat","offend","resent","sore","spite","testy","ticked off"];

anger[2] = ["displeas","bugged","chagrin","dismay","galled","grim","impatien"," irk","petulan","sullen","uptight"];

After scoring, the page is styled only if the highest emotion score is 15% greater than any of the other emotion scores. This is to prevent styling for all-zero score cases, or cases in which there isn't a clear winner.

Here are some examples of pages styled according to the emotion of the content:

Screen Shot 2014-03-26 at 11.01.05 AMScreen Shot 2014-03-26 at 10.45.05 AM

Screen Shot 2014-03-26 at 11.02.58 AMScreen Shot 2014-03-26 at 11.02.12 AM

Final project proposal: Sonome

Sonome (Solar-powered Noise Measurement) is the tentative name of my final project for Energy. It will be another iteration on my project for the solar challenge, but in an extremely compact, low profile, wireless form.

Tagline: Wireless, self-powered noise level analysis tool!

I want to use this module in a larger project. Having accurate (even real time) measurements of noise levels in New York or any other city is something that most people would find useful when searching for housing or even just a quiet place to relax. Unfortunately, there is no way to get this data besides putting a bunch of loggers out into the world.

Sonome would help get this going by creating an all-in-one module that could be easily deployed anywhere in the city. The main problem is getting live data. Even with a WiFi shield (which seems prohibitively expensive for mass production), the placement of the module then depends on the availability of WiFi networks in that area.

There is no GPRS shield for the TinyDuino; however, GPRS may be the only way to truly untether these modules from any sort of location restrictions.

Bill of Materials (tentative)
Component Price
Polymer Lithium Ion Battery - 400 mAh $7.95
Mini Solar Panel Module - 0.5W, 5V $2.13
TinyDuino Processor Board $20.95
TinyShield microSD $14.95
TinyShield WiFi $59.95
Total: $45.98

  • Week 7
    • Decide on components
  • Week 8
    • Order components
    • Diagram components and data flow
  • Week 9
    • Build prototype
  • Week 10
    • Test prototype
  • Week 11
    • Test prototype
  • Week 12
    • Rebuild prototype if necessary

Precedent: Barnards Farm Sitooterie

The Barnards Farm Sitooterie is a small pavilion designed by Heatherwick Studio. Similar to Heatherwick's UK Pavilion, designed for the 2010 Shanghai World Expo, the Sitooterie is a cube "punctured by over 5000, 18mm square hollow aluminium staves that act as miniature windows with tiny glazed ends. [...] The aluminium staves are arranged radially, the origin point being the centre of the cube. A single light source located at this central point emits light at night through every tube, causing the windows to glow." The rest of the structure was "precision-machined, by an aerospace company, from 15mm anodised aluminium and bonded together using special high-strength adhesive."

The content is a display of the color of the light inside. I think the content does match the display because it's about creating an illusion of uniformity through low "resolution"; in this case, each aluminum stave could represent one pixel in a traditional display. This display is not meant to convey information, except that which represents the nature of the light inside. Additionally, at a distance the display completely merges with the physical exterior, just as at a distance a low-resolution display gains perceived clarity.

The Sitooterie is certainly reactive to its internal light source, and purely dynamic because as a system it is stateless. At any given time it represents exactly what is inside. It has mild interactivity since the internal light can be changed to achieve a desired external effect, but it's definitely not generative or pre-rendered.

Midterm: Moon

Get the code: GitHub

My midterm Android application is Moon, an app that shows the moon phase for any date.


I have been wanting to explore the phases of the moon for another potential project. The phases are extremely regular and could be used to control something when the moon is treated like a meter oscillating between 0 (dark) and 1 (light). This app is meant to be just for fun but it also allowed me to take the first step towards this and other possible projects involving the moon, sun, and other natural bodies which have consistent cycles.


Moon is a simplification of the many moon phase Android apps (Moon Phases Lite, Simple Moon Phase Widget, Phases of the Moon Free, etc.) which feature realistic and/or cheesy graphics. I am not against these apps but I wanted to make something pure and simple that really lets you focus on the cycle.  Moon is no better or worse than the other available apps - it definitely has less functionality, but I will say that it does one thing and it does it well. And the reduced functionality allowed me to focus on smaller, but no less important, UI design features.

How I did it

The most important part of the app is the data that drives the moon phases for a given date. This data is available in tabular form but I wanted to do the calculations programmatically. I tried three different code sources, the first being a PHP snippet that I translated to Java. It turned out that the calculations were wrong, so in the end I found MoonPhase, a J2ME program that calculates and displays moon phases on older mobile phones.  From this I used only the Java class which did the math.

Keeping simplicity in mind, I opted for a single Activity. I then created a custom View that draws the graphics of the phases based on the calculations from MoonPhase. In the custom View I developed a way to form accurate representations of moon phases using simple shapes. This can be seen below, with the shapes given colors to let them stand out.

There are only four cases needed to draw all possible moon phases. In each the color and location of the oval and rectangle are switched to make it appear that the moon face is seamless. In this case, the rectangle is black and the oval is white, but this changes throughout the cycle.

Once able draw the moon phase for a given date, I added a few TextViews and Buttons to step back and forth between dates. I also incorporated an instance of DatePickerDialog for easy date selection, so that tapping the date lets you select any date you want.

I spent extra time on the arrow buttons and enabled them to handle a press-and-hold rather than just a single touch. This lets you more quickly increment/decrement the date. A very useful Stack Overflow thread explains this feature.

What works and what doesn't

Technically there isn't anything that doesn't work, but there is at least one thing that could be improved on. The MoonPhase calculations are so accurate that you can get the exact phase of the moon down to the millisecond, which means that my app greatly diminishes the potential accuracy of what's going on underneath. An enhancement would be to update the moon phase in real time (or closer to real time) when the current date is set. Also it would be nice to accommodate users in the Southern Hemisphere, since this only displays the moon as we see it here in the North.

I don't know what the future holds for Moon but I may attempt to use it as a UI for throttling bandwidth based on the percent of the moon illuminated. Other than that, it was a great exploration of some new Android programming conventions and features.

Midterm ideas

Idea #1: Time Out!

I originally thought Time Out! would be my final project for this class but the amount of work required to finish it may make more sense as a midterm rather than a final. The main problem with the app so far is that in the latest version of Android there isn't a way for one app to kill another app. According to the research I've done, this used to be allowed, as demonstrated by the many task killer apps available in the Google Play Store. However, since the update that removed this ability (I believe it was 4.2), these task killers now lack a large part of their original functionality.

So, either Time Out! needs to be a Launcher (an app that would take the place of the default Android Launcher), which gives a greater chance of being able to manipulate and/or control a user's actions, or I need to think up a new model for achieving the same goals which doesn't rely on programmatically preventing the user from doing anything.

Idea #2: Minimalist moon phase tracker

This idea is related to another potential project that I've been thinking about lately. For the purposes of this class, the app would display a representation of the current moon phase, as well as the moon phase for any date in the past or future.  I know of a few APIs and datasets which provide this information so the app would likely consist of some simple graphics and a date picker running off of asynchronous data (or a purely local dataset if feasible).