MP3 control Hack using a motion sensor and a Microcontroller
Using
a microcontroller is not as hard as you might think. For an
introduction to microcontrollers please click the Microcontroller 101
link below. I would like to thank Otaku and Bourno for the information
on the work they did for there MP3 Hacks. There web links are here.
Otaku's MP3 Hack
Bourno's MP3 Hack
Microcontrollers 101
Now
do not run screaming to the door. The picaxe microcontroller is very
easy to use. I have been using them for several years now and they have
really helped me take my prop control to another level. They
program is basic just like a basic stamp but cost about a tenth the
price. The software and the manuals are free. If you do not know
anything about electronics do not worry there is a lot of information
available to help you look in the links section for a free online
electronics course. Send me an email and I can help you get started
with electronics or microcontrollers. In this How-to I used a picaxe
08M (about $3.50) to control the now infamous 5 dollar MP3 player. I am
also using the parallax motion sensor to trigger it. The picture below
is the actual circuit that I made on a prototype board. With this chip
I can control the start, pause, and stop functions. You can start the
player have it play for a long as you like, also you can pause it as
many times as you like and then shut it down until the next trigger in
order to save battery power.

This
picture below is how it is connected to the MP3 player. The red and
black wires sticking up from the circuit board is the negative and
positive battery connections for the circuit board. The gray wire is
soldered to the switch in the MP3 player. I have also tapped off the
battery connection inside the MP3 Carrier so that I can use a larger
battery. Even though there are two batteries in the holder they are
both facing the same direction so it is still 1.5 volts. The batteries
are in parallel.

Here
is the circuit schematic and how to connect the MP3 player to the
circuit. The Picaxe 08M has 5 pins that can be used as inputs or
outputs. The pins are labeled 0 to 4. The pins do not match with the
chip pin number (this is common of all microcontrollers). For example
output pin 1 is pin 6 of the chip. Keep this in mind when you read the
schematic so that you do not get confused. The output pins 1 to 4 are
labeled. Pin 0 is also used for programming the chip. I try not to use
output 0 unless I have to. There are many other larger picaxe chips all
the way up to 40 pin units. Everything to the right of the chip is for
programming except the cap which is to keep the chip stable. Just 2
resistors are needed to program the chip and a 3 pin header. The
circuit for the programming cable is there as well as a 7805 regulator
circuit if you want to use a wall wart. Input 1 is connected to the
other 3 pin header which connects to the Parallax motion sensor. The
220 ohm resistor is to protect the chip input from over current. Output
2 is connected to a NPN transistor through a 1K resistor to limit the
current on the transistor base. The transistor shorts the MP3 player
switch to ground effectively pushing the button. The
program for the chip can be seen here.
MP3 control program with motion detection



I
forgot to take a picture of the solder point inside the MP3 player so I
borrowed a picture from Bourno's web page. the point indicated in the
picture is the exact same spot that I used.


Go to page 2 to see the Motion sensor and board mounting --