Transmitting Infrared on irrp.py doubles the signal

Asked 1 years ago, Updated 1 years ago, 77 views

I used RaspberryPi3B+ as an infrared remote control and used it for lighting.
At one point, the update failed and 3B+ stopped booting, so I re-entered the operating system.
Then, I couldn't operate with infrared rays that I had been able to operate normally.
It seems that the signal cannot be transmitted properly. What kind of cause can you think of?

Raspberry Pi 3B+
debian_version:10.10
python —3.7.3
pigpio —1.78
Transmitter: Infrared LED is controlled by a transistor, and batteries are used for power supply (3V)
receivers:using the infrared receiving module OSRB38C9AA
Programs: Use irrp.py without modification
remote control:Panasonic HK9478

$vcgencmd measure_temp
temp = 54.8'C
$ vcgencmd get_config arm_freq
arm_freq = 1400
$ vcgencmd measure_volts
volt = 1.3688V // 1.2688V // 1.3688V rolls around, higher than 1.2V
$ vcgencmd get_config over_voltage
over_voltage = 0 // No voltage setting

I removed the keyboard, mouse, etc. and connected ssh from wifi.
I have an operating system on an SSD connected by usb instead of an SD card.

When you send an infrared signal, each on/off time doubles.

I also had a Raspberry Pizero on hand, so I decided to try the combination of send = {remote control, 3B+,zero} and receive = {3B+,zero}.
Then, when I sent the signal at 3B+, the signal was doubled.
Also, I was able to operate the lighting with zero, but I would like to use 3B+ for my convenience.

//Send signal with remote control
(Press the button on the remote control)
// Receives remote-sent signal at 3B+
$ python irrp.py-g5-forg_3bright —off-r
$ catalog_3b
{"light:off": [3466, 1732, 440, 433, 440, 433, 440, 1298, 440, 1298, 440, 433, 440, 1298, 440, 433, 440, 433, 440, 433, 440, 1298, 440, 433, 440, 433, 440, 1298, 440, 433, 440, 1298, 440, 433, 440, 1298, 440, 433, 440, 433, 440, 1298, 440, 433, 440, 433, 440, 433, 440, 433, 440, 1298, 440, 1298, 440, 1298, 440, 1298, 440, 433, 440, 1298, 440, 433, 440, 433, 440, 433, 440, 1298, 440, 1298, 440, 433, 440, 433, 440, 1298, 440, 433, 440, 433, 440]}
// Receives signals sent by remote control in zero
$ python irrp.py-g17-forg_0 light —off-r
$ catalog_0
{"light:off": [3482, 1718, 441, 441, 441, 441, 441, 1286, 441, 1286, 441, 441, 441, 1286, 441, 441, 441, 441, 441, 441, 441, 1286, 441, 441, 441, 441, 441, 1286, 441, 441, 441, 1286, 441, 441, 441, 1286, 441, 441, 441, 441, 441, 1286, 441, 441, 441, 441, 441, 441, 441, 441, 441, 1286, 441, 1286, 441, 1286, 441, 1286, 441, 441, 441, 1286, 441, 441, 441, 441, 441, 441, 441, 1286, 441, 1286, 441, 441, 441, 441, 441, 1286, 441, 441, 441, 441, 441]}
Send a signal with //3B+
$ python irrp.py-g17-forg_3bright —off-p
 // 3B+ receives signals from 3B+
// Mismatch without --no-confirm, terminated halfway without --post
$ python irrp.py-g5-f3b_3blight:off-r --post100 --no-confirm
$ cat3b_3b
{"light:off": [6685, 3816, 560, 1229, 560, 1229, 560, 2872, 560, 2872, 730, 1229, 560, 2872, 560, 1229, 560, 1053, 730, 1053, 730, 2872, 730, 1229, 560, 1229, 481, 2872, 560, 1229, 560, 2872, 560, 1229, 560, 2872, 730, 1229, 560, 1229, 560, 2872, 560, 1229, 560, 1229, 560, 1229, 560, 1053, 730, 2872, 560, 2872, 730, 2872, 560, 2872, 730, 1053, 730, 2872, 730, 1229, 560, 1229, 560, 1229, 560, 2872, 730, 2872, 560, 1053, 730, 1229, 560, 2872, 560, 1053, 730, 1229, 560]}
 // Receives signals sent by 3B+ in zero
$ python irrp.py-g17-f3b_0 light —off-r
$ cat3b_0
{"light:off": [7012, 3490, 901, 873, 901, 873, 901, 2618, 901, 2618, 901, 873, 901, 2618, 901, 873, 901, 873, 901, 873, 901, 2618, 901, 873, 901, 873, 901, 2618, 901, 873, 901, 2618, 901, 873, 901, 2618, 901, 873, 901, 873, 901, 2618, 901, 873, 901, 873, 901, 873, 901, 873, 901, 2618, 901, 2618, 901, 2618, 901, 2618, 901, 873, 901, 2618, 901, 873, 901, 873, 901, 873, 901, 2618, 901, 2618, 901, 873, 901, 873, 901, 2618, 901, 873, 901, 873, 901]}
Send a signal with //zero
$ python irrp.py-g26-forg_0 light —off-p
 // Receives signals sent in zero at 3B+
$ python irrp.py-g5-f 0_3blight —off-r
$ cat0_3b
{"light:off": [3478, 1713, 433, 465, 433, 465, 433, 1286, 433, 1286, 433, 465, 433, 1286, 433, 465, 433, 465, 433, 465, 433, 1286, 433, 465, 433, 465, 433, 1286, 433, 465, 433, 1286, 433, 465, 433, 1286, 433, 465, 433, 465, 433, 1286, 433, 465, 433, 465, 433, 465, 433, 465, 433, 1286, 433, 1286, 433, 1286, 433, 1286, 433, 465, 433, 1286, 433, 465, 433, 465, 433, 465, 433, 1286, 433, 1286, 433, 465, 433, 465, 433, 1286, 433, 465, 433, 465, 433]}
 Receives signals sent in //zero at zero
$ python irrp.py-g17-f 0_0 light —off-r
$ cat0_0
{"light:off": [3420, 1770, 393, 495, 393, 495, 393, 1340, 393, 1340, 393, 495, 393, 1340, 393, 495, 393, 495, 393, 495, 393, 1340, 393, 495, 393, 495, 393, 1340, 393, 495, 393, 1340, 393, 495, 393, 1340, 393, 495, 393, 495, 393, 1340, 393, 495, 393, 495, 393, 495, 393, 495, 393, 1340, 393, 1340, 393, 1340, 393, 1340, 393, 495, 393, 1340, 393, 495, 393, 495, 393, 495, 393, 1340, 393, 1340, 393, 495, 393, 495, 393, 1340, 393, 495, 393, 495, 393]}

Also, the result of sending the signal doubled by 3B+ at 3B+ is as follows.
The results received were doubled even more.

//3B+ sends "3B+ sent and 3B+ received signal"
$ python irrp.py-g17-f3b_3blight —off-p
// 3B+ receives "Signals sent by 3B+ and received by 3B+" at 3B+
$ python irrp.py-g5-f3b3b_3blight:off-r --post100 --no-confirm
$ cat3b3b_3b
{"light:off": [13605, 6952, 1381, 2668, 860, 2668, 1099, 12715, 1381, 2182, 1381, 5780, 1381, 2182, 1381, 2668, 1099, 3283, 387, 5780, 1381, 2668, 1099, 2182, 1381, 5780, 1099, 9550, 1099, 9550, 1381, 2668, 1099, 2182, 1381, 5780, 1381, 2668, 860, 2182, 1381, 2668, 1381, 9550, 1099, 5780, 1381, 5780, 1099, 6952, 387, 9550, 1381, 2668, 160, 2668, 1381, 3283, 279, 6952, 210, 6952, 387, 2668, 387, 9550, 387, 5780, 1381]}
// len —69
 // Receives "Signals sent by 3B+ and received by 3B+" in zero
$ python irrp.py-g17-f3b3b_0 light:off-r --no-confirm --post1000
$ cat3b3b_0
{"light:off": [13465, 7135, 1250, 2598, 888, 2598, 1250, 12880, 1250, 2112, 1480, 5958, 1250, 2598, 1060, 2598, 888, 9669, 1250, 2598, 888, 2598, 1250, 5958, 888, 9669, 1250, 9669, 1250, 2598, 1250, 2112, 888, 420, 140, 5958, 1250, 2598, 888, 2112, 1250, 2598, 1250, 9669, 888, 5958, 1250, 5958, 888, 7135, 265, 9669, 1250, 2598, 645, 2598, 1250, 16905, 265, 2598, 395, 16905, 1060]}
// len —63
  • Use a red LED instead of an infrared LED
  • Red LED is lit
  • Check with Camera
  • The infrared LED was lit
  • Change the transmit pin to another pin
  • Not improved

python python3 raspberry-pi gpio

2022-09-30 15:54

1 Answers

Summary: I don't know why, but it's fixed

Are any other programs operating at 1/2 speed?If so, it is estimated that clock initialization incorrectly results in a half frequency.

I don't feel any change in usage, and I don't feel like other programs are slow.
I put cpufrequtils in order to check the current clock frequency.

First of all, when I measured the clock frequency, it was 900 MHz, and I got a slower value.
When I operated irrp.py (assuming it didn't work), it turned off normally and I was surprised.
The clock frequency measured immediately after this was 1.4 GHz.
From this, I thought the clock frequency was the cause.

However, after several additional operations, the lights went off normally even when the clock frequency was 700 MHz.
However, if you use cpufreq-info continuously, 800M→1.4G→700M→1.4G→700M→1.4G→700M→1000M. I wonder if this result is correct.
(The clock frequency was basically constant, and I had the image that it could be switched step by step depending on temperature and CPU utilization.)

$sudo apt-get install cpufrequtils
$ cpufreq-info | grep "current CPU frequency"
  current CPU frequency is 900 MHz.
  current CPU frequency is 900 MHz.
  current CPU frequency is 900 MHz.
  current CPU frequency is 900 MHz.


2022-09-30 15:54

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.