HTMAA 2023  |  Samantha Chan
samanthachan.net
Final Project#01Computer-Aided Design#02Laser CuttingVinyl Cutting#03Embedded Programming#043D Scanning3D Printing#05Electronics Design#06Electronics Production#07Molding and Casting#08Computer-Controlled Machining#09Input Devices#10Output Devices#11Networking and Comms#12Interface and App

Final Project

SleepSoundly: Smart Fabric Sleep Interface

The aim of this project is to create a flexible and soft pillow interface to improve sleep quality and wellbeing.
This interface can support sleep interventions and sensing.

One of the interventions I'm excited about is slow wave audio entrainment to enhance users' overall sleep quality where pulses of pink noise sounds are played during the deep sleep stage at about 0.75 Hz.

I also envision that the interface that can sense motion and sounds which could help detect sleep stages, snorring and potentially sleep apnea. Additionally, it could support touch sensing for menu and volume control.

Visual mockup, user lying on smart fabric

Concept Sketch

Sketch of the envisioned SleepSoundly interface

Fabrication Plan

  • Laser cut box to store the interface
  • Vinyl cut label for the box and/or heat transfer vinyl logo on the fabric
  • Flexible speakers (from Tori at ONE Lab), ideally to fabricate via vinyl/laser cut and vacuum forming
  • Flexible microphone / motion sensor using the same piezoelectric-based module as the flexible speakers
  • Fabric with conductive thread strips (from Irmandy at Responsive Environments) for capacitive sensing
  • Circuit for the ESP32 microcontroller and power input
  • Circuit for amplifying signals to the speakers
  • Circuit for microphone / motion sensing
  • Circuit for capacitive sensing

Video Demo (Speakers Only)

The flexible speakers that I plan to use are made by Jinchi Han and Tori Deng at the MIT Organic and Nanostructured Electronics Laboratory (ONE Lab). Tori kindly gave me samples of these speakers to test out. I made a quick demo by connecting the speakers to a 3.5mm audio plug and playing music on it via my macbook. They are incredibly thin and flexible and seem to work even without an amplifier as shown in the video below.



I placed to the speakers between a pillow and its pillow case. As shown in the video below, the speakers can play music and at a relatively good sound quality (when you place your head on the pillow).

[Next Steps]

  • Embedding programming: connect the flex speakers to a class-D amplifier (and possibly an SD card module to store sounds) and then program the Seeed ESP32 board to play audio through it.
  • Embedding programming: connect the fabric with conductive thread strips to the board and then program the board to sense capacitive touch. Get advice from Irmandy.
  • Check with Tori on how to make the speaker module become a microphone/motion sensor since it uses a piezoelectric sheet.
  • Check with Tori on how to make the speaker via lasercut and vacuum forming (figure out a good way to optimise fabrication procress)

Help from TAs

Claire provided great advice for the final project. Some of the key points:
  • Make sure to test the sensitivty of the sensors (e.g., amount of movement detected from the motion sensor) and calibrate accordingly.
  • Have to check datasheet about how to store the audio files (can it be stored on the EEPROM, or does it need external SD module?).
  • Think of what would be the minimum viable product (MVP) for this project.
  • Check out Victoria Shen's works on vinyl cut circuits, that can be used for making the flexible circuits (this was also recommended by FangZheng).
  • Think of how to incorporate molding and casting and/or 3D printing in the project, perhaps create a charging station.

In the 0th week we're asked to sketch our final projects.

After considering several ideas, I (tentatively) decided upon what I call “the I-Ching divination machine”. It seems interesting and doable enough.

The machine performs the divination procedure described in I-Ching, one of the oldest of ancient Chinese texts. The original procedure, or rather algorithm, uses random number generation and modular arithmetic to “model” the erratic nature of life. Being extremely convoluted, it was probably performed by priests at the book's time; Luckily, this machine can fully automate the authentic process for lazy moderners.

I made a vector drawing of it, including “storyboard” detailing how the machine performs each step of the divination. You can download the PDF; Each section is also reproduced below in HTML format:

The divination algorithm described in I-Ching involves randomly dividing a bunch of sticks and doing modular arithmetic with the counts. The resultant number is then interpreted according to the book for “fortune telling”. A rough explanation of the algorithm on Wikipedia.

This design puts a flat box, divided into chambers, on a slanted and rotating stand. Using gravity, the sticks can fall into different chambers (connected by trapdoors), performing the required steps for the divination technique. Laser beams are used to count the sticks when they're going through certain doors.

▲ I. Initially, the sticks are placed in chamber 0.

▲ II. Opening and closing this door, a random number of sticks are allowed to slide to chamber 1.

▲ III. The sticks falls to chamber 2, while being counted.

▲ IV. (count+3%4)+1 number of sticks are allowed to slide to chamber 4, enforced by the second beam counter.

▲ V. The remaining sticks in chamber 2 slide to chamber 3

▲ VI. The sticks remaining in chamber 0 are slid to chamber 1

▲ VII. This group of sticks follow the same steps: the remainder to the modulo falls to chamber 4, while the rest joins the previous group in chamber 3.

▲ VIII. The sticks in chamber 3 fall back to chamber 0. The process restarts. This loop continues until there are 6 or 7 or 8 or 9 sticks remaining in chamber 0. This number is one of the 6 numbers required for the final interpretation. The intermediate and final results are displayed on the LCD screen. At the very end, the “fortune-telling” message is also displayed.

Before settling on this idea, I initially had a couple other funny ones:

  • a slot machine with a camera: if the machine “sees” that you're losing interest, it deliberately lets you win a bit, to keep you hooked (so that you can lose more in the end).
  • a self-writing book: a book, a pen-plotter, and a page-turning machine combined. it just keeps on writing itself and flipping the pages.
  • a poop machine. the user inserts in random things, the machine squeezes, moisturizes, and do other nasty things, and what appears to be poop come out at the other end.

It was somewhat challenging for me to come up with good ideas because:

  • I'm not familiar with designing machineries, so I don't know what would be possible and what would be too janky to work or simply impossible.
  • It seems that most of the “obvious” ideas has already been done, often many times.

Since currently I really don't know how I would approach realizing my idea, I haven't created detailed CAD models for its parts. However, as I progress through the course, I'll (hopefully) learn the necessary skills and have more detailed plans.