Jump to content

Orange pi zero ir receiver and transmitter


Atgeek

Recommended Posts

It has only IR receiver, so no, it is not possible without additional HW and probably some driver compiling.

 

EDIT: Zero actually doesn't have IR receiver also, only with expansion board...

Link to comment
Share on other sites

Give the peoples here some time, 22h aren't that much for a specific question. If I have it right in mind a attiny or arduino breakout should also work with the lirc library. Would be cheaper as a usb soundcard not? Years ago, someone ported everything to RPi (ir on gpio header) so maybe this could be a starting point to bring this to work on an OPi. I think it's somehow ironic if you have a sbc with gpio header and need additional hardware to trigger a simple irLED. There's also a analog out (sound) on the 13pin header of the opi 0. So if you get this one working, no additional usb soundcard is needed. 

Link to comment
Share on other sites

On 7/13/2017 at 8:42 PM, Atgeek said:

Could be possible to use a USB audio card and lirc for both transmit and receive? 

Sorry, I don't get this... Do you want to use a USB sound card as a IR transmitter/receiver?

 

Link to comment
Share on other sites

Is there a way to use PWM or a GPIO pin roughly connected with an infrared LED to transmit IR bits with different protocols NEC, but also Samsung and so on?

 

I tried YS-IRTM module via UART but it works with NEC protocol only, afaik. I need the Samsung protocol.

 

I thought there should have been a library for that, but I can't find it or it doesn't exist.

 

thank you

 

(OPI Zero)

Link to comment
Share on other sites

4 hours ago, jscax said:

Is there a way to use PWM or a GPIO pin roughly connected with an infrared LED to transmit IR bits with different protocols NEC, but also Samsung and so on?

 

I tried YS-IRTM module via UART but it works with NEC protocol only, afaik. I need the Samsung protocol.

 

I thought there should have been a library for that, but I can't find it or it doesn't exist.

 

thank you

 

(OPI Zero)

 

 

There is Chinese Manual.

 

http://www.uctronics.com/download/U3107_Infrared_decoding_module.zip#sthash.Br6igdz4.dpuf

 

There is following explanation.

 

Signal launch of 940nm38kNEC code.

Link to comment
Share on other sites

11 hours ago, nopnop2002 said:

 

 

There is Chinese Manual.

 

http://www.uctronics.com/download/U3107_Infrared_decoding_module.zip#sthash.Br6igdz4.dpuf

 

There is following explanation.

 

Signal launch of 940nm38kNEC code.

Yeah, YS-IRTM is working ok using the OPI Zero UART (thanks armbian :beer:), now I can control my TV.

 

The problem is that YS-IRTM works with NEC protocol only.

I actually need to control a Samsung AC unit which uses Samsung protocol.

 

YS-IRTM ==> https://www.aliexpress.com/item/5V-IR-Infrared-Remote-Decoder-Encoding-Transmitter-Receiver-Wireless-Module-IR-Decoder-Module/32528109291.html

 

http://www.datasheetcatalog.com/info_redirect/datasheet/nec/UPD6122G-002.pdf.shtml => UPD6121 ====> NEC only

 

Differences between IR remote protocols:

http://www.techdesign.be/projects/011/011_waves.htm

 

NEC:

tt_011_2-nec.gif

 

SAMSUNG:

tt_011_8-samsung.gif

 

So, I was guessing that maybe GPIO can handle this kind of specific 1/0 switching and timing.

And should be great if does exist a library for this, because seems like something very standardized.

 

I'd expect something like:

Ir ir = new Ir()
ir.setGpioPin(x)
ir.sendSamsung(hexcode)

 

But maybe it's all wrong

Link to comment
Share on other sites

2 hours ago, jscax said:

 

But maybe it's all wrong

 

I think:

 

On board MCU(STC11F02E) launches a start bit unconditionally.
Start Bit of this module is NEC format(13.5ms) fixing.
It isn't possible to change Start Bit of SAMSUNG format(9ms) via UART.

 

If you can change firmware of On board MCU(STC11F02E), It's possible to send SAMSUNG format.

Link to comment
Share on other sites

The MCU programming way seems very hard for me :o

 

https://wiki.libreelec.tv/infrared_remotes

Here they talk about overlay enabling. That should be a great implementation, I don't know if this is possible in armbian. But it's all about receiving, I want to send.

 

This:

http://www.piddlerintheroot.com/ir-blaster-lirc/

seems very promising, do you see any cons vs my OPI Zero?

Is OPI Zero capable of switching GPIO so fast? I hope so

Link to comment
Share on other sites

5 hours ago, jscax said:

 

A method the infrared reception and the infrared transmission for which lirc isn't used by this page is introduced.

http://feijoa.jp/laboratory/raspberrypi/infrared/

So I tried whether it work using OrangePi-PC.
It work fine.

 

$ cc scanir.c -o scanir -lwiringPi -lpthread
$ sudo ./scanir tv_on.ir
write file: tv_on.ir
scaning pin: 7 (wiringpi)
max keep time: 40(ms)
Infrared LED scanning start.
Pressed Ctrl+C, this program will exit.

Scanning has been done.
$ ls -l tv_on.ir
-rw-r--r-- 1 root root 476 Jun 26 07:56 tv_on.ir

$ cc sendir.c -lm -o sendir -lwiringPi -lpthread
$ sudo ./sendir tv_on.ir 1 14
read file: tv_on.ir
output pin: 14 (wiringpi)
unit: 26ms duty:9-17
send infrared signal.
send data.

done
 

 

scanir
The first argument is file name of output.
The second argument is The pin number of Infra red sensor.(The pin number of WiringPi, Default is 7.)
The third argument are the biggest duration. When infrared rays didn't light up more than this time, the biggest duration considers a transmission from a remote control to end, ends the reading and extracts a file.

 

sendir
The first argument is file name of read.
The second argument is repeat counter.
The third argument are The pin number of Infra red transmitter.(The pin number of WiringPi)
The fourth argument are Frequency of transmit signal.
The fifth argument are Molecule compared with duty
The sixth argument are denominator compared with duty.

Link to comment
Share on other sites

On 6/1/2018 at 5:28 AM, jscax said:

Yeah, YS-IRTM is working ok using the OPI Zero UART (thanks armbian :beer:), now I can control my TV.

 

The problem is that YS-IRTM works with NEC protocol only.

I actually need to control a Samsung AC unit which uses Samsung protocol.

 

YS-IRTM ==> https://www.aliexpress.com/item/5V-IR-Infrared-Remote-Decoder-Encoding-Transmitter-Receiver-Wireless-Module-IR-Decoder-Module/32528109291.html

 

http://www.datasheetcatalog.com/info_redirect/datasheet/nec/UPD6122G-002.pdf.shtml => UPD6121 ====> NEC only

 

Differences between IR remote protocols:

http://www.techdesign.be/projects/011/011_waves.htm

 

NEC:

tt_011_2-nec.gif

 

SAMSUNG:

tt_011_8-samsung.gif

 

So, I was guessing that maybe GPIO can handle this kind of specific 1/0 switching and timing.

And should be great if does exist a library for this, because seems like something very standardized.

 

I'd expect something like:


Ir ir = new Ir()
ir.setGpioPin(x)
ir.sendSamsung(hexcode)

 

But maybe it's all wrong

 

 

Hello jscax,

 

Are you saying that the YS-IRTM uses the "UPD6121".    I thought it used a STC11F02 microcontroller.   I am frustrated about finding information on the module I bought - looks like the one in your link to Aliexpress.    STC11F02  is an 8051 micro - I will see if I can use STC software to get the embedded firmware, and try to disassemble it.

Link to comment
Share on other sites

On 11/17/2018 at 5:11 PM, dony said:

 

 

Hello jscax,

 

Are you saying that the YS-IRTM uses the "UPD6121".    I thought it used a STC11F02 microcontroller.   I am frustrated about finding information on the module I bought - looks like the one in your link to Aliexpress.    STC11F02  is an 8051 micro - I will see if I can use STC software to get the embedded firmware, and try to disassemble it.

yes, it's a UPD6121 and I gave up about making it work with different protocol than NEC.

 

I bought a double led with transistor ( https://www.aliexpress.com/item/Free-Shipping-electronic-building-blocks-Two-way-infrared-transmitter-module-IR-Transmitter-for-arduino/1972945414.html ) which allows me to just turn on/off the LED by changing high/low PIN and I succeded transmitting what I need.

Note again: you need a double led with transistor to success

 

I went for a very low level solution, similar to the one posted by nopnop2002 here above.

I just save ON/OFF pulse with timing and I then just replicate the commands without encoding or making any logic.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines