Re: Toshiba air-cooling IR remote

Bengt Martensson <[email protected]> Fri, 27 Oct 2017 09:26:14 +0200
Newsgroups gmane.comp.hardware.lirc
Message-ID <[email protected]>
On 10/27/17 03:16, BenoƮt-Pierre DEMAINE wrote:
> Hello.
> 
> Project is still in meditation phase. I have not checked yet with my 
> osciloscope, but I fear a coming problem.
> 
> I want to customise a Toshiba air-cooling system using an rPi and LIRC. 
> The hardware is the easiest part, for once. The AC terminal has an IR 
> receiver, I have all electronic blueprints, and I know exactly where is 
> the IR receiver, the type, and how it's connected to the "brain TTL 
> chip". This line is a classic TTL line; I will connect it to pins 13 and 
> 14 on the rPi which are IO 22 and 23. In the worst case, I will need a 
> level adaptor (to convert between 3.3 and 5V).
> 
> This will allow the rPi to listen to any incoming signal from the IR 
> remote, and also send orders to the AC terminal. The only "bad" side 
> effect is that any signal sent by the rPi will immediately be received; 
> I will have to ignore such frames.

If I understand you correctly, you want to grab all IR commands, decode 
and analyze them in your program, and then send a possibly modified 
command (not "order") to the AC. First, I think it is a bad idea to 
"hijack" the IR receiver of the AC. Either by a suitable IR receiver 
(TSOP***38?) and connect it to a GPIO pin, or get this thingy 
http://www.harctoolbox.org/arduino_nano.html . (The latter is also very 
good for analyzing the signals). For sending commands RPi -> AC you can 
for example replace the IR receiver with an opto coupler, or send an IR 
signal with e.g. an IR stick on emitter.

I would recommend first getting a receiver to work, either with the 
lirc_rpi ("old") or with the "new" gpio-ir-recv (?) (using /dev/lirc*), 
or the above Arduino stuff (using /dev/ttyUSB* or /dev/ACM*).


> My need, regarding LIRC, is to ask LIRC to only learn about bitrate, and 
> how to convert IR frames into binary words (convert timings into 
> binary), and then, send the received code to a shell script. Then, my 
> shell script will examine the content of the frame, and analyse which 
> byte is the temperature, which byte is the fan speed ...
> 
> Can LIRC do this ? How ?

Lirc (lircd) was not designed for this use case. I think it is easier to 
decode the signals otherwise. (If using /dev/lirc and programming in C++ 
or Java, you might find https://github.com/bengtmartensson/DevSlashLirc 
useful). What is your target language?

There are a number of contributions on the internet on people decoding 
AC protocols. Typically, the protocols are have 38kHz modulation and are 
PWM encoded.

I suggest that you first get the reception to work (try with something 
simple, like a standard TV first), and we continue from there.

Greetz,

Bengt

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot