Ambient Sound Machine
My wife uses a white noise machine at night to help her sleep. I saw this beautiful piece from Yuri Suzuki and thought it would be an amazing gift. Luckily for me, John Park put together this nice step-by-step guide for Adafruit.
There are some differences between the 2 devices.
- The Suzuki Ambient Machine has 32 switches and the Park device has only 20. This changes the shape of the device as well as the number of sounds that can be played.
- The 32 different sounds in the Suzuki Ambient Machine are pretty similar and the switches make subtle changes to the output. The Park sounds are all very different and change the output audio in major ways. Alos, half of the switches are used to control the volume of the the other half, so there are only 10 different sounds.
- The front of the Suzuki Ambient Machine looks like it's a yellow acrylic sheet. It's a nice looking project. The Park device is using yellow card stock or construction paper. Obviously, this is a tutorial project and the paper is a great example of using an inexpensive and highly available product to provide a very nice looking end result.
Since this is a gift, I want it to look more like the Suzuki product. I want it to have many different sounds so it can be used for sleep, meditation, and background noise. I want to have a sleep timer function so it can play for some period of time and then turn off. I also really like the Park device's ability to modify the volume of each sound with a switch.
With all of that in mind, I ordered some parts and started on the electronics.
From Adafruit:
Metro M7 I2S 3W MAX98357 Amp MCP23017 x 4 IC Socket 3 Pack x 2 Aluminum Mounting Grid USB C Mount cable
From Amazon:
3 Position Switches 15 pack x2 GaN USB-C Power Adapter USB-C PD 12V Trigger Module
From AliExpress:
Touch Switch
Using the 3 position switches, I can have them play a sound at a lower volume when it is switched up or a higher volume when it is switched down.
I'm also going to reserve the last 2 switches for the timer function. I can have up to 8 different timers (Up/Up, Up/Off, Up/Down, Down/Off, Down/Up, Down/Down, Off/Up, Off/Down).
I'm going to skip the Up/Down and Down/Up settings and go with the following:
- 5 Min Up/Off
- 10 Min Down/Off
- 15 Min Off/Up
- 30 Min Off/Down
- 45 Min Up/Up
- 60 Down/Down
With the second switch off, the first switch is 5 or 10 min.
With the first switch off, the second switch is 15 or 30 min.
Both up is 45 min and both down is an hour.