Course Code Microcontroller Computer Peripherals and Interfacing Lab
Course Code Microcontroller Computer Peripherals and Interfacing Lab
Answer:
Specifications:
Color: Grey, Black, White
Material: ABS
Working Rotation: 180 Degree
Voltage: DC 12V
Standard: LVD, EMC, CE, RoHS
IP Rating: Indoor application IP44
LUX Setting: 2-2000lux svr adjustable
Size: As shown on the picture
Induction lighting time: 5s~6min adjustable time
Detection distance: Approx 12M, installation 1.5-2.5M High
Application:
This sensor is use to Human detection.
Home Automation.
Intelligent Rode lamp etc.
Fingerprint scanners are awesome. Why use a key when you have one right at the tip of
your finger? Unfortunately, they're usually unreliable or difficult to implement. Well not
anymore! We've found this great fingerprint module from ADH-Tech that communicates
over TTL Serial so you can easily embed it into your next project.
The module itself does all of the heavy lifting behind reading and identifying the
fingerprints with an on-board optical sensor and 32-bit CPU. All you need to do is send it
simple commands. To get started, just register each fingerprint that you want to store by
sending the corresponding command and pressing your finger against the reader three
times. The fingerprint scanner can store different fingerprints and the database of prints
can even be downloaded from the unit and distributed to other modules. As well as the
fingerprint "template," the analyzed version of the print, you can also retrieve the image
of a fingerprint and even pull raw images from the optical sensor!
This is the more economical version of the GT-511 which has a decreased memory
capacity (compared to the GT-511C3). The module can only store up to 20 different
fingerprints and is only capable of 30° fingerprint recognition. If you are on a budget and
need only a small number of fingerprints stored, this is the perfect option for you!
The module is small and easy to mount using two mounting tabs on the side of the sensor.
The on-board JST-SH connector has four signals: Vcc, GND, Tx, Rx. A compatible JST-
SH pigtail can be found in the related items below. Demo software for PC is available in
the documents below, simply connect the module to your computer using an FTDI
Breakout and start the software to read fingerprints!
Specifications:
The MQ-2 Gas Sensor module is useful for gas leakage detecting in home and industry. It can
detect LPG, i-butane, propane, methane, alcohol, hydrogen and smoke.
Some modules have a built-in variable resistor to adjust the sensitivity of the sensor.
Note: The sensor becomes very hot after a while, don't touch it!
4. TCRT5000L Reflective Optical Sensor.
Description:
The TCRT5000 and TCRT5000L are reflective sensors which include an infrared emitter and
phototransistor in a leaded package which blocks visible light. The package includes two
mounting clips.
Specification:
APPLICATIONS:
The Temperature Sensor LM35 series are precision integrated-circuit temperature devices with
an output voltage linearly proportional to the Centigrade temperature.
The LM35 device has an advantage over linear temperature sensors calibrated in Kelvin, as the
user is not required to subtract a large constant voltage from the output to obtain convenient
Centigrade scaling. The LM35 device does not require any external calibration or trimming to
provide typical accuracies of ±¼°C at room temperature and ±¾°C over a full −55°C to 150°C
temperature range.
The LM35 series are precision integrated-circuit temperature sensors, with an output Voltage
linearly proportional to the Centigrade temperature. Thus the LM35 has an advantage over linear
temperature sensors calibrated in ° Kelvin, as the user is not required to subtract a large constant
voltage from the output to obtain convenient Centigrade scaling.
Specification:
The HC-SR04 ultrasonic sensor uses sonar to determine the distance to an object like bats or
dolphins do. It offers excellent range accuracy and stable readings in an easy-to-use package. It
operation is not affected by sunlight or black material like Sharp rangefinders are (although
acoustically soft materials like cloth can be difficult to detect). Similar in performance to the
SRF005 but with the low-price of a Sharp infrared sensor.
Specification:
Applications:
Used to avoid and detect obstacles with robots like biped robot, obstacle avoider robot,
path finding robot etc.
Used to measure the distance within a wide range of 2cm to 400cm
Can be used to map the objects surrounding the sensor by rotating it
Depth of certain places like wells, pits etc can be measured since the waves can penetrate
through water
7. DHT11 DIGITAL TEMPERATURE HUMIDITY SENSOR MODULE
Description:
The sensor can measure temperature from 0°C to 50°C and humidity from 20% to 90% with an
accuracy of ±1°C and ±1%. So if you are looking to measure in this range then this sensor might
be the right choice for you.
Specifications:
Applications:
Specification:
Applications
Garden plants
Moisture detection
Intelligent agriculture
Description:
The Touch Sensor is based on a touch-sensing IC (TTP223B) capacitive touch switch module. In
the normal state, the output module low, low power consumption; When a finger touches the
corresponding position, the high output module, if not touched for 12 seconds, switch mode
down-power.
Jog type: the initial state is low, high touch-sensitive, no touch is low (similar to the touch of a
feature button)the module can be installed in such as plastic surface, glass of non-metallic
materialsin addition to the thin (non-metallic) paper that covers the surface of the module, as
long as the correct location of the touch, you can do hidden in the walls, desktops and other parts
of buttons.
Specification:
Description:
MF RC522 is used in highly integrated 13.56MHz contactless communication card chip to read
and write, of NXP for “three” and the application launched a low voltage, low cost, small size,
non-contact card chip to read and write, intelligent instruments and portable handheld devices
developed better.
The MF RC522 use of advanced modulation and demodulation concept completely integrated in
the 13.56MHz all kinds of passive contactless communication methods and protocols. 14443A
compatible transponder signal. The digital part handles the the ISO14443A frames and error
detection. In addition, support Quick CRYPTO1 encryption algorithm, the term verification
MIFARE series. MFRC522 support MIFARE series of high-speed non-contact communication,
two-way data transfer rates up to 424kbit / s.
As 13.56MHz highly integrated card reader series chip new family, the MF RC522 MF RC500
MF RC530 there are many similarities, but also have many of the characteristics and differences.
Communication between it and the host SPI mode, helps to reduce the connection, reduce PCB
board volume and reduce costs.
Specification:
1. Operating Current :13-26mA/DC 3.3V
2. Idle Current :10-13mA/DC 3.3V
3. Sleep Current: <80uA
4. Peak Current: <30mA
5. Operating Frequency: 13.56MHz
6. Supported card types: mifare1 S50, mifare1 S70, mifareUltraLight, mifare Pro,
mifareDesfire and mifare Classic
7. Environmental Operating Temperature: -20-80 degrees Celsius
8. Environmental Storage Temperature: -40-85 degrees Celsius
9. Relative humidity: relative humidity 5% -95%
10. Data transfer rate: maximum 10Mbit/s
11. Size: RFID-RC522 Module:3.9 x 6 cm The Standard S50 Blank Card :8.5 x 5.4 cm
12. Diameter of S50 special-shaped card: 3.1(max)
One-time mode:
In One-time mode, we can set the timer to go off after a particular time duration,
say 10 ms. Once started, the timer counts down and once it runs out it notifies the
core through a mechanism called interrupts (discussed later in this article)and the
timer gets disabled. This action is very similar to using a stopwatch in count down
mode.
Periodic mode
In periodic mode, once the timer runs out, it notifies the core, then instead of
getting disabled, it automatically reloads the initial value and starts counting down
again. Basically, all this mode does extra compared to the One-time mode is just
the auto-restart!
There are several types of timers that can be present in an embedded system.
Examples cam include general-purpose timers, watchdog timers, and SysTick
timers. Each of these is useful in specific scenarios. You can read this article to
learn more about timers
The microcontrollers are digital devices that can only deal with binary voltage
levels, level 0 and level 1. Level 1 can be 1.8v or 3.3v or 5v depending upon the
microcontroller design and Level 0 is usually 0v. If we need some other voltages
in the middle, let’s say 0.45v, the only way to accomplish this is by turning on
and off the pins continuously at a very fast rate so that the average voltage
becomes 0.45v. The device that does this is called PWM controllers.
For example, say we have a microcontroller with voltage levels of 0v and 5v and
we need 2.5v output. We can use the PWM controller to do that for us by asking it
to keep the pin at 0v for 1ms and 5v for 1ms and just alternate between the 2 for
as long as we need this 2.5v output.
The duty cycle and period are the 2 most important parameters when designing
the chip. Duty cycle is the ratio of On-time to Off-time and the period of a PWM
output is simply the time duration of one period as shown in the image above.
5. Interrupt controllers:
Interrupt controllers listen to the peripherals for events and reports to the
processor once an event occurs.
Lets first talk about what interrupts are by considering some real-life examples of
interrupts.
you are sleeping and in the morning the alarm you set goes off and wakes
you up (by interrupting your sleep)
You are reading a book and your phone rings to alert you of a call (by
interrupting your reading session.)
These are 2 examples of day to day interrupts experienced by us humans.
This concept has been ported to embedded systems using special devices called
interrupt controllers. I like thinking of them as event listener peripherals. Their
main job is to listen to the events generated by the other peripherals and report
them to the processor.
This analogy is perfect for describing DMA. Here the microprocessor is your
awesome programmer, the customer coming in is say UART interrupts to the
microprocessor, UART data is the parcels and the second person hired is the
DMA controller.
ADMUX Register
REFS1 and REFS0 (REFerence Selection bit 1 to 0) : this bits are used to determine what reference voltage source
to be used for AD Conversion. It can be either internal 2.56 V or through external AREF (Analog REFerence) pin,
following table sows the bit configuration for different reference source :
Click on the link below to see schematic of different type reference source
MUX3 to MUX0 (multiplexer) : This bits are used to select particular analog input channel. The table shows bits to
be set to enable any particular pin (ADC5 ....ADC0)
Note that bit 4 (MUX3) is not used in Atmega8 as there are only 6 analog pins (three bits are sufficient to point the
address). However there are another AVR device which have more than 8 analog pins for which the fourth bit is
utilized, Also note that if bits are changed during a conversion, the change will not go in effect until conversion
completes
ADCSRA Register
The main use of this Register is to enable the ADC features in AVR's I/O
Port, Starting the conversion of analog, Enabling Interrupt, Setting a flag bit after conversion, Declaring mode either
it will be free running or Single Conversion mode, and defining the Prescaler
ADEN (ADc ENable) : This bit of this register is used to enable the ADC feature in Atmega8's I/O Port (PC0 to
PC5) otherwise these pins will work as GPIO (general purpose input output) pins.
ADSC (ADc Start Conversion) : Writing a logical 1 to this bit will start a conversion of analog data of that
selected I/O pin. (ADMUX Register is used to select the pin for conversion. We will study ahead) In Single
Conversion Mode, this bit will remain cleared until the conversion completes.
ADFR (ADc Free Running) : Writing a logical one to this bit enables the Free Running Mode where the ADC
samples and updates the Data Register continuously. Clearing this bit will terminate this mode.
ADIF (ADc Interrupt Flag) : when the conversion is finished and Data Register is updated this bit is set to 1
automatically thus it is used to check whether conversion is completed or not
ADIE (ADc Interrupt Enable) : when this bit is set to 1 and the global interrupt ( I bit in SREG) are enabled the
ADC interrupt is activated and the ADC ISR (Interrupt Service Routine) is called when conversion completed.
ADPS2 to ADPS0 (ADc Prescaler Select) : this bit determines the division factor between AVR clock frequency
and the ADC clock frequency the following table describes the setting of this bits...