A homemade audio player for kids that uses RFID cards and a Raspberry Pi Zero W 2, similar to a Yoto Player or Yoto Mini.
This is based on jmcrory's The Pi Must Go On project and would not be anything close to possible without his work. His version differs from mine in a few respects: it uses a full size pi instead of a pi zero, uses usb spearkers insteadd of a HAT, is always plugged in instead of battery powered, doesn't have a volume knob, and doesn't have a 3D-printed case. A few of the script functions also didn't work for me without a lot of vibe-coded modifications which I suspect is due to changes in how underlying libraries are handled since he wrote his instructions.
The basic steps to making the version described in this repo are:
- Gather all materials
- Put together the HATs and the pi
- Wire everything to the exposed GPIO pins as shown in this diagram. This involved some soldering in my case to get the pins onto the RFID reader and to make the momentary button work jumper cables
- Install Bookwork Raspbian lite via Raspbian imager with SSH enabled and wifi details included to a microsd and boot the pi for the first time
- SSH in and update everything in Raspbian
- use raspi-config to activate i2c, spi, and serial interfaces
- edit /boot/firmware/config.txt to add/uncomment a couple lines to get the sound card working:
dtparam=i2c_arm=on dtparam=audio=offdtoverlay=wm8960-soundcard- test speakers. Figuring this out took me a truly stupid amount of time so I hope it's as simple as following the above for you.
- install python 3
sudo apt-get install python3-dev python3-pip
- make a project directory (in my case /home/joel/musicbox)
- use pip to install spidev and mfrc522
- make write.py (standard version in the jmcrory tutorial)
- use write.py to write to a card or two
- copy over Read.py
- use the power button setup script
- create the musicbox systemd service and make it run on boot
sudo systemctl daemon-reloadsudo systemctl enable musicbox.servicesudo systemctl start musicbox.service
- reboot, test one of the cards you wrote to see if it's all working
- print the case, and assemble everythig inside it