Project Title: Measure the Power Consumption of an Output Device
Group Members: [List names of 3–4 students]
Date: [e.g., March 26, 2025]
Course/Instructor: [If applicable]
Objective: Brief statement of the goal (e.g., "Measure and analyze the power consumption of an output device under different operating conditions").
Chosen Output Device: Specify the device (e.g., LED, motor, buzzer) and why it was selected.
Components List:
Schematic Diagram: Simple drawing or software-generated schematic showing how the output device is connected.
Description: Explain the setup and how power will be supplied and measured.
Methodology:
Data Collection: Record voltage (V), current (I), and calculated power (W) under each condition.
Data Presentation:
Findings:
Discussion: Interpret the results and their implications (e.g., efficiency, practical applications).
Report/Presentation Content:
Demonstration Plan: How the setup and measurements will be shown (if required).
Summary: Recap key findings about the device’s power consumption.
Challenges Faced: Highlight difficulties and solutions (e.g., "Stabilized readings by adding a capacitor").
Project Title: RFID-RC522 with LCD on XIAO RP2040 (Fixed)
Objective: The PCB integrates a Seeed XIAO RP2040 module with an RFID-RC522 sensor and a 16x2 LCD display (I2C). The design uses the XIAO RP2040’s onboard power regulation and headers for connections.
Components List:
Schematic Diagram: Hand-drawn or software-generated by KiCad.
Description: Explain the board design and how it supports the output device.
The board design integrates the Seeed XIAO RP2040 microcontroller module with a 16x2 LCD display (connected via I2C) and an RFID-RC522 reader. The layout ensures that each component is easily accessible through clearly labeled header pins, with dedicated traces for power (3.3V or 5V as required), ground, and data lines.
The XIAO RP2040 module includes onboard voltage regulation, which powers both the microcontroller and peripheral devices. The LCD display, as the primary output device, is supported via the I2C bus using the SDA and SCL lines, minimizing the number of pins needed and reducing wiring complexity. Pull-up resistors on the I2C lines ensure stable communication.
Capacitors are placed near the power supply lines to smooth out voltage fluctuations, ensuring stable operation for both the microcontroller and the display. Mounting holes and headers allow the LCD to be secured and connected without strain on the pins. Overall, the board design focuses on compactness, modularity, and reliable communication between components, especially to support real-time display of scanned RFID tag data.
Device Choice: 16 x 2 LDC (I2C) .
Connection: How the output device is wired to the SEED XIAO RP2040.
Operation Flow
Code Snippet:
#include <SPI.h> #include <MFRC522.h> #include <Wire.h;> #include <LiquidCrystal_I2C.h> #define RST_PIN D0 // Reset pin #define SS_PIN D1 // Slave select pin MFRC522 mfrc522(SS_PIN, RST_PIN); // Create MFRC522 instance LiquidCrystal_I2C lcd(0x27, 16, 2); // LCD address (0x27 or 0x3F), columns, rows void setup() { Serial.begin(9600); SPI.begin(); // Init SPI bus mfrc522.PCD_Init(); // Init MFRC522 // Initialize LCD lcd.init(); lcd.backlight(); lcd.setCursor(0, 0); lcd.print("RFID Reader"); lcd.setCursor(0, 1); lcd.print("Scan a card..."); Serial.println("RFID Reader Ready"); Serial.println("Scan a card..."); } void loop() { // Look for new cards if (!mfrc522.PICC_IsNewCardPresent()) { return; } // Select one of the cards if (!mfrc522.PICC_ReadCardSerial()) { return; } // Show UID on serial monitor Serial.print("UID tag: "); String content = ""; for (byte i = 0; i < mfrc522.uid.size; i++) { Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "); Serial.print(mfrc522.uid.uidByte[i], HEX); content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ")); content.concat(String(mfrc522.uid.uidByte[i], HEX)); } Serial.println(); Serial.print("Message: "); content.toUpperCase(); // Display UID on LCD lcd.clear(); lcd.setCursor(0, 0); lcd.print("UID:"); lcd.setCursor(0, 1); for (byte i = 0; i < mfrc522.uid.size; i++) { lcd.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "); lcd.print(mfrc522.uid.uidByte[i], HEX); } delay(2000); // Wait 2 seconds before next scan lcd.clear(); lcd.setCursor(0, 0); lcd.print("RFID Reader"); lcd.setCursor(0, 1); lcd.print("Scan a card..."); } }
Program Details:
loop()function continuously polls for RFID cards using conditional checks, exiting early if no card is present.
forloops process the UID bytes for both Serial and LCD output.
How the output is controlled
Testing:
Results: Confirm the device performs as intended.
Submission Content:
Optional: Plan for video/demo (e.g., "A 30-second clip showing the servo moving").
Summary: Recap the design and functionality achieved.
The design performed as it was supposed to be. The use of the MFRC522, XIAO-RP2040 and the 16x2 LiquidCrystal_I2C is going to be used as the basis of an inventory Management system for the unicersity to reduce time and ensure that tools are always protected and tracked to avoid loss.
Challenges: It was really difficult to achive this functionality. The code would refuse to run the RFID-RC522, then after acheving it the LCD completely could not be deted. After two days I realised that it was because of a pin that was not well sodered in the development board.