Infrared interface VS1838B

Here we can discuss about the problem found
Post Reply
User avatar
Fernando Perez
Posts: 118
Joined: Mon Feb 15, 2021 10:09 pm
Location: Santander (Spain)
Has thanked: 62 times
Been thanked: 67 times

Infrared interface VS1838B

Post by Fernando Perez »

I need some advice. I have received a couple of VS1838B infrared receivers. I have connected one according to Annex help manual:
[Local Link Removed for Guests]
(only the receiver) and the program returns a different value every time I press the same key on a remote control of any of all the ones I have found around my house.
I have tried Panasonic, LG, Sony, Denon remotes, etc.
ir.get$ always different, with the same key and ir.get$(1) always -1 with any remote control of any brand.
I have tried inserting a 100 ohm resistor and a 4.7 microfarads capacitor, according to the VS1838B datasheet, with no improvement.
I have traded the VS1838Bs that I have, and neither.
The worst thing is that both modules work perfectly with the Arduino IDE and David Conran's IRremoteESP8266 library.
cicciocb
Site Admin
Posts: 403
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 90 times
Been thanked: 294 times
Contact:

Re: Infrared interface VS1838B

Post by cicciocb »

Hi Fernando,
you should try with another pin on the module and / or with the ESP32.
User avatar
Fernando Perez
Posts: 118
Joined: Mon Feb 15, 2021 10:09 pm
Location: Santander (Spain)
Has thanked: 62 times
Been thanked: 67 times

Re: Infrared interface VS1838B

Post by Fernando Perez »

Right now I try. I am with a Wemos D1 mini, I will test with other GPIOs and then move on to ESP32.
Thanks Cicciocb
User avatar
Fernando Perez
Posts: 118
Joined: Mon Feb 15, 2021 10:09 pm
Location: Santander (Spain)
Has thanked: 62 times
Been thanked: 67 times

Re: Infrared interface VS1838B

Post by Fernando Perez »

I feel shame. How have I been able to hit one of the two pins that does not have interrupts (16) or that cannot be used as an input (15)?
It works perfectly. Also, sorry make you waste your time with these old things. :cry:

Code: [Local Link Removed for Guests]

' Wemos D1 mini:
D0 = 16 ' Fail
D1 = 5  ' Ok
D2 = 4  ' Ok
D3 = 0  ' Ok
D4 = 2  ' Ok
D5 = 14 ' Ok
D6 = 12 ' Ok
D7 = 13 ' Ok
D8 = 15 ' Fail 

ir.init D3
OnInfrared irReceived
wait

irReceived:
  wlog "Code "; ir.get$
  wlog "Type "; ir.get$(1)
  wlog "Address "; ir.get$(2)
  wlog "Cmd "; val("&h" + ir.get$(3))
  wlog "??4 = "; ir.get$(4)
  wlog "??5 = "; ir.get$(5)
  pause 200
return
cicciocb
Site Admin
Posts: 403
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 90 times
Been thanked: 294 times
Contact:

Re: Infrared interface VS1838B

Post by cicciocb »

This is a good news.
Maybe it worth to add this information in the documentation.
Post Reply