Introduction to DS1307

Hello friends, I hope you all are doing great. In today's tutorial, we are gonna have a look at detailed Introduction to DS1307. DS1307 is a real-time clock. It is a low power device and also has battery backup, which provides power when its external power supply not working or is off. It works on the I2C protocol. It is a bidirectional device and it can send and receive data on both sides. DS1307 is used in industrial projects where constant time and date of some projects or working is required. I will give you a detailed overview of this time and date indicator IC. In today's post, we will have a look at its pinout, working, basic circuit, protocol, etc. I will also share some links of projects where I have interfaced it with Arduino and some other Microcontrollers. Friends, if you have any questions, please ask in comments and I will try my best to solve your problems and will give you comprehensive answers. So let's get started with basic Introduction to DS1307:

Introduction to DS1307

  • DS1307 is a Real-Time Control (RTC) IC. In DS1307, data is transferred in binary decimal coded, bits pattern. The data transfer rate in DS1307 is 56 bytes.
  • The memory which is used in DS1307 is NV SRAM. NV SRAM is basically a non-volatile random access memory. In working, NV SRAM is quite similar to static random access memory(SRAM).
  • DS1307 is an electronic device which plays an impotent role in real-time embedded systems. In embedded systems, we can get benefits of system clocks, students attendance time and date, we can also use it as an alarm for special work.
  • DS1307 consists of a built-in power-sense circuit. The purpose of the built-in power-sense circuit is that if power gets cut-off, then it will automatically switch to back up power supply. In this way, our circuit remains in working condition.
  • The protocol on which DS1307 works is I2C. I2C is a single line protocol in which data is transferred bit by bit along a single wire.

  • Now let's have a look at DS1307 Pinout:

DS1307 Pinout

  • DS1307 has a total of 8 pinouts, which are described below:
    • PIN 1,2: These pins are for standard 32.768 quartz crystals. Both pins can be used as input and output for internal oscillator. If X1 is input then X2 is used as output.
    • PIN 3: This pin is used for battery connection to DS1307.
    • PIN 4: We have to apply Ground on this pin.
    • PIN 5: This pin is labeled as SDA, which is short for Serial Data Line.
    • PIN 6: It is used for serial clock input (SCL) and data synchronized.
    • PIN 7: This pin is used for output square wave obtainer (SQW).
    • PIN 8: At this pin, we provide an external power supply (Vcc).
  • Now let's have a look at the pinout picture:
Now let's have a look at I2C protocol

I2C Protocol

  • I2C is a serial protocol in which data is transferred bit by bit.
  • I2C combine the best feature of  SPI and UART. By using it with one microcontroller we can control many slave devices.
  • In I2C data is transferred in the form of messages, then we convert messages into data form. Each message has an address frame that contains a binary address of devices which under control.
  • I2C protocol is cheaper to implement then SPI protocol. SPI control one slave device while I2C control more than one device.
  • For better understanding lets have a look at the I2C protocol picture. Now let's have a look at working of DS1307

Working of DS1307

  • For a better understanding of the working of DS1307 let's discuss a circuit in which we use it.
  • In this simple circuit, we connect its first two pins which are X1 and X2 with 32.768 kHz crystal oscillator as the source for the chip.
  • The third pin is connected with a battery of 3V.
  • At Vcc, we give 5v supply and it can be given by using a microcontroller. If Vcc is not provided then read and write condition are inhibited.
Let us have a look at the circuit:
  • Starts and stop conditions are required when one device wants to communicate with other devices in the I2c protocol.
  • For obtaining start condition we provide specific identification and address register to a device, by this, we get start condition.
  • For a better understanding of stop and start condition lets have a look at clock figure.
  • Let's have a look at Feature of ds1307.

Features of DS1307

  • In this section, I have designed a table where I have placed all features of DS1307 along with their symbols and units.
No. Parameter Symbol Value Unit
1. Supply Voltage VCC 5 V
2 Logic 1 Input VIH 2.2 V
3 Logic 0 Input VIL +0.8 V
4 VBAT Battery Voltage VBAT 3.5 V
5 Input Leakage ILI 1 uA
6 I/O Leakage ILO 1 uA
7 Logic 0 OUTPUT VOL 0.4 V
8 Active Supply Current (fSCL = 100kHz) ICC 1.5 mA
9 Standby Current ICCS 200 uA
10 VBAT Leakage Current IBATLKG 50 nA
11 Power-Fail Voltage (VBAT = 3.0V) VPFtd> 1.284 x VBAT V
12 VBAT Current (OSC ON); SQW/OUT OFF IBAT1 500 nA
13 VBAT Current (OSC ON); SQW/OUT ON (32kHz) IBAT2 100 nA
14 VBAT Data-Retention Current (Oscillator Of) IBATDR 100 nA
15 SCL Clock Frequency fSCL 100 kHZ
16 Bus Free Time Between a STOP and START Condition tBUF 4.7 us
17 Hold Time (Repeated) START Condition tHD:STA 4 us
18 LOW Period of SCL Clock tLOW 4.7 us
19 HIGH Period of SCL Clock tHIGH 4 us
20 Setup Time for a Repeated START Condition tSU:STA 4.7 us
21 Data Hold Time tHD:DAT 0 us
22 Rise Time of Both SDA and SCL Signals tR 1000 ns
23 Fall Time of Both SDA and SCL Signals tF 300 ns
24 Setup Time for STOP Condition tSU:STO 4.7 us
Now, let's discuss applications of DS1307

Applications of DS1307

  • These are some applications of DS1307, Lets disuses them.
  • As we know DS1307 is used to tell continues time and date showing purpose, that way it is an electronic device such as a computer, mobile, and laptops.
  • By using it with Arduino we can use it in several projects related to data logging, alarm, clocks, etc.
So, that was all about this Real Time Clock DS1307. I hope you have enjoyed today's tutorial and it will help you with your engineering projects. Will meet you guys in the next tutorial, till then take care and have fun !!! :)

Introduction to TCS3200

Hello friends, I hope you all are doing great. In today's tutorial, we are gonna have a look at a detailed Introduction to TCS3200. TCS3200 is a color-detecting sensor, it consists of TAOS TCS3200 RGB sensor chip and four white LEDs. It is used to detect visible color in a measurable range. This sensor has an array of a photodetector diode, some diodes are equipped with different color filters i.e. red, blue or green color and some diodes do not have any filter. TCS3200 has different applications such as test strip reading, sorting by color and ambient light sensing. In today's post, we will have a look at its working, protocol, pinout, specification, etc. I will also share some links where I have interfaced it with other microcontrollers. If you have any questions about it ask in the comments I will resolve your problems. So, let's get started with a basic Introduction to TCS3200.

Introduction to TCS3200

  • TCS3200 is a color-detecting sensor, it consists of TAOS TCS3200 RGB sensor chip and four white LEDs. It is used to detect visible color in a measurable range.
  • It is a programmable sensor and color light-to-frequency converter. The board of this sensor is a monolithic integrated circuit that consists of a configurable silicon photodiode and a current-to-frequency converter.
  • The output of this sensor is a square wave (50% duty cycle), the frequency of output depends on the intensity of light (irradiance).
  • The output frequency of this sensor can be scaled by two input control pinouts. Due to its digital input and digital output, it can easily be interfaced with other microcontrollers.
  • The light-to-frequency converter of this sensor reads the 8 x 8 array of photodiodes. In this array of photodiodes, 16 photodiodes have green filters, 16 have blue filters, 16 have red filters and sixteen photodiodes have no filters.
  • To minimize, the effect of non-uniformity of incident radiation all photodiodes are interdigitated. The same colored diodes are connected in parallel. We can use pin S2 and S3 to check which group of photo diodes is active.
  • The dimensions of photodiodes are 110um x 110um.
  • The operating temperature of this sensor is -40°C to +85°C and it is available in 8-SOIC packages.
  • This sensor is mostly used in RGB-led industrial control projects and medical diagnostic types of equipment.

Now, we discuss TCS3200 pinouts with a detailed description.

TCS3200 Pinout & Description

  • There are main eight pinouts of TCS3200 which are described below.
Pin# Type Parameters
Pin#4 GND This pin is the power supply ground. All voltages are reference to the ground.
Pin#5 VCC It is a supply voltage.
Pin#3 OE Enable for FO  (Active low).
Pin#6 OUT This pin is for output frequency (fo).
Pin#1,2 S0, S1 Using these pins we can Select lines for output frequency scaling.
Pin#7,8 S2, S3 Using these pins we can Select lines for photodiode type.
Now, we discuss the specifications of TCS3200, which are described below.

Features of TCS3200

  • These are the main features of TCS3200.
    • Its operating voltage is 2.7v to 5.5v.
    • Its operating current is 2 mA at 5 V.
    • Its interface is digital TTL.
    • It can easily convert light intensity to frequency with high resolution.
    • There is no need for ADC.
    • It operating temperature is -40 C to 85 C.
    • It has a power down attribute.
    • Its dimensions are 28.4x28.4mm(1.12x1.12").
    • It is available in a 5mm x 6.2mm SOIC (D) package.
    • It is programmable.
    • It supports LED lamp light supplement control.

Working of TCS3200

  • As we have already seen that TCS3200 has an 8 x 8 array of photodiodes, which are used for color sensing.
  • When light falls on these photodiodes, then these light signals are converted into square waves and the frequency of these square waves is dependent on the intensity of falling light.
  • After getting results from light to frequency converter, which is a square wave, we can simply fed them to any microcontroller like Arduino, PIC Microcontroller or Atmel etc and detect the color of falling light.
  •  If we observe a given diagram we can easily understand how the sensor can detect various colors.
  • As we earlier discussed that photodiodes of the sensor have three different filters which are red, green, and blue while one group of photodiodes have no filter.
  • All sixteen photodiodes of a sensor are connected in parallel, by using two pins S2 and S3 we can select which pin we have to use for color reading.
  • Let's suppose we have to detect red color, we just have to use sixteen red filter photodiodes by setting two pin S2 and S3 to low logic level according to a given table.
  • TCS3200 also has two more pins used for controlling purposes, and are named as S0, and S1.
  • These two switches are used for tuning the frequency of square wave. We can set the output frequency to either 2%, 20% or 100%. These are builtin frequency values.
  • This function tells us that we can optimize the sensor output for various counters and microcontrollers.

Applications of TCS3200

  • These are some applications of TCS3200.
    • As we know this is a color light sensor, so we use it in color detecting projects, otherwise we have to use MATLAB for color detection, which will need laptop (not a good option).
    • TCS3200 is used for object sorting based on color.test strip reading,
    • We can also sense ambient light using this sensor.
    • We can also read color codes on LED strips.
So, friends that were all about TCS3200 If you have any questions about it please ask in comments. Thanks for reading. Take care until the next tutorial.

Introduction to MSP430

Hello friends, I hope you all are doing great. In today's tutorial, we are gonna have a look at a detailed Introduction to MSP430.  MSP430 is a microcontroller portfolio that offers different varieties of sixteen-bit Microcontrollers. These microcontrollers are integrated with ultra-low power and digital and analog peripherals devices for sensing and measurement applications. MSP430 microcontrollers with non-volatile FRAM (ferroelectric random access memory) provide the lowest stand-by power (350nA with RTC), 100 µA/MHz active power and have the capability to recover system state after sudden power failures. MSP430 is used in different applications such as sensor systems which receive analog signals and convert them into digital values and after processing send these values to host systems. In today's post, we will have a look at its introduction, working, protocol, features, applications, etc. I will also share some links where I have interfaced it with other microcontrollers. If you have any questions please ask in the comments, and I will resolve your problems. So, let's get started with a basic Introduction to MSP430.

Introduction to MSP430

  • MSP430 is a microcontroller portfolio that offers different varieties of sixteen-bit Microcontrollers. These microcontrollers are integrated with ultra-low power and digital and analog peripherals devices for sensing and measurement applications.
  • This module consists of five low-power modes that increase battery life in portable measurement applications.
  • MSP430 has a feature of 16-bit registers, sixteen-bit RISC Cpu and constant generators which provides maximum code efficiency.
  • The digitally controlled oscillator (DCO) of this module converts low power modes to active mode in less than 6µs.
  • The MSP430x11x series is an ultra-low power signal microcontrollers that consist of a 16-bit timer and fourteen input and output pinouts.
  • MSP microcontrollers give ideas and enable designers to produce such high-performance applications, which support the industry's lowest stand-by power, analog and digital devices suitable for sensing and measurement applications, and also support 20+ wired and wireless connectivity applications.
  • The main applications that it provides are sensor systems that receive analog signals and convert them into digital values, and after processing this data sends to host modules. Another area of application is RF front-end sensor.

Now, we discuss its pinouts.

Pinout of MSP430

These are the main pinouts of MSP430 which are described below.
Pin# Type Parameters
Pin#13 P1.0/TACLK It is general-purpose digital I/O pin / Timer_A, clock signal TACLK input.
Pin#14 P1.1/TA0 It is general-purpose digital I/O pin/Timer_A, Capture: CCI0A input, Compare: Out0 output.
Pin#15 P1.2/TA1 It is general-purpose digital I/O pin/Timer_A, Capture: CCI1A input, Compare: Out1 output.
Pin#16 P1.3/TA2 It is general-purpose digital I/O pin/Timer_A, Capture: CCI2A input, Compare: Out2 output.
Pin#17 P1.4/SMCLK/TCK It is general-purpose digital I/O pin/SMCLK signal output/Test clock, an input terminal for device programming and test.
Pin#18 P1.5/TA0/TMS It is general-purpose digital I/O pin/Timer_A, Compare: Out0 output/test mode select, an input terminal for device programming and test.
Pin#19 P1.6/TA1/TDI It is general-purpose digital I/O pin/Timer_A, Compare: Out1 output/test data input terminal.
Pin#20 P1.7/TA2/TDO/TDI It is general-purpose digital I/O pin/Timer_A, Compare: Out2 output/test data output terminal or data input during programming.
Pin#8 P2.0/ACLK It is general-purpose digital I/O pin/ACLK output.
Pin#9 P2.1/INCLK It is general-purpose digital I/O pin/Timer_A, a clock signal at INCLK.
Pin#10 P2.2/TA0 It is general-purpose digital I/O pin/Timer_A, Capture: CCI0B input, Compare: Out0 output.
Pin#11 P2.3/TA1 It is general-purpose digital I/O pin/Timer_A, Capture: CCI1B input, Compare: Out1 output.
Pin#12 P2.4/TA2 It is general-purpose digital I/O pin/Timer_A, Compare Out2 output.
Pin#3 P2.5/ROSC It is general-purpose digital I/O pin/Input for an external resistor that defines the DCO nominal frequency.
Pin#7 RST/NMI It is Reset or nonmaskable interrupt input.
Pin#1 TEST/VPP It is selected test mode for JTAG pins on Port1/programming voltage input during EPROM programming.
Pin#2 VCC It is a Supply voltage.
Pin#4 VSS It is Ground reference.
Pin#6 XIN It is an Input terminal of the crystal oscillator.
Pin#5 XOUT/TCLK The output terminal of a crystal oscillator or test clock input.
Now, we discuss the features of MCP430.

Features of MSP430

  • These are the main features of MCP430, Lets's discuss them with detailed.
    • It is available in a 20 pin plastic small outline widebody package.
    • Its operating voltage range is 2.5v to 5.5 v.
    • Its active mode is 330 µA at 1 MHz, 3 V.
    • Its stands by mode are 1.5 µA.
    • It's off mode (Ram Retention) is 0.1 µA.
    • This module is available in 16-bit architecture, 200ns instruction cycle time.
    • This module consists of various internal resistors, single external resistor,32 kHz crystal, high frequency, resonator and external clock source.
    • It has a 16-bit timer with a three capture/compare registers.
    • In this module, programme protection is done by a security fuse.
    • It has serial onboard programming.
    • This module has 16 kb flash, 512 B RAM, 8ch 10-bit ADC, two 16-bit timer

MSP340 Interfacing with RFID

  • In the next coming lines, we will discuss MSP430 interfacing with RFID, first of all, we discuss components required for this circuit.
  • Circuit Components
    •  MSP430 Launchpad.
    •  EM-18 (RFID reader module).
    •  16*2 LCD.
    •  Potentiometer.
    •   Breadboard.
    •   Jumper wires.
  • In this circuit diagram, we are going to use UART hardware of MSP430, So you should put RXD and TXD jumpers on HM UART mode. After this connect the Tx of EM-18 to RXD (P1.1) of MSP430.
  • In this project, we are going to use serial communication of data transfer. RFID also has another mode than serial mode but we are using RS232 communication mode. The RS232 pin of RFID the module connects with RXD pin of MSP430.
  •  To connect the RFID reader with MSP430 we have to enable the serial communication in MSP430.
  • We can initialize serial protocol in MSP430 by using a simple command Serial.begin(9600), where 9600 is the baud rate.
  • Now in order to read the incoming Serial data, we need to use value=Serial.read().
  • We can see in the given diagram that for communication by RFID use BAUD rate of 9600 bits per seconds. For MSP430 to create baud rate equal to the RFID baud rate to start communication, we use the command of "Serial.begin(9600);". 9600 is a baud rate which can change.
  • After setting of baud rate, MSP430 is ready to receive data. This data can be received by command “data = Serial.read();”. By this way, serial data is taken in 'data ' named Integer.

  • When we take a card near the reader, the reader reads data and forward it to MSP430, MSP430 after getting data show on LCD. So we will have an ID of a card on LCD.

Applications of MSP430

  • These are some applications of MSP430.
    • It is used for Factory Control & Automation Applications
    • It is used in Building & Home Automation Applications.
    • It is used in Grid Infrastructure & Metering Applications.
    • It is used in Portable Test & Measurement Equipment.
    • It is used in Health, Medical & Fitness Applications
    • It also used in Consumer Electronics.
So, friends, that's was all about MSP430 If you have any question about it please ask I comments I will resolve your problems. Take care until next post.

Introduction to BD139

Hello friends, I hope you all are doing great. In today's tutorial, we are gonna have a look at detailed Introduction to BD139. BD139 is a Bipolar NPN transistor, it is mounted in the SOT-32 plastic package. It is designed for audio amplifier and driver utilizing complementary circuits. BD139 has a gain value of 40 to 160, which determine the amplification capacity of a transistor. It has three main pinouts which are a collector, base and emitter. It is used to control (On/Off) bigger loads that consume less than 1.5A. BD139 is used in different industrial projects such as RF amplifier and Switching Circuits. In today's post, we will have a look at its pinout, Arduino interfacing, applications, Specifications, etc. I will also share some links where I have interfaced it with other microcontrollers. If you have any question about it please ask in comments I will resolve your problems. So, let's get started with a basic Introduction to BD139.

Introduction to BD139

  • BD139 is a Bipolar NPN transistor, mounted in the SOT-32 plastic package and is designed for audio amplifier and driver utilizing complementary circuits.
  • Gain Value of BD139 ranges from 40 to 160. (Gain Value of any transistor helps in determining its amplification capacity)
  • The maximum value of current, which can pass through collector pin, is 1.5A, so if you are working on this transistor then make sure that your load must be less than 1.5A.
  • In order to operate this transistor in forward biased state, we have to apply current at its base and this base current must be greater than 1/10th of its collector current. Moreover, make sure to apply 5V at its base-emitter pin.
  • Once it's operating in forward biased state, we can draw a maximum of 1.5A current between its Collector & Emitter. If maximum current i.e. 1.5A is flowing through a transistor then we can say it's in Saturation Region.
  • Normally, we can apply a maximum of 80V across Collector & Emitter.
  • When we remove base current transistor becomes fully off, this situation is called the cut-off region.
  • One best point about it is that it comes in a plastic package, which is that most medium power transistor available only in the metal package. This reduces its cost and since this package is not conductive it will not be affected by other circuits. Due to this feature, it is mostly used in amplifier applications.
  • So if you are searching for medium power NPN transistor in a plastic package than this will be the best choice for you.
  • BD139 was originally manufactured by Phillips rated at 160 MHZ for specific audio applications, with a passage of time it was cloned by other manufacturers like Samsung, ST, etc.
Now, we discuss BD139 pinout with a detailed description.

BD139 Pinout

  • There are three main pinouts of BD129, which are described below with a detailed description.
Pin# Type Parameters
Pin#1 Emitter An emitter is used for current Drains out, normally it is connected to ground.
Pin#2 Collector Current flows in through collector, normally it is connected to load.
Pin#3 Base Base controls the biasing of the transistor, it is used to turn ON or OFF the transistor.
 
  • For further information let's see BD139 pinout diagram.
Now we, discuss BD139 features and specification. Detailed features of BD139 are described below.

Features of BD139

  • These are the main features of BD139.
    • It is Available in To-225 package.
    • It is a plastic casing NPN transistor.
    • Its continuous collector current (IC) is 1.5A.
    • Its Collector-Emitter voltage is (VCE) is 80V.
    • Its Collector-Base voltage. 80V
    • Emitter-Base breakdown voltage (VBE) is 5V.
    • Its DC current gain (hfe) is 40 to 160
    • Emitter-Base Breakdown Voltage (VBE) is 5V
    • Its collector dissipation factor is 12.5w.
    • Its operating and storage junction temperature range is -55 to +150°C
    • It is also available in PB-Free packages.

BD129 Working as Amplifier

  • Now we discuss how we can use BD139 as an amplifier in or industrial and class projects.
  • In a given circuit diagram, there is a 2-watt class-AB audio power amplifier which provides low harmonic distortion and wide frequency response.
  • It has the capability of driving an 8O loudspeaker with an output power of 5 watts. In this circuit supply voltage is between 12V and 18V.
  • In this 470O circuit, potentiometer controls the quiescent passes through BD139 and BD140 complementary transistors.
  • Changes in values of this resistor is a trade-off between low distortion and low current across the output transistors Q3 and Q4.
  • As this amplifier is DC biased, emitters of BD139 and BD1340 are at about half power supply voltage to allow for a maximum output swing. In this circuit, additional R9 and R10 resistor provide temperature stabilization.
For further information let's see circuit diagram.

BD139 working as a Switch

  • In given diagram circuit is designed to produce high magnetic flux. Center tapped coil is maid by 20 SWG Enameled copper wire 6 cm diameter and five turns with a center tap in middle.
  • BD139 is acting a switch and oscillates high-frequency signal with the help of R1, C1, and C2 resonator.
  • In this circuit, LED1 indicates the presence of bias to this circuit.
For practical understanding let's see circuit diagram.

Applications of BD139

  • These are some applications of BD139.
    • It is used as RF Amplifiers.
    • It is used in switching circuits
    • It is used in amplification circuits
    • It is used in audio amplifiers
    • It is also used in Load driver circuits.
So, that was all about BD139, if you have any question about it ask in comments I will resolve your problems. Thanks for reading this tutorial. Take care until the next tutorial...

Introduction to Arduino Zero

Hello friends, I hope you are all fine will be doing something interesting in your life. In today's tutorial, we are gonna have a look at detailed Introduction to Arduino Zero. Arduino Zero is a Microcontroller device. It is a 32-bit extension of UNO series. Its main features are Atmel Embedded Debugger (EDBG), it provides a full debug interface without additional hardware. This board provides a platform of new inventory projects in smart IoT devices, high technology automation, robotics and much more. As, Electronic devices coming in our life, they have become cheaper and performing more functions then there predecessor. The microcontroller was introduced in the industry to make our task easy in electronic devices and projects. Arduino Zero is a valuable addition in the electronics industry. It providing the improvement in Arduino role in our projects. In today's I will explain about Its pinout, projects, working, protocol, etc. So let's started with Introduction to Arduino Zero.

Introduction to Arduino Zero

  • Arduino Zero is a microcontroller board, based on Atmel SAMD21G18U ARM CORTEX MO+CPU. It is simply a 32 bit extension of Arduino UNO series.
  • It has 20 input-output pins (10 can be used PWM output), it also has six analog inputs, 2 UARTs, 48 MHZ clocks, 1 digital to analog converter (DAC), one SPI reader, one TWI and reset button.
  • One of the most important functions of it is that (EDGB), Which provide full debugging without any external hardware. EDGB also support a virtual com port that can be used for boat loader programming.
  • It allows the designer to control electronic devices in a comprehensive way. AC to DC adopter can also be used to power the board.
  • Arduino Zero boards are quite similar to other boards in the Arduino family in terms of use and functionality.
  • It can operate on external supply 6 to 20 volts. But if we supply below six volts it becomes unstable and if the voltage is greater then 12, the voltage regulator is overheating and may damage the board.
Now, let's discuss the pinout of Arduino Zero PINOUT:

Arduino Zero PINOUT & Description

There are main twenty pinouts of Arduino Zero, let's discuss which are most important and mostly used.
No.  Pin Name  Description
01 SCL SCL is a clock line. It uses to synchronized data on a protocol which it uses. It works on the I2C protocol.
02 SDA SDA is a line at which data is transferred by the serial way.
03 AREF AREF stand for Analogue reference. It used to supply Arduino reference voltage.
04 GND This pin is used for ground purposes.
05 TX/D1 This pin used for transmission of data.
06 RX/D0 This pin is used for receiving data
07 AD0 It used for analog to digital conversion.
08  IOREF This pin is used for input, output voltage reference purpose. For example, an Arduino would supply 5 v to this pin, but a due would supply 3.3 v. Sending a signal to this pin does nothing.
09 3.3 V  This pin is used for 3.3 v supply to Arduino.
10 REST This pin is used for resting of Arduino.
11 VUSB This is a USB port.
12 VIN At this pin, we supply input voltage to Arduino.
13 AO/DAC This is used for analog to digital conversion of the signal.
14 GND This is two ground in Arduino Zero, this one is second
15 PROGRAMMING PORT This pin is used for the feeding of programming to Arduino.
16 SUPPLY CONNECTOR This pin is used for 2.1 mm supply connector.
17  MCU  This pin is used to interface other microcontrollers with Arduino.
  [otw_is sidebar=otw-sidebar-5] Now, Let's discuss the specifications of Arduino Zero.

Features & Specifications of Arduino Zero

These are some specification of Arduino Zero:
  • Arduino Zero is a SAMD 21 Cortex M0+ 32bit low power ARM microcontroller.
  • Its board Power Supply (usb.in) is 5 volts.
  • DC current we can apply at the 3.3v pin is 600 mA.
  • DC current for the 5-volt pin is 600mA.
  • Its circuit operating Voltage is 3.3V.
  • Total digital input and output pins are 22.
  • Its PWM Pins  are 12 (0, 1, 2, 3, 4, 5, 6, 7, 8, 10, A3 - or 18 -, A4 -or 19).
  • It's flash memory is 256 KB.
  • It has flash memory for boot-loader is 8 kb.
  • It has SRAM of  32 KB.
  • Its Clock Speed is 32.768 kHz (RTC), 48 MHz.
  • Its supported battery is Li-Po single cell, 3.7 V, 700 mAh minimum.
  • It's Analog Input Pins are  6, 12-bit ADC channels
  • It's Analog Output Pins are 1 to 10-bit DAC.
  • There is no use of EEPROM.
  •  Its LED BUILTIN is at pin no 13.
For a better understanding of Arduino Zero, we discuss its use in project By an example.

Zero Drive

Lets discuss project of Arduino Zero.
  • Zero Driver is basically an Arduino Zero compatible dual motor driver board for mechatronics engineering projects and different types of industrial robots.
  • In robotic projects required two board, one is a microcontroller and other is a separate driver for a motor. Zero Driver combines both in one for our convenience.
  • Zero drivers come with the same microcontroller as an Arduino Zero 48 MHZ ARM cortex M0+ chip, which is better than any other an entry-level Arduino Uno.
  • For better understand how this work lets see a picture of zero drive.

Application of Arduino  Zero

These are some applications of Arduino Zero. We can use it as a parking Lot Counter.
  • It can be used in security and Defense System.
  • It is used in Digital Electronics and Robotics.
  • It is used in Weighing Machines.
  • It is used in Traffic Light Count Down Timer.
  • we can also use it in Medical Instrument.
  • It is also used in Emergency Light for Railways.
  • It is also used in Home Automation.
So, friends, this was all about Arduino Zero. If you any question regards it, you ask in comment box. I will resolve your queries. Thanks for reading. Take care until next post...

Introduction to nRF52840

Hello friends, I hope you all are doing great. In today's tutorial, we are gonna have a look at a detailed Introduction to nRF52840. nRF52840 is a low-power 2.4 GHz wireless system-on-chip (SoC). It integrates a multi-protocol 2.4 GHz transceiver, an Arm Cortex-M4F CPU and flash memory. It is the best system-on-chip (SoC) for any short-range wireless personal area network or IPv6-enabled automation applications.

nRF52840 supports low energy Bluetooth, 802.15.4, ANT™ and user proprietary 2.4 GHz protocols. nRF52840 is used in different industrial projects such as industrial mesh networks, advanced personal fitness devices, and smart city infrastructure. In today's post, we will have a look at its working, specifications, applications, pinout, etc. I will also share some links where I have interfaced it with other microcontrollers. If you have any questions about it please ask in the comments, and I will resolve your queries. So, let's get started with a basic Introduction to nRF52840.

Introduction to nRF52840

  • nRF52840 is a  2.4 GHz wireless system on chip (SoC). It integrates a multi-protocol 2.4 GHz transceiver, an Arm Cortex-M4F CPU and flash memory.
  • It is an advanced and highly flexible single-chip solution for increasing demand for ultra-low power (ULP) wireless applications.
  • It is designed with features of Bluetooth 5 such as long-range, throughput and inherent industry-grade security which are essential for today's applications. nRF52840 adds best-in-class security for the Cortex TM-M Series with an on-chip ARM Crypto Cell cryptographic accelerator.
  • nRF52840 follows the same software and hardware architecture which is followed by  nRF52 series (SoCs).
  • Its core is an ARM Cortex M4F processor which solves quickly and more efficiently computation of complex functions for DSP, which requires floating point math.
  • It has extensive memory available in both Ram and flesh, 256kB/1MB respectively. Combination of memory available and cortex M4F provides unparalleled capabilities for single-chip applications.
  • The chip of nRF52840 consists of full speed (12Mbs) USB 2.0 controller and a large number of peripherals such as high-speed SPI (32 MHz) and quad SPI (32MHz) which allows direct interfacing to display and external memory sources.
  • nRF52840 can operate from +5.5v to 1.7v supply voltage, which can also be provided from rechargeable batteries and USB supplies when there is no mains supply.
  • nRF52840 is a Thread-certified module, which is ideal for home networking products using the thread mesh stack.
  • Its radio supports 802.15.4 PHY and MAC layers making it perfect for additional stacks using 802.15.4 such as Zigbee.

Now, discuss nRF52840 pinout with a detailed description.

nRF52840 Pinout &Description

Detailed information about nRF52840 pinout is given below. Lets, discuss them.
Pin# Type                                         Description
A8 P0.31  It is a general purpose I/O pin.
A10 P0.29 It is a general purpose I/O pin.
A12 P0.02 It is a general purpose I/O pin.
A14 P1.15 It is a general purpose I/O pin.
A16 P1.13 It is a general purpose I/O pin.
A18 DEC2 This pin is used for 1.3 V regulator supply decoupling (Radio supply).
A22 VDD  It is used for Power supply.
A23 XC2 It is a connection for 32 MHz crystal.
B1 VDD It is for Power supply.
B3 DCC  It is DC/DC converter output.
B5 DEC4 It is 1.3 V regulator supply decoupling.
B7 VSS Ground.
B9 P0.30 It is a general purpose I/O pin.
B11 P0.28 It is a general purpose I/O pin.
B13 P0.03 It is a general purpose I/O pin.
B15 P1.14 It is a general purpose I/O pin.
B17 P1.12 It is a general purpose I/O pin.
B19 P0.11 It is a general purpose I/O pin.
B24 XC1 It is a connection for 32 MHz crystal.
C1 DEC1 It is 1.1 V regulator supply decoupling.
D2 P0.00 It is a general purpose I/O pin.
D23 DEC3  This pin is used for Power supply and decoupling.
E24 DEC6 It is 1.3 V regulator supply decoupling (Radio supply).
F2 P0.01 It isa general purpose I/O pin.
F23 VSS_PA Ground (Radio supply).
G1 P0.26 It is a general purpose I/O pin.
H2 P0.27 It is a general purpose I/O pin.
H23 ANT It is a Single-ended radio antenna connection.
J1 P0.04 It is a general purpose I/O pin.
J24 P0.10 It is a general purpose I/O pin.
K2 P0.05 It is a general purpose I/O pin.
L1 P0.06 It is a general purpose I/O pin.
L24 P0.09 It is a general purpose I/O pin.
M2 P0.07 General purpose I/O pin
N1 P0.08 It is a general purpose I/O pin.
N24 DEC5 It is 1.3 V regulator supply decoupling (flash supply).
P2 P1.08 It is a general purpose I/O pin.
P23 P1.07 It is a general purpose I/O pin.
R1 P1.09 It is a general purpose I/O pin.
R24 P1.06 It is a general purpose I/O pin.
T2 P0.11 It is a general purpose I/O pin.
T23 P1.05 It is a general purpose I/O pin.
U1 P0.12 It is a general purpose I/O pin.
U24 P1.04 It is a general purpose I/O pin.
V23 P1.03 It is a general purpose I/O pin.
W1 VDD It is a Power supply pin.
W24 P1.02 It is a general purpose I/O pin.
Y2 VDDH  This pin used for High voltage power supply.
For better understanding, Let's see nRF52840 pinout diagram.

Features of nRF52840

  • Features of any electronic device can help us for a better understanding of the main functions associated with it. It will guide us on how we can select a relevant component for our projects. Following are some features of nRF52840.
  • nRF52840 System-on-Chip consists of
    • ARM Cortex M4F processor which used for ultra-low power operations.
    • On this module, there are ports for Bluetooth 5, Bluetooth Mesh, Thread, ANT and 2.4 GHz proprietary.
    • On this chip, there is a USB 2.0 (Full speed) controller and 1 MB FLASH and 256 kB RAM.
  • On this chip for Debugging, there is an option such as MSC, CDC, and HID.
  • This module has external low power 64-Mb QSPI flash memory.
  • This module has a user programmable button and an RGB LED.
  • It also has onboard 2.4G chip antenna.
  • It also consists of U.FL connector selectable for an external antenna.
  • It has a 3.3V regulator with 1A peak current output.
  • This module has reversible USB 3.1 Type-C Connector.
  • It is Breadboard friendly with dual 18-Pin headers.
  • Its dimensions are 1.97" x 0.9" x 0.51" (50mm x 23mm x 13mm) with headers soldered in.
Now, we discuss applications of nRF52840

Applications of nRF52840

  • These are some applications of nRF52840.
    • It used in Smart Home products.
    • It used in Industrial mesh networks.
    • It also used in Smart city infrastructure.
    • It used in Advanced wearables.
    • It used in Connected watches.
    • It used in Advanced personal fitness devices.
    • It used in Virtual/Augmented Reality applications.
    • It also used in Interactive entertainment devices
    • It used in Advanced remote controls and Gaming controller.
So, friends that were all about nRF52840. If you have any question about it ask in comments, I will resolve your problems. Take care.

Introduction to ACS712

Hello friends, I hope you all are doing great. In today's tutorial, we are gonna have a look at detailed Introduction to ACS712. ACS712 is an AC or DC current sensor, which is used to measure AC or DC current. You should also have a look at Difference between AC & DC Power, that will help. The maximum value of AC and DC which can be measured is 30A, its output current signal can be read via analog I/O port of Arduino. It is also available in 5A and 20A version which provides precise and economical solutions for AC or DC current sensing in industrial and commercial systems. ACS712 consists of a precise and low offset linear Hall sensor circuit with a copper conduction path located near the surface of the die. ACS712  is used in different industrial projects and commercial electrical devices which includes motor control switched mode power supplies, load detection, and management and overcurrent fault protection. In today's post, we will have a look at its working, Arduino interfacing, applications, pinout, etc. I will also share some links where I have interfaced it with other microcontrollers. If you have any query ask in comments I will resolve your problems. So, let's get started with a basic Introduction to ACS712.

Introduction to ACS712

  • ACS712 is a current sensor, which can detect AC or DC current easily. The maximum values of AC or DC which can be detected is 30A. Its operating voltage is 5v.
  • ACS712 is available in small surface mount SOIC8 package. Its lead-frame is plated with 100% matte tin, which is compatible with standard lead-free printed circuit board assembly process.
  • Its package allows easy implementation by the customer, its typical applications are motor control, load detection and overcurrent fault protection.
  • It consists of a precise linear hall circuit with a copper conduction path located near the surface of the die. When applied current passes through this copper conduction path generates a magnetic field which is sensed by Hall integrated circuit (IC) and converted into a proportional voltage.
  • An output of ACS712 has a positive slope (>VIOUT (Q)) when increasing current passes through a primary copper conduction path (from pin 1 and 2, or pin 3 and 4), which is the path used for current sensing. The internal resistance of this conductive path is 1.2 mO. The thickness of the conductor provides survival for a device during the over-current condition.

Now, we discuss ACS712 pinout with a detailed description.

ACS712 Pinout & Description

  • There is three main pinout of ACS712, which are described below with detail description.
Pin# Type                                         Parameters
Pin#1 Vcc This is an input supply pin. 5v is given on this pin.
Pin#2 Output  This is output analog voltage proportional to current.
Pin#3 Ground This is used for ground.
  • For better understanding let's see ACS712 pinout diagram.
  • Now, we discuss ACS712 features.

Features of ACS712

    • These are the main features of ACS712.
      • It measures both DC and AC current.
      • Its operating voltage is 5v.
      • It is available in 5A, 20A and 30A module.
      • It provides isolation from the load.
      • It is easily integrated with MCU.
      • It provides a low noise analog signal path.
      • Its bandwidth is 50 kHz.
      • It is available in low profile SOIC8 package.
      • Its total error is 1.5% at TA = 25°C and 4% at –40°C to 85°C.
      • Its output sensitivity is 66 to 185 mV/A.
      • Its output voltage are proportional to AC or DC currents.
      • It has an extremely stable output offset voltage.
      • Its magnetic hysteresis is nearly zero.

ACS712 Arduino Interfacing

  • It is very easy to interface ACS712 with a microcontroller, you should also have a look at ACS712 Arduino Interfacing for better understanding.
  • In the given circuit diagram, the ACS712 module has two Phoenix terminal connectors with mounting screws as shown in the circuit diagram in green color. At these terminals, wires are connected.
  • In our circuit diagram we are measuring current drawn by the motor, so the wires which are connected with motor is passed through the ACS712 module. Make sure ACS712 module is connected in series with the motor.
  • On the other side of the module, we have three pins, Vcc is connected with +5V power supply and ground is connected to the ground of MCU.
  • Analog voltage given by the ACS712 module can be read using an analog pin of Microcontroller.
  • You can interface ACS712 with almost every microcontroller i.e. Arduino, PIC Microcontroller, 8051 etc.
  • For a better understanding of this module, let's see the circuit diagram.

Applications of ACS712

  • These are some applications of ACS712.
    • It is used for motor speed control.
    • It is used for load detection and management.
    • It is used as switched-mode power supplies.
    • It is used for over current fault protection.
So, that was all about ACS712, If you have any question regarding this module ask in comments, I will resolve your problems. Take care...

Introduction to DS3231

Hello friends, I hope you all are doing great. In today's tutorial, we are gonna have a look at a detailed Introduction to DS3231. DS3231 is a real-time clock (RTC) with an integrated temperature-compensated crystal oscillator. It consists of a battery that provides supply to DS3231 when the main supply is off. In this way, it continues working without any interference. It is available in industrial and commercial temperature ranges. It exists in a 16-pin, 300-mil  SO package. DS3231 is used in industrial projects and different electronic devices such as laptops, computers, and GPS for high accuracy of time. In today's post, we will have a look at its working, pinout, applications, protocol, etc. I will also share some links to projects where I have interfaced it with some other Microcontroller. If you have any questions please ask in comments, I will try my best to resolve your problems. So, let's get started with a basic Introduction to DS3231.

Introduction to DS3231

  • DS3231 is a low-cost real-time clock (RTC), which has an integrated temperature-compensated crystal oscillator (TCXO) and I2C working protocol. It also has a backup battery, which provides supply when the main supply is cut off.
  • It has a crystal resonator which enhances the long-term accuracy of the device and reduces piece-part count in a manufacturing line.
  • It is available in 16 pins, 300 mil SO package. This RTC module maintains seconds, minutes, hours, dates, months and yearly information. It changes to date and time at the end of the month automatically including corrections for the leap year.
  • This module operates in either 24 24-hour or 12-hour format with an AM/PM indicator.
  • It consists of temperature compensated voltage reference and comparator circuit, which monitors the status of Vcc to detect power failures. This circuit provides a reset output and automatically switches to a backup supply when necessary.

Now, we discuss DS3231 pinout with detailed.

DS3231 Pinout & Description

There are a main sixteen pinouts of DS3231, which are described below with detailed.
Pin# Type                                         Parameters
Pin#1 32K This is a 32 kHz output. This is an open drain pin requires an external pull up resistor. If it is not in use can be left open.
Pin#2 Vcc This pin is for DC power supply. It should be decoupled with 0.1µF to 1.0µF capacitor. If not in use connected to ground.
Pin#3 INT/SQW This is a low interrupt or square wave output pin. It requires an external pull up resistor.
Pin#4 RST This is an active low reset. It is open drain input/output. It indicates the status of Vcc relative to the Vpf simplifications. As Vcc falls below Vpf, the RST pin is driven low.
Pin#5-12 N.C These pins are not in use. These should be connected to ground.
Pin#13 GND This pin is used for ground.
Pin#14 Vbat  This pin used for Backup Power Supply Input. It should be coupled with 0.1µF to 1.0µF low-leakage capacitor.
Pin#15 SDA It is serial data input, output pin. This pin is the data input/output for the I2C serial interface.
Pin#16 SCL It is a serial clock pin.
For better understanding, let's see the DS3231 pinout diagram.

Features of DS3231

  • Features of an electronic component can help you a better understanding of major function associated with it. It will help you to make a final decision before picking a device for your relevant project. Following are some features of DS3231.
  • Its accuracy from 0°C to +40°C is ±2 ppm and -40°C to +85°C is ±3.5 ppm.
  • It is a low power consumption device. It has battery backup for continuous timekeeping.
  • Its temperature range for commercial use is 0°C to +70°C and for industries is -40°C to +85°C.
  •  This Real Time Clock Counts Seconds, Minutes, Hours, Day, Date, Month, and Year with Leap Year Compensation Valid Up to 2100.
  •  It has two times of day alarms. It can operate up to 400kHz frequency.
  • It has a simple serial interface which can Connect to Most Microcontrollers. Its working protocol is I2C.
  • It is Underwriters Laboratories (UL) Recognized.

DS3231 Arduino Interfacing

Friends, now we discuss DS3231 Arduino interfacing with a complete description and circuit diagram. Components Required
  • These are components of this circuit.
    • Arduino UNO
    • DS3231 RTC Module
    • Mini Breadboard
    • 16×2 LCD Display
    • Connecting Wires
    • 10 KO POT
Circuit Design & Description
  • First of all, we discuss connections between Arduino and DS3231. As we already know interfacing between them is I2C, If you are using board other than UNO, then first you should identify the I2C pins on your Arduino Board.
  • In Arduino UNO A4 and A5 are SDA and SCL pins. Connect these pins with corresponding SCL and SDA pins of DS3231 module. After this connect Vcc and ground pin of RTC Module with +5v and GND of Arduino.
  • For output, I have interfaced LCD with this circuit. Connect E and RS pins of LCD to 7 and 6 of Arduino, also connect D4-D7 of LCD to 5-2 of Arduino pins.
For further information, let's see its circuit diagram.

Applications of DS3231

  • These are some applications of DS3231.
    • It is used in Servers.
    • It used in Data Loggers
    • It can be used in GPS Modules.
    • It is also used in Power Meters
So, friends that were all about DS3231, if you have any question and query about it please ask in comments. I will resolve your problems. Take care.

Introduction to DHT11

Hello Friends, I hope you all are fine and will be doing well in your life. In today's tutorial, I am going to give you a detailed Introduction to DHT11. It is an embedded sensor used to measure temperature & humidity in the surroundings and gives calibrated digital output. It can measure temperature in the range of 0°C to 50°C with ±2°C accuracy. Its humidity range is from 20% to 80% with ±5% accuracy. It is a small, low cost and easy-to-interface embedded sensor.

In this tutorial, I will explain its working, pinout, protocol and interfacing with other microcontrollers in detail.

  • Here are a few important features of DHT11, given in the below table:
DHT11 Features & Specs
No. Parameter Value
1 Measures Humidity & Temperature
2 Sensors Included Capacitive Humidity Sensor & Thermistor
3 Humidity Range 20% to 80% with ±5% accuracy
4 Temperature Range 0°C to 50°C with ±2°C accuracy
5 Package 4 Pins in a single row
6 Operating Voltage 3.0V to 5.5V
7 Operating Current 0.3mA(measuring), 60uA(idle)
8 Resolution 1°C, 1%RH (8-Bit)
9 Response Time 6s-15s
10 Repeatability ±1°C, ±1%RH
11 Sampling Frequency 1Hz
12 Dimensions 27mm x 59mm x 13.5mm (1.05" x 2.32" x 0.53")

So, let's start with the Introduction to DHT11:

Where To Buy?
No.ComponentsDistributorLink To Buy
1DHT11AmazonBuy Now

Introduction to DHT11

  • DHT11 is a low-cost, small-sized & easy-to-operate embedded sensor, consisting of 4 pins, used to measure Temperature(0°C to 50°C with ±2°C accuracy ) & Relative Humidity (20% to 80% with ±5% accuracy ) and provides calibrated digital output.
  • DHT11 Pinout consists of 4 Pins in total, listed below from left to right:
    1. Vcc: Need to provide +5V at this pinout.
    2. Data: It's the digital output pin, that gives either 0V or 5V.
    3. NC: Not Connected. (It's left open for future design)
    4. GND: Need to provide Ground at this pinout.


  • DHT11 has a Capacitive Sensor for measuring humidity & NTC Thermistor for temperature sensing. (We will cover them in detail below)
  • It comes in a single package comprising of 4 pins with 0.1" spacing between them and a special package can be provided according to user demand.
  • DHT11 updates the output value once every 2 seconds.
  • Small-size, low-cost, precise & calibrated output and up to 20 meters signal transmission stand it out from other sensors.
  • DHT11 uses a single-wire serial interface for data processing.
  • It calibrates the humidity using humidity coefficients, which are stored in the OTP program memory of the built-in controller.
  • Its operating voltage is 3V to 5.5V, so it works with both 3.3V and 5V microcontroller systems.
  • It has a sampling frequency of 1Hz, so it samples the data after every 1sec.
  • DHT11 has a dimension of 27mm x 59mm x 13.5mm (1.05" x 2.32" x 0.53"), so it is very small and can easily be placed in autonomous embedded projects.
  • It is quite accurate & precise in its readings as compared to other expensive sensors i.e. SHT10, DS18B20 etc.

We have discussed the basic features of our Moisture sensor DHT11. Now, let's have a look at DHT11 Pinout and description:

DHT11 Pinout & Description

  • DHT11 Pinout consists of 4 Pins in total, which are shown in the below table:
Pin# Type                                         Parameters
Pin#1 Vcc Provide 3.3V to 5V at this pin.
Pin#2 Data This pin provides a digital output.
Pin#3 N/C  Not Connected.
Pin#4 Ground This pin is used for Ground ( Connected to 0V or GND ).
  • For better understanding let's check its picture, given below:

Now, we will discuss the DHT11 working principle in detail:

DHT11 Working Principle

  • Now, let's understand the working principle of the DHT11 temperature & humidity sensor.
  • As we have discussed earlier, it has two sensors inside it, so let's have a look at both of them separately:

DHT11 Temperature Sensing

  • For temperature sensing, it has an NTC(Negative Temperature Coefficient) temperature sensor (also called a thermistor ) mounted on the surface inside the plastic casing.
  • NTC temperature sensors are variable resistive sensors and their resistance decreases with an increase in the surrounding temperature.
  • Thermistors are designed with the sintering of semiconductor materials, such as ceramic or polymers and they provide a large change in resistor with a small temperature change.
  • Here's the graph showing the relation between temperature and resistance for the DHT11 sensor:

Now, let's discuss the Humidity Measurement of DHT11:

DHT11 Humidity Measurement

  • For Humidity Measurement, it uses a capacitive humidity sensor, which has two electrodes and a substrate material in between.
  • The substrate material is used for holding the moisture on its surface.
  • As moisture content changes in our environment, they get saturated on the substrate material, which in turn changes the resistance between electrodes.
  • This change in electrode resistivity is then calibrated using the humidity coefficient (saved in OTP memory) and the final relative humidity value is released.
  • Here's the image showing the internal structure of the DHT11 humidity sensor:
Now let's discuss the communication Protocol of the DHT11 temperature & humidity sensor:

DHT11 Communication Protocol

  • DHT11 sensor uses a single-wire, two-way Serial Protocol for communicating with third-party peripherals normally microcontrollers.
  • We call it single-wire because the communication is performed through a single pin.
  • It's two-way because DHT11 receives commands from the microcontroller and then responds required data.
  • Data sent by the DHT11 sensor is 40 bits and it sends Higher Data Bits first.
  • Data contains both Integral and decimal values of temperature and relative humidity along with a checksum value.

DHT11 Data Format

  • DHT11 sends the 40Bit serial data in the below format:
    1. 8-Bit Humidity(Integral)
    2. 8-Bit Humidity(Decimal)
    3. 8-Bit Temperature(Integral)
    4. 8-Bit Temperature(Decimal)
    5. 8-Bit Checksum
  • If DHT11 is sending the correct data, then it must send an 8-bit Checksum data at the end.

DHT11 Communication with Microcontroller

  • The circuit diagram to interface DHT11 with the microcontroller is shown in the below figure:
  • A pull-up resistance of 5k ohm is recommended to place at the Data Pin of the DHT11 sensor.
  • At normal conditions, the data pin of DHT11 remains at the HIGH voltage level and the sensor remains in low power consumption mode.
  • To receive data from the DHT11 sensor, the microcontroller should make the Data Pin low for at least 18us, so that the sensor could sense it.
  • Once the DHT11 sensor senses the low signal at the Data Pin, it changes its state from low power consumption mode to running mode and waits for the Data Pin to get HIGH.
  • As the Data Pin gets HIGH again by the microcontroller, DHT11 sends out the 40-bit calibrated output value serially.
  • After sending the data, DHT11 returns to low power consumption mode and waits for the next command from the microcontroller.
  • The microcontroller has to wait for 20-40us to get a response from the DHT11 sensor.

Applications of DHT11

Because of its small size, low cost and ability to sense two values, DHT11 has a wide range of applications:
  • DHT11 is used in Home Automation Projects to maintain constant atmospheric values by controlling the appliances(i.e. AC, Fan etc.) based on the sensor's readings.
  • It is also used at weather stations for temperature & humidity sensing.
  • It is also used in automatic climate control appliances.
  • Environment monitoring devices also utilize this sensor.
  • Garden Monitoring Systems also use DHT11 sensors.

So, that was all about the DHT11 temperature and humidity sensor. I have tried to cover this sensor from all angles. Let me know about your experience with the DHT11 sensor in the comments. Take care!!!

Introduction to DHT22

Hello friends, I hope you are all fine and will be doing something interesting in your life. in today's post, I am going to discuss Introduction to DHT22. It is a temperature and humidity measure sensing device. It is easily used but it needs a specific time for an operation. Its temperature measuring range is from -40 to +125 degrees Celsius with +-0.5 accuracy. This sensor measures moisture content and temperature. This sensor is easily connected to other microcontrollers. DHT22 plays an important role in our environment in measuring temperature and moisture. It is a low cost easy-to-use small sensor. This sensor is used at different weather stations to measure temperature and ratio of moisture in the air, in this way, they tell about temperature or rain prediction. In today's post, I will talk about its working protocol, pinout, application and interfacing with other microcontrollers. I will also share some links to projects where I have interfaced with other Arduino. If you have any queries about it please ask in the comment I will resolve your queries. So let's start with Introduction to DHT22.

Introduction to DHT22

  • DHT22 is a low-cost humidity and temperature measuring sensor. It consists of thermister for temperature measurement and capacitive humidity sensor humidity measurement. The feature which gives importance then another sensor is that you can get data after two seconds.
  • It is very easy to use, just connect the first pin from left with supply then get data from the second pin. Its last pin used for ground.
  • It has higher accuracy and precision, due to this feature it can replace expensive imported SHT10 temperature and humidity sensor.
  • This sensor is used to measure environment temperature and humidity to meet the high demand.
  • This sensor has reliability and good stability. It is easy to combine with a special sensor Arduino expansion board, which is easy to use for temperature and humidity perception.
  • DHT22 is digital humidity sensor, designed for analog sensor interfacing.
  • It consists of 4.7 K to 10 K resistor, which can be used as pull up from data pin to Vcc.
  • It has four pins with 0.1" spacing.
For better understanding now discuss its pin configuration.

DHT22 PINOUT & Description

There is main four pinout of DHT22 we use three pins which are discussed below with details.
No. Pin Type                                         Parameters
1. Vcc This is Power Pin at this pin we apply 3.5 v to 5.0 volts.
2 Data Through this pin, we get outputs both Temperature and Humidity through serial Data.
3 Ground Ground Pin ( Connected to 0V or GND )
Better understanding lets see its pinout picture. Now discuss its working and its principle at which it works.

Working of DHT22

  • Now discuss how it works, It consists of two main parts one measure temperature and other is used for humidity measurement it also has IC to send data to Microcontroller. Discuss these component ones by one.
    •  Humidity Sensing Component
      • For humidity measurement, it uses the humidity measurement component, which has two electrodes with moisture holding substrate between them.
      • As humidity changes, the conductivity of substrate changes or resistance between electrodes changes. This changes in resistance are measured, then processed by IC which make it ready to be rad by Microcontroller.
    • Temperature Measuring Component
      • To measure temperature this sensor uses an NTC temperature sensor or Thermistor.
      • A thermistor is a variable resistor that changes its resistance with a change of temperature. These sensors are made by sintering of semiconductive materials, such as ceramic or polymers in order to large change in a resistor with small changes in temperature. As temperature changes, there is a change in the value of resistance by which we measure the temperature of our environment.
For a better understanding of its working, Lets its picture. Now, discuss the features and specifications of DHT22.

Features & Specification of DHT22

These are some features of DHT22.
  • The voltage it operates is 3.5v to 5.5v.
  • Its operating current is 0.3v to 5.5.
  • The protocol which it uses to send data is a serial transmission of data.
  • Its temperature at which it operates is -40°C to 80°C.
  • Its humidity range is 0% to 100%.
  • Its temperature and humidity resolution are 16-bit.
  • Its Accuracy is ±0.5°C and ±1%
  • Its sampling rate is 0.5 Hz once every two seconds.
  • Its dimensions are 27mm x 59mm x 13.5mm (1.05" x 2.32" x 0.53").
  • It has four pins with 0.1" spacing.
  • Its weight is 2.4g.
  • It is a low-cost sensor. Its price is just $1 to $5.
  • It has long term stability of ±0.5% per year.
Now we discuss the DHT22 Serial Data Transmission protocol by which it sends data.

DHT22 Serial Protocol

  • DHT22 sensor is calibrated in industries it is designed for serial output data transmission. I have to interface it with Microcontroller for its serial data transmission.
  • As you can see that the data pin is connected with an input-output pin of Microcontroller and 5k pull up resistor is used. This data pin sends output values of both temperature and humidity as serial data.
For a better understanding of serial transmission, let's see its picture. Now discuss DHT22 Arduino interfacing.

DHT22 Arduino Interfacing

  • In given circuit diagram I have interfaced Arduino with DHT22. By providing source code to Arduino we can use it according to desire requirement and also can use it for temperature and humidity measuring purpose.

Application of DHT22

These are some application of DHT22.
  • It is used for temperature and humidity measurement.
  • It is used as a weather station to measure temperature and humidity in the air.
  •  It is an automatic climate control sensor.
  • It is also used as an environmental monitoring device.
So, friends, this was all about DHT22, if you have any query regarding it please ask in a comment. I will resolve your queries. Thanks for reading. Take care until the next tutorial.....
Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir