Close
0%
0%

Binky - Kid's Music Box

Binky is a music box built for the 3rd anniversary of my daughter. It's designed to let her play music by herself with use of NFC cards.

Similar projects worth following
This Kid's Music box uses Squeezebox as it core to play music from a network Logitech media server. The playlists are saved in the server, and the name of each playlist contains the NFC id of a card. When a NFC card is inserted in Binky's "mouth", the Unique ID of the NFC card is readed and the corresponding playlist is played.

Hardware

The hardware is pretty silmple as it uses a raspberrypi 3. Version 3 is not necessary, rpi1 or 2 is sufficient for the music box to work.

The mini jack audio output of the rpi is connected to a 15W audio amplifier connected to 2 8Ohms output speakers.

A USB NFC card reader is used to scan NFC card and is blugged to USB host of the Raspberry PI.

Software

Software has to be reliable, as it's a music box for a kid. Especially i don't want Raspbian, as it's slow to boot, and not resilient to power cut. So i decided to use a dedicated Linux distribution, running in RAM, and i used Buildroot to do that.

The software is really simple :

  • Rpi bootloader
  • Linux kernel
  • Initramfs bundled to Linux kernel

Rootfs contains :

  • Busybox


And that's all. I also installed wifi tools and firmware, but I didn't use them as Binky is Ethernet connected.

The whole image is less than 10MB and run in RAM, so even if the power is cut off, everything is running back at next boot.

JPEG Image - 2.05 MB - 12/29/2018 at 10:51

Preview
Download

JPEG Image - 1.95 MB - 12/29/2018 at 10:51

Preview
Download

JPEG Image - 1.87 MB - 12/29/2018 at 10:50

Preview
Download

binky.mp4

Binky in action

MPEG-4 Video - 4.23 MB - 12/29/2018 at 09:58

Download

  • 1 × Raspberrypi 3
  • 1 × 15W stereo amplifier : https://www.audiophonics.fr/en/amplifier-boards/dayton-audio-dta-2-amplifier-stereo-class-t-15w-8-ohm-p-8
  • 1 × USB NFC Card reader
  • 2 × Speakers
  • 1 × AC/DC 12v output Adapter

View all 6 components

  • Adding firmware update OTA

    naguirre02/08/2019 at 21:19 1 comment

    This week i added a new functionnality to Binky : Software Update OTA (over the air). Over the wires for me, as binky is using ethernet cable, but you get it.

    The idea, is to be able to launch a complete update of Binky when i'm doing changes on the software without having to dissassemble it.

    I want the F-OTA as simple as possible. The Linux image running on the Rasberry-PI is build with buildroot. It's easy with it to build a Linux kernel image with a root filesystem bundled. The goal of such system, is to have in one piece of binary the whole software you want to use. So you get in a zImage, the Linux kernel as well as the root filesystem containing squeezebox, squeezeznfc, and all the softwares needs to run Binky. 

    As we are running all this stuff on a Raspberrypi, we are relying on the proprieraty bootloader wich have to be run from a Fat32 partition.

    We are so using buildroot to generate the whole SDCARD the firstime, and when we want to upgrade, we only have to change the zImage.

    The Fw OTA is designed arroundca Web service runing on any machine on your local network and a shell script running on the radio.

    The webservice is writtin in go, and is answering to this :

    - the API point /latest : returning a json containing the latest know version of Binky, and where the fw can be downloaded

    - The fw path : /fw/binky_v2.ota, wich returns the whole file

    The shell script is comparing the current version of the software it is running on, and the latest version returned by the Web Service. If a new version is present, the script donwload it, check SHA256 of the file, and change zImage of the Fat32 partition with the new file downloaded.

    And finally reboot the board.

    That's really easy and simple, you have to trigger the upgrade from binky itself. The script can be found here : https://github.com/naguirre/binky_buildroot/blob/master/br_external/board/raspberrypi3/rootfs_overlay/usr/sbin/upgrade.sh

    The webservice can be found here : https://github.com/naguirre/binky_update_ws

View project log

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates