Welcome to Week 13. This week's assignment focuses on learning about networking and communication, which involves studying various types of networking and communication used in embedded technology.
In this assignment we have to Send a message between two projects for group assignment.Please find the group assignment link below.
For Group assignment Click Here
Design, build, and connect wired or wireless node(s) with network or bus addresses and local input &/or output device(s).
I have read about networking and communication from Google and provided the source link. I have also taken some images from Google as
references to better understand networking and communication. Then, I used the microcontroller board that I made in a previous
assignment to understand how it works practically and documented all the steps.
A network is a set of devices connected by communication links.Networks and communication connect different devices to share data. This includes hardware like computers, routers, and modems, and software that controls how data moves between them.Protocols like TCP/IP and HTTP are important because they set the rules for how devices talk to each other and exchange information. These protocols make sure the connection works properly.
These involve a physical connection between devices. Wired communication is a way to send information using electrical signals
through wires. Examples include telephone networks, fiber-optic systems, and the public switched telephone network (PSTN).
Wired communication remains important because it offers clear and stable connections, even in the age of wireless technology.
The three main types of wired connections are:
Twisted Pair
Coaxial Cable
Fiber Optic Cable
Wireless communication, also called unguided or unbounded media, does not need physical cables to send signals. Messages can be transmitted through the air, water, or even space using electromagnetic waves like infrared, radio, or microwaves. This means there is no need for wires or other materials to send information. Reference Link
There are two types of data communication.
1. Paraller communication
2. Serial communication
Serial communication is a method of sending data sequentially over a single channel, reducing wire cost but slowing transmission speed. It uses binary pulses (0 for LOW, 1 for HIGH) and can be either asynchronous or synchronous.
Serial communication is further classified into two types.
Synchronous Communication
Asynchronous Communication
In synchronous communication, data is sent continuously in sync with a master clock, eliminating the need for start or stop bits. Since the sender and receiver are time-synced, timing errors are reduced, but it is more expensive than asynchronous communication.
In asynchronous communication, data bits are sent independently at any time, using start and stop bits to ensure synchronization. The advantage is that no constant synchronization is needed, but transmission can sometimes be slower Reference Link
Data transmission mode defines the direction of data flow between devices and is classified into three types based on the
direction of information exchange.
Simplex Mode
Half-Duplex Mode
Full Duplex Mode
Simplex Mode Data Transmission is a one-way communication mode, like a radio broadcast or TV signal, where data flows only in one direction.
Half-Duplex, also known as Semi-Duplex, is a data transmission mode where devices can alternately transmit and receive information, similar to how a walkie-talkie allows one device to talk at a time while the other listens.
Full-duplex is a data transmission mode that enables simultaneous two-way communication, such as in a phone conversation, allowing both parties to send and receive data at the same time.
For this week I am using microcontroller board ESP32C3 board which i designed during input week.
Please click to see Microcontroller Board I Design
During this assignment, I used the Xiao ESP32C3 board designed in the output week and utilized ThingSpeak for network communication. The process I followed to install and sign in to my ThingSpeak account is as follows:
First, I searched for Thingspeak on Google and clicked.
Page opened.
After clicking on 'Get Started for Free,' enter the email address.
After entering my email address, I have to set my password.
After entering the email and password, click on 'Sign Up' to open the page for creating a MathWorks account and fill in all the fields.
I received an email to verify the details I filled out, and I verified my email by clicking 'yes.'
Again, I entered my password to finish my profile and clicked continue.
After completing the above process, I received a message saying 'Sign up successful.' Then, I clicked the OK button.
I have selected a personal, non-commercial project and added a description of the project.
After selecting the Usage Intent and adding the project description, I clicked the OK button, which opened a new page titled New Channel. On this page, I entered my project name and checked the fields required for my project.
After filling in all the required fields, save the channel.
I have decided to connect the soil moisture and temperature sensors and use ThingSpeak for network communication.The temperrture sensorI used is DS18B20 and soil moisture snsor.Since I had already logged into ThingSpeak, I then started writing the code for it.
I got a compilation error for the MQ135.h library, so I installed it to fix the issue from Library Manager.
Once again, I got an error in the Arduino program related to the OneWire.h and DallasTemperature.h libraries.Then I installed these library one by one.
"I got another error related to the DallasTemperature dependency, so I clicked the 'Install All' button to resolve it.
Then I provided the channel name and set the required fields in ThingSpeak.And Saved the channel.
Then the page looks like in the private view tab. Then, click on the edit symbol shown in the screenshot below to edit the specifications for soil moisture and temperature.
Edit the configuration for Soil Moisture by filling in the name as 'Soil Moisture' and the field as 'Field1,' along with the minimum and maximum values and other details as shown in the screenshot below.
Then I have edit the configuration for Temperature.
I then wrote the code in Arduino. I made some changes because my previous program was not working; it did not reflect the changes in the graph on ThingSpeak. I found the mistake: I had missed writing the channel ID in the code, so I added it.
Then I uploaded the code and checked it in ThingSpeak.
It shows the changes in soil moisture and temperature values in Field 1 and Field 2 charts, respectively.
During coding, I missed adding the channel ID in the code, so the ThingSpeak graph is not showing the changes in moisture and temperature on the chart. I also faced a problem during this assignment because the soil moisture value was not changing. After some struggle, I realized that since my board had no connection for the analog pin, I was using the SDA, TX, and RX pins for trial and error. I then connected it to the analog pin GPIO2 to resolve this error.
In this assignment, I learned about networks and communication and how they work. I also went through the entire process of signing in, creating a channel, and how the microcontroller board communicates and sends data to ThingSpeak, displaying the variations on the chart.I also learned that the soil moisture sensor requires an analog pin instead of the SDA, TX, or RX pins.