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:brief [2025/01/19 05:02] – [2.2 Overview of Hardware Components in the Kit] leanne_oon | ixc2025:brief [2025/01/19 06:07] (current) – [1.1 Introduction to Sustainability and Smart Homes/Cities] jeanettetan | ||
---|---|---|---|
Line 7: | Line 7: | ||
Sustainability is about using resources responsibly to meet our current needs while protecting the environment and ensuring future generations can thrive. It focuses on reducing waste, conserving energy, and promoting eco-friendly practices to create a balance between human activities and the planet’s health. | Sustainability is about using resources responsibly to meet our current needs while protecting the environment and ensuring future generations can thrive. It focuses on reducing waste, conserving energy, and promoting eco-friendly practices to create a balance between human activities and the planet’s health. | ||
+ | |||
+ | {{ : | ||
Smart homes are residential spaces equipped with technology that automates and optimizes everyday functions. Using devices like sensors, smart thermostats, | Smart homes are residential spaces equipped with technology that automates and optimizes everyday functions. Using devices like sensors, smart thermostats, | ||
+ | |||
+ | |||
Smart cities, on the other hand, scale this concept to the urban level, integrating technology into public infrastructure and services. Through interconnected systems such as traffic management, smart grids, and pollution monitoring, smart cities create more efficient and sustainable environments for entire communities. | Smart cities, on the other hand, scale this concept to the urban level, integrating technology into public infrastructure and services. Through interconnected systems such as traffic management, smart grids, and pollution monitoring, smart cities create more efficient and sustainable environments for entire communities. | ||
Line 19: | Line 23: | ||
By integrating technology into homes and cities, these innovations provide practical solutions to environmental challenges, enabling individuals and communities to live more sustainably. | By integrating technology into homes and cities, these innovations provide practical solutions to environmental challenges, enabling individuals and communities to live more sustainably. | ||
+ | |||
+ | |||
==== 1.2 The Impacts of Smart Cities and Smart Housing ==== | ==== 1.2 The Impacts of Smart Cities and Smart Housing ==== | ||
Line 54: | Line 60: | ||
- | ==== 1.3 The Role of IoT in a Smart City ==== | + | ==== 1.3 The Role of IoT in a Smart Homes and Cities |
+ | **1. Smart Homes** | ||
+ | **a. Home Automation and Control**: IoT integrates with devices such as smart lights, thermostats, | ||
+ | **b. Smart Security Systems**: IoT-enabled cameras and sensors monitor the home in real-time, sending alerts to homeowners in case of unusual activity. Smart locks allow remote locking/ | ||
- | ===== 2. Introduction to IoT ===== | + | **c. Energy Management |
- | ==== 2.1 What are IoTs? ==== | + | |
- | IoT stands for Internet of Things which are basically day-to-day appliances that are now connected to the internet | + | |
- | IoT devices can also have sensors which are great for automation. For example, air-conditioning systems could have sensors that monitor a room's temperature and be automated to keep a room cool. If the room is too hot, the system would work to release cool air. If it's cold enough, it can stop working for a while. Things are simply made convenient. | + | |
- | ==== 2.2 Basics of IoT Architecture ==== | + | |
- | IoT architecture typically consists of four main layers that work together to enable | + | |
- | ==== 2.3 Overview of Hardware Components in the Kit ==== | + | |
- | 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, equipped with freeRTOS operating system, which is quite suitable for the Internet of things and smart home. | + | |
- | Modules | + | **2. Smart Cities** |
- | RFID | + | |
- | An RFID system allows devices to exchange data wirelessly using radio waves. It consists of two parts, RFID Reader that sends out a magnetic field and reads data from nearby RFID tags; RFID Tag with integrated circuit chips to store data and an antenna to communicate with the reader. | + | |
- | The RFID reader generates | + | **a. Smart Transportation Systems**: IoT-enabled sensors on roads, vehicles, and public transport systems monitor traffic flow, accidents, and road conditions.Real-time traffic management systems optimize traffic lights and provide navigation updates |
- | Once powered, the tag’s chip becomes active | + | **b. Public Safety and Emergency Services**: Smart surveillance systems equipped with IoT cameras and AI detect criminal activities, monitor crowds, and enhance disaster management.IoT-enabled emergency services provide faster response by tracking incidents like fires, floods, or medical emergencies in real-time. |
+ | **c. Environmental Monitoring**: | ||
- | 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). | ||
- | Button | ||
- | 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 like an ESP32. The LED has three main connections: | ||
- | 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 | + | ===== 2. Introduction to IoT ===== |
+ | ==== 2.1 What are IoTs? ==== | ||
+ | IoT stands for Internet of Things which are basically day-to-day appliances that are now connected to the internet and thus made smart. Such devices can include things like a smart TV, smart refrigerator, | ||
+ | IoT devices can also have sensors which are great for automation. For example, air-conditioning systems could have sensors that monitor a room's temperature and be automated | ||
- | 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 | + | ==== 2.2 Basics |
- | Working Voltage | + | IoT architecture typically consists |
- | 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 " | + | |
- | + | ||
- | 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 " | + | |
- | + | ||
- | Displaying characters | + | |
- | 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 | + | |
- | + | ||
- | Required Files: | + | |
- | i2c_lcd.py: Contains | + | |
- | lcd_api.py: Provides an interface to send high-level commands to the LCD. | + | |
- | + | ||
- | Sensors | + | |
- | Temperature & humidity sensor | + | |
- | A temperature & humidity sensor | + | |
- | Temperature: | + | |
- | Humidity: The amount of water vapor in the air (measured as a percentage, relative humidity or RH). | + | |
- | It communicates using serial data and a single-bus protocol, which means it transmits | + | |
- | + | ||
- | 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 | + | |
- | Analog output (A): Provides a proportional voltage corresponding to the gas concentration, | + | |
- | + | ||
- | Inside the sensor, a chemical | + | |
- | + | ||
- | Motion Sensor | + | |
- | The PIR (Passive Infrared) motion sensor detects movement by sensing infrared radiation (heat) emitted by objects, such as humans | + | |
- | + | ||
- | The sensor is " | + | |
- | When a warm object (like a person) moves within its range, the sensor detects the change in infrared levels. | + | |
- | + | ||
- | 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 or amount of water on its surface. | + | |
- | + | ||
- | The sensor has a conductive surface. When water droplets touch this surface, they close circuits | + | |
- | + | ||
- | 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. | + | |
- | + | ||
- | 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 for accurate position control. The servo receives a signal | + | |
- | + | ||
- | The integrated circuit (IC) on the circuit board determines the direction of rotation based on the voltage difference. The motor drives the position through a gear system and moves the swing arm. The position detector continuously monitors the angle and sends feedback to the system. The motor stops when the desired position is reached (voltage difference = 0). | + | |
- | + | ||
- | The servo motor is controlled via PWM signals, where the pulse width determines the angular position. Generally, the angle range of servo rotation is 0° –180 °. The pulse period of the control servo is 20ms, the pulse width is 0.5ms ~ 2.5ms, and the corresponding position is -90°~ +90°. | + | |
- | ==== 2.4 Software Essentials ==== | + | |
- | ==== 2.5 Guide to Setting Up the Kit ==== | + | |
- | + | ||
- | ===== 3. Example Use Cases ===== | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | ===== 4. Measuring Energy Consumption ===== | + | |