This is a documentation of using AMG8833 infrared array on Orange PI 5 (Plus model) inspired and full-based on the original documentation and code of using it on Raspberry Pi 4 (see repository here).
-
- 2.1. Wiring Diagram
- 2.1.1. i2c
- 2.1.2. Power Supply
- 2.1.3. Diagram
- 2.1. Wiring Diagram
-
- 3.1. Bus Number
Using the 40 Pin Expansion Interface Pin Instructions
, we have multiple i2c SCL/SDA pin's. We decided to use I2C2_SCL_M4
and I2C2_SDA_M4
(GPIO1_A1
and GPIO1_A0
) pins on the Orange PI 5 board pins. See the pinout bellow:
The AMG8833 is powered by 5V pin on the OrangePI 5 board and we decided to use GND pin on the side of the I2C2_SDA_M4
because the pins on the circled by dot line on the image on the section bellow is used by calor fan.
The bellow image contains the connections of the OrangePI 5 Plus and AMG8833 used by the project:
On the scripts we need to change the bus number configuration to get access to the AMG8833 i2c protocol interface.
When we create the AMG8833()
instance, like on the IR_cam_test.py
script, we can pass the bus_num
argument:
sensor = amg8833_i2c.AMG8833(addr=0x69, bus_num=2)
The bus_num=2
is referencing that we are using I2C2
bus. On the OrangePI5 we have some i2c bus interfaces:
I2C Interfaces
I2C bus | SDA pin | SCL pin | dtbo |
---|---|---|---|
I2C2_M0 | Pin 3 | Pin 5 | i2c2-m0 |
I2C2_M4 | Pin 10 | Pin 8 | i2c2-m4 |
I2C4_M3 | Pin 22 | Pin 32 | i2c4-m3 |
I2C5_M3 | Pin 27 | Pin 28 | i2c5-m3 |
I2C8_M2 | Pin 29 | Pin 7 | i2c8-m2 |
From the Orange PI 5 Plus documentation, we have a information about I2C2_M0
and I2C2_m4
:
I2C2_M0 and I2C2_M4 can only use one of them at the same time, and they cannot be used at the same time.
Based on the above I2C information from the OrangePi we can change the bus_num
based on the others pin configurations:
orangepi@orangepi:~$ sudo i2cdetect -y 2 #i2c2 command
orangepi@orangepi:~$ sudo i2cdetect -y 4 #i2c4 command
orangepi@orangepi:~$ sudo i2cdetect -y 5 #i2c5 command
orangepi@orangepi:~$ sudo i2cdetect -y 8 #i2c8 command
Making a parallel on the i2cdetect
configuration above, we have a table of bus_num
setting:
I2C Bus | bus_num |
---|---|
I2C2_M0 | 2 |
I2C2_M4 | 2 |
I2C4_M3 | 4 |
I2C5_M3 | 5 |
I2C8_M2 | 8 |
Remember that is necessary to open the i2c buses on the linux system (see page 225 on the OrangePI 5 Plus User Manual).
The following plot is outputted by the example script:
- /examples/IR_cam_test.py
The following plot is outputted by the example script:
- /examples/IR_cam_interp.py