meta data for this page
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ixc2025:components [2025/01/19 06:20] – diva | ixc2025:components [2025/01/19 09:41] (current) – added one line for yellow LED diva | ||
---|---|---|---|
Line 1: | Line 1: | ||
==== Overview of Hardware Components in the Kit ==== | ==== Overview of Hardware Components in the Kit ==== | ||
- | This page is a brief introduction of each component | + | // |
+ | It's time to get to know the kit!\\ | ||
+ | |||
+ | This page gives you a brief introduction of what each component | ||
The following is a diagram of a general control system flow. | The following is a diagram of a general control system flow. | ||
Line 8: | Line 11: | ||
- The process begins with **Input Devices** or **Sensors**, | - The process begins with **Input Devices** or **Sensors**, | ||
- This data is sent to a **Processing Unit** (such as a microcontroller or computer), where decisions are made based on the input. | - This data is sent to a **Processing Unit** (such as a microcontroller or computer), where decisions are made based on the input. | ||
- | - Finally, the **Actuators** execute the necessary actions, such as turning on lights, adjusting windows, or activating alarms. | + | - Finally, the **Output Devices** or **Actuators** execute the necessary actions, such as turning on lights, adjusting windows, or activating alarms. |
List of components in the kit: | List of components in the kit: | ||
Line 20: | Line 23: | ||
- Processing Unit: | - Processing Unit: | ||
* ESP32 PLUS Development Board | * ESP32 PLUS Development Board | ||
- | - Actuators: | + | - Output Devices: |
* DC motor (connected to fan) | * DC motor (connected to fan) | ||
* Servo motor | * Servo motor | ||
Line 26: | Line 29: | ||
* Yellow LED | * Yellow LED | ||
* RGB LED | * RGB LED | ||
+ | * LCD Display | ||
== Input Devices == | == Input Devices == | ||
- | ^ Name ^ Image ^ Description | + | ^ Name |
- | | Gas Sensor | + | | Gas Sensor |
- | | Steam/Water Drop Sensor| {{ : | + | | Steam/Water Drop Sensor| {{ : |
| Humidity and Temperature Sensor | {{ : | | Humidity and Temperature Sensor | {{ : | ||
- | | RFID | {{ : | + | | RFID | {{ : |
| PIR Motion Sensor | | PIR Motion Sensor | ||
- | | Button | + | | Button |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | **1. ESP32 PLUS Development board** | + | |
- | + | ||
- | The ESP32 PLUS is a versatile Wi-Fi + Bluetooth development board, designed for building IoT and smart home applications. It is based on the ESP32-WROVER-32 module and is compatible with Arduino. It has a hall sensor, high-speed SDIO/SPI, UART, I2S as well as I2C. Furthermore, | + | |
- | + | ||
- | + | ||
- | **2. Modules** | + | |
- | + | ||
- | **// | + | |
- | + | ||
- | An RFID system allows | + | |
- | + | ||
- | The RFID reader generates a magnetic field using radio frequency signals. This magnetic field extends around the reader. The RFID tag, when placed within this field, doesn’t need its own battery. Instead, it uses the energy from the magnetic field to power itself due to Lenz’s Law, where a changing magnetic field induces an electrical current in the tag’s antenna. | + | |
- | + | ||
- | Once powered, the tag’s chip becomes active and starts sending its stored data back to the RFID reader. The reader picks up these signals and processes them. | + | |
- | + | ||
- | **//Passive Buzzer// | + | |
- | + | ||
- | A passive buzzer is an electronic component used to produce sounds and is often connected to an audio power amplifier. A passive buzzer doesn’t have a built-in oscillator, meaning it can’t generate sound independently. It relies on an external signal, such as a square wave (a type of electrical signal that switches between high and low voltage). To produce sound, you send square wave signals of different frequencies to the positive pole of the buzzer. | + | |
- | * Take note that the negative pole of the buzzer is connected to the ground (GND). | + | |
- | + | ||
- | **// | + | |
- | + | ||
- | A button module is a simple input device that detects when a button is pressed or released. It is a digital sensor, meaning it only outputs two states: | + | |
- | + | ||
- | High level (1): When the button is not pressed. | + | |
- | + | ||
- | Low level (0): When the button is pressed. | + | |
- | + | ||
- | When the button is not pressed, the module outputs a high signal (1), meaning the circuit is open. Pressing the button closes the circuit, connecting it to ground (GND). This results in a low signal (0), indicating the button is being pressed. | + | |
- | + | ||
- | **//LED Light//** | + | |
- | + | ||
- | An LED is a small electronic component that lights up when you pass electricity through it. It can be controlled by sending electrical signals from a microcontroller | + | |
- | + | ||
- | GND (Ground): Connect this to the ground pin of your controller. | + | |
- | VCC (Voltage): Connect this to the power pin of your controller. | + | |
- | S (Signal): This pin controls whether the LED is ON or OFF based on the signal it receives. | + | |
- | + | ||
- | To turn on the LED, you supply power to it by setting the signal pin (S) to a high level. If the signal pin is set to a low level, the LED turns off. The module can adjust the brightness or blink frequency of the LED by changing how fast we turn it on and off using a process called Pulse Width Modulation (PWM). | + | |
- | + | ||
- | RGB LED An RGB LED is a more advanced type of LED that can emit red, green, and blue light. By mixing these colors at different brightness levels, you can create almost any color. The module uses serial communication, | + | |
- | + | ||
- | Key Parameters | + | |
- | Working Voltage DC 3~5V | + | |
- | Working current <20mA | + | |
- | Power 0.1W | + | |
- | + | ||
- | Adjusting blinking speed We can make the LED blink (turn on and off repeatedly) by sending alternating high and low signals to the S pin. The speed of the blinking depends on the delay time between these signals: | + | |
- | Short delay: Faster blinking. | + | |
- | Long delay: Slower blinking. | + | |
- | + | ||
- | **//LCD Display// | + | |
- | + | ||
- | The 1602 LCD display is a simple and widely used electronic component for displaying text. It can show 16 characters per line and has 2 lines, hence the name “1602”. | + | |
- | + | ||
- | The display communicates with the ESP32 microcontroller using the IIC protocol. IIC is a simple communication protocol for short-distance data exchange. To break down how it works, two wires are used to send messages to the screen, SCL and SDA. SCL synchronizes the data transfer and SDA carries the actual data. | + | |
- | + | ||
- | IIC operates in 2 modes, master mode and Slave mode. The ESP32 acts as the Master, sending commands and data to the LCD. The 1602 LCD acts as the Slave, following the Master’s instructions. Each bit of data is synchronized with a “high-to-low” pulse on the clock line (SCL) to ensure that both the Master and Slave stay in sync. | + | |
- | + | ||
- | To display characters on the 1602 LCD: Set up the IIC connection between the ESP32 and the LCD. Use a library (pre-written code) to simplify the process of sending commands to the LCD. | + | |
- | + | ||
- | Required Files: | + | |
- | i2c_lcd.py: Contains the implementation for controlling the 1602 LCD via I2C. | + | |
- | lcd_api.py: Provides an interface to send high-level commands to the LCD. | + | |
- | + | ||
- | **3. Sensor** | + | |
- | + | ||
- | **// | + | |
- | + | ||
- | A temperature & humidity sensor is a device that measures two key environmental parameters: Temperature: | + | |
- | + | ||
- | Measuring Range | + | |
- | Temperature -20℃ ~ +60℃, with ±2℃ accuracy | + | |
- | Humidity 5 ~ 95%RH, with ±5%RH accuracy | + | |
- | + | ||
- | **//Smoke sensor// | + | |
- | + | ||
- | The MQ2 smoke sensor is a device used to detect gas leaks or smoke in homes, factories, and other environments. This makes it suitable for safety systems, such as gas leak detection and fire alarms. | + | |
- | + | ||
- | The MQ2 sensor provides two types of outputs: | + | |
- | Digital output (D): Indicates whether the gas concentration has crossed a set threshold. | + | |
- | Analog output (A): Provides a proportional voltage corresponding to the gas concentration, | + | |
- | + | ||
- | Inside the sensor, a chemical layer reacts with specific gases. This reaction changes the resistance in the sensor, which the module converts into an electrical signal. The digital pin (D) is typically used as a binary sensor—if gas is detected, the pin goes high (1); otherwise, it stays low (0). The analog pin (A) is used when you want to measure the exact gas concentration. | + | |
- | + | ||
- | **//Motion Sensor// | + | |
- | + | ||
- | The PIR (Passive Infrared) motion sensor detects movement by sensing infrared radiation (heat) emitted by objects, such as humans or animals. It is commonly used in daily life for automation, such as stairway motion-activated | + | |
- | + | ||
- | The sensor is “passive, | + | |
- | The PIR motion sensor is a digital sensor with two states: 0 (Low): No motion detected. 1 (High): Motion detected. | + | |
- | + | ||
- | **//Water drop sensor// | + | |
- | + | ||
- | The raindrop sensor module detects water through its analog input. It is commonly used in IoT applications to sense the presence | + | |
- | + | ||
- | The sensor has a conductive surface. When water droplets touch this surface, they close circuits and change the resistance. The more water on the surface, the lower the resistance and the greater the output value. | + | |
- | + | ||
- | The sensor returns an analog value proportional to the water detected. The range of the output is 0 to 4096 (for systems like ESP32 with a 12-bit ADC). 0: No water detected. 4096: Maximum water coverage. | + | |
- | + | ||
- | + | ||
- | **3. Motors** | + | |
- | + | ||
- | **//DC Motor//** | + | |
- | + | ||
- | The 130 DC Motor is a small motor used to power devices like fans. In this case, it is paired with safe fan blades, making it suitable for DIY projects and IoT applications. DC Motor converts electrical energy into mechanical energy to spin the fan. PWM Speed Control use Pulse Width Modulation (PWM) to adjust the fan’s speed. The motor can rotate the fan clockwise or anticlockwise based on the inputs. | + | |
- | + | ||
- | Two pins are required: INA (Input A): Controls one side of the motor. INB (Input B): Controls the other side of the motor. These pins are controlled using PWM signals (values range from 0 to 255). By comparing the PWM outputs on INA and INB, you can control the motor' | + | |
- | INA - INB ⇐ -45 Rotate clockwise | + | |
- | INA - INB >= 45 Rotate anticlockwise | + | |
- | INA ==0, INB == 0 Stop | + | |
- | **//9G 90° Servo// | ||
- | A Servo Motor is a precision motor designed | + | == Processing Unit == |
+ | ^ Name ^ Image ^ Description | ||
+ | | ESP32 PLUS Development Board | {{ : | ||
- | The integrated circuit | + | == Output Devices == |
+ | ^ Name ^ Image ^ Description | ||
+ | | DC Motor (Fan) | {{ : | ||
+ | | Servo Motor | {{ : | ||
+ | | Buzzer | ||
+ | | Yellow LED | {{ : | ||
+ | | RGB LED | {{ : | ||
+ | | LCD Display | ||
- | The servo motor is controlled via PWM signals, where the pulse width determines | + | You may test the components with the tutorial and test codes provided in the documentation by keyestudio: [[https:// |
+ | Additional concepts that might be useful (you may explore these on your own):\\ | ||
+ | * PWM (Pulse Width Modulation): | ||
+ | * Useful for: | ||
+ | * RGB LED: blend color by varying the brightness of red, green, and blue. | ||
+ | * Servo motor: use PWM to control precise angular movements. | ||
+ | * DC motor (fan): PWM can adjust fan speed. | ||
+ | * Communication technologies and protocols: | ||
+ | * Wi-Fi and Bluetooth Communication: | ||
+ | * Useful for sending sensor data to a cloud platform or app and for remote control of devices. | ||
+ | * I2C Communication: | ||
+ | * Useful for: | ||
+ | * LCD Display: uses I2C for displaying text or data. | ||
+ | * RFID: uses I2C for transferring tag information. | ||
+ | * UART (Serial Communication): | ||
+ | * Useful for ESP32 Dev Board which communicates with the computer or external devices using UART. |