Liquid Lights (mini-project 2)

Anis Abboud, Max Potasznik


http://www.youtube.com/watch?v=JMaEg7-LB1k

Introduction

Lights Pong is a tangible version of the classic game Lights Out. The rules are pretty simple. In the starting position, some of the lights may be on. The goal is to get all the lights on. Clicking a light flips (on→off / off→on) it and its adjacent lights.
lightsout example4.png

In our version of the game, the buttons are water cups, pressed by inserting your finger into the water.
press.png

Details

The following 5 images, illustrate the complete process of a game play, starting from an arbitrary position, until turning all the lights on and winning the game.
example1.jpg
example2.jpg
example3.jpg
example4.jpg
example5.jpg

After winning, all the lights will blink to denote that. If you want to play a different level, hit the new level button:
new-level-button.jpg

If you are stuck, insert a coin to get a hint. This will flash the buttons that you should click to win the game.
coin-hint.jpg

Inside the box, there is a QRD1114 infrared sensor, whose analog input value will go up when covered by the coin, triggering the hint.
IR-coin-sensor.jpg
This infrared sensor is connected to the Arduino through its own breadboard in our project as you can see in the image above.
However, to make it easier for future reference, if you are considering to use this QRD1114 sensor in your project, below is an illustration of a circuit containing only the sensor, which is connected to analog input pin 5.
infrared-wiring.jpg

To play the game, you should be wearing the conductive wristband, that is made out of conductive fabric:
conductive-wristband.jpg

The input from the wristband is read as an analog signal, similarly to how MaKey MaKey works:
external image 7167030308_7bf5245187.jpg

The image below shows how the wires are connected to the Arduino.
  • The white wires connect the analog input pins in Arduino to the breadboard.
  • From there, these are each connected to a 1 mega ohm resistor, which connects them to power (5V), serving as a pull-up resistor.
  • These are also connected to the cups through the yellow wires which go into the water cups.
  • The wristband is connected to ground, so when touching the water, you complete a circuit that goes to ground, thus reducing the analog input values. This way we know what was touched!
  • The black wires connect the LEDs to ground, and the red ones connect their other leg to the Arduino digital output pins.
wires-and-arduino.jpg

All the code runs on Arduino. The snippet below shows the mathematical idea behind finding the solution (for the hint).
The mathematical formulas were derived through linear algebra and matrix reductions, in the field Z2.
Arduino code 2.png

Hardware


Challenges

There were several challenges that were specific to our project. The first challenge was caused by the use of water as our input medium. When using natural substances like water as input in a "Makey-Makey" fashion, it is important to set the sensitivity thresholds based off the actual conductivity of the substance. This was challenging for us because testing with water is potentially destructive if the hardware isn't constructed carefully. While testing by touching either our hands or wire leads to the input contacts, we experienced much different voltage response than we did during testing using water. This should be expected but it is an important factor to consider when using low-tech items.
In addition, we experienced different "conductivity" between our hands. Max's hands are a bit fatter than Anis', so they were better connected to the wristband (which was tighter for this reason), leading to a lower resistance.

The second challenge was caused primarily by our choice of container and lack of experience building non-trivial circuits. We originally intended to use our plastic parts box as the entire enclosure but once we began to wire each cup into the breadboard, we quickly realized the wires would not fit into the space without extreme force or care. We were worried that the upward pressure of the wires on the bottom of the cups would either detach the cups from the lid or push the LEDs through the bottom of the cups and cause leaks. If we had to do this over again, we would consolidate wires into busses and run them along the surface of the container so that each wire would bend in a designated location (i.e. the hinge point).

Finally, we did face a challenge in that several parts we used including the IR sensor and the push button weren't well documented. We overcame this challenge by breaking out the multi-meter and testing each parts behavior with voltage applied.

Thoughts about the project

  • This project was fun because it allowed us to implement something old in a new way. We have worked on revisiting existing games in previous work but this project allowed us to find and build a new way to play an old game.
  • While building this project, we also realized the value of rapid prototyping. Using water as an input medium is non-standard so it required a lot of experimentation regarding the proper thresholds in software. Before building the full circuit, we created a model of our cup/buttons using a larger plastic cup to test everything from our waterproofing strategy to the circuit behavior. This initial testing was crucial to our success.

Links