Assignment Requirements
Group assignment
- Measure the power consumption of an output device.Send a message between two projects.
- Document your work to the group work page and reflect on your individual page what you learned.
Individual assignment
- design, build and connect wired or wireless node(s) with network or bus addresses and a local input and/or output device(s).
Progress Status
This is for reporting progress (not for visitors to click).
Group page link + notes added.
Missing final photos and conclusions.
Upload .zip with source files.
Assignment Requirements
Learning outcomes
- Demonstrate workflows used in network design.
- Implement and interpret networking protocols and/or communication protocols.
Have you answered these questions?
- Linked to the group assignment page.✅
- Documented your project and what you have learned from implementing networking and/or communication protocols.✅.
- Explained the programming process(es) you used.✅.
- Ensured and documented that your addressing for boards works.✅.
- Outlined problems and how you fixed them.✅.
- Included design files (or linked to where they are located if you are using a board you have designed and fabricated earlier) and original source code.✅.
- Included a ‘hero shot’ of your network and/or communications setup.✅.
Weekly planning
During the week, we carried out various activities that presented significant challenges but were also very rewarding, especially due to the opportunity to share and learn as a team. We met virtually with our colleagues at the node and participated in lab meetings, which allowed us to organize ourselves and conduct open workshops in different spaces. In these sessions, we reviewed and worked with input devices, understanding their operation and their importance in capturing data from the environment for subsequent processing in electronic systems.
During Networking and Communications Week, we explored the fundamental principles of communication between electronic devices, a key aspect in the development of IoT (Internet of Things) systems. This week focused on understanding how different boards and systems can exchange information over networks using specific protocols such as MQTT.
Installation of MQTTX (MQTT client):
MQTTX was used, whose chat-based interface facilitates interaction and understanding of the data flow. This tool allows:
For more details about the group work and collaborative development, visit the following link:
Gruop Work- Networking and Communications Week
Problems
Diagnosis
Solutions
Tools Used
MQTT Server Configuration
More Information
View Group Documentation
MQTT Setup and Usage Guide
1. Download MQTTX (MQTT Client)
- Go to the official website: https://mqttx.app
- Select your operating system (Windows, macOS, or Linux).
- Download the corresponding installer.
- Run the file and complete the installation.
2. Create an MQTTX Connection
- Open MQTTX.
- Click on “New Connection”.
- Fill in the following fields:
- Name: (e.g., My Connection)
- Host: broker (e.g., broker.hivemq.com)
- Port: 1883 (unsecured) or 8883 (secured)
- Client ID: automatic or custom
- Click on “Connect”.
3. Subscribe to a Topic (Receive Data)
- Go to the “Subscribe” section.
- Enter a Topic (e.g., fablab/test).
- Click on “Subscribe”.
- Wait for messages sent from another device.
4. Publishing a Message (Sending Data)
- Go to the “Publish” section.
- Enter the same Topic (e.g., fablab/test).
- Write a message (e.g., Hello world).
- Click “Publish”.
5. Testing Communication Between Devices
- Connect two devices (e.g., two computers or boards).
- Both must use the same broker and the same topic.
- One device publishes, and the other receives.
- Verify that messages are transmitted in real time.
6. Common Problems and Solutions
- No connection: Check your internet connection and the broker.
- No messages received: Verify that the topic is exactly the same.
- Connection error: Check that there are no spaces in the topic.
- Failures: Verify the port used (1883 or 8883).
7. Recommendations
- Use public brokers such as broker.hivemq.com or test.mosquitto.org.
- Keep topic names simple and without spaces.
- Perform tests in MQTTX before connecting boards such as Arduino or ESP32.
In this stage, the WiFi connection of the ESP32-C3 microcontroller was configured, allowing it access to the local network and enabling communication with a broker using the MQTT protocol. The Arduino IDE was used for programming, where the PubSubClient library was installed, simplifying the implementation of this protocol.
Thanks to this library, it was possible to manage key functions such as connecting to the broker, publishing data, and subscribing to different topics. This allowed the device to send and receive information in real time, integrating correctly within a functional IoT system.
As part of the process, test code was generated using Gemini to verify both the WiFi connection and the correct communication via MQTT.
In this implementation, my colleague assumed the role of transmitter, using Adrián Torres' FABXIAO board. A button connected to pin D7 was used as an input for sending data.
The board was connected to the computer, the corresponding code was uploaded, and data transmission to the MQTT broker was configured to occur each time the button was pressed.
On the other hand, I assumed the role of receiver, using a board equipped with an OLED screen. Pins D4 (SDA) and D5 (SCL) were used for I2C communication with the display.
After connecting the board to the computer and uploading the code, the device subscribed to the same MQTT topic used by the transmitter, allowing it to receive the data and display it on the OLED screen in real time.
Establishing a WiFi Connection and Sending Data via MQTT
Transmitter
Receiver
Result
As a result, effective communication was established between both devices using MQTT. The system successfully sent and received data, demonstrating the operation of a basic IoT communication architecture based on the sender-receiver model.
This experience strengthened the understanding of networks, communication protocols, and the integration of hardware and software in connected systems.
Video
Difficulties
During the testing phase, we encountered some issues when working with a micro servo. The servo did not respond correctly to the data sent from another computer, suggesting possible problems related to signal interpretation, timing, or code configuration.
This required additional testing and adjustments to better understand the system’s behavior and identify the source of the issue.
Conclusion
During this week, I was able to understand and apply the MQTT protocol to establish communication between two projects within a local network. First, I configured MQTTX to connect to the broker and monitor data in real time. Then, I verified the WiFi connection of the ESP32-C3 and the correct publishing of messages using Arduino IDE.
Finally, I validated the communication between a transmitter and a receiver: when a button was pressed, data was sent and correctly displayed on an OLED screen. This process helped me better understand the integration of hardware, software, and IoT communication.
Additionally, it highlighted the importance of testing, debugging, and making iterative improvements to ensure a stable and reliable system.
Video
Individual Task
Individually, I conducted tests with sensors and simulations using a breadboard, the Wokwi platform, and a physical circuit board. This allowed me to validate the functionality of the components before their final implementation.
For the development of the circuit board, I attended the ESAN Fab Lab, where I was guided by Professor Jorge. This process presented a significant challenge, as we acquired knowledge about the operation of CNC machines from different perspectives each week.
On this occasion, we worked with the Carvera desktop CNC machine, which requires the use of additional software compared to other CNCs we had previously used. This necessitated a greater level of learning and adaptation.
For the circuit board design, I used a Silva Espinoza board as a base, since it contained components related to the final project I want to develop. From this base, I was able to customize the design according to my needs; however, achieving its correct adaptation and functionality also presented a challenge.
fairs for entrepreneurs and artisans.Fab Lab ESAN
Carvera CNC Machine
The CARVERA Maker is an advanced and intelligent desktop CNC machine designed to meet the demands of digital manufacturing in confined spaces. Despite its compact size, it offers a high level of precision, automation, and versatility, making it an ideal tool for designers, engineers, and machining enthusiasts.
It integrates innovative features such as automatic leveling, automatic tool change, a dust collection system, and the option to add a 4-axis module. Thanks to these features, CARVERA sets a new standard in desktop CNC machining.
One of its main advantages is the automatic tool change system along with the automatic probe function. With machines lacking these functionalities, the user must manually perform tool changes and calibration, which is tedious and time-consuming, especially for complex tasks like PCB manufacturing.
In contrast, CARVERA allows for the automated execution of multiple processes—such as leveling, cutting, cleaning, drilling, and engraving—selecting the appropriate tool at each stage. This not only optimizes working time, but also improves the accuracy and quality of the final result, allowing the user to focus primarily on the design.
Motherboard
Work began using the KiCad program, after verifying that all necessary libraries were correctly installed. The motherboard file was also opened for review, ensuring the FabLab library was properly incorporated.
From this motherboard, the required components were selected and adapted. First, the XIAO microcontroller was chosen, specifically the Xiao ESP32-C3 model. The footprints for each component were also verified, guaranteeing their compatibility with the design. Subsequently, the electronic schematic was updated.
During the schematic design, the various components, such as the DHT sensor and the OLED display, were placed and properly connected to the ESP32-C3. The microcontroller's technical specifications were consulted to ensure correct pin assignment and proper circuit operation.
Using a motherboard optimized the design process; however, it also required additional adjustments and validations to correctly integrate the new components into the existing circuit.
Components List (USD)
| # | Item Description | Qty | Unit | Unit Price (USD) | Total (USD) | Purchase Location |
|---|---|---|---|---|---|---|
| 1 | XIAO ESP32-C3 | 1 | UNIT | 16.22 | 16.22 | J6 Soluciones Tecnológicas |
| 2 | LCD Display 4x20 | 1 | UNIT | 5.41 | 5.41 | NYABBYCORP S.A.C |
| 3 | OLED Display 0.96 (4 pins) | 1 | UNIT | 5.14 | 5.14 | NYABBYCORP S.A.C |
| 4 | SMD Resistor 1206 (1K ohm) | 30 | PCS | 0.27 | 8.11 | NYABBYCORP S.A.C |
| 5 | Male Header 40 pins | 10 | UNIT | 0.27 | 2.70 | NYABBYCORP S.A.C |
| 6 | Female Header 40 pins | 10 | UNIT | 0.27 | 2.70 | NYABBYCORP S.A.C |
| 7 | Solder Wick 1.5 mm | 1 | UNIT | 1.89 | 1.89 | NYABBYCORP S.A.C |
| 8 | DHT11 Module | 2 | UNIT | 2.16 | 4.32 | NYABBYCORP S.A.C |
| TOTAL | $59.73 USD | |||||
RemoteXY WiFi Control with XIAO ESP32-C3
1. Introduction
In this exercise, RemoteXY was used to develop a remote control interface for a mobile device (in this case, an iPad), allowing interaction with a XIAO ESP32-C3 board via a WiFi connection. The programming was done in the Arduino IDE, integrating different electronic components to achieve a real-time interactive system.
2. Creating the Interface in RemoteXY
- Go to: https://remotexy.com
- Access the Online Editor.
- Design the interface by adding:
- An ON/OFF button to control the system.
- A data display field (status or information from the board).
- Configure the connection type as WiFi.
- Select the board: ESP32 (compatible with XIAO ESP32-C3).
- Click on “Get Source Code” and copy the generated code.
3. Configuration in Arduino IDE
- Open the Arduino IDE.
- Install the RemoteXY library from the Library Manager.
- Select the board: XIAO ESP32-C3.
- Paste the code generated by RemoteXY.
- Configure the WiFi network settings:
#define REMOTEXY_WIFI_SSID "YOUR_WIFI" #define REMOTEXY_WIFI_PASSWORD "YOUR_PASSWORD"
4. Hardware Integration
During the project development, the following components were integrated:
- OLED display: used to show the number of times the system was activated (power-on counter).
- RGB LED (3 colors): used to visualize state changes based on interaction from the iPad.
These components improved the visualization of the system behavior in real time.
5. Uploading the Program
- Connect the XIAO ESP32-C3 to the computer.
- Select the correct port.
- Upload the code.
- Open the Serial Monitor to verify the connection and obtain the device's IP address.
6. Connecting from the iPad
- Ensure the iPad is connected to the same WiFi network.
- Open the RemoteXY app or a web browser.
- Enter the IP address shown in the Serial Monitor.
- View the interface (ON/OFF button and data display).
7. Functionality Test
- Press the ON button on the iPad.
- Verify system response:
- The RGB LED changes color.
- The OLED screen updates the activation count.
- Confirm real-time communication via WiFi.
8. Results
Effective wireless communication was established between the iPad and the XIAO ESP32-C3 via WiFi. The integration of RemoteXY, the OLED display, and the RGB LED enabled the creation of an interactive system, demonstrating successful integration of hardware, software, and IoT communication.
Video
Video
Reflection
Initially, using RemoteXY and linking the Arduino (XIAO ESP32-C3) with the mobile application was a bit confusing. Setting up the connection, whether via Wi-Fi or Bluetooth, and understanding the generated code were the most challenging aspects.
It also took time to grasp how the interface created in the app relates to the variables within the code. However, through trial and error and continuous adjustments, I gradually gained a better understanding of the operation and communication between both environments.
Conclusion
Using RemoteXY allowed for the effective integration of Arduino with a mobile application, enabling real-time control of various components such as the RGB LED, the servo, and the OLED screen. This experience demonstrated how it is possible to develop interactive systems where the mobile device becomes a control interface.
Additionally, I reinforced my knowledge of programming, wireless connectivity, and IoT communication, understanding the importance of proper configuration and constant testing to achieve a stable and functional system.