Skip to content

Latest commit

 

History

History
97 lines (85 loc) · 5.3 KB

readme.org

File metadata and controls

97 lines (85 loc) · 5.3 KB

Minecraft Jukebox Alarm Clock

Concept

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.

./jukebox.jpg

Development

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!

BOM

ComponentLinkPriceFor project
Computer: Raspberry Pi Model Bhttps://www.adafruit.com/products/99839.95
USB powered speakershttps://www.adafruit.com/products/13639.951
0.56” blue seven segments displayhttps://www.adafruit.com/products/88111.951
Real Time Clock (RTC)https://www.adafruit.com/products/2649.00
Power supply: USB 5.4Vhttps://www.adafruit.com/products/5015.95
Half size perma proto for Pihttps://www.adafruit.com/products/11485.95
Pi Cobbler breakout and cablehttps://www.adafruit.com/products/9147.95
Square tactile button switcheshttps://www.adafruit.com/products/10105.951
Toggle switchrecycled0
Boxcardboard from and old big box0
Total (include Pi Kit)96.65
Price for the jukebox only27.85

Notes on power

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:

ModeConsumption (A)
Pi connected to local network0.44
Pi without network cable, but USB bus on0.37
Pi without network cable, USB bus off0.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 -o

Note on price

This 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).