FabAcademy

Vigyan Ashram

Networking and Communications

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.

Group Assignment

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

Individual Assignment

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.

My Hero Shot for this week assignment


#

#

My Hero Video for this week




Networking And Communication

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.

Mediums for Data Communication


1. Wired Communication Media

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

2. Wireless Communication Media

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

Data Communication Types

There are two types of data communication.
1. Paraller communication
2. Serial communication

#

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

Synchronous 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.

#

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 Modes

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

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 Mode

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 Mode

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.

#

Communication Protocall


I2C Protocol
SPI Protocol

Thingspeak as Network Communication

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:

Search for ThingSpeak on Google

First, I searched for Thingspeak on Google and clicked.

#

Page opened.

#

Click On Get Started For Free

After clicking on 'Get Started for Free,' enter the email address.

#

Set Password

After entering my email address, I have to set my password.

#

Create Mathworks Account

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.

#

Verify the details.

I received an email to verify the details I filled out, and I verified my email by clicking 'yes.'

#

Enter the password

Again, I entered my password to finish my profile and clicked continue.

#

Sign-up Successful.

After completing the above process, I received a message saying 'Sign up successful.' Then, I clicked the OK button.

#

Usage Intent Pop-up for ThingSpeak

I have selected a personal, non-commercial project and added a description of the project.

#

New Page Open

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.

#

Save the Channel

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.

Coding


#

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.

Problem Faced

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.

Key Learning

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.

Original Files


  • Download Arduino File
  • Design File For microcontroller board