If you’re like a lot of people, most of the time your computer speakers are on without actually playing any music. This wastes a bit of power, and [Bogdan] thought he could create a circuit to cut down on that wasted electricity. The result is a very tiny auto-on circuit able fit inside a pair of speakers.
The circuit is built around the ATtiny13, very nearly the smallest microcontroller available with an on-board ADC. When music is played on the computer, the ATtiny senses a bit of voltage in the audio line and switches a relay to power the speaker.
Of course, there is always the problem of music with a high dynamic range; if the sound played from the computer has too low of a volume, the ATtiny might turn the speakers off even if music is playing. [Bogdan] solved this problem by adding a timer to his code; if nothing is detected by the ADC for three minutes, the speakers turn off.
This feature is integrated in many modern audio chipsets, like my Intel HDA laptop chipset.
You’re correct, though the difference here of course is that he is powering off “external” speakers.
Presumably this is a typical external speaker set which is plugged into a power brick or has some transformer built into it, this circuit is just switching that on/off.
I didn’t notice if he did any analysis of the power consumed before/after. So do the speakers actually consume much less power on (but silent) vs. off (but still plugged in). How much add’l power does this small circuit consume.
Switching his external amplifier to something more efficient (like Class-D) might make more sense from power saving point of view.
The circuit here is powered from a computer’s usb port. The relay turns on the whole amplifier(including transformer). So when it’s off, the power consumption is zero.
The circuit itself consumes less then 10mA (Tiny + LED) when monitoring the signal. And it is totally off when the computer is off.
I’ve got an old set of analog 5.1 computer speakers. When on but no audio you can turn it up and listening carefully you hear the static noise. Anyway, it pulls around 15W with no audio.
It should be noted a lot of (all?) laptops implement this. My two year old laptop does a reasonable job of capturing fast mouse click buzzes etc then going back to ‘sleep’. I’d be curious to know how they do it (in software?).
I’ve thought about building something like thi for a while. My surround sound system draws 40w on standby, 50 on but silent.
The difficulty for me is the circuit would need to recognise a signal not just on analogue audio lines, but also coax and optical digital lines; I suspect any simple circuit would damage the audio signal.
40w in standby? What the hell kind of stupid system is this? My computer draws less power when it’s turned on.
Nice idea. As a person who works for a PC audio company–this the same concept as power management for the audio chip itself (power it off when not in use). We of course have the ability to actually know when the OS is attempting to play or record audio, but otherwise it’s about the same.
Reducing pop’s and missing fractions of a second of the audio from the start-up (particularly very short sounds, like the click of a mouse on a folder) is somewhat of a challenge under the best circumstances, so I would imagine it is here too, but probably not one that matters to Bogdan.
Yey, another fellow Romanian. One question, though: why the uC? Is it really the most practical solution for an envelope detector with long release time/hysteresis?
seems like a transistor or two and a counter would be able to do the same thing… but then the cost of the uC might well be less, unless you already had those bits in your junk drawer…
Either way, nicely done.
I have no idea if it is the most practical solution. But it is the most flexible. It is terribly easy to change the timings and threshold level.
Building this circuit with analog parts, timers and counters makes it more complex(more parts) and it might not be less expensive.
good point about the flexibility factor!
but modern speakers take < 1W while idle so why bother?
Maybe modern speakers that use class D amplifiers, or those that are really low power(like 2-3W each)
Hi-fi amplifiers are class AB/A and will consume a lot more, especially if they are high power.
The three minute “fix” may work for music fading /out/, but not /in/.
It needs 3 seconds of sound(actually three chunks of 1 second with detectable sound) to turn it on.
It will then be turned off when there are 3 minutes of absolutely no sound.
Assuming the 20-watt speakers on my desk right now (powered up, thank you), and the average $.10/KWh BGE charges residential customers (this is at the office, so probably it’s running a bit cheaper, but why not make a generous estimate?):
.02KWh * ~$0.10/KWh = $.002/h * 24 = $0.048/day.
Rounded up, it’s costing me not more than five cents a day, or $.70 per two-week pay period, to leave my speakers on 24/7. Dunno what Bogdan’s using, but it doesn’t look from the pix like they’re all that much bigger than these old chunky ones I’ve got, so it can’t be eating that much more unless he’s powering them from an incredibly inefficient wall-wart supply. (You know, like I’m doing!)
Neat hack, tho.
Also, before twenty people babble at me about how fun can’t be valued in dollars and cents, &c., &c. ad naus. — no argument. But “burning a lot of power” seems like it might be significantly overstating the case. (I’m also curious how the parts cost amortizes over the cost of the power this hack will undoubtedly save. Again, yeah, I know, how awful of me to think about mere money in a context like this one. Still curious, tho.)
I did the math before building it. I was curious too.
The amp burns 15W doing nothing. For 10 hours of power wasted per day this is about $6 per year. It costed me about $3 in parts to build the circuit.
Fair enough. In my case, leaving the speakers on costs not more than $18.20 a year — which, coincidentally, is about a dollar less than my gross pay per hour.
$3 in parts? You must buy in bulk.
This should also extend the life fo the speakers as leaving them on 24/7 is no doubt putting unneeded stress on the components.
Dunno, kendall14. The ones I’m talking about haven’t been powered off, except during outages, for well over half a decade; they were at least six or eight years old before I started using them, and they’re still going strong. It may be that the built-in amplifier shuts off when it’s not getting a signal…
(I’d also note that, while again it’s a neat hack, it wouldn’t actually help with the speakers I use, since thye’re powered by a wall wart — whether the amp is powered or not, the wall wart’s still sucking power as long as it’s plugged into the wall. That doesn’t appear to be the case for Bogdan’s speakers, judging by what appears to be a transformer next to the protoboards in his picture, but it’s worth noting all the same.)
I do buy parts in larger quantities, but not extreme ones. Tiny13 drops to about $1 per piece if i buy at least 5.
SMDs drop to about $1 per 100 0805 resistors, a little more for caps.
5×7 cm boards are $4 per 10 pcs on ebay.
@Kendal114 – Not entirely true, it is switching on and off that causes most wear on electronic components due to heating and cooling causing thermal stress. There have been quite a few studies into this effect including some done by google about the hard drives in their huge data centres
Only problem I see here is when you think you’ve got the sound turned off while watching porn so wife doesn’t hear and then all of a sudden….
Good thing i replaced the power swith with a three state one: Auto, OFF, ON.
I had a set of external speakers with this built in. Problem was that they took about a second to turn on, so all the small windows sounds (getting an IM, etc.) wouldn’t play.
And my current sound system takes even longer to turn on.
But maybe I could adapt something like this to switch between a low power speaker for “windows” sounds and my primary system.
I actually used a 3s timer specially to avoid turn on because of the sounds. On my computers they are usually turned off, but some “escape”.
A good idea is to use a small amplifier, powered directly off the USB and switch between this one and the power one when there is music/movies.
@Aaron
While working an hour of your life each year for nothing may not bother you and the cost savings seem minimal, think large scale and multiply the wasted power by millions. And the effects of generating this power, too..
This could also be used to automatically switch between sources sources.
Say you feed all the in’s to the A2D and then once you detect a level you do a scan on all the inputs until you find the one is on and switch it to the speakers and turn them on. To save power you could use a schmidt trigger to wake the chip from sleep as well.
May I humbly suggest the 3 minutes is extended to 4 minutes 33 seconds. Three minutes is insufficient to render John Cage’s masterpiece correctly. ‘Playing’ 4’33” with the speaker switched off would be like performing the piece without an orchestra. That this is unsatisfactory needs no explanation.
My speakers have such feature built-in and I’m constantly fighting with them to turn on, especially when the sound is very low. But it’s definitely better than leaving them on constantly. When you add all the devices in a house that never really turn off you add up to a lot of wasted energy.
A finger of fudge for the first person to do this with an op-amp and a handfull of passives. Tiny or not, this didn’t need a micro.
It has been done. The circuit is more complex, larger and costs about as much
http://sound.westhost.com/project38.htm
Making a circuit that needs external always on power to stop always on power, seems a bit odd :)
A tiny on USB power seems better.
For some reason I find the idea of measuring fudge in fingers…unsettling. Where have those fingers been?
As others have noted already this seems like a bit overkill for the amount of power it saves.
I did note in the replies that it was mentioned that these speakers are USB powered. That means the savings are almost in the noise level. Your computer’s power supply uses pretty much the same amount of power when an additional load (the speakers) are turned on. It is not a linear relationship.
What does make sense is powering your speakers via USB, or some other tap off of the computer’s power supply and eliminating an external brick. Bricks are far less efficient than power supplies, they’re (generally) powered 24/7, and always consume a little power when they’re plugged in.
I added a 12V power jack to my computer’s case (just tapped it off of a spare power connector) and wired a simple cable from that jack to my speakers. While the speakers receive power whenever the computer is turned on, it’s still far less power than the original brick which came with the speakers.
Read again. Speakers are NOT usb powered. They have a 2x22w amplifier. However the control circuit is powered from usb since the speakers are used for the pc.
So how are the speakers powered? A wall-wart or a power supply with an on-off switch?
If you actually switch the AC power source completely off (no ‘vampire power’) then this circuit makes sense. But if the transformer’s still connected to an AC outlet then it’ll continue to draw power 24/7 whether or not there’s any sound – and whether or not the computer’s even on.
I’ve replaced wall-warts which power accessories for my computer with jumpers which connect to my computer’s 12 volt power supply. That way the accessories only draw power when the computer’s on.
Indeed, i did not provide enough info. The speakers themselves are passive, driven by an amplifier, which is in a separate box, also containing the required transformer. The circuit was mounted inside the box and it switches the mains, meaning that there is absolutelly zero power consumed by the amp when off.
Interesting project.
My desktop speakers have an internal transformer and the power switch is after the transformer, ie not on the mains side, so I imagine they’re still drawing power when off.
I’ve thought about wiring in a switch on the mains side but I can’t find any specs for the speakers.
I think that turning off after only 3 minute is a bad idea. That means it will cut out 3/4 of the way though 4’33”!
The Micro-Controller + Relay combination on a Circuit Board will work GREAT for a 2.1 or 5.1 Speaker System with a Sub-Woofer, That’s attached to a Television or a Boom-Box.
I have a LED TV, which doesn’t have ANY bass to speak of. Hence I attached a 2.1 Speaker System, thereby gaining impressive sound & bass that’s great for movies.
However, I am concerned that leaving the entire setup on 24*7 will not only continue to draw power when idle, but will strain the components as well (I can hear the “hiss” of speakers when they are On, Connected, But with the source silent).
I live in India & electricity is VERY Expensive, not to mention erratic & “impure”.
Just an addition:
Assuming the speaker system is connected to a power-brick, what modifications do you suggest to the setup so that it draw powers from an electrical outlet instead of a USB port? As evident, I am looking for a solution that switches off the surround sound system completely, when the TV is on standby.
UPDATE: I could use the idle USB port on the TV to power the setup as is, but I also want to connect another 2.1 to a boombox that’s powered via an electrical outlet & doesn’t have a USB port.
I assume that the amplifier is powered by a DC brick (normally they are). In that case just use a regulator to step down the voltage to 5V for the microcontroller, a 7805. The most economic way to use it would then be to use a relay for the specific voltage on your psu.
What speakers are we talking about?