Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 15:28 28 Nov 2024 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 : decode a not standard ir protokoll

Author Message
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 554
Posted: 03:32am 06 Jun 2023
Copy link to clipboard 
Print this post

HI,

I have a cheap Hd Monitor with a Infrared Remote which will not encoded by the intern
Mmbasic picomite protocoll (sony). I got Pulses from the IR Receiver so i guess the frequenz is ok. if i remember right somebody has postet some code  for a problem like what. the search function will not help me so i ask here .



thz  
Plasma
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3804
Posted: 07:03am 06 Jun 2023
Copy link to clipboard 
Print this post

In case it helps, some search sites are better at finding things and allow such as
site:... search words

The ... can be a URL usually.

John
Edited 2023-06-06 17:03 by JohnS
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 07:42am 06 Jun 2023
Copy link to clipboard 
Print this post

I have no idea what Sony protocol you are refering to, but the PicoMite user manual says that there are 2 IR protocols supported:
- NEC
- SONY
When your protocolis different from these two (i.e Philips RC6 or so) then you need to analyze the protocol so we have somthing to work with. Without more detail it is hard to suggest a solution. Most IR RC systems work around PPM (pulse position modulation) where a carrier burst is send, and there is a variable time in between bursts. This time determines if it si a "1" bit or "0" bit that is send.
So accurately measuring the "period" of such demodulated signal will give you infomration about the ones and zeros.
MMBasic (on picomite) is fast enough to keep pace with the bitstream. Measuring could be done using PIO, or the PULSIN command.

Volhout
Edited 2023-06-06 17:52 by Volhout
PicomiteVGA PETSCII ROBOTS
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 07:57am 06 Jun 2023
Copy link to clipboard 
Print this post

It can only *send* SONY protocol though.

The frequency might be correct (commonly around 38kHz) so the receiver chip is seeing it and flashing the LED connected to it's data pin, but that doesn't mean that the protocol is the same.

IR is tricky. You need to capture the signals from the transmitter and then find a way to copy them if you want to transmit them from something else. A good place to start is with a 38kHz IR receiver and a digital oscilloscope. Get something to display while the transmit button is held down then set the trigger and do a 1-shot display. You have one pulse train on the screen to figure out. :)  Some logic analyzers can do this very well too. It's always difficult with an unknown protocol as you can't trust any of the published codes.
Mick

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

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2138
Posted: 08:19am 06 Jun 2023
Copy link to clipboard 
Print this post

Peter's CSub LOG can capture the data. Alternatively the ADC function can do it.
At 378MHz a short For - Next loop can capture data with 20uS pulses.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 09:08am 06 Jun 2023
Copy link to clipboard 
Print this post

  phil99 said  Peter's CSub LOG can capture the data. Alternatively the ADC function can do it.
At 378MHz a short For - Next loop can capture data with 20uS pulses.


Hi Phil,

Does the LOG csub still work? I remebers disco4now had to recompile it for 50703B13, since the header file changed. Would be nice to have this functionality. But I expect 50703 (1 year ago) might be too old to run.

What would even be nicer, if Peter adapted the PULSIN to accept an array for results in stead of a value. Then yo would not need the CSUB at all.
PicomiteVGA PETSCII ROBOTS
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2138
Posted: 12:22pm 06 Jun 2023
Copy link to clipboard 
Print this post

  Quote  Does the LOG csub still work?

The old version no, but Peter updated it after the change of compiler version.
TassyJim has a similar thing called Fetch, I think.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 09:42pm 06 Jun 2023
Copy link to clipboard 
Print this post

This is something I put together for Grogster to read pager codes.
It uses a PWM signal as a high definition timer on a micromite.
you save all the time intervals to an array and then analyze them later.
It might help but the pico has a lot more in it's arsenal.

 ' exp64 decoder
 DIM INTEGER tick, tock, period, pulsetime = 50, synctime = pulsetime * 10
 DIM code$
 DIM pulses(500) '  store all timing intervals for later processing
 DIM inSync ' used to signal when sync pulse has been received
 DIM pulsecount
 DIM firstRun, syncs
 DIM validAlarms$(20)
 CONST ticker = 49 ' connect PWM output (pin 48) to here
 CONST rxPin = 46  ' pin that the receiver output connects to
 validAlarms$(1) = "011101010001110000000010"
 validAlarms$(2) = "011101010001110000100010"
 validAlarms$(3) = "011101010001110001100010"
 validAlarms$(4) = "011101010001110000000001"
 validAlarms$(5) = "011101010101110000000010"
 validAlarms$(6) = "011101011101110110100010"
 validAlarms$(7) = "011101011001110001100010"
 validAlarms$(8) = "011101011001110000000010"
 validAlarms$(9) = "011101011111110000000010"
 validAlarms$(10) = "011101000001110000100010"
 validAlarms$(11) = "011101100001110001100010"
 validAlarms$(12) = "011101010001110001000001"
 validAlarms$(13) = "010101010001110000000010"
 validAlarms$(14) = "011001010001110000100010"
 validAlarms$(15) = "011011010001110001100010"
 validAlarms$(16) = "011101010001110100000001"
 validAlarms$(17) = "011101010001111100000010"
 validAlarms$(18) = "011101010001101000100010"
 validAlarms$(19) = "011101010001000001100010"
 validAlarms$(20) = "011101010000110000000001"
 
 PWM 1, 100000, 50 ' this is out high resolution timer whch gets connected to ticker pin
 SETPIN ticker, CIN
 SETPIN rxPin, INTB, blip ' triggers on a high or low transition
 tock = PIN(ticker)
 SETTICK 3000, checkit
 
 DO
   '    IF INKEY$<>"" THEN
   '      decode
   '    ENDIF
 LOOP
 
END
 
SUB blip
 tick = PIN(ticker)
 IF inSync = 0 THEN
   IF (tick - tock) > synctime AND PIN(rxPin) = 1 THEN' long enough to have been sync pulse
     inSync = 1
     pulsecount = 0
     pulses(pulsecount) = tick - tock
   ENDIF
 ELSE
   pulsecount = pulsecount + 1
   pulses(pulsecount) = tick - tock
   IF pulsecount > 400 THEN
     inSync = 0
     pulsecount = 0
     'print "overflow"
   ENDIF
 ENDIF
 tock = tick
END SUB
 
SUB checkit
 LOCAL n, t
 t = TIMER
 decode
 FOR n = 1 TO 20
   IF validAlarms$(n)<>"" THEN
     IF INSTR(code$,"s"+validAlarms$(n))>0 THEN ' we have lift off!!
       PRINT "!!!! ",n, " needs help!"
     ENDIF
   ENDIF
 NEXT n
 PRINT "Checkit time ",TIMER - t
END SUB
 
SUB decode
 LOCAL n, pulsetimes
 code$ = ""
 ' check every second timing
 PRINT pulses(0)                                          'DEBUG
 pulsetimes = 0                                           'DEBUG
 FOR n = 1 TO 400 STEP 2
   pulsetimes = pulsetimes + pulses(n)+pulses(n+1)        'DEBUG
   PRINT pulses(n), pulses(n+1), pulsetimes               'DEBUG
   IF pulses(n) > synctime OR pulses(n+1) > synctime THEN ' a sync pulse
     code$ = code$ + "s"
   ELSEIF (pulses(n) + pulses(n+1)) = 0 THEN              ' all done
     EXIT FOR
   ELSEIF pulses(n+1) = 0 AND pulses(n) < pulsetime THEN  ' final transition
     code$ = code$ + "0"
   ELSEIF pulses(n) > pulses(n+1) THEN
     code$ = code$ + "1"
   ELSE
     code$ = code$ + "0"
   ENDIF
 NEXT n
 PRINT code$                                               'DEBUG
 inSync = 0
 syncs = 0
 pulsecount = 0
 FOR n = 1 TO 400
   pulses(n) = 0
 NEXT n
END SUB


Jim
VK7JH
MMedit   MMBasic Help
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 554
Posted: 01:28am 07 Jun 2023
Copy link to clipboard 
Print this post

thx Tassyjim , i will check.

i send temp and humidity from near Berlin (180km) . i mean its not Austalia so its near :)

gtx
Plasma
 
nestorjm
Newbie

Joined: 06/12/2022
Location: Argentina
Posts: 2
Posted: 02:49pm 07 Jun 2023
Copy link to clipboard 
Print this post

  Plasmamac said  HI,

I have a cheap Hd Monitor with a Infrared Remote which will not encoded by the intern
Mmbasic picomite protocoll (sony). I got Pulses from the IR Receiver so i guess the frequenz is ok. if i remember right somebody has postet some code  for a problem like what. the search function will not help me so i ask here .

thz  



Then maybe you need to send pulses with the NEC IR protocol

You may find the solution in this post  (NECSend command) !
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4247
Posted: 03:14pm 07 Jun 2023
Copy link to clipboard 
Print this post

@plasma,

Unless you provide more info, we may not be able to help you to a solution.

Volhout
PicomiteVGA PETSCII ROBOTS
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 554
Posted: 05:57pm 07 Jun 2023
Copy link to clipboard 
Print this post

Hi vollhout, i need to analyze the remote protocol first so i can’t provide much infos.
With Sony protocol i mean the MMBasic provided ir protocol. Thx
Plasma
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9129
Posted: 06:27pm 07 Jun 2023
Copy link to clipboard 
Print this post

  Quote  Hi vollhout, i need to analyze the remote protocol first so i can’t provide much infos.


If you haven't got a dedicated logic analyser then use Volhout's excellent PIO based logic analyser for the PicoMiteVGA
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024