Uncategorized | LK Tronics https://lk-tronics.com/category/uncategorized/ Components for the Future Wed, 22 May 2024 07:29:54 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.1 https://i0.wp.com/lk-tronics.com/wp-content/uploads/2023/11/cropped-Main-Logo-lktronics-2023-512-x-512-px-1.png?fit=32%2C32&ssl=1 Uncategorized | LK Tronics https://lk-tronics.com/category/uncategorized/ 32 32 153475254 MQ-135 Air Quality Gas Smoke Detection Sensor with Arduino https://lk-tronics.com/mq-135-air-quality-gas-smoke-detection-sensor-with-arduino/ https://lk-tronics.com/mq-135-air-quality-gas-smoke-detection-sensor-with-arduino/#respond Wed, 22 May 2024 07:29:49 +0000 https://lk-tronics.com/?p=16058 LK Tronics
MQ-135 Air Quality Gas Smoke Detection Sensor with Arduino

The MQ-135 is a popular gas sensor used for detecting a variety of gases including ammonia (NH3), nitrogen oxides (NOx), alcohol, benzene, smoke, and carbon dioxide (CO2). It is widely

MQ-135 Air Quality Gas Smoke Detection Sensor with Arduino
Research & Development Department

]]>
LK Tronics
MQ-135 Air Quality Gas Smoke Detection Sensor with Arduino

The MQ-135 is a popular gas sensor used for detecting a variety of gases including ammonia (NH3), nitrogen oxides (NOx), alcohol, benzene, smoke, and carbon dioxide (CO2). It is widely used in air quality monitoring applications due to its broad detection range and sensitivity to several gases. Here’s an overview of the MQ-135 sensor:

Features

  1. High Sensitivity: The sensor is highly sensitive to ammonia, NOx, alcohol, benzene, smoke, and CO2.
  2. Wide Detection Range: It can detect concentrations from 10 ppm (parts per million) to 1000 ppm.
  3. Fast Response and Recovery: The sensor has a quick response time and can recover quickly after exposure to target gases.
  4. Analog Output: The MQ-135 provides an analog output proportional to the concentration of the detected gas.

Specifications

  • Operating Voltage: 5V
  • Load Resistance: Adjustable
  • Heater Consumption: <800 mW
  • Sensing Resistance: 10 kΩ – 60 kΩ (in clean air)
  • Preheat Time: 20 seconds
  • Operating Temperature: -10°C to 50°C
  • Humidity: 95% RH

Pin Configuration

  • VCC: Power supply pin (5V)
  • GND: Ground pin
  • DO: Digital output pin
  • AO: Analog output pin

Applications

  • Air quality monitoring
  • Gas leak detection systems
  • Industrial safety systems
  • Portable air quality meters

How to Use the MQ-135 Sensor

  1. Wiring: Connect the VCC to a 5V power supply, GND to ground, AO to an analog input pin of a microcontroller, and DO to a digital input pin if digital readout is needed.
  2. Calibration: It is crucial to calibrate the sensor in a clean-air environment to establish a baseline resistance. This allows for accurate readings.
  3. Reading Data: The sensor provides an analog voltage output that varies with the concentration of gases. This output can be read using an ADC (Analog-to-Digital Converter) on a microcontroller like Arduino.
  4. Interpreting Readings: Convert the analog value to a gas concentration using the sensor’s datasheet and the specific calibration curve provided.
/***********************************************
* Company Name:LK Tronics
* Author: Research & Development Department
EXPERT GUIDANCE TO BRING YOUR DREAM PROJECT TO LIFE
* Date: 2023/03/10
* https://lk-tronics.com/
***********************************************
* All rights reserved. No part of this code may be reproduced, distributed,
* or transmitted in any form or by any means, including photocopying, recording,
* or other electronic or mechanical methods, without the prior written permission
* of LK Tronics, except in the case of brief quotations embodied in
* critical reviews and certain other noncommercial uses permitted by copyright law.

************************************************/
const int analogPin = A0;  // Analog input pin that the sensor is attached to
int sensorValue = 0;       // Variable to store the value coming from the sensor

void setup() {
  Serial.begin(9600);      // Initialize serial communication at 9600 bits per second
}

void loop() {
  sensorValue = analogRead(analogPin);  // Read the analog value from the sensor
  Serial.print("Gas Concentration: ");
  Serial.println(sensorValue);          // Print the value to the serial monitor
  delay(1000);                          // Wait for 1 second before the next reading
}

Considerations

  • Environmental Factors: Temperature and humidity can affect sensor readings, so it’s important to consider these factors in the application.
  • Interference: The sensor can detect multiple gases, which might lead to interference and affect the accuracy for a specific gas detection.

The MQ-135 is a versatile and cost-effective solution for detecting a variety of gases, making it ideal for environmental monitoring and safety applications. Proper calibration and understanding of its characteristics are crucial for accurate measurements.

MQ-135 Air Quality Gas Smoke Detection Sensor with Arduino
Research & Development Department

]]>
https://lk-tronics.com/mq-135-air-quality-gas-smoke-detection-sensor-with-arduino/feed/ 0 16058
AD9833 Function Generator with Arduino https://lk-tronics.com/ad9833-function-generator-with-arduino/ https://lk-tronics.com/ad9833-function-generator-with-arduino/#respond Mon, 25 Mar 2024 05:27:57 +0000 https://lk-tronics.com/?p=15778 LK Tronics
AD9833 Function Generator with Arduino

The AD9833 is a programmable waveform generator IC (integrated circuit) developed by Analog Devices. It’s commonly used to generate sine, triangle, and square waveforms with frequency and phase control. Here’s

AD9833 Function Generator with Arduino
darazsales

]]>
LK Tronics
AD9833 Function Generator with Arduino

The AD9833 is a programmable waveform generator IC (integrated circuit) developed by Analog Devices. It’s commonly used to generate sine, triangle, and square waveforms with frequency and phase control. Here’s a brief overview of its functionality:

  1. Waveform Generation: The AD9833 can generate three types of waveforms: sine, triangle, and square waves.
  2. Frequency Control: It allows precise control over the frequency of the generated waveform. The frequency can be programmed via a serial interface, typically SPI (Serial Peripheral Interface) or I2C (Inter-Integrated Circuit).
  3. Phase Control: The phase of the waveform can also be adjusted programmatically, allowing for phase modulation.
  4. Frequency Resolution: The frequency resolution of the AD9833 is determined by its internal 28-bit phase accumulator, providing high-resolution frequency tuning.
  5. Power Supply: It typically operates with a single power supply voltage, making it suitable for a wide range of applications.
  6. Interface: It communicates with external microcontrollers or other digital devices through a serial interface, usually SPI or I2C.
  7. Applications: The AD9833 finds applications in various fields such as function generators, signal generators, frequency synthesizers, and DDS (Direct Digital Synthesis) systems.

To use the AD9833 as a function generator, you would typically interface it with a microcontroller or a digital signal processor (DSP) to control its settings and generate the desired waveform with the desired frequency and phase characteristics. The microcontroller or DSP sends commands to the AD9833 via SPI or I2C to set the frequency, waveform type, and phase offset.

When utilizing the AD9833, you would typically:

  • Configure the desired waveform type (sine, triangle, square).
  • Set the frequency of the waveform.
  • Optionally, adjust the phase offset if phase modulation is needed.
  • Control power-down modes or sleep modes for power management.

Overall, the AD9833 provides a versatile and flexible solution for generating accurate waveforms in various electronic applications.

***************************************************************************************************************

***************************************************************************************************************

* Company Name:LK Tronics
* Author: Research & Development Department
EXPERT GUIDANCE TO BRING YOUR DREAM PROJECT TO LIFE
* Date: 2024/ 03/25
* https://lk-tronics.com/
***********************************************
* All rights reserved, No part of this code may be reproduced, distributed,
* or transmitted in any form or by any means, including photocopying, recording,
* or other electronic or mechanical methods, without the prior written permission
* of LK Tronics, except in the case of brief quotations embodied in
* critical reviews and certain other noncommercial uses permitted by copyright law.

************************************************/
#include <AD9833.h>     // Include the library

#define FNC_PIN 10       // Can be any digital IO pin
#define Frequency 1    // if set value 1 = 1Hz Frequency

AD9833 gen(FNC_PIN);       // Defaults to 25MHz internal reference frequency

void setup() {
  Serial.begin(9600);

  gen.Begin();

  // Apply a 1000 Hz sine wave using REG0 (register set 0). There are two register sets: REG0 and REG1.
  // Each one can be programmed for:
  //   Signal type - SINE_WAVE, TRIANGLE_WAVE, SQUARE_WAVE, and HALF_SQUARE_WAVE
  //   Frequency - 0 to 12.5 MHz
  //   Phase - 0 to 360 degress (this is only useful if it is 'relative' to some other signal
  //           such as the phase difference between REG0 and REG1).
  // In ApplySignal, if Phase is not given, it defaults to 0.

  gen.ApplySignal(SINE_WAVE, REG0, Frequency);
  gen.EnableOutput(true);   // Turn ON the output - it defaults to OFF
  // There should be a 1 Hz square wave on the output of the AD9833
}

void loop() {
  Serial.println(analogRead(A0));
  delay(100);
}

AD9833 Function Generator with Arduino
darazsales

]]>
https://lk-tronics.com/ad9833-function-generator-with-arduino/feed/ 0 15778
OLED Display with Arduino https://lk-tronics.com/oled-display-with-arduino/ https://lk-tronics.com/oled-display-with-arduino/#respond Wed, 17 Jan 2024 14:54:34 +0000 https://lk-tronics.com/?p=14623 LK Tronics
OLED Display with Arduino

An Organic Light light-emitting diode (OLED) display is a type of flat-panel display technology that uses organic compounds to emit light when an electric current is applied. OLEDs are known

OLED Display with Arduino
Research & Development Department

]]>
LK Tronics
OLED Display with Arduino

An Organic Light light-emitting diode (OLED) display is a type of flat-panel display technology that uses organic compounds to emit light when an electric current is applied. OLEDs are known for their vibrant colors, high contrast ratios, fast response times, and flexibility. Unlike traditional liquid crystal displays (LCDs) that require a backlight, OLEDs are “emissive” displays, meaning each pixel generates its light. This allows for more accurate and dynamic color reproduction, as well as deeper blacks since individual pixels can be turned off completely to achieve true black.

Here are some key features and advantages of OLED displays:

  1. Thin and Flexible: OLED displays can be made very thin and flexible, making them suitable for applications such as curved or rollable screens.
  2. Wide Viewing Angles: OLEDs offer wide viewing angles, maintaining color accuracy and brightness even when viewed from different angles.
  3. Faster Response Time: OLEDs have faster response times compared to traditional LCDs, resulting in smoother motion and reduced motion blur.
  4. High Contrast Ratios: OLEDs can achieve high contrast ratios, as individual pixels emit their light, allowing for better differentiation between light and dark areas on the screen.
  5. Energy Efficiency: OLEDs are generally more energy-efficient than traditional displays because they don’t require a constant backlight. Power is consumed only when the pixels are emitting light.
  6. Better Color Reproduction: OLED displays can produce more vibrant and accurate colors due to their ability to emit light directly.

Despite their advantages, OLEDs also have some challenges, including potential issues with long-term durability (especially for blue OLEDs), susceptibility to water damage, and manufacturing costs. Researchers and manufacturers are continually working to address these challenges and improve the technology.

OLED displays are commonly used in various electronic devices, such as smartphones, televisions, computer monitors, and wearable devices. As technology advances, OLEDs continue to play a significant role in the evolution of display technologies.

***************************************************************************************************************

***************************************************************************************************************

* Company Name:LK Tronics
* Author: Research & Development Department
EXPERT GUIDANCE TO BRING YOUR DREAM PROJECT TO LIFE
* Date: 2023/ 12/21
* https://lk-tronics.com/
***********************************************
* All rights reserved. No part of this code may be reproduced, distributed,
* or transmitted in any form or by any means, including photocopying, recording,
* or other electronic or mechanical methods, without the prior written permission
* of LK Tronics, except in the case of brief quotations embodied in
* critical reviews and certain other noncommercial uses permitted by copyright law.

************************************************/
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 64


Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire);

void setup() {
  Serial.begin(9600);
  display.begin(SSD1306_I2C, 0x3C);
  display.clearDisplay(); // Clear the buffer
}

void loop() {
  display.setTextSize(3); 
  display.setTextColor(SSD1306_WHITE);  // Draw white text
  display.setCursor(30,30);     // Start at top-left corner
  display.print(F("LK Tronics"));

  display.display();   // Show the display buffer on the screen
  delay(2000);
  display.clearDisplay();
}

OLED Display with Arduino
Research & Development Department

]]>
https://lk-tronics.com/oled-display-with-arduino/feed/ 0 14623
L298N Motor Driver with Arduino https://lk-tronics.com/l298n-motor-driver-with-arduino/ https://lk-tronics.com/l298n-motor-driver-with-arduino/#respond Mon, 08 Jan 2024 06:47:04 +0000 https://lk-tronics.com/?p=14562 LK Tronics
L298N Motor Driver with Arduino

The L298N is a popular dual H-bridge motor driver integrated circuit commonly used in robotics and other projects to control DC motors or stepper motors. It allows you to control

L298N Motor Driver with Arduino
Research & Development Department

]]>
LK Tronics
L298N Motor Driver with Arduino


The L298N is a popular dual H-bridge motor driver integrated circuit commonly used in robotics and other projects to control DC motors or stepper motors. It allows you to control the direction and speed of two DC motors independently.

Features and Connections:

  1. Dual H-Bridge: The L298N has two H-bridges, allowing it to control two motors independently.
  2. Motor Power Supply: It requires an external power supply for the motors, typically 7V to 35V. Ensure the voltage matches your motor specifications.
  3. Logic Power Supply: It also needs a separate power supply (usually 5V) for its logic circuitry.
  4. Motor Connections: Connect your motors to the OUT1/OUT2 and OUT3/OUT4 pins for Motor 1 and Motor 2, respectively.
  5. Control Pins: The control pins are used to control the direction and speed of the motors. The logic inputs IN1, IN2, IN3, and IN4 control the direction, while PWM (Pulse Width Modulation) signals applied to the ENA and ENB pins control the motor speed.
  6. Enable Pins (ENA and ENB): To control the speed of the motors, you can apply a PWM signal to these pins. The higher the PWM value, the faster the motor spins.
  7. Direction Pins (IN1, IN2, IN3, IN4): These pins determine the direction of the motor. For instance, setting IN1=HIGH and IN2=LOW might make the motor turn in one direction, while reversing those values will change the motor’s direction.

Remember to use appropriate heat sinks if the motor driver gets hot during prolonged usage, and always handle the connections carefully to prevent short circuits.

***************************************************************************************************************

***************************************************************************************************************

Replace the PINs (enA, in1, and in2) with the actual pins you’ve connected the L298N to on your Arduino board. The code demonstrates how to control the direction and speed of the motor. Adjust the analogWrite(enA, 200) value to change the motor speed (values between 0-255).

Make sure to power the L298N separately with an appropriate voltage source, connect the motor to the outputs of the L298N, and connect the control pins (IN1, IN2, ENA) to the Arduino as specified in the code.

This code is a simple demonstration. For a more sophisticated control scheme or for incorporating inputs like potentiometers or sensors, you’d modify the loop() function accordingly.

Arduino Code

* Company Name:LK Tronics
* Author: Research & Development Department
EXPERT GUIDANCE TO BRING YOUR DREAM PROJECT TO LIFE
* Date: 2022/ 01/20
* https://lk-tronics.com/
***********************************************
* All rights reserved. No part of this code may be reproduced, distributed,
* or transmitted in any form or by any means, including photocopying, recording,
* or other electronic or mechanical methods, without the prior written permission
* of LK Tronics, except in the case of brief quotations embodied in
* critical reviews and certain other noncommercial uses permitted by copyright law.

************************************************/
int enA = 9;
int in1 = 8;
int in2 = 7;

void setup() {
  pinMode(enA, OUTPUT);
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);

  // Set initial rotation direction
  digitalWrite(in1, LOW);
  digitalWrite(in2, HIGH);

  // Initialize serial communication
  Serial.begin(9600);
}

void loop() {
  // Motor speed control using PWM on enable pin (enA)
  analogWrite(enA, 200); // Change this value (0-255) for speed control
  
  // Move the motor in one direction for some time
  Serial.println("Motor rotating in one direction");
  delay(2000); // 2 seconds delay

  // Change rotation direction
  digitalWrite(in1, HIGH);
  digitalWrite(in2, LOW);

  // Move the motor in the opposite direction for some time
  Serial.println("Motor rotating in the opposite direction");
  delay(2000); // 2 seconds delay

  // Stop the motor
  digitalWrite(in1, LOW);
  digitalWrite(in2, LOW);
  
  Serial.println("Motor stopped");
  delay(2000); // 2 seconds delay
}

L298N Motor Driver Module (lk-tronics.com)

VISIT OUR FACEBOOK PAGE FOR MORE INFO | MORE PRODUCT IN OUR SHOP

L298N Motor Driver with Arduino
Research & Development Department

]]>
https://lk-tronics.com/l298n-motor-driver-with-arduino/feed/ 0 14562
What is 801S Vibration Sensor with Arduino https://lk-tronics.com/801s-vibration-sensor-with-arduino/ https://lk-tronics.com/801s-vibration-sensor-with-arduino/#respond Wed, 08 Nov 2023 10:02:13 +0000 https://lk-tronics.com/?p=13888 LK Tronics
What is 801S Vibration Sensor with Arduino

The 801S Vibration Sensor is a module use to detect vibration or mechanical movements. It is commonly employe in various projects and applications where the detection of physical vibrations is

What is 801S Vibration Sensor with Arduino
Research & Development Department

]]>
LK Tronics
What is 801S Vibration Sensor with Arduino

The 801S Vibration Sensor is a module use to detect vibration or mechanical movements. It is commonly employe in various projects and applications where the detection of physical vibrations is required. This sensor can used for purposes such as security systems, impact detection, and vibration monitoring. Here are some key features and information about the 801S Vibration Sensor:

  • Operating Principle: The 801S Vibration Sensor is typically based on a piezoelectric crystal. When the sensor experiences a mechanical vibration or impact, it generates a small voltage signal due to the deformation of the crystal. This signal can used to detect the vibration.
  • Output: The sensor typically provides a digital output signal. When a vibration is detect, the sensor output goes from a LOW to a HIGH state. It can interface with microcontrollers or other digital devices.
  • Sensitivity Adjustment: Some versions of the 801S sensor come with a sensitivity adjustment potentiometer. This allows you to adjust the sensor’s sensitivity to different levels of vibration.
  • Operating Voltage: The sensor usually operates at a low voltage, typically around 3.3V to 5V, making it compatible with most microcontrollers.
  • Applications: This sensor is often use in applications where the detection of movement or vibration is essential, such as in burglar alarms, motion-activated lights, or as part of a system to monitor the integrity of structures or machinery.
  • Wiring: The sensor typically has three pins: VCC (power supply), GND (ground), and OUT (output). Connect VCC and GND to your power supply, and the OUT pin to a digital input pin on your microcontroller.

***************************************************************************************************************

/* Company Name:LK Tronics
* Author: Research & Development Department
EXPERT GUIDANCE TO BRING YOUR DREAM PROJECT TO LIFE
* Date: 2020/ 08/ 25
* https://lk-tronics.com/
***********************************************
* All rights reserved. No part of this code may be reproduced, distributed,
* or transmitted in any form or by any means, including photocopying, recording,
* or other electronic or mechanical methods, without the prior written permission
* of LK Tronics, except in the case of brief quotations embodied in
* critical reviews and certain other noncommercial uses permitted by copyright law.

************************************************/
const int vibrationPin = 3;  // Define the pin

void setup() {
  pinMode(vibrationPin, INPUT);  // Set the sensor pin as an input
  Serial.begin(9600);
}

void loop() {
  int vibrationState = digitalRead(vibrationPin);  // Read the state of the sensor
  
  if (vibrationState == HIGH) {
  Serial.println("Vibration detected!");//Print a message when vibration is detected

  }
}

***************************************************************************************************************

What is 801S Vibration Sensor with Arduino
Research & Development Department

]]>
https://lk-tronics.com/801s-vibration-sensor-with-arduino/feed/ 0 13888
What is MLX9014 IR Temperature Sensor with Arduino https://lk-tronics.com/mlx9014-ir-temperature-sensor-with-arduino/ https://lk-tronics.com/mlx9014-ir-temperature-sensor-with-arduino/#respond Wed, 08 Nov 2023 09:50:22 +0000 https://lk-tronics.com/?p=13883 LK Tronics
What is MLX9014 IR Temperature Sensor with Arduino

The MLX9014 is an infrared (IR) temperature sensor manufacture by Melexis. It is a non-contact temperature sensor that can accurately measure the temperature of an object without physical contact. The

What is MLX9014 IR Temperature Sensor with Arduino
Research & Development Department

]]>
LK Tronics
What is MLX9014 IR Temperature Sensor with Arduino

The MLX9014 is an infrared (IR) temperature sensor manufacture by Melexis. It is a non-contact temperature sensor that can accurately measure the temperature of an object without physical contact. The MLX9014 is often use in various applications, including industrial temperature measurement, automotive systems, and consumer electronics. Here are some key features and information about the MLX9014 IR temperature sensor:

What are the Feature

  • Operating Principle: The MLX9014 is based on the principles of infrared thermometry. It detects the thermal radiation emitted by an object and converts it into a temperature reading.
  • Measurement Range: The MLX9014 typically has a wide temperature measurement range, making it suitable for various applications. The specific measurement range may vary depending on the model.
  • Accuracy: Melexis give different versions of the MLX9014 with varying levels of accuracy, you can choose a model that your application’s requirements. The accuracy is typically specified in terms of temperature resolution and measurement error.
  • Analog Output: The MLX9014 usually provides an analog output signal, as a voltage or current, that corresponds to the measured temperature. The output is typically linear and can interfaced with microcontrollers or other analog electronics.
  • Digital Interface: Some versions of the MLX9014 come with a digital interface, as I2C or SPI, which simplifies communication with microcontrollers and provides digital temperature readings.
  • Emissivity Correction: The sensor can calibrated for different types of surfaces with varying emissivity to ensure accurate temperature readings. Emissivity is a measure of how efficiently an object emits thermal radiation.
  • Field of View: The field of view (FOV) or spot size of the sensor can vary between models. It determines the area on the object from which the sensor collects thermal radiation for temperature measurement.
  • Supply Voltage: The MLX9014 typically operates on a low supply voltage, making it suitable for battery-powered and low-power applications.
  • Applications: The MLX9014 is use in a wide range of applications, including industrial temperature monitoring, automotive climate control, medical devices, and consumer electronics like non-contact thermometers.
  • Mounting Options: The sensor can mounted in various ways, through-hole or surface-mount (SMD) options, depending on your application’s requirements.

The datasheet will contain information about the pin configuration, operating conditions, calibration procedures, and other details necessary to correctly interface and use the sensor in your project.

Arduino Code

***************************************************************************************************************

/* Company Name:LK Tronics
* Author: Research & Development Department
EXPERT GUIDANCE TO BRING YOUR DREAM PROJECT TO LIFE
* Date: 2020/ 08/ 16
* https://lk-tronics.com/
***********************************************
* All rights reserved. No part of this code may be reproduced, distributed,
* or transmitted in any form or by any means, including photocopying, recording,
* or other electronic or mechanical methods, without the prior written permission
* of LK Tronics, except in the case of brief quotations embodied in
* critical reviews and certain other noncommercial uses permitted by copyright law.

************************************************/
#include <Wire.h>
#include <MLX9014.h>

MLX9014 mlx;

void setup() {
  Serial.begin(9600);
  Wire.begin();
  mlx.begin();
}

void loop() {
  float objectTemperature = mlx.readObjectTemperatureCelsius();
  float ambientTemperature = mlx.readAmbientTemperatureCelsius();
  
  Serial.print("Object Temperature: ");
  Serial.print(objectTemperature);
  Serial.println(" °C");
  
  Serial.print("Ambient Temperature: ");
  Serial.print(ambientTemperature);
  Serial.println(" °C");
  
  delay(1000);
}

***************************************************************************************************************

What is MLX9014 IR Temperature Sensor with Arduino
Research & Development Department

]]>
https://lk-tronics.com/mlx9014-ir-temperature-sensor-with-arduino/feed/ 0 13883
What is TTP223 Touch Sensor with Arduino https://lk-tronics.com/ttp223-touch-sensor-with-arduino/ https://lk-tronics.com/ttp223-touch-sensor-with-arduino/#respond Wed, 08 Nov 2023 09:38:39 +0000 https://lk-tronics.com/?p=13878 LK Tronics
What is TTP223 Touch Sensor with Arduino

The TTP223 is a popular touch sensor module that can detect human touch or capacitive touch. It is widely use in various electronics projects and applications. Here are some key

What is TTP223 Touch Sensor with Arduino
Research & Development Department

]]>
LK Tronics
What is TTP223 Touch Sensor with Arduino

The TTP223 is a popular touch sensor module that can detect human touch or capacitive touch. It is widely use in various electronics projects and applications. Here are some key features and information about the TTP223 touch sensor:

Key point

  • Operating Principle: The TTP223 touch sensor module uses capacitive touch technology to detect a touch. When a user touches the surface of the sensor, it changes the capacitance of the touchpad, and the module can sense this change.
  • Operating Voltage: TTP223 modules typically operate at a voltage of 2.0V to 5.5V, making them compatible with a wide range of microcontrollers and digital devices.
  • Output Modes: The TTP223 module usually provides two output modes, which can select using a jumper or solder bridge on the module:
  • Toggle Mode: In this mode, a single touch will toggle the output state between HIGH and LOW. Another touch will toggle it back to the previous state.
  • Momentary Mode: In this mode, the output is HIGH as long as there is a touch detect, and it goes LOW as soon as the touch is removed.
  • Sensitivity Adjustment: Some TTP223 modules come with a sensitivity adjustment potentiometer, allowing you to adjust the touch sensitivity according to your requirements.
  • Output Signal: The module typically provides a digital output signal (HIGH or LOW) that can read by a microcontroller or other digital devices.
  • Application: TTP223 touch sensors are use in various applications, such as touch-sensitive lamps, interactive displays, and DIY electronics projects. They are a simple way to add touch functionality to your projects.
  • Wiring: To use a TTP223 module, you need to connect it to your microcontroller or digital device using its VCC, GND, and OUT pins. The specific pinout may vary depending on the module’s manufacturer, so be sure to check the datasheet or documentation provided with your particular module.
  • Interfacing: When interfacing with a microcontroller, you can use the digital output to trigger actions or responses in your project whenever a touch is detect.
  • Libraries and Code: Depending on your microcontroller platform, you may find libraries or code examples that make it easier to interface with the TTP223 touch sensor module. This can save you time in setting up and using the sensor in your projects.

It’s important to refer to the datasheet and documentation provided by the manufacturer of the specific TTP223 module you are using, as pin configurations and features may vary between different models. Additionally, it’s essential to handle the sensor module with care to avoid damage and ensure proper functionality.

Arduino code

***************************************************************************************************************

/* Company Name:LK Tronics
* Author: Research & Development Department
EXPERT GUIDANCE TO BRING YOUR DREAM PROJECT TO LIFE
* Date: 2020/ 08/ 10
* https://lk-tronics.com/
***********************************************
* All rights reserved. No part of this code may be reproduced, distributed,
* or transmitted in any form or by any means, including photocopying, recording,
* or other electronic or mechanical methods, without the prior written permission
* of LK Tronics, except in the case of brief quotations embodied in
* critical reviews and certain other noncommercial uses permitted by copyright law.

************************************************/

const int touchSensorPin = 8; // Define the pin where the TTP223 module is connected

void setup() {
  pinMode(touchSensorPin, INPUT); // Set the sensor pin as an input
  Serial.begin(9600);
}

void loop() {
  int touchState = digitalRead(touchSensorPin); // Read the state of the Sensor

  if (touchState == HIGH) {
    Serial.println("Touch detected!"); // Print a message when touch is detected
    // You can perform any actions or logic here when a touch is detected
  }

  delay(100);
}

***************************************************************************************************************

VISIT OUR FACEBOOK PAGE FOR MORE INFO | MORE PRODUCT IN OUR SHOP

What is TTP223 Touch Sensor with Arduino
Research & Development Department

]]>
https://lk-tronics.com/ttp223-touch-sensor-with-arduino/feed/ 0 13878
Programmable Logic Controllers – 9 https://lk-tronics.com/programmable-logic-controllers-in-%e0%b7%83%e0%b7%92%e0%b6%82%e0%b7%84%e0%b6%bd-part-9_siemens/ https://lk-tronics.com/programmable-logic-controllers-in-%e0%b7%83%e0%b7%92%e0%b6%82%e0%b7%84%e0%b6%bd-part-9_siemens/#respond Thu, 29 Nov 2018 14:30:31 +0000 http://lk-tronics.com/?p=427 LK Tronics
Programmable Logic Controllers – 9

ආයුබෝවන්!!!!PLC ඊලග පාඩම අරගෙන ලොකු කාලයකින් පස්සේ මම අවේ. ඇත්තටම එන්න බැරි උනා ලොකු කාලයකින් මොකද මගේ website එක down උනා හිතන්නෙවත් නැති වෙලාවක එක හදල ඉවර වෙද්දී අසංඊප උන

Programmable Logic Controllers – 9

]]>
LK Tronics
Programmable Logic Controllers – 9

ආයුබෝවන්!!!!PLC ඊලග පාඩම අරගෙන ලොකු කාලයකින් පස්සේ මම අවේ. ඇත්තටම එන්න බැරි උනා ලොකු කාලයකින් මොකද මගේ website එක down උනා හිතන්නෙවත් නැති වෙලාවක එක හදල ඉවර වෙද්දී අසංඊප උන තව තව ඒවා උන e මදිවට exams වැටෙන්නත් ගත්තා, කොහොමෙන් කොහොමහරි මම අවා අලුත් software එකක් හදුන් වල දෙන්නත් එක්කම. ඊට කලින් සිදුවූ අපහසුතාවයට සමාවෙන්න කියලා කියනවා………

SPS VISU link – http://www.datafilehost.com/d/a775881c

SPS VISU නම නම් හුරු නැතුව ඇති , මේ software එක තම මන් programme කරන ladder code එකsimulate කරන්න ගන්න software එක. ඔගොලන්ට මතක ඇති මන් කලින් videos වල සහ tutorials වල පෙන්නුවා code එකක් ලියල ඉවර වෙලා කොහොමද එකේ ඉන්පුට් output වැඩ කරන හැටි බලාගන්නේ කියල (රූපය1).පේනවනේ මෙනන්න මේ වගේ පොඩි හරි වලින් තම bits set වෙච්ච පෙනන්නේ එක ටිකක් අමාරු වැඩක් ලොකු bits ප්‍රමාණයක් තියෙද්දී සහ මෙන්න මේ software එකෙන් පුළුවන් අපිට් graphically button add කරන්න light දන්න bitmaps කියන්නේ අන්න e wdihata තියෙන්නේ කොටින්ම කිව්වොත් මේකෙන් පුලවන් අපිට convayor belt එකක් දෙසිග්න් කරලා piston ඒවත් එක්ක ඒවා එහෙට මෙහෙට යන්න programme එකක් චොදේ කරලා මේ දෙකම එකට එකතු කරන්න . මේ software ගොඩක් මිලෙන් අදිකයි ගොඩක් ඒවා නිකන් දෙන්නෙන් නෑ. සහමර software siemens PLC වල support නෑ ඒවලට තියනව වෙනම software.

කොහොමහරි මේන්න මේ software එක දාගත්තොත් ඔයාට ට්න්නේ ඉස්සෙල්ලම PLC step 7 එකේ code එක programme කරන්න ඊටපස්සේ එක save කරනවනේ තැනක අන්න e තැන access කරන්න පුළුවන් වෙන්න තියාගන්න ඊටපස්සේ කරන්න ට්න්නේ sps VISU සොෆ්ටව්රේ එක open කරලා bimaps තමන්ට අවශ්‍ය ලෙස තෝරාගන්න (රුපය 2) පේනවා ඇති තියනව bitmaps ගොඩක් ස්විට්ච් ඒවලට ගහන් තමන් කැමති ඒවා තෝරාගෙන එක වොර්ක් area එකේ ඩ්‍රොප් කලාම (රුපය 3) එකක් ඕගොල්ලන්ට පෙන්ව එකෙන් දෙන්න පුළුවන් ස්විට්ච් එකක් නම් normally open ද close ද වගේ ඒවා සහ වැදගත්ම වෙන දේ තම address දෙන එක ,ඉතින් ස්විට්ච් එකක් දැම්මනම් එකට දෙන්න ඕනේ i0.0 බුල්බ් එකක් නම් එක output එකක් එකට දෙන්න ඕනේ q0.0 ඊටපස්සේ මන් කිව්වනේ access කරගන්න පුළුවන් වෙන්න file එක තියාගන්න කියල ඊටපස්සේ (රුපය 4) software PLC tab එකට ගිහින් controll software PLC ගිහින් project file එක upload කරන්න ඊටපස්සේ F8 එහම නැත්නම් Run/ස්ටොප් (රුපය5) දුන්නම මේsimulation එක run වෙනවා තව දෙයක් එකේ තියනව examples ඔගොලන්ට ගිහින් ඒවා චෙච්ක් කරන්නත් පුළුවන්. හැබැයි පොඩි වලක් තියෙන්නේ ඒ software එක free download කලාම simulation time එක ලිමිට් වෙනවා විනාඩි 1 . ඉතින් සල්ලි තියන ය ගෙවලා ගන්න අනික් ය මේ විදිහට කරන්න එක එඡාර ලොකු අව්ලක් නෑ පුලුවන්නම් crack එකක් හම්බුනොත් මටත් කියන්න.

ඔන්න එහනම් මන් අද ගේනවා අලුත් software එකක්. ඊලග week එකේ දාන්නම් video එකක් programme එකක් එක්කම. මේ වෙලාවේ මන් මතක් කරනවා මට PLC ගැන උගන්නපු ගුරුවරුන් දෙදෙනා ආදරයෙන් ඒ වගේම ප්‍රසාද් අයියා මෙහම එකක් කරමු කියල idea එක දුන්න එක ගැන සහ අනුරාධ අය්යටත් ස්තුති . බොහොම ස්තුත්යි ඒගොල්ලනට නැවතත් .
කලින් මගේ වෙබ් site එකේ learn with us tab එකේ link එක මාරු උනා
මෙම tutorial පිළිබද අදහස් දක්වන්න තව add වෙන්න් ඕනේ මොනාද යෝජනා චෝදනා ඔක්කොම comment section එකේ දාන්න. එක අපි දෙගොලොන්ගේම දියුණුවට උදව් වේවි.
මේ මගේ FB page එක Like , comments දන්න අමතක කරනන් එපා..
Link – https://www.facebook.com/LK-Tronics-349974762194688/

Programmable Logic Controllers – 9

]]>
https://lk-tronics.com/programmable-logic-controllers-in-%e0%b7%83%e0%b7%92%e0%b6%82%e0%b7%84%e0%b6%bd-part-9_siemens/feed/ 0 427
Programmable Logic Controllers – 8 https://lk-tronics.com/programmable-logic-controllers-in-%e0%b7%83%e0%b7%92%e0%b6%82%e0%b7%84%e0%b6%bd-part-8_siemens/ https://lk-tronics.com/programmable-logic-controllers-in-%e0%b7%83%e0%b7%92%e0%b6%82%e0%b7%84%e0%b6%bd-part-8_siemens/#respond Fri, 02 Nov 2018 09:08:41 +0000 http://lk-tronics.com/?p=334 LK Tronics
Programmable Logic Controllers – 8

ආයුබෝවන්!!!! Timer Logics ඔන්න අදත් PLC ඊලග පාඩම අරගෙන මම අවා අද කතා කරන්න බලාපොරොත්තු වෙන්නේ PLC programme කරද්දී ගොඩක් උවමන වන දේයක් ගැන  තම Timers .ඕගොල්ලොන්ට මතක ඇති මන්

Programmable Logic Controllers – 8

]]>
LK Tronics
Programmable Logic Controllers – 8

ආයුබෝවන්!!!!

Timer Logics

ඔන්න අදත් PLC ඊලග පාඩම අරගෙන මම අවා අද කතා කරන්න
බලාපොරොත්තු වෙන්නේ PLC programme කරද්දී ගොඩක් උවමන වන දේයක් ගැන  තම
Timers .ඕගොල්ලොන්ට මතක ඇති මන් කලින් කියල දුන්න memory management කියන්නේ
මොනාද් වගේ එකක් අන්න ඒවත් පොඩ්ඩක් මේවා කරද්දී ඕන වෙනවා.

හරි අපි බලමු PLC එකකට timers යොදගෙන කොහොමද programme කරන්නේ කියල.
Siemens step7 software එකේ අපිට timers 5 හදුන්වල දීල තියනව. මෙම timers වලට
අවේනික එක එක ලක්ෂණ තියනව (ඒ ගැන video එකෙන් කතා කරන්නම්)
    • S_PULSE  – Pulse s5 timer
    • S_PEXT -Extended pulse s5 timer
    • S_ODT -on delay s5 timers
  • S_ODTS -retentive on  delay s5 timers

S_OFFDT -off delay s5 timers

එක එක PLC CPU අනුව මේ timers අපිට යොදාගන්න පුළුවන් ගණන වෙනස් වෙනවා
timer එකක් වැඩ කරන්නේ PLC එකක තියන memory bits උපයෝගී කරගෙන.
timer එකකට PLC එකකින් memory bit එකක් වැය කරනවා ඒ මගින් timer එකේ
ක්‍රියාකාරිත්වය සිදුවනවා මෙම ක්‍රියාකාරිත්වය සිදු වන්නේ BCD මගින් (Binary Code
decimal)
Simens software එකෙහි timers තියෙන්නේ blocks විදිහට ඒ block එකක් programme
එකේ නෙට්වර්ක් එකකට දාගත්තම එක setup කරන්න ඕනේ

1. timer එකට නමක් දෙන්න ඕනේ
timer එකට නමක් කිව්වම එකට දෙන්න ඕනේ අපි T1 , T2 , T3………..(video එකේදී හරියටම දන තැන කියන්නම්)

2. timer එක වැඩ කිරීමට අවශ්‍ය කාලයක් ලබා දෙන්න ඕනේ
මේක ඉතාමත් වැදගත් දෙයක් මෙක්දී අපිට අවශ්‍ය කාලයක් ලබා දෙන්න
පුළුවන් නිකන් හිතන්න ඔයාට ඕනේ මොකක් හරි switch එකක් on කලාම
තත්පර 30 ගිහින් light එකක් on වෙන්න නම් ඔයා programme කරන්න
ගත්ත timer එකට value එක pass කරන්න ඕනේ 30 seconds කියල එකට
විශේෂ ක්‍රමයක් තියනවා සාමාන්යෙන් timer එකක් ගත්තම මේ software
එකේ අපිට Hours(පැය) ,Minutes(මිනිත්තු)සහ seconds(තත්පර) වලින් කාලය
දෙන්න පුළුවන් ඕනේ නම් ඔය තුනෙන්ම දෙන්න පුළුවන්.
මෙම timers block එකක් ගත්තම එකේ තියනව TV කියල spec එකක්
අන්න එකට තම timer value එක දෙන්න ඕනේ. මේක අපි දෙනවා
S5T#2s - තත්පර දෙකකින්
S5t#10m - මිනිත්තු දහයකින්
S5T#1H - පැයකින්
මෙම තුනම එකතු කරලා
S5T#1H_10M_2s - පැය එකයි මිනිත්තු දහයය් තත්පර දෙකක එකක්.
ඔන්න ඔක් තම timer එකක් කියන්නේ මට පුළුවන් විදිහට සරලව මන්
කියල දුන්න දැන් නිකන් හිතෙනවා ඇති පොඩි Article එකක් කියලා
Article එක පොඩි  උනාට වැඩ ගොඩක් කරන්න පුළුවන්. ඊළගට මම
දානවා මේකේ Videos පාර්ට් 1 සහ 2 කියල timers පහම කියල දෙන
එකක් timer වලින් Traffic light system එකම වගේ ගහන්න කියල දෙන
එකක් එහනම් අපි ඊලග video එකින් හමුවෙමු. LK-Tronics youtube channel
එක subscribe කරලා තියාගන්න.

Video - https://www.youtube.com/watch?v=STDqXtv6K2g

මේ වෙලාවේ මන් මතක් කරනවා මට PLC ගැන උගන්නපු ගුරුවරුන් දෙදෙනා
ආදරයෙන් ඒ වගේම ප්‍රසාද් අයියා මෙහම එකක් කරමු කියල idea එක දුන්න එක
ගැන සහ අනුරාධ අය්යටත් ස්තුති . බොහොම ස්තුත්යි ඒගොල්ලනට නැවතත් .
මෙම tutorial පිළිබද අදහස් දක්වන්න තව add වෙන්න් ඕනේ මොනාද යෝජනා චෝදනා
ඔක්කොම comment section එකේ දාන්න. එක අපි දෙගොලොන්ගේම දියුණුවට උදව් වේවි.
මේ මගේ FB page එක Like , comments දන්න අමතක කරනන් එපා..
Link – https://www.facebook.com/LK-Tronics-349974762194688/
මේ articles ඔක්කොම මන් මගේ web site එකෙත් දානවා කැමති යට එකෙන් ගිහිල්ල
බලන්නත් පුළුවන්.
https://lk-tronics.com/category/learn-with-us/?v=2c16b194a0d9

Programmable Logic Controllers – 8

]]>
https://lk-tronics.com/programmable-logic-controllers-in-%e0%b7%83%e0%b7%92%e0%b6%82%e0%b7%84%e0%b6%bd-part-8_siemens/feed/ 0 334
Programmable Logic Controllers 5 https://lk-tronics.com/programmable-logic-controllers-5/ https://lk-tronics.com/programmable-logic-controllers-5/#respond Fri, 02 Nov 2018 08:47:12 +0000 http://lk-tronics.com/?p=324 LK Tronics
Programmable Logic Controllers 5

ආයුබෝවන්! Programmable Logic Controllers 5| ඔන්න අදත් පොරොන්දු උන විදිහටම PLC Tutorial එක අරගෙන මම අවා. අද තම හරියටම PLC පටන් ගන්නේ මෙච්චර දවසක් PLC ඉගෙන ගන්න අවශ්‍ය මුලික Pneumatics

Programmable Logic Controllers 5

]]>
LK Tronics
Programmable Logic Controllers 5

ආයුබෝවන්!

Programmable Logic Controllers 5| ඔන්න අදත් පොරොන්දු උන විදිහටම PLC Tutorial එක අරගෙන මම අවා. අද තම හරියටම PLC පටන් ගන්නේ මෙච්චර දවසක් PLC ඉගෙන ගන්න අවශ්‍ය මුලික Pneumatics දැනුම ගැන අපි කතා කළා.මම හිතනවා pnematics ටික දුන්න software එකෙන් practice කරගන්න ඇති කියල කොහොම හරි අද කතා කරගන්න යන්නේ PLC ගැන සහ PLC memory management ගැන.

PLC programme කරද්දී අත්‍යවශ්‍යම දෙයක් තම memory handling කියන්නේ. PLC programme කරන විට අපි මේ memory කියන ඒවා යොදාගන්නවා මේවා යොදාගෙන තම අපි instruction දෙන්නේ PLC එකට. අපි මේ Plc programme කරද්දී යොදාගන්න බලාපොරොත්තු වෙන්නේ SIEMENS S7 නිසා මන් කියන්නම් එකේ කොහොමද memory handle වෙන්නේ කියල සමහර එවල පොඩි පොඩි වෙනස් කම් තියනව හබි එකක් හොදට දනන් හිටියම අපිට අනික් ඒවත් එක්කත් වැඩ කරන්න පුලුවන්.

බිට් එකක් (bit) එකක් කියන්නේ 0 සහ 1 පමණක් වෙනස් වෙන කුඩා ඒකකයක් මේක තම කුඩාම එකකකය.bit එකක් එක්කෝ 1 එහම නැත්තනම් 0 ඔය අගයන් දෙකම තියෙන්නත් බෑ 1 ට වැඩ වැඩි වෙන්නත් බෑ. බිට් 8 එකතු වෙලා තම byte එකක් හැදෙන්නේ.

bit bit bit bit bit bit bit
bit

මෙන්න මේ bit 8 එකතු වෙලා තම byte එකක් හැදෙන්නේ byte එකකින් පෙනන්න පුලුවන්
උපරිම අගය තම 128 කියන decimal value එක . දැන් බලනව ඇති ඇයි මේ මේවා
උගනන්නේ කියල. මෙන්න මේ නිසා තම කියන්නේ PLC කරද්දී ඒවලට තියනව bit
හදුන්වන විදි.

  • INPUTS  – I බිට්ස්
  • OUTPUT – Q බිට්ස්
  • MEMORY –  M බිට්ස්

ඒ කියන්නේ PLC programme කරද්දී දෙන්න ඕනේ addresses එමන්න මේ address
දෙන්න ඕනේ INPUT, OUTPUT සහ MEMORY කුයන ඒවලට අදාලව.

INPUT

I0.0 I0.1 I0.2 I0.3 I0.4 I0.5 I0.6 I0.7

OUTPUT  

Q0.0 Q0.1 Q0.2 Q0.3 Q0.4 Q0.5 Q0.6 Q0.7

MEMORY

M0.0 M0.0 M0.0 M0.0 M0.0 M0.0 M0.0 M0.0

මෙන්න මෙහම තාම මේ byte address නම් වෙන්නේ මන් ඊළගට පෙනන්නම් 128
නේ දැන් මාර්ක් කරගන්න පුළුවන් ඔයිට වැඩ වැඩි අගයක් පෙන්න්වන්ම් ම්කෝ
වෙන්නේ කියල අර වගේම තම පොඩි ඒවා ටිකක් ADD වෙන්ව

1

 

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7
2 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7
3 2.0 2.1 2.2 2.3 2.4 2.5 2.6 2.7
4 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7
5 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7
6 5.0 5.1 5.2 5.3 5.4 5.5 5.6 5.7
7 6.0 6.1 6.2 6.3 6.4 6.5 6.6
6.7

*මේකේ 1 පේලියෙන් කියන්නේ පලවෙනි byte එකක් address වෙන විදිහ
* මේකේ 2 වන පේලියෙන් කියන්නේ දෙවැනි byte එක address වෙන විදිහ
* 1 සහ 2 පේලි දෙක එකට එකතු උනාම එකට කියනව විශේහ නමක් ඒ තමා input /output/ memory word එකක් කියල.
*1 සිට 4 වෙනි පේලිය දක්වා එකතු උනාම කියනවා double word එකක් කියා
Dword කියල තම සාමාන්යෙන් අර්ථකතනය කරන්නේ.

Image result for bit & byte

මේකේ තව ඉගෙන ගන්න දේවල් වගයක් තියනවා ඒටික මන් software
එකත් එක්කම කියල දෙන්නම් එතකොට තම තේරෙන්නේ.
කොහොමහරි මෙහම PLC programme එකක් කරද්දී හොදම දේ තමා input
ශීට් එකක් output ශීට් එකක් සහ memory ශීට් එකක් අරගෙන අපි use
කරන bits කපල අයින් කරලා දන එක
එහම නැත්නම් අපි use කරපු bit එකක් ආරගෙන කලොත් සැහෙන්න
ප්‍රශ්නෙකට මුහුණ දෙන්න වෙන්ව අන්තිම ට.

දැන් ඔක්කොම හරි ඊලග සතියෙන් අපිට software එකට බැහැලාම මේක
කරන්න පුළුවන් මන් අදට මෙතනින් නවතිනවා ඊලග සතියේ හමුවෙමු.
මේ වෙලාවේ මන් මතක් කරනවා මට PLC ගැන උගන්නපු ගුරුවරුන් දෙදෙනා
ආදරයෙන් ඒ වගේම ප්‍රසාද් අයියා මෙහම එකක් කරමු කියල idea එක දුන්න එක
ගැන සහ අනුරාධ අය්යටත් ස්තුති . බොහොම පින් ඒගොල්ලනට .
මෙම tutorial පිළිබද අදහස් දක්වන්න තව add වෙන්න් ඕනේ මොනාද යෝජනා චෝදනා
ඔක්කොම comment section එකේ දාන්න. එක අපි දෙගොලොන්ගේම දියුණුවට උදව් වේවි.
මේ මගේ FB page එක Like , comments දන්න අමතක කරනන් එපා..
Link – https://www.facebook.com/LK-Tronics-349974762194688/

..ස්තුත්යි…

Programmable Logic Controllers 5

]]>
https://lk-tronics.com/programmable-logic-controllers-5/feed/ 0 324