23
Hard-wired vs. programmable electronics Prof. Slavko Kocijancic University of Ljubljana, Faculty of Education, Dept of Physics and Technology SLOVENIA, Europe Contact: [email protected]

Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Hard-wired vs. programmable electronics

Prof. Slavko Kocijancic

University of Ljubljana, Faculty of Education,

Dept of Physics and Technology

SLOVENIA, Europe

Contact: [email protected]

Page 3: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

University of Ljubljana

● University of Ljubljana is the oldest and largest higher education institution in Slovenia founded in 1919.

● It has more than 40.000 undergraduate and postgraduate students.

● Employs approximately 4.000 higher education teachers and researchers.

● There are 23 faculties and three arts academies.

Page 4: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Faculty of Education

● Since 1947 trains teachers and other education experts for:

● Pre-school, elementary, low & some high secondary (two subjects teachers)

● It has more than 40.000 undergraduate and postgraduate students.

● Bechelor, master, doctoral study.

Page 5: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Slavko Kocijančič

● Higher Education: University of Ljubljana, Faculty of Science and Technology, bachelor degree in applied physics

● Master and PhD degree: University of Ljubljana, Faculty of Electrical Engineering.

● Habilitation degree: Professor Technology Education, formerly Associate professor Electrical Engineering.

● Give lectures at the pre-graduate two-subject study programme: Electrical engineering, Electronics, Energetics, Projects in electronics and Robotics. Also involved in a couple of elective courses at masters and doctoral study programme.

● Coordinated 2, participated in 4 European projects (Leonardo da Vinci, Framework programme 7).

Page 6: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Example circuit: electric security alarm

● A thief cannot enter protected area without interrupting a light beam being a part of security alarm.

● Immediately after the beam is interrupted, a loudspeaker generates sound for chosen time interval.

● An indicator (signal light) is turned on only while the light beam is interrupted and continues to blink after the beam is no longer interrupted and siren is quiet. The security alarm indicates that there was an attempt to enter protected area after the thief escaped.

● An authorised person with the access to the security alarm can press a button on the security alarm to stop the blinking.

FUNCTIONS AND OPERATION OF ALARM

Page 7: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Operation of a model of security alarm

Page 8: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Simulation of security alarm

Simulation of a model of security alarm

1. light beam

2. loudspeaker

3. light indicator

4. button to reset security alarm

Page 9: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

What is under the “black box”?

Under the “black box” of presented video clip is...

Page 10: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

What else can be under the “black box”?Under the “black box” of presented simulation is...

Page 11: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Q0: What is your birthday month

a) January to March

b) April to June

c) July to September

d) October to December

Q0: From which country the lecturer Slavko comes from

a) Hungary

b) Slovakia

c) Slovenia

d) Yugoslavia

On-line test

Visit http://drti.si/jkt1Start with intro now. The rest of the questions (q0 to q6) answer during the lecture when asked.

Page 12: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Q1: How this component is called – what is its function

a) Photo transistor – sensitive to pressure.

b) Photo resistor – sensitive to light intensity.

c) Thermistor – sensitive to light intensity.

d) Strain gauge – sensitive to force.

External components

Page 13: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Photo resistors are also called light dependent resistors (LDR)

Q2: see simulation...

Properties of photo resistor

Page 14: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Voltage divider

Q3: A circuit with three resistors is supplied with an ideal voltage source as shown at the figure below. The switch S is open at first. Confirm correct answers about the changes in the circuit after the switch S is getting closed. Choose between “Increased, decreased, not changed”.

a) voltage on resistor R1 is:

b) voltage on resistor R2 is:

c) sum of voltages on resistors R1 in R

2 is:

d) electrical current supplied by the UG is:

e) electrical current through resistor R2 is:

f) electrical current through resistor R1 is:

Page 15: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Logic gates and LED

We have two different circuits with logic gates which we use to turn on/off an LED (light emitting diode). In digital electronics, logic lavels 0 and 1 often correspond to nearly 0 V and nearly 5 V. See simulation...

Page 16: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Basic logic gates

We have two different circuits with logic gates which we use to turn on/off an LED (light emitting diode). In digital electronics, logic lavels 0 and 1 often correspond to nearly 0 V and nearly 5 V. See simulation...

AND gate OR gate

Input Output

A B Y

0 0 0

0 1 0

1 0 0

1 1 1

Input Output

A B Y

0 0 0

0 1 1

1 0 1

1 1 1

NOT gateInp. Outp.

A Y

0 1

1 0

Page 17: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Q4: For all 4 combinations of switches S1 and S2 select if LED is on (emits light, select 1) or off (select 0).

S1 S2 LED

a) 0 0 ?

b) 0 1 ?

c) 1 0 ?

d) 1 1 ?

LED switched on/off

Page 18: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Switching bulb on/off

We have 12 V, 2 W electric filament lamp. We would like the lamp would be turned off at logic 0 and turned on at logic 1. See simulation.

Page 19: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Switching bulb on/off using transistor

Transistor can be used as a switch. Using it, logic levels can turn on/off electric lamp and supply it with bigger current and higher voltage (12 V).

Page 20: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Voltages when lamp is turned on

Q5: After S2 is si turned on, output of AND gate will get value of logic 1.Which of the values from a) to d) will be most probabbly shown on voltmeters V1 to V4?

a) 0.1 V

b) 0.7 V

c) 4.2 V

d) 11.9 V

Page 21: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Security alarm – programmable version

High-level program (C++) → .hex file → “machine code” saved to Flash ROM

(what is potentiometer used for?)

Page 22: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

From analog to digital and vice versaAnalog output: digital to analog conversion (DAC)

Analog input: analog to digital conversion (ADC), inverse to DAC.

Q6: When input voltage of ADC is 1.2 V, output is 1 0 0. What is input voltage, if output is 0 1 1.

a) 0.9 V

b) 2.1 V

c) 1.0 V

d) 0.6 V

Page 23: Prof. Slavko Kocijancic University of Ljubljana, …binus.ac.id/wp-content/uploads/2018/02/Hard-wired.pdfLogic gates and LED We have two different circuits with logic gates which we

Security alarm – hard-wired version