I started by thinking how cool it would be if there existed a coaster that lit up, changing colors as your drink level decreased. From a purely "what the heck" standpoint, it was a super neat idea that had to be pursued. As I began designing and building and talking to different folks about the idea, I realized that it actually could be great to have, for example, in restaurants, bars, night clubs, and the like as a great way for waiters to keep an eye on drink levels and keep the customers satisfied. If I ever own a nightclub, I'll definitely make these a standard issue.
Step 1: Supplies
I got all the electronics from Jameco, the acrylic from TAP plastics, and other misc. things (like batteries and wire) from RadioShack.
- (1x) 13 x 24 x 1/8" clear acrylic
- (2x) green LEDs
- (2x) yellow LEDs
- (2x) red LEDs
- (1x) comparator IC
- (1x) NAND gate IC
- (1x) force-sensitive resistor (Jameco)
- (1x) solderable breadboard
- (2x) 1k resistors
- (3x) 680k resistors
- (1x) 56k resistor
- (1x) 6.8k resistor
- (1x) 9V battery
- (1x) 9v battery wire connector
- (2x) rubber bands
- various lengths of red, black, white wire
- soldering iron + solder
- wire cutters
- wire strippers
- small needle-nose pliers
- laser cutter (if you want to make the same base - there are most definitely alternatives if you don't have access to a laser cutter - get creative!)
Step 2: The Circuit
Let's discuss the electronics side of the project first. Fundamentally, the circuit relies on two voltage dividers - one as a static reference and one that changes as the FSR reacts to pressure. Two comparator ICs are used to compare the voltage below the FSR to two different reference voltages. One comparator's output is attached to the red LED and the other is connected to the green LED. To complete the circuit, I added a NAND gate whose inputs are connected to the two comparator outputs and whose output is connected to the yellow LED. See the table below for an idea of which states cause which results. When the output is HI, the LED is off; when the output is LO, the LED is on. Notice how the two comparator states determine the NAND state.
Pressure Comparator 1 Out (RED) NAND Out (YEL) Comparator 2 Out (GRN)
Low LO HI HI
Medium HI LO HI
High HI HI LO
Because the circuit depends on voltage dividers, picking correct resistor values is critical. The only way to do this is to run some tests to measure the resistance of the FSR using your glass and various amounts of beverage. Maybe do some voltage divider math using that info to determine values that should work, and test it all. You can certainly use the values I show in the schematic and photo, but know that our glasses might have different weights, our FSRs might be slightly different, we might want our LEDs to switch at different beverage levels, and so forth.
Now, the key to the whole circuit is the FSR, and this is for two reasons. First, as I've already mentioned, it's the sensor that actually changes as environmental inputs change. Second, it's necessary to spend some time understanding the FSR's reactions to different inputs, weights, and interface materials. For example, squeezing it between your fingers does a great job of changing its resistance; squeezing it between two rigid objects like acrylic pieces does nothing to it. Rubber band slices work well, rubber sheets work well...anything with compliance works well. The next step is to understand how the size of the interface alters the behavior - a smaller rubber piece will cause the FSR to change resistance at a difference rate than a larger rubber piece (sizes relative to the FSR's head). So as you test it to determine your resistor values, make sure you standardize an interface piece early on and stick with it until you're finished. I didn't realize this was the case until I'd already changed a couple times, so I went through some frustration in figuring out resistor values.
I've included a photo of the circuit in the prototyping breadboard in case that's easier to follow than the schematic diagram.
Step 3: The Base
I made a base out of layered pieces of 1/8" clear acrylic - I wanted to see inside, I wanted to be able to get inside if necessary, and I thought layering would be a visually interesting style. I ended up using 12 layers in the following order: 1 base, 6 battery/circuit board cutouts, 1 large circle (to give LED leads room), 1 LED hole array with slit for FSR leads, 1 LED hole array with FSR head access, 2 large circles. Then I had a small circle to sit on the FSR head and a larger circle to set the glass on (and attached a small piece of rubber sheet to the bottom of the small circle). These two circles can be the circles cut out from the other pieces; no need to cut extra circles.
If you design a different base, I'd love to see it!
Step 4: Assembly
- Grab the solderable breadboard and attach the 9V battery connector to the power strips on the side and power and ground wires to the other side
- Solder on the ICs - I left room between them to use the central rows for the FSR - that's where it will feed down from the upper layer so make sure it won't have to bend too much
- Power and ground wires to the ICs
- Comparator outputs to NAND inputs
- Resistors and comparator inputs
- LED resistors
- Insert all 6 LEDs into bottom LED layer (with the FSR slot) - I used a small drop of super glue to hold them in place as I worked
- Bend leads toward the center
- Wire each pair of same color LEDs together in parallel (remember polarity!)
- Wire the positive terminal of each LED pair to an LED resistor
- Wire the negative terminal of each LED to the corresponding comparator or NAND output
- Slide the FSR through the slot and solder it to the board - be quick since the heat can damage the FSR
- Slide circuit board through one of the large circle pieces and place that piece under the LED piece
- Stack battery/board layers and slide assembly into opening
- Lay FSR down so it aligns with opening on next layer up (can use super glue to hold in place)
- Lay top two large circles on top
- Attach predetermined FSR interface rubber to small acrylic disc and place on top of FSR
- Place large disc on top of small disc
- Insert battery into bottom
- Close bottom with bottom layer
- Place rubber bands around layers, holding in place