July 27, 2022

RS-232 with displays & AV equipment

The use case for this post is that a got a request from a customer where a commercial displays brightness, used for digital signage, should be put at a minimum when there is no people in the surroundings.

After some checking I found that on most displays, even on our own TV set, there is a
 connector for the RS - 232 protocol that accepts commands similar to the commands sent by the remote control.

A nice explanation on how it works is found here.

Intro
To make it a little more complicated different manufacturer have different RS-232 codes. Here is a summary but if you are going to implement something check out the respective manufacturers documentation.

Hardware
In this case a display from LG was used and here is a link to the user manual. The second manual, in the link, handles the RS-232 interface. Just search for "232".

I have done a lot of projects with Raspberry Pi so in this case I used a Raspberry Pi Zero(RPiZ).

To sense people passing I used this PIR motion sensor.

The RS 232 connector on the display was connected to a USB to RS-232 adapter but please connect according to the picture. I just used TX, RX and GND.

Node-Red 
The Node-Red flow above was used to send the commands and get feedback.

If you check the LG display manual the commands to change the backlight are;

Minimum backlight  => "mg 00 00"
Maximum backlight => "mg 00 64"

If the pin, connected to the PIR, goes high, motion, the max command will be sent.
After at least a minute of no motion the min command will be sent and this is checked every 10:th second.

Remark
Due to the shortage of RPiZ:s this application will be using a RPi Pico instead.
Here is a base for that application done i MicroPython.

No comments:

Post a Comment

Feel free to leave a comment ! ... but due to a lot of spam comments I have to moderate them. Will reply ASAP !