0
\$\begingroup\$

The project I'm working on is going to use a LiPo Battery to run a Raspberry Pi, Arduino, and some LED's. I currently have all of that working. One final thing I want to do is have a "Speaker" plugged into the Raspberry Pi. I went to the local electronics store and got a little battery operated speaker thingy that has a 3.5mm audio jack. The speaker runs off of two AAA batteries. I would like to wire it up so that the speaker runs off of the lipo battery instead of AAA. That way when I connect/disconnect the battery the whole system turns on and off as one.

My question is what resistor would I need to appropriately power the device? Two AAA batteries only put out 3v but my power source is 5v. I don't really know how much current the device needs though so I don't know how to calculate a resistor.

EDIT: Did a little search on the internet and found a link to the product description: http://www.radioshack.com.eg/en/auvio-universal-speaker-for-media-players-40-036 That is the item I have. Due to complexity, budget, and size constraints I am unwilling to add another voltage regulator to the system. The battery I have is a 7.4v LiPo battery running through a BEC that is set to the default (5.1v). If I can use the power source directly great. If not then I'll have to just omit the sound feature of the project which will make it significantly simpler because the only reason for the Raspberry Pi is to provide sound.

EDIT 2: This is my BEC: http://www.quadrocopter.com/Battery-Eliminator-Circuit-BEC_p_625.html

\$\endgroup\$
4
  • 4
    \$\begingroup\$ You don't want to use a resistor. The load of your amplifier and speaker varies too much for that to work. What is the maximum current the speaker draws (full blast)? You'll need to measure it with an ampmeter. Also you really should find out if the thing can work from a 5V supply, chances are that it will. \$\endgroup\$
    – jippie
    Commented May 23, 2013 at 18:10
  • 1
    \$\begingroup\$ You would probably use a linear voltage regulator to output 3V from a 5V supply - try looking up one that you think might work - you'll need to understand how much current your speaker box may use on full volume - there maybe some info that came with the speaker. It's not a good idea to use a resistor to do this because as the speaker volume increases, the resistor won't adjust (it's fixed) to keep a regulated 3V at the speaker. Alternatively, your speaker may run from 5V so check what it says in the documents about it. \$\endgroup\$
    – Andy aka
    Commented May 23, 2013 at 18:12
  • \$\begingroup\$ Thanks for the help guys. The speaker thingy was pretty cheap and it's not a necessary part of the project so I think I'll just wire it up to the 5v source and see if it blows. It was a cheap speaker thingy from Radio Shack. I'm not sure there is even documentation on what kind of power source it needs. \$\endgroup\$
    – William
    Commented May 23, 2013 at 18:16
  • \$\begingroup\$ It's possible that not only will the little powered speaker work on 5V, it might well have less noise and distortion, and a little bit better dynamic range and output power. \$\endgroup\$
    – Kaz
    Commented May 23, 2013 at 22:37

2 Answers 2

1
\$\begingroup\$

No resistor at all. Once again, questions should stick to what you want to know or accomplish, not how you think it should be done.

Your basic question is apparently how to power this "speaker" (clearly more than just a speaker) from the power source you supply rather than the two AAA batteries it is designed for. You have available some sort of lithium battery and a regulated 5 V supply generated from that somehow.

First, you need to find out whether the batteries in your speaker unit are ground-referenced. If they are, you can proceed. If not, then this is beyond your level at this time and you either need to find a different speaker unit or a altogether different approach. Run the speaker normally with a fairly strong signal into it. With a voltmeter, measure between the negative terminal of the combined AAA battery pack and the outer ring of the 3.5 mm plug. There should be 0 V, both when measuring AC and DC. Of course exactly 0 will never happen, so in this case anything over about 10 mV means the two points aren't really connected. If they are connected, then the battery is ground-referenced and you can proceed.

If the lithium battery voltage is around 3 V, then use it directly. If this battery is a single cell, this might just work. Basically, if the lithium battery voltage is below the regulated 5 V output, try connecting the battery to the + side of where the AAA pair would go, and ground to the - side.

If the lithium battery voltage is higher than 5 V, then it would be best to to use that directly to make some sort of regulated 3 V to drive the speaker unit with. A linear 3.3 V regulator is a quick and simple answer, but might get warm when the speaker is producing loud sound. Try it and see. If that is not acceptable or the lithium battery voltage is substantially higher than 5 V, then use a switching regulator instead. There are many switching regulator chips out there that can do this with a few external parts. You can even use one that has a fixed 3.3 V output.

Added:

You now say the lithium battery puts out 7.4 V and the link to the speaker unit rates it as 1/2 W, but it's not clear if that is input power or power to the speaker. Just to see where you're at, .5W / 3V = 170 mA. We can't really tell from the sparse information in the link, but lets say top current draw of the speaker unit is 200 mA at 3 V. With just a linear regulator, the regulator would dissipate (7.4V - 3V) * 200mA = 880 mW. That's rather wasteful and something like a TO-220 package will get hot but probably OK with a modest heat sink. You can try a 7803 regulator.

The other thing to try is to power the speaker unit from your existing 5 V source. I don't know what a "BEC" is, so can't tell if this is a linear or switching regulator and how much current it can support. The speaker will draw more current at 5 V than at 3 V. If a lot more, it may get damaged. After all, it's meant to run from 3 V. 5 V may be OK, but you're a test pilot then and you can't complain if it vanishes into a greasy puff of black smoke.

\$\endgroup\$
2
  • \$\begingroup\$ Wow. That's a lot of information and almost all of it went over my head I think. I added a little information in the OP if that helps. Thanks for your response. \$\endgroup\$
    – William
    Commented May 23, 2013 at 21:05
  • \$\begingroup\$ BEC is Battery eliminator circuit. It's just a thing that regulates the 7v down to 5v. I put a link to what I'm using in the OP. \$\endgroup\$
    – William
    Commented May 23, 2013 at 21:56
2
\$\begingroup\$

In general you can't do this kind of thing with a resistor because the current drawn by (in this case) the active speaker is NOT CONSTANT. The resistor would have to adapt itself constantly to the required current to keep the voltage at 3V.

Luckily, this 'adaptive resistor' does exist, it is called a voltage regulator. Within its limitations (maximum current, input voltage, dissipation, some capacitors required) such a gadget can convert a voltage to a fixed lower voltage. Your Pi contains one, because its processor runs at 3V. Its 3V output is available on the extension connector, but according to the specs it can provide only 50mA. My guess is that your speaker draws more, so you'll probably have to add an extra voltage regulator. You could use a 3V3 MCP1702, or use the more commonly available LM317 with two resistors to set it to 3V.

It might be worth checking what is inside your speaker. If you find a chip and give us its number we might be able to guess whether it can use 5V directly.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for the help. I added a little more information in the OP. \$\endgroup\$
    – William
    Commented May 23, 2013 at 21:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.