Smart coaster is a collaborative effort by KTH Royal Institute of Technology students to explore the physical interaction design space. We up-cycled the traditional drink coaster concept and transformed it into a device that senses and expresses states. Smart coaster will help bar staff notice and respond to when people need a refill and when hey seek assistance. Smart coaster comes with a customisable companion application.
For this project you will need a load cell (you can get one from a regular household scale), a micro-controller, a Neopixel RGB led ring and some other more or less necessary components. You will require some tools, a bit of skill and determination. We give you our shopping list, step by step instructions, files and code to guarantee your success. Enjoy!
Max, Joel, Victor, Aroshine & Heidi
Step 1: Materials
We chose these components primarily for their size and availability. Our shopping list is easy to acquire in electronics shops in Sweden or by mail order.
- Adafruit Feather Huzzah ESP8266 WiFi micro-controller
- Adafruit Neopixel ring, 24 x 5050 RGB Led with integrated drivers
- Load cell and cradle from household scale, e.g. Rubicson Rund from K&C
- Load cell amplifier HX711 from SparkFun
- Rechargeable battery LiPo 3.7V, 400 mA or higher. Observe physical size constraints.
- A 1x2 cm piece of printed circuit board PCB
- 3 x 1K Ohm resistor
- 3D printed coaster base & lid or comparable. Download files here.
- Access to 3D printer with at least 10 x 10 cm print surface. We used Flash forge 3D Dreamer.
- ~35 meters ABS plastic thread for printing.
- Assorted tools, cables, soldering station.
- Double sided tape or blue tack.
- Micro USB cable for charging/loading code
- Optional coating materials
Altogether, we spent around € 80.
Step 2: Print Coaster Base and Top
You will want to get the printing job done and out of the way. Standard quality printing takes 1.5 hours per piece on a Flashforge Dreamer 3D printer. If you don't have access to a 3D printer, build a container of your own. A 10x10 cm ready made cardboard gift box comes close. You can find these boxes in crafts shops.
- Upload the design files to your 3D printer.
- Print each piece and let them cool down.
- Study the diagram, identify where the micro-controller sits and,
- make the hole for the Micro USB connector.
Step 3: Prepare Load Cell and Cradle
The household scale comes with four interconnected load cells. This project requires only one.
- Remove the base of the scale.
- Detach one the four load cells from its cradle.
- Cut the wires, leaving at least 5 cm of wire on the load cell end.
- Remove the glass surface and recover a cradle for the load cell by sawing it free.
- Sandpaper down any irregularities along the sides.
The bottom plate of the cradle must be absolutely level. You may be able to reduce the height of the cradle but take care to keep the result level. Pro tip: The glass surface is attached with double sided foam tape. To loosen it up, submerge it in boiling water with a few drops of detergent. Use protective gloves, the glass gets really really hot. While working with the glass cover, avoid drastic temperature changes. Save left-over cradles and load cells for more smart coasters (or other cool projects).
Step 4: Make a Wheatstone Bridge
A Wheatstone bridge is used to read the single load cell and accurately calculate unknown electrical resistance. Learn more about bridge circuits. Follow the wiring schema for Wheatstone bridge to make the bridge. It is important that you use the same resistance in all three resistors. Leave enough wire for later assembly steps.
Check out our project blog where we also include our soldering experiences.
Step 5: Connect Bridge, Amplifier and Load Cell
Using a multi-meter, measure the pair of wires that give a readout when pressure is applied to the load cell. Once you identify the pair that has a variable output based on load, connect these to the Wheatstone bridge. The multi-meter read must be stable and vary depending on applied pressure on the load cell itself. If you get negative readouts, switch the wires around.
Step 6: Prepare Power and Ground Cables
The power and ground wires fork to connect to the amplifier and the Neopixel ring. Prepare them in advance for easier assembly. Approximate the necessary length and where to make the fork from the diagram. Use isolation tubing or similar to protect the exposed sections.
Step 7: Connect Power & Ground to the Micro-controller
- Locate the 3V power pin on the micro-controller.
- Solder the unsplit end of the power wire to the micro-controller’s power pin.
- Locate the ground pin on the micro-controller.
- Solder the unsplit end of the ground wire to the micro-controller’s ground pin.
Step 8: Prepare the Neopixel Ring
When you buy a Neopixel, it pays off to test that it works. Please follow the instructions by Adafruit on how to test your ring. You will need to connect ground, power and data to a micro-controller and install the Neopixel library in order to perform the recommended test (strand test). Read the sections relating to your Neopixel product. Pay attention to the order in which you bring your Neopixel to life - always connect ground first. Conversely, disconnect ground last when separating.
In our project, we attached temporary ground, power and data wires that were later replaced at the final assembly steps. Locate the Data in pin, usually marked DIN and solder a piece of wire. Solder the wire onto the back surface of the ring. This will be the data cable. Similarly, solder wires for ground and power to the back of the ring. You will later replace power and ground wires with custom made.
Step 9: At This Point
You can follow the diagram to make the remaining connections between components and mount them onto the 3D-printed coaster base or you can follow the suggested soldering and final assembly steps that follow.
Step 10: Suggested Soldering Order & Final Assembly
Follow the diagram and the suggested order for easy assembly.
- Solder one of the power fork wires and ground fork wires from the micro-controller onto the amplifier’s corresponding power and ground pins.
- Solder the amplifier’s remaining pins to the micro-controller. Our example uses pins 12 & 13.
- Solder the remaining power and ground fork wires to the ring’s corresponding power and ground pins.
Observe that the ring and the leds will lie topmost, all wires are soldered onto the back of the ring.
- Finally, connect the ring’s data pin to the micro-controller, pin 6 in our code.
- Connect the battery to the micro-controller through the JST-PH plug.
- Add a small piece of double sided tape/blue tack onto the coaster base’s inner beams where the ring will rest, to prevent the ring from moving.
Once all pieces are soldered together, and the battery is connected:
- Flip all components bottom side up. You will probably need an extra pair of hands.
- Place a piece of double-sided tape or blue tack to the back of: bridge, amplifier, micro-controller and battery. This is for attaching the components securely to the 3D-printed base.
- Add super glue to the load cell cradle. The load cell must be affixed to the base and be absolutely level.
- Flip everything right side up again and place in position on the printed coaster base.
- Press down each piece firmly.
- Optionally decorate the coaster lid and click it into place.
Decoration is optional. We coated the inside of the lid in tin foil to direct the light downwards and used cork tape to coat the surface of the lid.
Find out code here. Keep in mind the power consumption when adjusting the number of leds and colors you use in your smart coaster. Good luck!
Step 11: Calibration
Once your coaster is ready, launch the Arduino IDE and open the main.ino file. If you deviated from the project description, used different components etc, make sure to make the necessary adjustments to the setup clauses to reflect your particular configuration.
- Connect the micro-controller and upload the code
- Open the Serial Monitor window
- Take a regular empty beer glass or similar and center it on the smart coaster lid.
- Read the value of the load cell.
- Fill the glass with water so it is one quarter full and read the value of the load cell.
- Fill the glass to be three quarters full and read the value of the load cell.
- Review the code and make the necessary adjustments to the threshold values so that the conditions empty glass, low content, and high content are discriminable. Don't forget to save and upload changes.