Help - Search - Members - Calendar
Full Version: need help regarding DIY project
Lumenlab > Community Interests > Mad Science
q789654
musical box: you open the box, stored mechanical energy drives pins onto a cylinder disc to produce sound

my DIY project: light activated device that plays an .mp3
project example: my device in a closed box, activated when the box is open

i looked around the internet, but couldn't find someone who already made such a device. So i decided to combine two DIY projects that i've found to produce my project

(light activated circuit): http://hackedgadgets.com/2006/04/12/what-t...h-blue-bawls/2/
("hacked" MP3 player): http://popsci.typepad.com/how20blog/2007/1...-it-hack-y.html

my plan is to have a circuit like the first link, but instead of having an LED being activated, i would connect it to the PLAY button as shown in the second link

circuit diagram:


i'm a little confused about the diagram or how the transistor works. anyone can explain it to me?
coyote483
QUOTE (q789654 @ Feb 3 2008, 04:17 PM) *
musical box: you open the box, stored mechanical energy drives pins onto a cylinder disc to produce sound

my DIY project: light activated device that plays an .mp3
project example: my device in a closed box, activated when the box is open

i looked around the internet, but couldn't find someone who already made such a device. So i decided to combine two DIY projects that i've found to produce my project

(light activated circuit): http://hackedgadgets.com/2006/04/12/what-t...h-blue-bawls/2/
("hacked" MP3 player): http://popsci.typepad.com/how20blog/2007/1...-it-hack-y.html

my plan is to have a circuit like the first link, but instead of having an LED being activated, i would connect it to the PLAY button as shown in the second link

circuit diagram:


i'm a little confused about the diagram or how the transistor works. anyone can explain it to me?



What are the voltage and amperage requirements for the hacked mp3 player?
estefan2020
QUOTE (q789654 @ Feb 3 2008, 05:17 PM) *
musical box: you open the box, stored mechanical energy drives pins onto a cylinder disc to produce sound

my DIY project: light activated device that plays an .mp3
project example: my device in a closed box, activated when the box is open

i looked around the internet, but couldn't find someone who already made such a device. So i decided to combine two DIY projects that i've found to produce my project

(light activated circuit): http://hackedgadgets.com/2006/04/12/what-t...h-blue-bawls/2/
("hacked" MP3 player): http://popsci.typepad.com/how20blog/2007/1...-it-hack-y.html

my plan is to have a circuit like the first link, but instead of having an LED being activated, i would connect it to the PLAY button as shown in the second link

circuit diagram:


i'm a little confused about the diagram or how the transistor works. anyone can explain it to me?


Well the small circuit uses the transistor as a switch tough the npn transistor is fine radio shack 2n2222 as a substitute if need be. I would probably wire it a bit differently. The C or collector connect that to the plus side of the battery, connect the E or emitter to a reed relay (small relay) to one side of the coil, The second side of the coil to the negative side of the battery. This way you will be isolating your power both devices. Connect the Common and the NO normally open to the mp3 player play button, this will be your switch and you will not have to worry about voltage or current from each device. Next you will want to place a 50ohm pot or variable resistor before or after your cadmium sulfide photo cell, in series, this will give to control on how much light needs to trigger your circuit. you will also want to trade places of the photocell with variable resistor so it is first and the fixed resistor is below it, for your application.

In a dark box the photo has a much higher resistance than the 100k ohm with will allow the base of the transistor see more of a ground than a voltage verry little current will flow from the photo resistor to the variable resistor to the collector of the transistor and to the fixed resistor . The transistor will be in its off stage and will not engage the reed relay and your device will have an open switch.

When you open up the box the photocell will drop in resistance allowing the voltage / current to flow from the plus of the battery though the photocell to the base of the transistor through the fixed resistor to the - side of the battery creating current flow. the base of the transistor will have enough current flow to engage the reed relay which your device will see a closed button.

Now the music will play when the box is open, and off when closed, if the mp3 player will play, as long as the mp3 player can play music with the play button continuously pressed.

If you do not switch the photocell and the fixed resistor from the schematic above you will have the opposite effect, the player will play when box is closed and not when box is opened.

if you do not use a variable resistor in series with the photo resistor is fine, though u can use this in a room to play mp3 player when someone turns on a light.

I would highly recommend the reed relay, unless you measure the voltage at the mp3 players play switch and make sure your voltage source is the same, if your voltage source is too high you can make your mp3 player into a hockey puck. If you need to reduce the voltage by a little bit, try standard diodes witch should drop 0.7v per diode. However, the reed relay is the safest bet.

coyote483
QUOTE (q789654 @ Feb 3 2008, 04:17 PM) *
musical box: you open the box, stored mechanical energy drives pins onto a cylinder disc to produce sound

my DIY project: light activated device that plays an .mp3
project example: my device in a closed box, activated when the box is open

i looked around the internet, but couldn't find someone who already made such a device. So i decided to combine two DIY projects that i've found to produce my project

(light activated circuit): http://hackedgadgets.com/2006/04/12/what-t...h-blue-bawls/2/
("hacked" MP3 player): http://popsci.typepad.com/how20blog/2007/1...-it-hack-y.html

my plan is to have a circuit like the first link, but instead of having an LED being activated, i would connect it to the PLAY button as shown in the second link


i'm a little confused about the diagram or how the transistor works. anyone can explain it to me?




Also, the wiring diagram you posted will turn the music box on when it is closed and off when it is open. If you reverse the possition of the 100k resistor and the photo resistor, it should work the other way though you may need to change the value of the 100k resistor. If I'm not mistaken you want the opposite effect, right?
The simple explanation for how an NPN transistor works is: Think of the NPN transistor in the picture as an electronically controlled variable resistor. (Functionally in this case it can be explained like this, but in actuality there are definitely more accurate ways of describing them.) (Just in case: b = base, c = collector, e = emitter) If you measure the resistance with an ohmmeter between the collector and emitter you should get a reading well above 1 mega ohm. This in effect is the off position for the circuit. As current is applied to the base lead it travels into the transistor and out the emitter. It takes very little current (about 1 milli amp) to reduce the resistance between the collector and emitter leads. As the current applied to the base increases, the resistance across c and e decreases (usually 20-50 milli amps is all thats needed to push the transistor as far open as it will go). Theoretically transistors should be able to be driven to a point where the resistance across c and e is far below 1 ohm, but in practice this can be very tricky to do, and even impossible for some transistors. But for this circuit where an led is the only thing being powered, just about any NPN transistor will work. This is just a guess, but given the components you listed the mp3 device will not function unless it can work on less than 100 milli amps. You can power a small relay with this circuit which would be a mechanical switch for the mp3 device, but you would need to slightly alter the design to protect the transistor from being destroyed when the relay is turned off. Or instead of using a relay, you could use an NPN transistor that is designed for switching currents of more than half an amp. From my personal experience using transistors in similar circuits if you want to switch a device that uses half an amp of current, the transistor used usually needs to be rated at 2 amps minimum in order to work properly for this design.

if anyone else has better info on driving a transistor to its saturation point so that it's resistance is near zero please post. This has plagued me for some time. 95% of the transistors I've played with would go no lower than 10 ohms. Needless to say I've learned all I know from various web resources, the odd book or two, and my breadboard. smile.gif Go DIY'rs!!!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.