A fun alarm clock for a 9 year old. It plays Minecraft songs for wakeup. It can also be used as a real jukebox, by moving forwards and backwards though the list of songs.
I recently bought a Raspberry Pi for my son hoping to divert him from playing Minecraft and try programming instead. He already had done a little bit of Scratch, and I thought the Minecraft API would be very exciting for him… All wrong: the limited version of Minecraft on the Pi as no appeal compared to the full fledged version on a laptop. In addition he is simply not ready to program.
I also acquired a nice book for kids: “Adventures in Raspberry Pi” by Carrie Anne Philbin. The book did not help program (yet;-), but at least provided an idea to recycle the Pi. By adding a few components to the Pi kit (I already had a GPIO cable, protoboard, etc.), we can construct something useful for a nine year old. He will not do the programming for it, but at least he will help during the building process and understand a little bit the capabilities of hardware mixed with software.
My son helped with the initial design of the box (finding the right size, laying out the components), he soldered most of the components (he always enjoy soldering), and kept complaining that I was spending too much time on the cardboard part (not so easy to build a box;-)
As usual, I found that one difficult aspect is to create a simple user interface. The most basic interaction always require at least a few buttons, and they are a pain to integrate.
Well, time will tell us if this project is a success or not!
| Component | Link | Price | For project |
|---|---|---|---|
| Computer: Raspberry Pi Model B | https://www.adafruit.com/products/998 | 39.95 | |
| USB powered speakers | https://www.adafruit.com/products/1363 | 9.95 | 1 |
| 0.56” blue seven segments display | https://www.adafruit.com/products/881 | 11.95 | 1 |
| Real Time Clock (RTC) | https://www.adafruit.com/products/264 | 9.00 | |
| Power supply: USB 5.4V | https://www.adafruit.com/products/501 | 5.95 | |
| Half size perma proto for Pi | https://www.adafruit.com/products/1148 | 5.95 | |
| Pi Cobbler breakout and cable | https://www.adafruit.com/products/914 | 7.95 | |
| Square tactile button switches | https://www.adafruit.com/products/1010 | 5.95 | 1 |
| Toggle switch | recycled | 0 | |
| Box | cardboard from and old big box | 0 | |
| Total (include Pi Kit) | 96.65 | ||
| Price for the jukebox only | 27.85 |
Raspberry Pi is not designed for very low power operations and has no suspend/sleep mode. An alarm clock does nothing most of the time! So there is clearly a mismatch, but well, that is the board that I had to recycle…
Reading about the Pi, I found that the only significant power draw gain you can get is by disabling the Ethernet port (powered by the USB bus, so you loose this one too).
Powering down the USB bus is a little bit tricky since the alarm clock
program is launched at boot (/etc/rc.local), and you want to avoid a
Pi that disables automatically its network and USB every-time you boot
it! After some experimentation, I found an satisfying way to put this
in place. When the alarm clock program is launched, only if 1) there is
no network cable detected, and 2) the toggle switch is in alarm mode,
the USB bus is de-powered. This leaves a double security to be able to
access your board when something goes wrong (beside re-flashing;-).
Below are the numbers I obtained:
| Mode | Consumption (A) |
|---|---|
| Pi connected to local network | 0.44 |
| Pi without network cable, but USB bus on | 0.37 |
| Pi without network cable, USB bus off | 0.22 |
So there is definitely a nice gain by powering off the USB bus. Look at the
file disableUsbBusTest.bash if you want to experiment yourself.
I also turn off the HDMI output in /etc/rc.local, which gain about
20mA:
tvservice -oThis is not a cheep project if you want to replicate exactly. Howver my excuse is that the Pi and its accessories would have gone unused otherwise. I only added $28 to the previous failed project (Pi computer for kid).
Starting from scratch, it would be probably preferable to use an old iPod and an Arduino type microcontroller (which also would bring the power draw down).
