[Newbrain] had a small problem. He’d turn off the TV, but would leave the sound system turned on. Admittedly, not a big problem, but an annoyance, none the less. He realized the TV had a USB port that went off when it did, so he decided to build something that would sense when the USB port died and fake a button press into the amplifier.
He posted a few ideas online and, honestly, the discussion was at least as interesting as the final project. The common thread was to use an optoisolator to sense the 5 V from the USB port. After that, everyone considered a variety of ICs and discretes and even did some Spice modeling.
In the end, though, [Newbrain] took the easy way out. An ATtiny 84 is probably overkill, but it easy enough to press into service. With only three other components, he built the whole thing into a narrow 24-pin socket and taped it to the back of the audio unit’s wired remote control.
The seventh post contains the code for the CPU. It isn’t all that difficult or exciting, but the thought process of evaluating FETs and logic ICs against a cheap CPU is entertaining and maybe even instructive.
The amplifier’s wired remote acted like a potentiometer, interestingly enough, so it was a little different than what you would probably find on another piece of gear. We’ve looked at remote hacking several times. Unsurprisingly, the Arduino features in several of them — a small step up from the ATtiny84 used here.
I would have hoped that a tv with a USB port would have HDMI that could signal to other devices about turning off and on.
I would have hoped that someone posting to hackaday would realize that the ‘other device’ would need to have HDMI capabilities in order to receive that signal.
I would have hoped to read less sarcasm on hackaday…
sorry i didn’t realise the receiver was a piece of trash.
Find a tube amp receiver with HDMI.
Quite the opposite. Most pieces of trash receivers have HDMI.
Universal programmable remote with macros perhaps?
macros suck you’ve gotta hold the remote still until everything turns off, I’d rather the USB hack, power off, and put the remote down.
logitech harmony (with smart hub) uses a dedicated (fixed) device… No need to keep pointing anymore.
What about sleep timers on the TV?
I know this isn’t a hack but there are fairly affordable remotes that will do this for you. I have one that’s almost 20 years old that runs power up/down macros. Yeah, I know, what’s the fun in all that.
Macros get out of sync if one of the commands is missed or someone uses the wrong remote or pushes a button on the device itself. Having the receiver turn on and off automatically means it will work 100% of the time and you don’t have to convince your wife to only use one remote in a special way (which is a terrible user interface).
The amp has a WIRED remote. 5 volt dip relay (mucho salvage), with 100microF lytic in series. Contacts across the remote button, assuming it’s momentary action. When 5 falls the charge closes relay for a short time.
OK, I can see the fun and the challenge in building something like that, and this is Hackaday… But if all you want to do is turn off everything else when the TV switches off (or computer, or whatever you want), then just use an automatic power bar like this one: https://www.amazon.com/Smart-Strip-SCG-3M-Autoswitching-Technology/dp/B000P1QJXQ
If you aren’t allergic to line voltage you can build your own too, for a lot less trouble than a USB/micro/remote solution.
Suddenly cutting the power to some of these smarter appliances can cause unexpected firmware faults and loss of stored settings.
AHHHHHHhhhh….. that would be terrible. So that confirmes it, you are no longer boss over your opwn TV, so just cannot switch it off when you want to. It also requires you ta have a UPS, generator because a superstable powergrid is not available to everybody.
The funny thing is, that I sometimes DO need to curt the power, simply because my smart TV (or settop box) are in a strange state that they cannot recover from. If Baird and Farnsworth knew that their invention would involve into something with these silly kind of problems, would they have bothered?
Ahh… progress, you’ve got to love it.
Create something perfect… then overdesign it and add some problems and make the machine do lot’s of other stuff and neglect it’s orginal function… TV, Phone (computer) when does the hurting stop?
If you’d bothered to read the linked article….
My first though was actually to simply use a relay off the USB port, but unfortunately the ampli will forget some of the settings if completely disconnected from mains.
That it would lose its brains when simply switched off was not mentioned anywhere in the original post. I see the afterthought was added in a later comment though.
5v from the USB port turning on/off a relay switchibg the mains perhaps ??
Only 1 component needed
This, or the “smart” power board linked above are the classic solution. Power amps are fussy things though and they often don’t really like having their mains power turned on/off. Much better to control them through their proper interface which is more likely to succeed with de-thumping etc.
Then I seem to be lucky, that my amp has just a real mains power switch as the proper interface. Small drawback: The remote can not actuate it, but on the other hand: it consumes true zero standby power. And the funny thing: If you change the input source a small motor turns a switch in it.
My Sanyo soundbar automatically turns off about 5 minutes after the S/PDIF signal drops. What’s annoying is that if the lack of signal turns it off, it doesn’t automatically wake back up when the signal returns.
But if there is no signal, don’t modern amplifiers disable the drive signals to avoid undesirable noises as the PLL relocks to a new signal? And maybe also protect the power electronics from glitches that may occur in the process? (I remember reading about some Onkyo receiver that tended to blow the output MOSFETs if the input signal switched between sample rates rapidly in a certain way.)
I had much the same issue with another brand of soundbar (Philips?); I was using only the line in, but if audio went silent for a few minutes it would turn to standby. So I’d pause playback to answer the door, make a snack or visit the bathroom and when I’d restart there was no sound and I’d need to find the tiny remote. Totally infuriating! I soon ditched it and switched to some much older ‘unintelligent’ kit. The people designing this stuff should take the prototypes home for a bit and try it out for real!
Heh, yah, have 5.1 amp and speakers that is almost as annoying. I think it gave me an hour though, so didn’t hit it all the time, just long interruptions. The remote isn’t stupid small either, which helps. However, after not being interrupted long enough while using it for it to sleep for a month, the next time it did it would have me checking connectors etc until I remembered, doh!
Heh, talking of stupid small remotes, think that will be something I print early on, a “fat suit” for the apple TV remote.
We did the Neanderthal version of this with our old TV: taped an LDR to the on-LED and used that to turn on/off our amplifier. Using black electrical tape, it “kinda” matched the looks of the TV and wasn’t totally horrible, but it would periodically come loose and need a retaping. Advantage is that the optocoupler is built in! :)
We moved, didn’t re-install the system, and now we have to turn the amp on and off by hand. Which is more primitive?
now that is a hack, that looks like a hack.
definitely a hack!
Did something similar by rectifying one of the SCART pins, and then using a comparator to switch a relay.
When the digital TV receiver was switched on, it also switched on the TV, the amplifier, and the subwoofer amp. (and off as well).
Why didn’t you use the SCART control voltage – something like 12V/100mA on pin 8 if I remember correctly? It is just for this purpose.
We are in f Hackaday and people keep talking about buying remotes and stuff!
Got a message from a friend “Look where they are talking about you!”
Well, lots of reactions, I’d never had thought…
pff: you are right, literally: it _was_ a piece of trash. It is not now. No HDMI or video input, it’s just a stereo receiver: Tuner, CD and AUX – the one I’m using for the TV – the remote display/control unit is a nice touch.
Jerry: Yes, it will forget the time of day, volume and input setting when disconnected, so the relay on mains idea was no good.
Moreover, I have no 5V relay, and the whole exercise was to hack something with what I had at home (I could get overpriced stuff from Kjell&Co on a Sunday, but really…), it started when I woke up and noticed I had forgot to turn it off once again!
I had bought that ATtiny just because it was the right price to get free shipping from RS, and never actually used it.
Echodelta: no 5V relays, as said, plus it’s not guaranteed that I would get a pulse at turn off, depending on both the internal TV circuitry and the falling slew rate of the Vusb. Using the comparator in the ATtiny (or Schmitt triggers in the other version) make sure I get a clean signal, see the scope traces.
Control via CEC: I already have a CEC to USB HID converter -for Kodi- I implemented on a Nucleo 32, so one option might have been to dedicate an output pin for the purpose, but cabling (due to physical placement of the stuff) would have been quite inconvenient, and the FW more complicated.
Hpinheiro: QFT. I really don’t need an Harmony or other fancy stuff…the Pioner IR remote was lost in the trash, but that’s a project for another day.
Al Williams: yes, the resistor ladder + ADC trick was quite common, and I have seen it in a lot of receivers of the era. Actually, the _total_ component count is three: the optoisolator, one resistor, the ATtiny (thanks to Ian.M!).
I noticed I did not add a license to the code (which makes it not shareable or reusable), this one looks quite appropriate: http://www.wtfpl.net/
Lots of people seem to have done this using some signal from the TV to indicate it’s on. Personally I did it from the audio input of the receiver. Take an analogue through a simple envelope detector and pump that into a capacitor + relay. Sound on, receiver on. Sound off for about a minute, receiver off.
There is of course another, less complicated, more reliable and probably more hacky solution.
A time switch on a ring main, at 2200hrs everything goes off and can’t be turned on again until 0700hrs, obviously it’s imperfect, the vhs/dvd has no clue as to the time or date so flashes away to itself behind a piece of gaffer tape, and as for forgetting the correct volume, we have kids, need I say more?
if a powerfailure causes the FIRMware to corrupt,
then it means that either
1) the circuit lacks any sort of brown-out-detection andor power-good signal (not just power-up reset/delay)
or
2) the unit is using PROGRAM flash chip as USER SETTINGS, which means the design deserves a refund because it is doomed. (wear-leveling will eventually get messed, and dual-useage will fail early without wear-leveling)
or
3) the unit is using flash for SPYING and the creator of the SPYING software is not the original device vendor and doesnt give a hoot about failure modes and the rest of the software was not written to be compatible with such dogery, so it works… for a while… but it only needs to work long enough to get your personal useage info ect
I needed something like this to turn off the t-amp for a built in speaker in my kitchen. I also had a tv with a usb port, i just bought an SSR with a 3-30v control line, already has opto-isolation built in, and only cost $10.