September 22, 2019, 05:19:40 pm


Have you visited the Allwinner Chipset wiki? -

IR sender (transmitter) for CT

Started by david88, September 13, 2014, 07:47:54 pm

Previous topic - Next topic



I would like to connect an IR transmitter to the CT's GPIO to be able to control my AV receiver. Whilst I kind of understand how to connect it and how to configure the software, I am a bit lost finding an actual piece of hardware that will be supported in this setup.

The biggest problem seems to be that the CT only provides 3.3V from the GPIO and all of the ready-made transmitter are based on 5V input.

I do not want to soldier my own circuit as I want it as small and tidy as possible.

Does anyone know if the below would be suited (or has any other recommendations)?

The above lists power supply voltage as a range from 3.2-5.25V, so it might be sufficient, but I am not sure?

Thanks for any help


In the meantime I bought and installed the diode. It does work from both sources (3.3V and also from the 5V Vcc).

I can see that it pulses the diode when using LIRCs irsend through a camera and I can even measure the same pulse from Cubietrucks built-in IR receiver.

One major problem I have is that the timing/frequency seems to be way off. E.g. if I enter into the lircd.conf file that a logical one should have a pulse/space duration of 512/1700 it actually will send something much longer, like 800/3000. I can adjust it to the value I want by stating the durations lower in the config, i.e. with 312/900 in the config I get the actual wanted duration of 512/1700.

Is it possible that the GPIO is just too slow in changing the voltages? IR frequency is only 38kHz, based on other posts I saw that CT should easily be able to manage that?

Ricardo Gurgel

Hello, David88,

It's good to know that IR sending is working on Cubie. I'm tooking the same path that you, trying to set IR transmission via GPIO on Cubie. Could you, please, explain how do you configure LIRC to write on a gpio pin?

Best Regards,


Well, it is kinda working, except the problem I mentioned above (which btw I think is due to a bug in the latency timing of the source code of the kernel module).

Anyways it took me actually quite a while to get it to transmit, as it is not exactly straight forward. Firstly I am using slovenias image (,1275.0.html) as this one has a few updated IR modules included which I use.

The idea behind it is to load one kernel module as receiver (lirc-sunxi) and another one as sender (lirc_gpio). Then I run two lirc daemons which connect to the respective sockets (one for RX, one for TX).

Also of course you need to enable the GPIO port in the script.bin file of the image and connect it correctly to the transmitter. In addition you will need to have a working IR remote configuration file that is valid for the device you want to control.

Probably the best place to start is to get the hardware done first. Connect it all and see if you can get a signal just writing to the GPIO bin per bash (something like "echo 1 > /sys/class/gpio/gpiopinXX/value"). This should switch on the diode and you should see (with the camera of your mobile, as IR is invisible to human eyes) that it is emitting a purple light.