Introduction: Digital Moo Box
Runner Up in the
Sensors Contest 2017
Do you love Moo Boxes? Do they remind you of your childhood? This instructable is made for you :)
This instructable details a way to build a digital Moo Box. There are a lot of ways to build this but the goal was to limit the brain to an arduino mini and an accelerometer. No MP3 player. So to obtain some sound from the arduino, we need a DAC (Digital to Analog Conversion) and for this application no need for a fancy one. The simplest solution is a shift register to synchronize and a R-2R resistance ladder to convert. A low pass filter at the end allows to remove a bit from the ladder effect and Mooo !
Let's go tinker !
Step 1: What Do You Need?
- an arduino mini
- a ADXL345
- a speaker
- a LM358
- a 74HC595
- a battery holder
- a switch
- some 10K Ohms resistor (all are the same value)
- surface mount version will take less space
- 2 capacitors
- 2 pieces of proto board
- some cables
- some screws (M3) up cycling from old stuff
and an access to a 3D printer (your own, in a fablab, 3D hubs, ...)
Step 2: The Electronic Side
Following the schematic, the goal is to arrange everything to obtain a pretty small circuit. I used 3 pieces of proto board for the whole circuit and the biggest is the size of the arduino mini.
Step 3: A Bit of Programming
A bit of programming or not, all the files you need are here. I used the Adafruit sensor library but also the library "digitalWriteFast.h" available here. I used the last one because I was not able to achieve the 8kHz needed to render the sound. We will see afterwards how to change the sound.
Step 4: A Nice Box
I give here the files to reproduce the box but depending on the screws, the speaker, the switch or the accelerometer you find you will need to modify them in order to fit to your need. The little tip is to heat up the screw's head with a lighter to help create the thread inside the plastic when you screw it in. Let cool down the screw inside. And a perfect thread it is.
Step 5: How to Use Other Sound
If you want to change the sound inside the box, you need to put it in a certain way. It's 8 bits PCM sound at 8 kHz. Considering the limited memory, you can put a sound of around 10 seconds. To transform from any format, I used Audacity on Linux to produce an audio PCM binary. Then I used hexdump and some regexp to produce the "meuh.h" file.
Now it's time for you to have fun. :D
I hope that you enjoyed reading this instructable and that you will create your own Moo Box.
You can find more DIY projects on our French blog.
We have a be nice policy.
Please be positive and constructive.