Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 14:07 09 May 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Add a remote control to a Harman Kardon HK6350R amplifier.

     Page 2 of 3    
Author Message
Marcel27

Regular Member

Joined: 13/08/2024
Location: Netherlands
Posts: 77
Posted: 04:43pm 30 Oct 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  It's probably 38kHz modulated IR. Some receivers decode this and output a simple TTL signal. Others are basically a IR diode with an amplifier and leave the decoding to external circuitry.


I think you are right with the modulated version.

The new circuitry....

 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7499
Posted: 04:59pm 30 Oct 2024
Copy link to clipboard 
Print this post

I've not been able to find a data sheet on that IR  receiver. It's probably a good idea to change it for a more modern one. Just make sure your remote works with it first though or you'll be sad. :)

Looks like you could do that with a RP2040-Zero. There's not a lot of IO. A bit of a pain to surface mount though.

A TSOP28328 IR receiver would run from 3V3 and you could lose a transistor. It does the 38kHz decoding too.

.
Edited 2024-10-31 03:07 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Marcel27

Regular Member

Joined: 13/08/2024
Location: Netherlands
Posts: 77
Posted: 06:17pm 30 Oct 2024
Copy link to clipboard 
Print this post

Hi Mick,

There is indeed no data on the SBX1619-52. My remote works with the SBX1619-52 but not all codes/buttons are resolved. So I'm using the TFMS5360, all buttons produces a code. This sensor handles the carrier also.

Good idea to use a 3.3V type sensor, although the 3.3V types are cheap I have a few 5V types lying around and the transistors also.

These are the cheapest Pico's €3.95, the RP2040-Zero is much more expensive.





Your idea to create a new pcb is great. I looked around for some software for pcb-design and found several packages. Two of them are my favorite: Sprint layout and KiCad. I read a lot of negative feedback about KiCad, that it doesn't work intuitively and other things. I have no experience with any software package, except EasyEDA and I never had a printed circuit board made there because it was way too expensive.
Now I'm learning KiCad and and so far everything is going well. Maybe I'll get to a point where I start cursing.  

Sprint Layout 6.0 costs €50 and I do not know if I'm going use this software on a regular basis to justify the expense.

Next step is to create a board for de HK6350R with a Pico on it and some obsolete old stuff.  
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7499
Posted: 06:44pm 30 Oct 2024
Copy link to clipboard 
Print this post

The RP2040-Zeros that I got from AE were nothing like that. Currently £1.42+vat, mid price. Not many dearer than that. You aren't stuck for space though. :)

Looks like Sprint Layout has gone up in price. IIRC I only paid about £30.

EasyEDA is the way to go for a free package now, I think, if you want "proper" PCB software. I fell out with KiCAD when I attempted to create new objects.

I doubt if you'll find a PCB house cheaper than JLCPCB. If you can get the PCB size down to less than 100mm x 100mm you'll save a lot of money! You can have more than one design on the same board if you only separate them with a silkscreen line and saw them yourself.

By the way, using a transistor between the IR receiver and the Pico is inverting the signal. That's fine if you can handle it in the Pico's software but if you can't then it may not work.

.
Edited 2024-10-31 04:46 by Mixtel90
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2414
Posted: 08:42pm 30 Oct 2024
Copy link to clipboard 
Print this post

Part of the issue of the old Sony IR receivers poor performance is their maximum sensitivity is at 40kHz, not the more common 38kHz. (Philips use 36kHz).

Regarding level shifting a 5V sensor, they usually have an open collector output with an internal pullup (40kΩ is common) so all that is needed is a suitable pulldown resistor.

Finding the value of the pulldown is easy as the output is idle high.
1) Before connecting to the Pico simply put a 82k from the output to ground and measure the voltage. If it is a bit high or low change the resistor to get it in the range 2.5 - 3.3V.

2) Or just add a Schottky diode from the output to 3.3V.
 
Marcel27

Regular Member

Joined: 13/08/2024
Location: Netherlands
Posts: 77
Posted: 08:41am 31 Oct 2024
Copy link to clipboard 
Print this post

Woooha, I had my KiCad swearing moment when assigning a footprint of the RP Pico. But I did it. The next step is to find out where I can specify the dimensions, for the time being I was going around in circles.

@Mixtel90: I did indeed find an RP2040 Zero for €5.00. As you already indicated, there is enough space on the PCB to place an RP Pico. Fortunately, I have not had to make any new objects yet. I am just having a little trouble finding the right component in the endless list with the right dimensions.

So far I can keep the PCB within 100mm x 100mm. The wiring with the connector is long enough to be placed on the new location on the PCB.

Yes, the signal is inverted because of the transistor, but strangely enough it works. I still have to check whether the transmit codes are also correct in the normal or inverted situation. phil99 also suggested to just use a pull down resistor on the output of the remote sensor or a Schottky diode to 3.3V.

@phil99: thanks for the input, I'll test it.

Thanks, both of you for the input.  

 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7499
Posted: 10:46am 31 Oct 2024
Copy link to clipboard 
Print this post

I like phil's idea of the pull down resistor. Very simple and foolproof.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Marcel27

Regular Member

Joined: 13/08/2024
Location: Netherlands
Posts: 77
Posted: 04:42pm 31 Oct 2024
Copy link to clipboard 
Print this post

The resistor pull down phil99 suggested is working. I'm using now the TFMS5360 from TEMIC (Telefunken 1996) an oldie from another amplifier. The datasheet tells me that it has an internal 100k resistor from output to 5V. An external resistor with a value of 180k does the job. The voltage at the output is 3,34V.

Next step is to change the KiCad circuitry again and create a footprint for the sensor lying on it's back and looking to the frontside. Still need to find the board dimensions  

Thanks, gentlemen.
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7499
Posted: 09:17am 01 Nov 2024
Copy link to clipboard 
Print this post

If you are considering surface mounting the Pico make sure you can still get the programming lead to it. If you aren't, make sure there is enough depth behind the front panel. :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Marcel27

Regular Member

Joined: 13/08/2024
Location: Netherlands
Posts: 77
Posted: 11:24am 01 Nov 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  If you are considering surface mounting the Pico make sure you can still get the programming lead to it. If you aren't, make sure there is enough depth behind the front panel. :)


 
Marcel27

Regular Member

Joined: 13/08/2024
Location: Netherlands
Posts: 77
Posted: 05:33pm 12 Mar 2025
Copy link to clipboard 
Print this post

I see that it has been quite some time since I have been working on this problem. There were several things that required my attention, not even important ones but you are occupied with them, just working on new amplifier repairs. You have to change the subject every now and then to keep your spirits up. The photo shows my latest acquisition and repair. Both output stages were defective. The sound is fantastic.

And last month I switched my Intel NUC from Microsoft to Linux Mint (LMDE 6) and banned  everything that smells of Microsoft. Today I took the time to get the Raspberry Pico 2 to work under Linux Mint. At first I didn't succeed. However, it turned out that I was using the wrong image file and then Linux also threw a spanner in the works by not showing the device. After a reboot the Pico 2 appeared. The next step is to get all information back on track for the remote solution.

 
Marcel27

Regular Member

Joined: 13/08/2024
Location: Netherlands
Posts: 77
Posted: 12:03pm 13 Mar 2025
Copy link to clipboard 
Print this post

I already know where the process derailed. It was at KiCad. I was busy using the remaining PCB surface for 2x 60 watt amplifiers prints. Start again from the beginning and just add the PICO on a scratch board. Much faster and easier.
 
Marcel27

Regular Member

Joined: 13/08/2024
Location: Netherlands
Posts: 77
Posted: 02:39pm 16 Mar 2025
Copy link to clipboard 
Print this post

At the moment the next code is working as intended. I used the code phil99 wrote and adapted it to suit the situation. The volume works only in PON situation.


=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2025.03.16 15:24:43 =~=~=~=~=~=~=~=~=~=~=~=
> list all
'Date: 15 march 2025
'Author: phil99, adapted by Marcel27
'HK6350R Volume and PON controle with Raspberry Pi Pico 2

Option EXPLICIT

Const Pon%  = (24225 << 8) + 184 '24225=DevCode, 184=KeyCode for Pon button
Const Up%   = (24225 << 8) + 88  '24225=DevCode,  88=KeyCode for Vol Up button
Const Down% = (24225 << 8) + 216 '24225=DevCode, 216=KeyCode for Vol down butto
n

SetPin GP0, IR
SetPin GP1, DOUT 'Vol up
SetPin GP2, DOUT 'Vol down
SetPin GP3, DOUT 'Power

Dim INTEGER DevCode, KeyCode, PON_STATUS, DevKey, SHOW_STATUS, CNTR, BREAK

PON_STATUS = 1   'Set status to power on.

IR DevCode, KeyCode, IRInt

Sub IRInt
DevKey = (DevCode << 8) + KeyCode

Select Case DevKey
  Case Pon%
       'ON/OFF function.
       If PON_STATUS = 1 Then  'Only when amp is On.
          Pin(GP3)=0           'Set GP3 low to switch amp off.
          PON_STATUS = 0       'Flag this situation.
          Print "Power Off"
        Else
          Pin(GP3)=1           'Set GP3 high to switch amp on.
          PON_STATUS = 1       'Flag this situation.
          Print "Power On"
       EndIf
  Case Up%
       If PON_STATUS = 1 Then  'Only when amp is On.
           CNTR = 0            'Set counter to zero.
           BREAK = 0           'Flag situation as no break.
           Pin(GP1)=1          'Rotate right to increase volume.
           Pin(GP2)=0          'Rotate right to increase volume.
           Print "Volume up"
       EndIf
  Case Down%
       If PON_STATUS = 1 Then  'Only when amp is On.
           CNTR = 0            'Set counter to zero.
           BREAK = 0           'Flag situation as no break.
           Pin(GP1)=0          'Rotate left to decrease volume.
           Pin(GP2)=1          'Rotate left to decrease volume.
           Print "Volume down"
       EndIf
  Case Else                    'In alla other cases freeze volume.
       BREAK = 1
       Pin(GP1)=1              'Both high for break.
       Pin(GP2)=1              'Both high for break.
       Print "Break from interupt"
End Select
Print "Interupt - received device=" DevCode", key=" KeyCode, "Break=" BREAK
End Sub

'Main body.
'The CNTR Do-loop is used to let the volumu potentiometer run another n-times.
'When the CNTR value has been reached the motordriver is set to the break
'position. Motordriver break position is both inputs low or both high.
'
Do
   If CNTR = 5 Then
       Pin(GP1)=1     'Both high for break
       Pin(GP2)=1
       BREAK = 1
       CNTR = 6
       Print "Break", "CNTR=" CNTR, "BREAK VAL=" BREAK
   ElseIf CNTR < 6 Then
       CNTR = CNTR + 1
       Print "Move", "CNTR=" CNTR, "BREAK VAL=" BREAK
   EndIf
Loop
End



The debug output of the remote buttons are as follows:


=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2025.03.16 15:27:38 =~=~=~=~=~=~=~=~=~=~=~=

Error : Unknown command
[?25h> run
Move CNTR= 1 BREAK VAL= 0
Move CNTR= 2 BREAK VAL= 0
Move CNTR= 3 BREAK VAL= 0
Move CNTR= 4 BREAK VAL= 0
Move CNTR= 5 BREAK VAL= 0
Break CNTR= 6 BREAK VAL= 1
Volume up
Interupt - received device= 24225, key= 88 Break= 0
Move CNTR= 1 BREAK VAL= 0
Move CNTR= 2 BREAK VAL= 0
Move CNTR= 3 BREAK VAL= 0
Move CNTR= 4 BREAK VAL= 0
Move CNTR= 5 BREAK VAL= 0
Break CNTR= 6 BREAK VAL= 1
Volume down
Interupt - received device= 24225, key= 216 Break= 0
Move CNTR= 1 BREAK VAL= 0
Move CNTR= 2 BREAK VAL= 0
Move CNTR= 3 BREAK VAL= 0
Move CNTR= 4 BREAK VAL= 0
Move CNTR= 5 BREAK VAL= 0
Break CNTR= 6 BREAK VAL= 1
Power Off
Interupt - received device= 24225, key= 184 Break= 1
Interupt - received device= 24225, key= 88 Break= 1
Interupt - received device= 24225, key= 216 Break= 1
Power On
Interupt - received device= 24225, key= 184 Break= 1
Volume up
Interupt - received device= 24225, key= 88 Break= 0
Move CNTR= 1 BREAK VAL= 0
Move CNTR= 2 BREAK VAL= 0
Move CNTR= 3 BREAK VAL= 0
Move CNTR= 4 BREAK VAL= 0
Move CNTR= 5 BREAK VAL= 0
Break CNTR= 6 BREAK VAL= 1
Volume down
Interupt - received device= 24225, key= 216 Break= 0
Move CNTR= 1 BREAK VAL= 0
Move CNTR= 2 BREAK VAL= 0
Move CNTR= 3 BREAK VAL= 0
Move CNTR= 4 BREAK VAL= 0
Move CNTR= 5 BREAK VAL= 0
Break CNTR= 6 BREAK VAL= 1
 
Marcel27

Regular Member

Joined: 13/08/2024
Location: Netherlands
Posts: 77
Posted: 07:08pm 16 Mar 2025
Copy link to clipboard 
Print this post

The test is positive. The concept works great. I increased the CNTR form 5 into 2000, 6 into 2001 and the GP1 and GP2 are set to 0 for break. GP1 High is clockwise, GP2 High is counter clockwise. Now just assemble it neatly and then the endurance test can begin.



Edited 2025-03-17 05:34 by Marcel27
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7499
Posted: 07:21am 17 Mar 2025
Copy link to clipboard 
Print this post

Oh, very artistic. :)
You're not going to wire-wrap it?  ;)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
Marcel27

Regular Member

Joined: 13/08/2024
Location: Netherlands
Posts: 77
Posted: 02:23pm 17 Mar 2025
Copy link to clipboard 
Print this post

I would have liked to do the wire wrapping but decided against it because the pins were too long.

Neatly built in. For me, good is good enough. I mounted the IR sensor on the original board, pin compatible, added the 180 kOhm to the senor output and ground to adjust the input voltage for the Pico 2. Added a diode in series with the +5V line to the VSYS input in case you connect an USB cable and added some jumpers to get signals at the right places.

I discovered that when the amplifier is switched off there is still 5V on the Pico. So that thing is always thumping.


 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4849
Posted: 02:53pm 17 Mar 2025
Copy link to clipboard 
Print this post

Marcel,

I hate to throw oil on the fire, but the pico2 has a GPIO problem. If I where you I would (just to be sure) add a pullup to +5V value 4.7k from the IR sensor output, and a pulldown of 10k from that same output to GND. That also gives 3.3V high, but has a lower output impedance.

Just to prevent the pico2 input getting into latch-up, and reaching logic high correctly.

Regards,

Volhout
Edited 2025-03-18 00:54 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Marcel27

Regular Member

Joined: 13/08/2024
Location: Netherlands
Posts: 77
Posted: 03:22pm 17 Mar 2025
Copy link to clipboard 
Print this post

Hello Volhout,

I checked it and you are right, I have to lower the voltage/impedance. The IR-sensor has an internal 30 kOhm pull-up resistor, so adding a 10 kOhm from the sensor output to ground should suffice.

Regards,

Marcel27
 
Marcel27

Regular Member

Joined: 13/08/2024
Location: Netherlands
Posts: 77
Posted: 03:47pm 17 Mar 2025
Copy link to clipboard 
Print this post

I added the 4k7 from +5V to s-output and 10k from s-output to GND and the voltage is higher than I had with the 180k version. ??

The situation above with only a 10k doesn't work.

I think a voltage devider 2k2 - 3k3 from the s-output to GND would be better.
Edited 2025-03-18 01:52 by Marcel27
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 7499
Posted: 04:10pm 17 Mar 2025
Copy link to clipboard 
Print this post

The Pico 2 has 5V rated inputs providing it has a 3V3 power supply (which it will have if the built in switcher is being used). The continuous 5V is an advantage here (providing the Heartbeat LED is switched off!).

The IR receiver is active low with a pullup resistor. The problem with the Pico 2 GPIO inputs is with the internal pull down resistors, i.e. it has problems with active high inputs but the pull up side is ok so active low inputs are fine.

DONT PANIC! (in large, friendly letters)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
     Page 2 of 3    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025