Parents of young children will probably be familiar with Yoto and Tonies. These story-reading devices allow kids to choose an audiobook simply by placing a little card or figure on them. They’re clever, child-friendly, and widely-loved, which is why parents are willing to stump up eighty quid for a player and then pay printer-cartridge prices for the stories to go with it.

But I am cheap and self-indulgent, so I thought I would make my own.

The Magic Storybook

The magic storybook uses a Raspberry Pi, an RC522 RFID module, a USB speaker, a cardboard box, some red faux leather, half a bottle of Copydex and an unjustifiable quantity of hot glue to provide delightful screen-free storytelling to exactly one child.

For the child, operation is simple. Place a suitably enchanted book or other object on the magic storybook, and it will be read aloud. Take it off, and the reading stops.

For the grownup, operation is still not too complicated. Place a suitably encoded audio file on the magic storybook’s SD card, then affix an NFC tag with the text <s>filename.flac</s> written to it to the object you wish to enchant.

I was fully prepared for this project to be entirely for my own amusement and of no interest to my son, but as it turned out, he was very enthusiastic about it. On his second night with it, I tucked him in and left him with Funnybones playing; when I checked in later, he had put Five Minutes’ Peace on for himself and was fast asleep. It is foolish to assume that anything involving a small child’s sleep will last, but it won’t take many nights like this for me to have gained more time than I spent making it.

Some notes on the build

Who ate all the Pis?

It is basically impossible to buy a Raspberry Pi for a reasonable price at the moment. Luckily, I was able to find an eBay listing with unusually little interest; shoppers may have been confused by the OCR exam board branding and bundled February 2013 issue of MagPi magazine. Can I make back some of the money spent on this project by selling on the magazine on its own? We shall see.

OCR exam board branded box with Raspberry Pi, RC522 module, mini speaker and other electronics parts on top of it. In the background is a copy of MagPi Magazine and a stand-up beginner's guide to using the Raspberry Pi.

(A few days after finishing the build, I got an alert that the Pi Zero W was back in stock at The Pi Hut. But there’s something satisfying about making use of a device that has been sat unused in its packaging for a decade.)

Reading tags

I used an RC522 RFID module to read my tags; it had a killer feature lacking from all the other options I looked at, which was that it was the price of a Boots meal deal. There is a Python library available for this module, which worked perfectly with the included tags. I felt very pleased with myself.

It then immediately fell over when faced with the cheap RFID stickers I had bought a hundred of for this process. You see, it turns out that not having the first idea what you are doing can cause problems. It also turns out that this whole RFID/NFC business isn’t just ‘magic sticker has some electric writing on’. There are different kinds, and they work differently!

I’ve written a separate post on resolving this, in the hope of helping anyone else who finds themselves in the same position of understanding just enough to get themselves into trouble get out of it. (This position seems to be where I spend most of my time.)

Enchant wisely

Once everything was built, there was one last decision to make: what objects should I tag to make the storybook play stories? Yoto uses cards; Tonies uses figurines. My first thought was just to tag the books themselves, which seemed the simplest and most magical approach. But I worried that it would be hard to line up the tag with the reader. Tonies have magnets to align them and Yoto has a slot; I was just going to put a little gold sticker on to mark the reader, but that doesn’t help if the object you’re putting on is the size of a children’s storybook.

In the end, my son made the decision for me. When I showed him how it worked, he just naturally assumed you would use the books. When we tried it out, it turned out that the way a person naturally places a book on the magic storybook is pretty predictable, and if it doesn’t work straight away it’s not hard to move it until it does. Also, my gold stickers were metallic enough to block the radio signal. The lessons here: don’t overthink things when you can try them out, and don’t assume you’re smarter than a four-year-old.

My dodgy code

The code that runs this project is available here, in case it’s useful to anyone.

Categorized in: