https://smallhacks.wordpress.com/2021/07/07/controlling-marantz-amplifier-using-arduino-via-remote-socket/ smallhacks Linux, FreeBSD, networking, etc. * Home * About Jul 07 2021 Leave a comment By sammczk Uncategorized 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. [screenshot]Sample of the decoded RC-5 command ("CD Input") [img_0944]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 TAPE ON/OFF 18 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. Share this: * Facebook * More * * Twitter * Like this: Like Loading... Related Tagged arduino, hacking, hardware, IoT Leave a Reply Cancel reply Enter your comment here... [ ] Fill in your details below or click an icon to log in: * * * * * Gravatar Email (required) (Address never made public) [ ] Name (required) [ ] Website [ ] WordPress.com Logo You are commenting using your WordPress.com account. ( Log Out / Change ) Google photo You are commenting using your Google 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 ) Cancel Connecting to %s [ ] Notify me of new comments via email. [ ] Notify me of new posts via email. [Post Comment] [ ] [ ] [ ] [ ] [ ] [ ] [ ] [ ] - Previous post Search for: [ ] [Search] Recent Posts * Controlling Marantz amplifier using Arduino via "Remote" socket * ESP32 based old clock controller, with NTP sync * How to Transfer pictures wirelessly for a Sony camera without using Playmemories on MacOS * AWS Client VPN internals * Official MacOS NVME Smart header found Archives * July 2021 * September 2020 * July 2020 * June 2020 * May 2020 * April 2020 * July 2019 * June 2019 * November 2018 * October 2018 * August 2018 * June 2018 * May 2018 * January 2018 * October 2017 * September 2017 * August 2017 * May 2017 * April 2017 * January 2017 * December 2016 * November 2016 * September 2016 * July 2016 * March 2016 * December 2015 * November 2015 * October 2015 * July 2015 * April 2015 * March 2015 * October 2014 * January 2014 * August 2013 * July 2013 * June 2013 * May 2013 * January 2013 * December 2012 * November 2012 * October 2012 * September 2012 * August 2012 * July 2012 * June 2012 * May 2012 * April 2012 Meta * Register * Log in * Entries feed * Comments feed * WordPress.com Tags android apple arduino arm asterisk asterisk linux voip g.729 atop backup banking card cisco codecs csas darwin debian delicious digium ds207 embedded firefox firmware freebsd g.729 gimp gsm hack hacking hardware I intercall internet iomega IoT ipmi ipv6 ix12 juniper jvpn kernel linux mci730 monitoring mplayer mysql nas ocr openwrt osx patents performance perl perl script philips phone PKCS#11 raid raspberry rsa scsi secureid security smartcard smartmontools source ssl synology technology temperature sensors turris twinkle voip vpn wifi windows wtf Create a free website or blog at WordPress.com. Write a Comment... [ ] Email (Required) [ ] Name (Required) [ ] Website [ ] [Post Comment] Loading Comments... Comment x [Close and accept] Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: Cookie Policy %d bloggers like this: [b]