I want to supply 3V to MP3 player - best way to turn on and off with the prop?
GeeksGoneBad
Posts: 100
I have a small MP3 player that runs on 3V - whats the best way to control power to the device using the prop? I asking for the best way to wire it and also how to code it
Thanks!
Jamie
Thanks!
Jamie
Comments
The diode in that circuit protects against the flyback current that happens with an inductor. It might not be needed for your application. Another thing to consider is the voltage drop across the transistor. Your input voltage (e.g. the 9 volts in the above schematic) needs to be higher than the desired output to compensate.
A relay has an advantage that there's no voltage drop, but to drive a relay you need to consider the current its coil draws. What I've done is use a small signal diode instead of a TIP120 in a schematic identical to the above. It turns on the relay which in turn turns on the device without any voltage drop issues. I bought everything from Radio Shack too.
What about the other push-buttons like previous/next title, stop, volume up/down?
Recently I tweaked a device where I simply used a 4066 in parallel to the buttons. This way the buttons still work and the propeller can take over control ;o)
http://www.datasheetcatalog.org/datasheet2/e/0l55x3pr5j0k4x8s96kswhjo903y.pdf
Something like the above, but mine are 1.5 amps. There may be some that are adjustable, but just about any regulator can have its reference voltage lead tweaked to get another voltage.
That TIP120 solution has a 4 volt drop at 2amps saturation and a 2 volt drop at 1 amp saturation. A simple 2n2222 transistor will provide 700ma and have about a 1 volt drop at saturation. What this means is that a TIP120 might require 7volts to provide 3, while a 2n2222 would require 4 volts to provide 3.
You need to determine how many amps (or watts at 3 volts) you require to determine a good fit for a transistor.
Of course, using a voltage regulator also requires providing a higher voltage, but a smooth output is assured. Though you can use the Low Drop Out region, that tends to consume power faster, so think about 5-6 volts for a 3volt device.
MOSfets will have the least power wasted in a voltage drop. I presume you need a constant 3 volts and want the lowest voltage power source you can get - maybe something like 4.5V from AA cells or even 3.6 from NiMH AA cells.
HOWTO code the Propeller.... If you want to control the MP3 Player via your computer or a wireless serial link, just load PropForth.
The examples below are for Pin 1, not Pin 0
In PropForth,
: PlayerON 1 Pinout 1 Pinhi ;
: PlayerOFF 1 Pinout 1 Pinlo ;
Then you just say PlayerON or PlayerOFF from a serial terminal.
I would help to know if you intend to power this from a wall wart or batteries.
Do you want the 3 volts provided to replace two AA alkaline batteries? If so, I think you will find that fresh alkaline are actually above 1.5 volts each, maybe even 1.65 volts. That would mean that your mp3 player could tolerate 3.3 volts, but it might be safest to just provide a steady 3 volts.
The other thing is that the actual voltage is never enough for solid-state switching designs.
One needs to know how many milliamps or amps you need in order to select an appropriate device. The TIP120 is rated to deliver up to 5 amps but darlington pairs have twice the voltage drop of regular transistors. Personally, I don't think you need anywhere near that much. And you might need less that 500 ma. If you do need a lot of power, a newer high-beta transistor is better than a darlington pair.
If it requires only 500 ma power (you do have to measure with an amp meter to find out), the 2N2222 transistor is the simplest. Yes you can use a MOSfet, but they can be tricky to turn on at 3.3 volts - you have to know how to select and buy the right one.
If the MP3 player will operated over a wide range (say down to 2 volts) you can just use two AA cells and a 2n2222. But if it needs all of 3 volts to work properly, you will need at least 3.6 volts to power it with a 2n2222 AND if you do go too far to a higher voltage (lets guess anything over 3.8 V) you might risk damage to it by high voltage.
So I suggested the 3.3 voltage regulator with an enable. The voltage is steady regardless of the power supply and the hook up is simple. If you want to bring the 3.3 volt output down to 3.0, a 1 amp Schottky diode has a .3 volt drop - just put it in series.
Google "3.3V regulator with enable" to find a good one.
If you cannot find what you want, just use a transistor and have an adjustible voltage regulator provide the plus voltage to unit and the 2n2222 switching the low side in such a way that results in the MP3 player always seeing 3.0volts. For that you will need to provide about 6-7 volts into the regulator.
How this project will be powered is interesting I will be powering a Prop Proto board from the 3.3V output of a Spark FUN Easy Driver (maybe it's 5V output, I can't recall right now) and the Easy Driver will be powered from a wall wart
Yanking out and just going for it is rather hazardous to one's projects and pocketbook. In could have been a 3V Lithium cell that requires something higher to actually take a charge (try Wikipedia for the details). NiCd and NiMh would have been 3.6V and the other Lithiums are 3.2 or 3.3 and 3.6 or 3.7
I guess you are thinking of using the +5 or +3.3 from the Propeller board to power the MP3 Player. I'd try running the +3.3 with a 2n2222 to see if the MP3 Player would run on a reduced voltage and at 700ma or less. It would probably work.
I just found there is an SC1565 that handles 1.5 amps, adjustible, and with enable that in an easier package to solder. Ask for samples... of course.
http://www.semtech.com/power-management/linear-regulators/sc1565/
thanks for the link to the voltage regulator with enable - I will have to get some of those - do you know if they have them in through hole packages? (I will look regardless)
limiting so the inrush to the MP3 player's decoupling capacitors doesn't crow-bar local supply rail.
The reality is that less and less is being produced in through hole packages, these seem to be only in surface mount. The PDF has a listing of available packages - just select the one that is the largest and simplest to work with.
The 2n2222 is NPN and is used ordinarily for a low side switch. The 2n2907 is its PNP mate and used generally in a high side switch for digital purposes. You need a pair of each to create an H-bridge.
PNP does conduct when pulled low, so it would seem to be an on until turned off.
NPN conducts when pulled high. I suppose that in enough to know for basic switching, but there is quite a bit more if you want to drive significantly higher volts or more watts.