Controlling Marantz amplifier using Arduino via “Remote” socket

Recently I decided to control my old Marantz PM-62 programmatically. There were a few reasons to do so:

  1. Original remote control died and "compatible replacements" were not good enough.
  2. I want to build more complex integration and routing for audio/video, so amplifier input switching would be a part of it.
  3. It is fun 🙂

Playing with "Remote" socket

I found that there are 2 standard RCA sockets named "Remote IN/OUT" on the back panel. So I connected with the oscilloscope to the OUT plug and tried to use different buttons on the remote control. Soon I understood that this output shows signals received from the IR sensor, after amplifier (impulses are about 6V) and without carrier frequency. An interesting fact is that it sends here all commands, including one unit cant understand. Also, I found that there are 2 very different types of codes, with different lengths and impulse counts. I was also able to use a cheap Saleae clone (8ch, 24MHz) with a PulseView instead of the oscilloscope.

Native format and scan codes

I identified that Marantz using 2 different ways to encode the signal.

  • Standard RC-5 encoding with 14 bits of data. Pulseview can decode such data using the IR RC-5 decoder. It has 2 fields – address to choose the device and command to send.
  • Marantz RC-5 extension – this adds one more field, called extension. Also, this format adds pause after the first 8 bits, likely to simplify the identification of it. This format is not supported by PulseView protocol decoders.
  • Both formats require at least 2 packets sent with Toggle bit flipped. I spent a lot of time trying to understand why it is not working for me until found that.
Sample of the decoded RC-5 command (“CD Input”)
Same from oscilloscope

After all, I have been able to identify all scan codes from the original RC:

Name Address Command Extension
Standby 16 12
Phono 21 63
CD 20 63
Tuner 17 63
AUX 1 16 00 06
AUX 2 16 00 07
DCC ON/OFF 23 63
Volume + 16 16
Volume – 16 17

Finally making hardware to control it

I had a few Arduino mini clones, so decided to start with it. Initially, I started with Arduino IRremote library but soon found that impulses it generating are not something I am looking for:

  • By default, it is re-creating carrier PWM impulses needed for real (wireless) IR transmit. This could be disabled by the USE_NO_SEND_PWM definition, but that causing an inverted signal with active HIGH. The amplifier was not able to recognize such a signal.
  • There is no code for 20bit RC-5 anyway

So I decided to quickly write my replacement, without using this library. It is done and published on my gist. This code does not require any external libraries and can send RC5 and RC5-20bit to the amplifier in the way it understands it. Some code is taken from Arduino-IRremote. I also did a patch to PulseView decoder to understand Marantz’s format, which I will PR to the upstream later.

To control the device you need to connect the RCA jack to GND and D5 pins. Once the program is loaded it will switch amplifier inputs in a loop. I found that TTL levels from ATmega168 are enough to control the device without the need to use any TTL converters or additional transistors

Next steps

I think I will try to use ESP32 for the same purpose and will find an Android application to control the device from the smartphone if needed. Also will look for the replacement of the original remote control which is smart enough to learn or program all codes I found. There are power sockets on the backside, so it should be trivial to add some 5v PSU to control have it running. Maybe later will also do some XMBC integration to make it feel more native. Maybe I will also add decoding functionality to my gateway to understand commands from other RC-s. I tried to use decode functions from the Arduino-IRremote but they are not working properly, likely due to the same difference as with sending.

Tagged , , ,

5 thoughts on “Controlling Marantz amplifier using Arduino via “Remote” socket

  1. […] one of my previous blog posts I explained how to emulate Marantz remote control with Arduino using "remote in" socket. […]

  2. Ludo Janse-Hoekstra says:

    If you need the rest of the rc codes, Marantz provides a nice xls document on their website:

    I’ve put your code on a Arduino Nano and it seemed to work fine for a couple of days. After that my receiver (SR6003) did not respond to any RC input until I disconected RC-in and did a powercycle. Did this happen to you too? I’m trying to recreate some sort of “ARC” function were the TV remote IR is read by the arduino and then the receiver is driven via RC commands on the RC-in port to turn on the surround sound (SR6003 does not support ARC).
    Ultimate goal would be to read the TV remote signal via RC-out so I don’t need the extra Arduino IR sensor.

    • sammczk says:

      Looks like wordpress eaten my comment, so repeating.

      1. Thanks for the link.
      2. I had similar issue, solved by diode, see more recent post in this blog 🙂
      3. Yes, you can also read from the same socket, but you will likely need to add some resistor or ttl converter as (at least in my case) input is ~5v and this could fry ESP32 which is 3.3v board. But if your arduino is 5v its possibly not an issue.

  3. Vincent says:

    Thank you very much for the post!
    Do commands Volume+, Volume- and mute work for you?
    I have a PMM440 amp and try your soft. That works very well to change input source and power off/on, but not for volume commands.
    I checked with an oscilloscope that when send Volume+ command with the remote, I get the command as you describe (16,16).
    I also checked that command have the same signal from the Arduino than from the amp. I also send command in 5V.
    I also try to add pull-down because signal wasn’t really square at the bottom.
    And then I try extended command share by Ludo Janse-Hoekstra.

    Then do volume commands work for you?
    Isn’t that weird than command works with remote and is transmit to RCA port, but then command is not accept from RCA port?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: