0% found this document useful (0 votes)
95 views14 pages

Ex3-Interfacing Analog Input and Output - SO

This laboratory report summarizes three experiments interfacing analog inputs to an Arduino. The first experiment uses a seven-segment display to count from 0 to 9 and back. The second adds LEDs and an LDR to count shadows and light the LEDs. The third adds a switch and potentiometer to count up or down when a shadow passes the LDR depending on the switch state. Schematics, code, and simulation links are provided for each experiment.

Uploaded by

Noel So jr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views14 pages

Ex3-Interfacing Analog Input and Output - SO

This laboratory report summarizes three experiments interfacing analog inputs to an Arduino. The first experiment uses a seven-segment display to count from 0 to 9 and back. The second adds LEDs and an LDR to count shadows and light the LEDs. The third adds a switch and potentiometer to count up or down when a shadow passes the LDR depending on the switch state. Schematics, code, and simulation links are provided for each experiment.

Uploaded by

Noel So jr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

NATIONAL UNIVERSITY MANILA MICROPROCESSOR SYSTEMS LABORATORY REPORT

Experiment 03:
INTERFACING ANALOG INPUTS

Leader : • So, Noel Jr Rating :

Members : • Conde, Alyssa Mae Date Performed : June 3, 2021

• Fernandez, Fernandez R. Date Submitted : June 6, 2021

• Inhog, Jaylord
• Llantos, John Tristan
• Perez, John Abraham
• Sabado, Christopher Dave

❖ SCENARIOS

 SCENARIO 1

An Arduino program that will:


➢ simulate a simple count up timer. The display count values from 0 up to 9 using a seven-segment
display (SSD).

Initial Configuration and Condition:


➢ he displays value start at 0.
➢ transition between display is 1 second.
➢ when the display reached its maximum value of 9, the display value will go back to 0 and count up
again.

 SCENARIO 2

Additional Components:
• 2 pcs. Light Emitting Diode (LED 0 - 1)
• 1 pc. Light Dependent Resistor (LDR)

An Arduino program that will:


➢ count the number of times a shadow is cast on the LDR. (Max value: 9)
➢ turn ON LED 0 when minimum value is reached.
➢ turn ON LED 1 when maximum value is reached.
➢ stop counting when maximum value is reached.

 SCENARIO 3

Additional Components:
• 1 pc. toggle switch
• 1 pc. 10kΩ potentiometer

Submitted to : ENGR. RAFAEL A. VENTURA


NATIONAL UNIVERSITY MANILA MICROPROCESSOR SYSTEMS LABORATORY REPORT

An Arduino program that will:


➢ a switch state dependent counter that counts the number of times a shadow is cast on the LDR.
➢ when switch state is ON, the display will count up when a shadow is cast on the LDR.
➢ when switch state is OFF, the display will count down when a shadow is cast on the LDR.
➢ turn ON LED 0 when minimum value is reached. min: 0
➢ turn ON LED 1 when maximum value is reached. max: 9
➢ adaptive when the circuit is deployed to a different environment with different lighting source.

Initial Configuration:
➢ the display value start at 0.
➢ LED 0 state is ON.
➢ switch state is OFF.

❖ EQUIPMENTS and MATERIALS

Name Quantity Value *Symbol Remarks

I/O Components
• LED Array 1 0.5 watts L0 – L7 8 LEDs in an Array
• Seven Segment Display 1 0.5 watts SSD1 Common Anode
• 10kΩ Potentiometer 1 10kΩ P1 ----
• Momentary Switch 1 --- S1 Push to ON – Normally Open

Controllers and ICs


• Arduino Uno Board 1 --- --- ----
• CD4511 Decoder 1 --- --- Seven Segment Decoder

Others
• Breadboard 1 Full --- ---
• USB Data Cable 1 1m --- Type A Male to B Male
• Connecting Wires 30 10cm --- Male to Male

❖ HARDWARE CONNECTION

Arduino Board pins


• Digital Pins
• D2 connected to Input 1 to CD4511 decoder
• D3 connected to Input 2 to CD4511 decoder
• D4 connected to Input 3 to CD4511 decoder
• D5 connected to Input 4 to CD4511 decoder
BCD Seven Segment Decoder (CD4511)
• Pin E connected to Pin E of seven segment display
• Pin D connected to Pin D of seven segment display
• Pin C connected to Pin C of seven segment display
• Pin B connected to Pin B of seven segment display
• Pin A connected to Pin A of seven segment display
• Pin G connected to Pin G of seven segment display
• Pin F connected to Pin F of seven segment display

Submitted to : ENGR. RAFAEL A. VENTURA


NATIONAL UNIVERSITY MANILA MICROPROCESSOR SYSTEMS LABORATORY REPORT

❖ INITIAL SETUP CONDITION

 SCENARIO 1

An Arduino program that will:


➢ simulate a simple count up timer. The display count values from 0 up to 9 using a seven-segment
display (SSD).

Initial Configuration and Condition:


➢ he displays value start at 0.
➢ transition between display is 1 second.
➢ when the display reached its maximum value of 9, the display value will go back to 0 and count up
again.

❖ SCHEMATIC CIRCUIT DIAGRAM

Submitted to : ENGR. RAFAEL A. VENTURA


NATIONAL UNIVERSITY MANILA MICROPROCESSOR SYSTEMS LABORATORY REPORT

❖ PICTORIAL CIRCUIT DIAGRAM

❖ EXPERIMENT LINK LOCATION

Refer to the link below for the output experiment that can be simulated:

https://www.tinkercad.com/things/3FvikPuUrsg-e3-interfacing-analog-inputs-fernandez-

Submitted to : ENGR. RAFAEL A. VENTURA


NATIONAL UNIVERSITY MANILA MICROPROCESSOR SYSTEMS LABORATORY REPORT

❖ SOURCE CODES

 SCENARIO 1

INITIAL SOURCE CODE

Submitted to : ENGR. RAFAEL A. VENTURA


NATIONAL UNIVERSITY MANILA MICROPROCESSOR SYSTEMS LABORATORY REPORT

 SCENARIO 1

OPTIMIZED SOURCE CODE

Submitted to : ENGR. RAFAEL A. VENTURA


NATIONAL UNIVERSITY MANILA MICROPROCESSOR SYSTEMS LABORATORY REPORT

❖ INITIAL SETUP CONDITION

 SCENARIO 2

Additional Components:
• 2 pcs. Light Emitting Diode (LED 0 - 1)
• 1 pc. Light Dependent Resistor (LDR)

An Arduino program that will:


➢ count the number of times a shadow is cast on the LDR. (Max value: 9)
➢ turn ON LED 0 when minimum value is reached.
➢ turn ON LED 1 when maximum value is reached.
➢ stop counting when maximum value is reached.

❖ SCHEMATIC CIRCUIT DIAGRAM

 SCENARIO 2

Submitted to : ENGR. RAFAEL A. VENTURA


NATIONAL UNIVERSITY MANILA MICROPROCESSOR SYSTEMS LABORATORY REPORT

❖ PICTORIAL CIRCUIT DIAGRAM

 SCENARIO 2

❖ EXPERIMENT LINK LOCATION

Refer to the link below for the output experiment that can be simulated:

https://www.tinkercad.com/things/3cwOih59DTU-e3-interfacing-analog-inputs-fernandez-

Submitted to : ENGR. RAFAEL A. VENTURA


NATIONAL UNIVERSITY MANILA MICROPROCESSOR SYSTEMS LABORATORY REPORT

❖ SOURCE CODES

 SCENARIO 2

INITIAL SOURCE CODE

Submitted to : ENGR. RAFAEL A. VENTURA


NATIONAL UNIVERSITY MANILA MICROPROCESSOR SYSTEMS LABORATORY REPORT

 SCENARIO 2

OPTIMIZED SOURCE CODE

Submitted to : ENGR. RAFAEL A. VENTURA


NATIONAL UNIVERSITY MANILA MICROPROCESSOR SYSTEMS LABORATORY REPORT

❖ INITIAL SETUP CONDITION

 SCENARIO 3

Additional Components:
• 1 pc. toggle switch
• 1 pc. 10kΩ potentiometer

An Arduino program that will:


➢ a switch state dependent counter that counts the number of times a shadow is cast on the LDR.
➢ when switch state is ON, the display will count up when a shadow is cast on the LDR.
➢ when switch state is OFF, the display will count down when a shadow is cast on the LDR.
➢ turn ON LED 0 when minimum value is reached. min: 0
➢ turn ON LED 1 when maximum value is reached. max: 9
➢ adaptive when the circuit is deployed to a different environment with different lighting source.

Initial Configuration:
➢ the display value start at 0.
➢ LED 0 state is ON.
➢ switch state is OFF.

❖ SCHEMATIC CIRCUIT DIAGRAM

 SCENARIO 3

Submitted to : ENGR. RAFAEL A. VENTURA


NATIONAL UNIVERSITY MANILA MICROPROCESSOR SYSTEMS LABORATORY REPORT

❖ PICTORIAL CIRCUIT DIAGRAM

 SCENARIO 3

❖ EXPERIMENT LINK LOCATION

Refer to the link below for the output experiment that can be simulated:

https://www.tinkercad.com/things/bbTQeDCgSfH-e3-scenario-3-fernandez

Submitted to : ENGR. RAFAEL A. VENTURA


NATIONAL UNIVERSITY MANILA MICROPROCESSOR SYSTEMS LABORATORY REPORT

❖ SOURCE CODES

 SCENARIO 3

INITIAL SOURCE CODE

Submitted to : ENGR. RAFAEL A. VENTURA


NATIONAL UNIVERSITY MANILA MICROPROCESSOR SYSTEMS LABORATORY REPORT

 SCENARIO 3

OPTIMIZED SOURCE CODE

Submitted to : ENGR. RAFAEL A. VENTURA

You might also like