Showing posts with label components. Show all posts

You must have heard about the process of measuring the depth of the sea by sound navigation technique. The process is known as SO und NA vig...



You must have heard about the process of measuring the depth of the sea by sound navigation technique. The process is known as SOund NAvigation and Ranging (SONAR). Using the same principle, we have a couple of sonar sensor modules available for daily life projects. HC-SR04, being the most popular one, is widely used. Let's try to dive into it. 

Why?
◉ Distance measurement: The exact distance of an object can be figured out by using this sensor. This includes Level Monitoring in tanks, liquid, trash, bottle, etc.
◉ Security installations: Intruders can be detected in the preset range using an ultrasound sensor. 
◉ Advanced applications: Practical applications of ultrasound sensors in diversified fields. Check the following links to know more;

Kinds of Ultrasound sensor:
There are two kinds of ultrasound sensor;
◉ Proximity detection: An object passing within the preset range will be detected and generate an output signal. The detect point is independent of target size, material, or reflectivity.
◉ Ranging measurement: Precise distance(s) of an object moving to and from the sensor are measured via time intervals between transmitted and reflected bursts of ultrasonic sound. Distance change is continuously calculated and outputted.

Working Principle:
By the name, it is easily understandable that this sensor uses ultrasound for its purpose. But why ultrasound? Can you take a guess? There are many more waves like microwaves and others. Then why ultrasound?

Sound with a frequency greater than 20KHz is called ultrasound. The physical properties of ultrasound are the same as normal sound but humans can't hear it.  There are basically a couple of reasons why ultrasound is used in sonar. 

✔ Ultrasound, having a high frequency and short wavelength, can penetrate to a long-distance (in water too).
✔ It can't be confused with other sounds. Therefore, the receiver can pick very easily.

Now the procedure goes like this, the module produces ultrasound using a piezoelectric sensor. The sound keeps traveling and upon reflection to an object, the reflected sound is received by the receiver placed in the module. The time required to send the signal and receive the is calculated by the crystal oscillator. Then the distance is calculated by the equation;
 Distance = 0.5 * Time * Speed of sound

The velocity of the sound is temperature-dependent. At 20 °C (68 °F), the speed in air is 343 m/s (1235 km/h; 1125 ft/s; 767 mph) 





Module Pinout & Functioning:
This module has 4 interfacing pins; Vcc, Trig, Echo & GND respectively.



Pin

No.

Pin Name

Description

1

Vcc

Input power pin. Typically 5V

2

Trigger

This input pin has to be kept high for 10us to initialize measurement

 by sending US wave

3

Echo

This is the output pin. It remains high for a time period
equal to the time, taken for the US wave to return back to the sensor

4

Ground

Connected to the system ground



 

System Specification:
Working voltage: DC 5V
Working current: 15mA
Working frequency: 40Hz
Range: 2cm-4m
Measuring angle: 15 degree
Trigger input signal: 10us TTL pulse
Echo output signal: Input TTL lever signal and the range in proportion


Reference Articles:


Projects:

▶ Blind stick using Ultrasonic Sonar Sensor
▶ 3D sonar mapping of an impregnable place using Ultrasound Sonar Sensor












In the previous article, we had talked about the outer interface of the HC-SR501 PIR Motion Sensor module. There are many more similar modul...





In the previous article, we had talked about the outer interface of the HC-SR501 PIR Motion Sensor module. There are many more similar modules for example HC-SR505 with advanced facilities. But the basic principles of working remain the same. We can divide the module into significant segments as;

◉ Pyroelectric Sensor
◉ Arrays of Fresnel Lens
◉ BISS001 PIR Chip
◉ Retriggering Setting
◉ Delay time & Sensitivity Adjust
◉ Capacitors & Resistors




▶ IR Reception: Heat generating objects also generate infrared radiation. The sensor after calibration, it can detect the change in IR. However, the pyroelectric sensor is sealed within a metal can for protection purposes. There is an opaque window (Si or Ge made) in the metal can that permits the IR to penetrate with small attenuation but visible light can't. Fresnel lens arrays cover the metal can to increase the range.
  


▶ IR Processing: The pyroelectric sensor is made of crystalline material that generates surface electric charge when exposed to heat in the form of IR. There is a built-in FET connected to the sensitive material. The change of surface electric charge can be detected by the FET. The Source of the FET is connected to a pulldown resistor to ground. The output of the FET goes through a signal conditioning circuit for amplification and comparison process. 

 
▶HC-SR501 Circuit: In this module, the process of signal conditioning is done by the usage of capacitors and resistors. And also the BISS001 Microchip processes the signal for the desired output. There's another voltage regulator ic is installed to stabilize the input voltage and there's a current limiting protection diode.

HC-SR501 Circuit Diagram


▶ Retriggering Setting: The pins are visible in the schematic as JP1. This setting defines the output nature of the PIR. For this, we need to consider a circuit;



Now, the module can operate in two modes; 
1) Repeatable (H) Mode: In this mode, the output, Dout will be high and the LED will turn on. The output will be high no matter the object is still in the range or not. The LED will turn off after a predefined time. This time can be controlled by the delay time adjust potentiometer. This is the default mode.

2)Non-repeatable (L) Mode: Now the LED will continue to glow as long as the object is in the coverage area. When the object leaves the area, the LED turns off after a pre-defined time. Similarly, the time and sensitivity can be set by the delay time adjust and sensitivity adjust potentiometer respectively.

▶ Sensitivity Adjust: This potentiometer adjusts the sensitivity of the module. Clockwise rotation of the potentiometer increases the sensitivity.

▶ Delay Time Adjust: PIR has two kinds of time delay as Tx (How long the LED will lit) and Ti (How long the LED will be off if there is no movement). These Tx & Ti can be adjusted according to the provided datasheet of the BISS001 chip. Following the datasheet, 

                                                               Tx= 24576* R10* C6
                                                               Ti= 24* R9*C7

Component numbers are referred to as the datasheet schematic.

BISS001 datasheet schematic


Now the problem may arise when the older version or different manufacturer products are encountered. There is no existing potentiometer. In this case, the resistance values are fixed and surface mounted in the PCB. Therefore Tx and Ti have to be determined from the datasheet or from manual calculation.






Reference Articles:




Image Sources

* EDAboard.com
* ozcott.com
* ResearchGate.com
* semanticscholar
* CircuitDigest




What does a sensor do actually? The simple answer is, "They sense the environment around them". But why sensing is important? Actu...






What does a sensor do actually? The simple answer is, "They sense the environment around them". But why sensing is important? Actually, rather than sensing the surrounding, it is more important to detect the changes in the surroundings and then act accordingly. Like any other living being, a machine or robot needs sensors to take decisions. Think about Sophia, the humanoid, what do you think how she communicates with the audience? 

Now curious minds may say security installations also require sensors. Such a kind of sensor is Passive Infrared Sensor (PIR), resembling CCTV. This sensor detects the motion of an object on the basis of emitted Infrared (IR) rays by that object. We have a mini version of this sensor module namely HC-SR501 PIR Motion Sensor Module that uses a BISS0001 microchip onboard. It can cover about 120 degree and 7 meters.




Structure:
First of all the question arises, why it is called 'Passive'? Active components are those which emit some signal or rays like Sonar sensor. But PIR receives IR from objects instead of sending it. Therefore it is called passive. A huge plastic cover appears at the first glance that covers the Pyroelectric sensor. Therefore the apparent parts are;


1

Fresnel Lens

Round

Array of lenses

Widens the range of the sensor

2

Output pins

Vcc

Input pin

4.5V~12V (Typically 5V)

Dout

Digital Output

High (3.3V)

Motion detected

Low (0V)

No motion

GND

Ground

Connects to system ground

3

Protection Diode

 

 

Limits the input current to the voltage regulator

4

DTA

Adjusts the delay time range

5

STA

Adjusts the sensitivity of the sensor

6

3V DC Regulator

Stabilizes the input voltage

7

BISS001 Chip

Processes the signal

8

Retrigger Select

Repeatable Mode (H)

Dout will be high, once the object passes through

Non-repeatable Mode (L)

Dout will be high as long as the object is within the range




Working Principle:
Each object emits some kind of IR. A moving object produces a variation of IR due to the heat generated by the friction of the object and air. The pyroelectric sensor has two slots in it. When the object passes through the first half, the state of it becomes greater than the second half and creates a positive trigger. Agan when the object goes away from the coverage area, similarly the second half creates a negative trigger. This triggers, after processing, appear in the Dout pin.




Circuit Implementation:
PIR sensor can only give the output as either High (3.3V) or Low (0V).  Therefore it can be used as a trigger to any security system. A simple implementation of the sensor can be an alarm circuit.

  


This is the circuit diagram of a PIR alarm system. Te shaded area represents the coverage area of the sensor and a BC547 NPN transistor has been used to amplify the alarm. The PIR sensor can be used with any kind of microcontroller like Arduino, Raspberry Pi, PIC, etc.

So, this was the working principle of the PIR sensor module. To know about the module circuitry and signal processing operation, visit Passive Infrared Sensor (PIR) Part-02: Inner Circuitry & Control 




Image source:
*Wikipedia
*indiaMART
*ozcott.com
*Wikimedia.com
*Tinkerdesk





Imagine your phone without its display! Seems absurd right? You may ask how will then anyone understand what's going on. Viso...




Imagine your phone without its display! Seems absurd right? You may ask how will then anyone understand what's going on. Visons are much more feasible than the explanation of an incident. Applying the same argument to your fascinating project, you can avoid a chunk of descriptions by simply adding a display to your project. 

Now the selection of display depends on the purpose of your project. But LCD has a greater extent of acceptance to all for its user-friendly interface and controlling parameters. Let us talk about a 16x2 LCD screen here.


Firstly what do we mean by 16x2? This matrix defines that we can represent 16 characters in each row and 32 characters altogether in the display. Each character is accommodated in a 7x5 pixel display. Now there is a big problem with this display. To work with this module you need to connect 16 pins! And sometimes it is a great hassle to figure out the functioning of the pins. 


✧ Pin_01: GND/VSS: It is the ground (0V) of the module. It needs to be connected with 0V.

✧ Pin_02: VDD/Vcc:  Supply voltage of the module. The module supports 5V (4.7~5.3V).

✧ Pin_03: V0/Vee: It adjusts the contrast of the display. A potentiometer can be connected with this pin to adjust the contrast level. Increment of the potentiometer increases the contrast and vice-versa.

✧ Pin_04: RS: It stands for Register Select. Low voltage in this pin selects the command register. Command register stores the instructions given to the LCD. High voltage selects the data register. Data is processed and stored in the data register. The data is mainly the ASCII code of the character.

✧ Pin_05: R/W: To write to the register, we need to give low voltage, and to read from the register it needs a high pulse.

✧ Pin_06: EN: This pin enables the module to receive data through the data pins. To enable data reception, this pin needs to be provided with a voltage spike.

✧ Pin_07: D0: ----------------------
✧ Pin_08: D1:                          ||
✧ Pin_09: D2:                          ||
✧ Pin_10: D3: 8-bit data pins  ||
✧ Pin_11: D4:                          ||
✧ Pin_12: D5:                          ||
✧ Pin_13: D6:                          ||
✧ Pin_14: D7: ---------------------- 

✧ Pin_15: A: It is the anode pin of the backlight. It needs to be shorted with Vcc.

✧ Pin_16: K: It is the cathode pin of the backlight. It needs to be shorted with the ground. 


Arduino Interface:




Now there are few things to notice;

* R/W pin has been grounded.
* Enable pin is connected to a PWM pin.
* Only 4 data pins are connected 

Problem!

As it is said earlier, the biggest problem of using this LCD module is that one needs to connect at least 12 pins of the module to the MCU. It may cause a shortage of pins of the MCU for other components!
To avoid this problem, there's another module called I2C LCD Adapter Module.


This module works based on the I2C protocol. Here you only need 4 pins of your MCU to run the display! But you need to modify your code.



Now let's wrap this up. You know how to connect, write your code, build your project. Be yourself!
Check out the next part to know how LCD works.





Image source:
*Makerguides.com
*WeArGenius
*CHS Sigma Wiki
*courses.jamesmpoe.com


Displays always add an extra attraction to any project. And when it comes about representing numerals, seven segment displays are the m...



Displays always add an extra attraction to any project. And when it comes about representing numerals, seven segment displays are the most preferred over other types of displays. Basically it’s nothing but a combination of 7 LEDs which gives the 10 numerals (0-9) & some alphabets (A/a, B/b, C/c, D/d, E/e, F/f). Okayy, this may be more than enough for introduction. Let’s try to dive into this tiny thing for some more details.

Why All These?
It’s true that working with these devices practically, is a more convenient way to learn than reading articles on them. But knowing what’s going inside them may give a better understanding that can help in modifying them for developed projects.

What’s Inside?
It’s evident from the name that the
7 ‘Segments’ indicate 7 LEDs with an additional LED. This additional LED serves the purpose of decimal point (DP). As LED’s are basically diodes, a two terminal device, they can be powered up with respect to either of the terminals. Depending on this, we find two variants of SSD;
· Common Anode Display (CAD) or Common Vcc [All the anodes are shorted inside]
· Common Cathode Display (CCD) or Common ground [All the cathodes are shorted inside]


Physically 10 pins are visible from outside among them 8 are data pins and two are marked as ‘COM’. Com pins are basically the shorted anodes or cathodes and either of them needs to be connected with the source (Vcc/GND). The pins & LEDs are categorized using alphabets.


Working Principles
Being a digital component, SSD needs digital pulses for functioning. So it’s very simple. We just need to send pulses to the LEDs that we want to turn on. For example, if we want to show 7 on the SSD, the values we need to assign are,

a
1
b
1
c
1
d
0
e
0
f
0
g
0
DP
0

SSD can be interfaced with numerous development boards like Arduino, Raspberry Pi or PID Microcontroller. Again there is a dedicated decoder IC to drive SSD known as BCD to seven segment decoder or IC-7447.

Arduino Interface
We need to connect the 8 data pins of SSD to 8 digital pins and the COM pin to the source or GND. For showing a specific number, we just need to high the state of the required pins of the Arduino. But if we want to make a sequence of numbers, the code has to be modified according to the requirement of the project.





7447 Decoder IC Interface
Here we just need an external circuitry to convert the decimal numbers into BCD (10 to 4 line encoder). 7447 Decoder IC will convert them digital pulses and the number is visible in the SSD.




Now, there exist a number of modules that provide reduced data pins, multiple SSDs on one board with many more advanced modifications. But the basic working function is same and it has made the SSD one of the simplest and most preferred digital displays that is widely used in calculators, digital watch, microwave oven, electric meters etc.


Throughout the blog, have you noticed the unique feature of this display? SSD can represent 0-9 & A, B, C, D, E, F; a complete unit of hexadecimal number system. Interesting, isn’t it?





Image source:
*circuitdigest.com
*parallax.com