Calculating the resistor needed to replace batteries with another power supply

battery-operatedresistors

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

Best Answer

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.