The Ruark audio R4i is a desktop DAB/FM CD player and USB stick player. It has a depression on the top that the removable Infra red Remote control sits in.
R4 MK3 and R2i remote codes are in later additions to this post below.
A separate post on the R2i remote codes describes how to program (not learn from an existing remote) an "all for one" URC1210/1240 remote with all the codes in this post.
The R4/R4i radio will not work without the remote, there are no operating buttons on the radio itself. As the remote often gets lost and a replacement from Ruark is about £60, I tried to repair a non functional remote.
I had hoped to modify an existing remote but the cheap IR remotes use a 0x00FF custom code and are not modifiable. My aim was to produce a solution that anyone in my family could use, which I still need help with !
Opening the circular remote by removing the bottom metal cover, exposes two AAAA batteries and two screws. The chip was found to be a Princeton Technology PT2221 which is a copy of the original NEC uPD6121 (datasheet attached).
The data sheets describe the 38khz format and circuit diagrams (NEC datasheets are more detailed and have fewer silly errors)
I started by purchasing an IR 38Khz receiver from eBay the YS-IRTM board which when used with the "Realterm serial capture terminal program 3.0.1.44" allowed hex to be read from a remote and sent to a computer via a serial port. There is also a IR transmitter on the YS-IRTM board. The user manual is attached below.
It only works for 38Khz and NEC coding structure.
I read the codes transmitted for each button on the good remote which are shown below going anticlockwise from the large "OK" button.
This way I could check what the faulty remote transmitted and use Realterm to send hex to the radio to check that the radio responded correctly. e.g using the ys-trm board to send these codes you must first send A1 F1 making 5 bytes / command ( for example A1 F1 8F EF 0F is vol down)
8FEF08 ok sw14
8FEF09 right sw15
8FEF00 info sw06
8FEF0A source sw12
8FEF05 pr5 sw01
8FEF04 pr4 sw02
8FEF03 pr3 sw03
8FEF02 pr2 sw04
8FEF01 pr1 sw08
8FEF06 audio sw10
8FEF0E clock sw16
8FEF07 left sw13
0B,0C,0D not used
8FEF1E power (push)
8FEF0F vol down (rotate left)
8FEF1F vol up (rotate right)
8FEFFF Mute A bonus, not on remote but works on R4i models not R4.
The last byte is set by each of the switches listed above.
The custom code (0x8FEF) is set by D1 to D5 (1N4148 or A6) and R1,R2,R6 to R9 100k resistors. As outlined in the datasheet schematic.
I found that my remote was sending the wrong custom code due to an open 100k resistor.
For this remote the circuit is as follows:-
The diodes set the first 8 bits by tying five selected KI/O lines to the CCS line ( 0x8F is a diode from KI/O 0-3 and KI/O7 to CCS)
The resistors set a second code by tying six selected KI/O lines to the SEL line (0x9F is a resistor from KI/O 0-4 and KI/O7 to SEL--- R6,R1,R7,R8,R2,R9 respectively)
The NEC datasheet shows how the second code is used to modify the first code to give the second byte.
LSB is first as that is the way it is shown on the datasheet......
0x8F 1111 0001
0x9F 1111 1001 These bits mean invert when 0 on the first code 0x8F resulting in.
0xEF 1111 0111
So now I could control the radio using the Realterm program/ YS-IRTM board or even PIC/Arduino/RP2040 and knowing how to set the "Custom"codes I could build/modify a remote using the PT2221 or NEC uDP6121 .
I may also be able to use the wifi to IR transmitters on eBay such as the Tuya WiFi IR RF Universal Controller
BUT I would still like advice for making a family friendly remote for this radio !
IMPORTANT update August 23 :-
The early Ruark radios such as the R4 and R2 use Infra red receivers that are sensitive to High Frequency Fluorescent lighting ( CFL or Electronic ballast). The long push on "info" , "Presets", "Volume up/down" and "Left/Right" will not function reliably.
The null repeat field has random pulses (Caused by the HF fluorescent tube) in it so the radio thinks a new command has started.
Later IR receivers in R4i and R2i use an internal AGC system that seems to eliminate such interference- See Vishay datasheets TSOP31238.