Page 1
Welcome! Thank you for purchasing our KY-026 AZ- Delivery Flame Detector Module. On the following pages, we will show you how to use and configure this handy device. Have fun!
Page 2
Areas of application Education and teaching: Use in schools, universities and training institutions to teach the basics of electronics, programming and embedded systems. Research and development: Use in research and development projects to create prototypes and experiments in the fields of electronics and computer science. Prototype development: Use in the development and testing of new electronic circuits and devices.
Page 3
consult a doctor. Caution: Keep the product out of the reach of children and pets to avoid accidental contact and swallowing of small parts. Note: Store the product in a safe, closed container when not in use. Attention: Avoid contact of the product with food and drinks.
Table of Contents Introduction........................3 Specifications......................4 Pinout ..........................5 How to configure the Arduino IDE................6 How to configure the Raspberry Pi and Python...........10 Connecting the module with Atmega328p ............11 Example sketch.....................12 Connecting the module with Raspberry Pi ............14 Python scripts......................15 - 2 -...
Introduction The KY-026 flame detector module is a sensor that detects flames. It has an infrared diode that can detect the infrared rays of flame light. It is very sensitive in the infrared light wavelength range of 760nm to 1100nm, which is a wavelength of flame light.
Specifications "Operating voltage range: 3.3V to 5.5V "Infrared wavelength detection : 760nm to 1100nm "Detection angle: 60° " Dimensions: 15 x 36mm [0.6 x 1.4in]. The voltage sensitivity of the analogue output pins can be adjusted via an on- board blue potentiometer. With some potentiometer adjustment, when the analogue voltage is read via an analogue-to-digital converter (ADC for short) within the microcontroller on the Atmega328p, the ADC value of the voltage is on the value around 930.
How to configure the Arduino IDE If the Arduino IDE is not installed, follow the link and download the installation file system operating system chosen. For Windows users, double-click the downloaded .exe file and follow t h e instructions in the installation window. - 6 -...
Page 9
For Linux users, download a file with the extension .tar.xz, which you must extract. When you extract it, go to the extracted directory, and open the terminal in that directory. You need to run two .sh scripts, the first called arduino-linux-setup.sh and the second called install.sh.
Page 10
Almost all operating systems come with a pre-installed text editor (e.g. Windows comes with Notepad, Linux Ubuntu comes with Gedit, Linux Raspbian comes with Leafpad, etc.). All these text editors are perfectly suited for the purpose of the eBook. The next thing to do is to check whether the PC can detect the Atmega328p board.
Page 11
If using the Arduino IDE on Windows, the port names are as follows: For Linux users, the port name is /dev/ttyUSBx for example, where x represents an integer between 0 and 9, for example. - 9 -...
How to configure the Raspberry Pi and Python For the Raspberry Pi, you will first have to install the operating system on it, then set everything up so you can use it in headless mode. Headless mode a l l o w s y o u to remotely connect to the Raspberry Pi, without the need for a PC monitor, mouse or keyboard.
Connect the KY-026 module with Atmega328p as shown in the connection diagram below: Pin KY-026 >Pin Mc > thread > Black wire > Green wire > Blue wire With this configuration, both the analogue and digital pins of the KY-026 - 11 -...
Page 16
Load the sketch onto the Atmega328p and open the Serial Monitor (Tools > Serial Monitor). The result should look like the output shown in the image below: - 14 -...
Connecting the module with Raspberry Pi Connect the KY-026 module with the Raspberry Pi as shown in the connection diagram below: Pin KY-026 >Pin Raspberry Pi > GND[ pin 14]. Black wire > GPIO22 [pin 15]. Blue wire + (VCC) >...
Python scripts import RPi.GPIO GPIO from time import sleep GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) # Pin setup for the module Digital_PIN GPIO.setup(Digital_PIN, GPIO.IN) print('[Press CTRL + C to end the script!]') try: # Main programme loop while True: GPIO.input(Digital_PIN): print('Flame detected') else: print('No flame') sleep(1) # Wait for a second...
Page 19
Save the script with the name Flame.py. To execute the script, open the terminal in the directory where you saved the script and execute the following command: python3 Flame.py The result should resemble the output shown in the image below: To stop the script, press CTRL + C on your keyboard.
Page 20
If you are looking for high-quality microelectronics and accessories, AZ- Delivery Vertriebs GmbH is the right company where you will find them. We will provide you with numerous application examples, comprehensive installation guides, e-books, libraries and assistance from our technical experts. https://az-delivery.de Enjoy! Impressum https://az-delivery.de/pages/about-us - 18 -...
Need help?
Do you have a question about the KY-026 and is the answer not in the manual?
Questions and answers