Close
0%
0%

SpeakerIR

Enjoying TV with a smart Hi-Fi or speaker? Use your TV IR remote to control volume, instead of having the other one always around.

Similar projects worth following
You may be interested in this project if:

- You have a speaker or Hi-Fi set using the Yamaha MusicCast or Samsung Multiroom protocols
- You have one of its inputs connected to a TV digital output
- You want to control the speaker via the same remote control of your TV
- Your TV disables volume control when the audio goes to the digital output
- Your TV remote control is based on infrared (IR) signals

Why?

My TV's audio output is connected to an hi-fi set via digital output. In this setup my TV ignores the volume controls from its IR remote, so I was forced to use another remote control (or worse, an app) for the speaker.

But if the volume controls are ignored by my TV, maybe something else can pick them up.

And my hi-fi has a web API (used by the companion app) that I can use to control its volume.

So why not connect my TV IR remote control to my Wi-Fi-enabled hi-fi?

The answer is this project. It listens to IR signals of my remote and calls volume control APIs. It also queries the current volume via API and shows it via a seven-segment display that can be read at a distance.

What

The software runs on an ESP8266 mounted on a WeMos D1 Mini module, soldered to a custom-made PCB. The micro is connected to a TSOP1738 IR receiver and a LED display matrix driver, driving four 7-segment displays. Both MAX7219 and TM1637 are supported. A few passive components do the level shifting.

All the hardware is enclosed in a 3D-printed case, with openings for the display, the IR and the power via micro-USB.

The source code can be found at https://github.com/egueli/SamsungM7_IR .

The enclosure's Fusion 360 project can be found at https://a360.co/3twnBLK.

Notes about the schematic/PCB

  • The display is a ready-made RobotDyn 4-digit 7-segment TM1637 module mounted vertically.

  • Part of the board is dedicated to an attempt to add a digital audio processor. It's not relevant for this project and the board pads can be left unpopulated.

Top enclosure TM1637.3mf

PrusaSlicer 3D-print project file for the top part of the enclosure. It's meant to fit snugly to the bottom part with little friction. The project specifies supports, which are necessary because the front hole is closed.

3mf - 30.81 kB - 02/05/2021 at 22:12

Download

Bottom enclosure TM1637.3mf

PrusaSlicer 3D-print project file for the bottom part of the enclosure, with supports for a vertically-mounted TM1637-based display from Robotdyn. It requires four M3 hex nuts that will be embedded in the print. The printer will pause at the right time so they can be inserted.

3mf - 50.10 kB - 02/05/2021 at 22:11

Download

Bottom enclosure.3mf

PrusaSlicer 3D-print project file for the bottom part of the enclosure. It requires four M3 hex nuts that will be embedded in the print. The printer will pause at the right time so they can be inserted.

3mf - 47.29 kB - 12/31/2020 at 10:34

Download

Top enclosure.3mf

PrusaSlicer 3D-print project file for the top part of the enclosure. It's meant to fit snugly to the bottom part with little friction. The project specifies supports, which are necessary because the front hole is closed.

3mf - 29.71 kB - 01/01/2021 at 20:56

Download

schematic.pdf

PDF of the schematic.

Adobe Portable Document Format - 172.90 kB - 12/31/2020 at 10:11

Preview

View all 7 files

  • 1 × Wemos D1 mini Microcontroller board
  • 1 × TSOP1738 Discrete Semiconductors / Diodes and Rectifiers

  • Added real time clock

    Enrico Gueli02/10/2021 at 18:23 0 comments

    Sometimes it would be nice to know what time it is while you're watching TV. Like when you're in lunch break while working from home and you have an upcoming meeting.

    Since the Speaker has four nice 7-segment displays, and can connect to Internet, why not adding a real time clock?

    First I introduced a mechanism for a "background text" to be displayed while no other important messages have to be displayed.

    Then I grabbed the TIme library (here's an example using NTP) and hooked it up to the rest of the system. And added a little logic to turn it off and on with a rarely-used button of the remote control.

    And there it is:

  • Poor man's exception handling

    Enrico Gueli02/07/2021 at 11:29 0 comments

    Once a IR command is received, SpeakerIR will try to send a command to the speaker. When things go wrong, the display will show error messages like "Ev" or "Et". E means error, and the second letter referred to which action failed: "v" is volume change, "t" is TV input select and so on. But that doesn't tell why exactly did it fail :)

    Read more »

  • TM1637

    Enrico Gueli02/01/2021 at 18:16 0 comments

    As described in my last log, I decided to drop the MAX7219 and use the TM1637 LED driver instead. The reason is that it's a lot easier to find 4-digit seven-segment displays with this driver chip all in the same PCB, like this one from Robotdyn.

    Read more »

  • Farewell, old display from 2001

    Enrico Gueli01/30/2021 at 08:55 0 comments

    This project has (at least) one big shortcoming. But that same shortcoming was crucial to give me motivation to work on, and eventually complete, this project.

    Read more »

  • Fix top enclosure

    Enrico Gueli01/02/2021 at 15:29 0 comments

    I updated the top enclosure design.

    The hole for the USB port was a bit too much to the left, and it's now centered.

    The side walls were a bit too thin (0.90mm). I initially made them that thin to use some snap-fit. But it wasn't necessary in the end: the print tolerances make enough extra width in both top and bottom enclosure to make the necessary friction. With 1.80mm walls the case is now stronger, and it's much easier to remove the supports without breaking it.

  • Power on the MusicCast device

    Enrico Gueli01/01/2021 at 20:50 0 comments

    Just merged a PR that also powers on the MusicCast device with the TV/Radio button.

    Can be fetched here: https://github.com/egueli/SamsungM7_IR/releases/tag/v1.0.1

    I'll also remove the old release's zipfile from this project; it feels like redundant work.

  • Completed... ish

    Enrico Gueli12/31/2020 at 14:28 0 comments

    After months of (slow) development, the project is good enough for me to be used every day without hiccups, except a small software fix and another one in the enclosure that I'm printing right now. Will post updates soon.

    I'd love this project being used by others too. But I realize it may not be that easy. First, because I published this project here on Hackaday.io only yesterday and I still have to figure out a lot of things. Second, the firmware itself needs a few tweaks to be customized for an environment that's not like mine. A few things right off the bat:

    • When it starts, it looks for a MusicCast device called "Living Room" in the local network. Alas I couldn't tell to just pick up any device, because it uses "_spotify-connect._tcp.local" as a mDNS service name and many non-MusicCast devices may respond to that. You can change the device name in src/discovery.cpp.
    • The firmware assumes the TV is an LG, with its remote control sending specific IR codes. If you have a different model, you should change the IR codes in src/config.h. Which codes do you need? Open the serial console after the upload and watch for "[IR:xxxxxxxx]" text every time you press a button.
    • The minimum/maximum volume levels are hard-coded to 1 and 161, that's good for my Yamaha R-N602 amplifier. Yours may need different values. Again, they can be changed in src/config.h.
    • The firmware supports Samsung Multiroom and Yamaha MusicCast protocols, but only one at a time and it's configured for MusicCast at the moment. In src/config.h you can change that.

    That's all for now.

View all 7 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates