Coder Social home page Coder Social logo

eduardojm / amg8833_orangepi5 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from makerportal/amg8833_ir_cam

0.0 0.0 0.0 3.42 MB

Python codes for development of a real-time thermal camera using a Orange PI5 computer and AMG8833 infrared array

Python 100.00%

amg8833_orangepi5's Introduction

Python Thermal Camera with Orange PI (AMG8833)

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).

1. Table Of Contents

2. Hardware Configuration

2.1. Wiring Diagram

2.1.1. i2c

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:

OrangePI 5 Plus Pinout

OrangePI5 Plus Pinout

2.1.2. Power Supply

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.

2.1.3. Diagram

The bellow image contains the connections of the OrangePI 5 Plus and AMG8833 used by the project:

OrangePI 5 Plus and AMG8833 Diagram

3. Software Configuration

On the scripts we need to change the bus number configuration to get access to the AMG8833 i2c protocol interface.

3.1. Bus Number

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).

4. Software Output

4.1. Example Output

The following plot is outputted by the example script:

  • /examples/IR_cam_test.py

AMG8833 Plot Test

4.2. Real-Time Interpolated IR Camera

The following plot is outputted by the example script:

  • /examples/IR_cam_interp.py

AMG8833 Interpolated Real-Time

amg8833_orangepi5's People

Contributors

josh-hrisko avatar eduardojm avatar

amg8833_orangepi5's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.