Task 4 Iic
Task 4 Iic
Write short notes on the different protocols of communication between the actuators and
sensors with the microcontroller.
Ans. The different protocols of communication between the actuators and sensors with the
microcontroller are: -
Ans. The ways to make a microcontroller communicate with another microcontroller are:
Parallel port
I^2c (Inter-Integrated Circuit)
SPI (Serial Peripheral Interface)
UART (Universal Asynchronous Receiver-Transmitter)
USB (Universal Serial Bus)
CAN (Controller Area Network), often used in automobiles
LIN (Local Interconnect Network), replacement for CAN
Ethernet
Bluetooth SPP (Serial Port Profile), wireless version of UART
BLE (Bluetooth Low Energy)
Wi-Fi
ISM (Industrial, Scientific and Medical band radio)
Zigbee
ANT+
cellular, such as GSM
Q3. Write short notes on the ESP8266, and its different ways of interfacing.
Ans. The ESP8266 is a low-cost Wi-Fi microchip, with built-in TCP/IP networking software,
and microcontroller capability, produced by Espressif Systems in Shanghai, China.
ESP8266 module can be programmed in two ways:
1.By LUA scripting
2.By Arduino programming.
NRF24L01: The NRF24L01 module is powered by 3.3 Volts, so it can be easily used in both
3.2 Volts and 5 Volts systems. Each module has an address range of 125 to communicate
with the other 6 modules and also allows several wireless units to communicate with each
other in a specified allows several wireless units to communicate with each other in a
specified location. Therefore, mesh and other types of networks use this module.
433Mhz RF transmitter and receiver: The 433 MHz RF transmitter and receiver module is
a pair of small RF (i.e. radio-frequency) electronic modules used to send and receive radio
signals between any two devices. The transmitter module sends the data from the
transmitter end and the Receiver module receives that data at the receiver's end.
The RF transmitter receives serial data and transmits it wirelessly through through its RF
antenna. The transmission occurs at the rate of 1 Kbps – 10 Kbps. RF receiver receives the
transmitted data and it is operating at the same frequency as that of the transmitter.
HC-05: HC-05 uses serial communication to communicate with the electronics. Usually, it is
used to connect small devices like mobile phones using a short-range wireless connection to
exchange files. It uses the 2.45GHz frequency band.
After successfully Uploading check whether the Bluetooth module is working or not. (The
easiest way is to see if the RED indicator is blinking). Now, go to the Bluetooth Settings on
your phone and pair your phone with the HC-05 Device.
16X2 LCD DISPLAY: A 16x2 LCD means it can display 16 characters per line and there are
2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. The 16 x 2
intelligent alphanumeric dot matrix display is capable of displaying 224 different characters
and symbols. This LCD has two registers, namely, Command and Data.
A liquid crystal display (LCD) has liquid crystal material sandwiched between two sheets of
glass. Without any voltage applied between transparent electrodes, liquid crystal molecules
are aligned in parallel with the glass surface.
MQ-135: The MQ-135 Gas sensor can detect gases like Ammonia (NH3), sulfur (S),
Benzene (C6H6), CO2, and other harmful gases and smoke. Similar to other MQ series gas
sensor, this sensor also has a digital and analog output pin. When the level of these gases
go beyond a threshold limit in the air the digital pin goes high.
Analog temp sensor: An analog (or voltage output) temperature sensor provides a voltage
level that is directly proportional to the measured temperature. In simple words, these
devices convert temperature to voltage.
The tip of the sensor has a spring that is attached to a rod, leading up to the gauge needle.
The spring sits inside the stems sensing end. When heat is applied to the sensing coil,
movement in the coil is created which causes the needle in the gauge to move – thus
displaying the temperature.
SW-420 TILT SENSOR: This is an SW-420 vibration module, which can work from 3.3V to
the 5V. The sensor uses LM393 comparator to detect the vibration over a threshold point
and provide digital data, Logic Low or Logic High, 0 or 1.
A vibration sensor is a device that measures the amount and frequency of vibration in a
given system, machine, or piece of equipment. Those measurements can be used to detect
imbalances or other issues in the asset and predict future breakdowns.
Photosensitive resistance: The resistance of a photoresistor decreases with increase in
incident light intensity; in other words, it exhibits photoconductivity. A photoresistor can be
applied in light-sensitive detector circuits and light-activated and dark-activated switching
circuits acting as a resistance semiconductor.
Photoresistors, also known as light dependent resistors (LDR), are light sensitive devices
most often used to indicate the presence or absence of light, or to measure the light
intensity.
L298N: The L298N is a dual H-Bridge motor driver which allows speed and direction control
of two DC motors at the same time. The module can drive DC motors that have voltages
between 5 and 35V, with a peak current up to 2A.
SD card module: The SD card module is specially useful for projects that require data
logging. The Arduino can create a file in an SD card to write and save data using the SD
library. There are different models from different suppliers, but they all work in a similar way,
using the SPI communication protocol.
MPU-6050: MPU6050 is a Micro Electro-mechanical system (MEMS), it consists of three-
axis accelerometer and three-axis gyroscope. It helps us to measure velocity, orientation,
acceleration, displacement and other motion like features.
Q5.
Use TinkerCad and make a simulation on the following:
a) Glowing of the on-board led on intervals of 1000, 500, 200, 400, 1000, 100, 100,
300, 1000 (all in ms)
https://www.tinkercad.com/things/kpHb6C00WrL?
sharecode=wQ_oeeydpGKZ7K0-Q3n6Dp0hzg3aZsT9plTHTMpMge4
b) Use a buzzer, hcsr-05, and a led to make a simulation such that if any object is
within 30cm the led glows and the buzzer sounds at full potential, and the light
and the sound fades away, as the objects goes far.
https://www.tinkercad.com/things/99U4S0fLUGe?
sharecode=exP8Y36oncEn2_DVxNjbnb4XCXKLy8b5xfoBDOZnBbo
c) Use a photosensitive resistance and make a buzzer sound as the intensity of the
light changes.
https://www.tinkercad.com/things/0JR14tGQLXE?
sharecode=62a15AXMku5BpWT3gmWQwoCrThWuE5hQ-ptNTtk_PhM
d) Use a PIR motion detector and make a led glow as soon as it detects any motion.
https://www.tinkercad.com/things/67tgRCiX7vf?
sharecode=ZWzkjNY3oOA2peeuWv8TFxexCUZcFnVx1AC5929d-3g
e) Make a simulation such that a servo motor move its axle in the direction of your
hand, use any motion detection method of your choice.
https://www.tinkercad.com/things/dLQOtBkYDxn?
sharecode=Z24Z7Ee8t5YreLiXsX-h7TzIsb_kJ_lojPLXqaqFECA
f) Use the temperature sensor and make the DC motor rotate faster as the
temperature increases.
https://www.tinkercad.com/things/08WHBWz0yiX?sharecode=xEbC-gQX-
xIHDBo3KcD3Bss6l0d0DMrxyPSWYPaq7Ww