Story
Description
Inspired by the high-way toilet experience "2TheLoo" (https://2theloo.com), this is an automatic MP3-player playing forest-bird-song sounds. When attached to the toilet-light mains power, it starts when the lights goes on and stops when the lights goes off. No batteries or presence detection circuitry. The player relies on a USB phone charger to operate.
Other parts of the concept are wall decoration (forest and bird photo's or images), filtered light and (slightly) moving air.
But those fall outside the current description.
The Arduino sketch selects fragments at random, which works good for short files (5-10 minutes). If you don't like the current sound, just switch the light off and on an you get a different one. The goal is to make toilet visits more enjoyable, even for techo-foobs.
Details
Technical description
The audio hardware consists of a small 3D-printed box containing a speaker, an Arduino Nano, a DFPlayer Mini MP3 module (https://www.dfrobot.com/product-1121.html) and two buttons. The Arduino firmware is a slightly modified version of Makuna's PlayRandom sketch (https://github.com/Makuna/DFMiniMp3). The addition consists of two buttons for persistent volume control. Volume control is intended for initial installation and occasional adjustments only.
One great advantage (IMHO) of this solution compared to other bird-song boxes is that the audio is in MP3 format and on a SD-card. This allows the user to select and add custom sounds. The current setup uses the sound ripped from several YouTube relax-bird-sound-forest streams, converted into five minute MP3 files. Eventually specially created sounds will be used.
This part of the project is limited to a few boxes, maybe seven or eight. Installed at my home or used as gift for friends. The current selection of parts doesn't scale well to mass-production. I have no plan to make them available commercially.
Note the current configuration is very close to my ideal setup. Which might be different from what other people want, or think they want.
Options and limitations:
- Being mains-powered it doesn't need a battery to be charged (which won't happen). The disadvantage is the need for an installation of a mains-socket between the mains-wiring and light, adding a mains-splitter for light and USB-charger. Finally everything has to be secured to the ceiling or high up the wall.
- The DFPlayer has two channels analog output, but the internal amplifier is mono. With more hardware stereo output is possible.
- The DFPlayer also has support for an USB memory-stick, for more sounds.
- As described above, there are no real user controls other than switching it on and off.
Construction of the box
The box can be printed with both PLA and PETG. I used transparent PETG, giving the box a nice red glow when operating.
The boards are stacked, placing all the outside interfaces close together; micro-B USB for the Arduino, SD-card slot for the DFPlayer and the volume control buttons. All boards are used without headers and wires directly soldered to the pads. The DFPlayer comes with pins soldered in, those have to be removed.
The two boards are connectted by a set of wires and two external components; a resistor and a capacitor.
Note the Arduino Nano used has a micro-B USB connector, while traditionally the Namo has a mini-B USB connector. But nowadays the Nano comes in three flavours; mini-B USB, micro-B USB and USB-C.
The volume switches are soldered on a small perfo-board.
The speaker is 50 mm in diameter and 10 mm deep.
More Code: Automatic WC bird song player | Hackaday.io
Reposted with permission from the author. And if you want to explore more projects, please follow the author: fjkraan (Hackaday). He has many wonderful projects and is an excellent maker. Enjoy it!