BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro –...
-
date post
15-Jan-2016 -
Category
Documents
-
view
214 -
download
0
Transcript of BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro –...
![Page 1: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/1.jpg)
BLOGICS!Using a Logic Circuit Simulator
Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord: Prof Hugo Fuks – Class: 33ALecture: Blogics! – Prof. Denise Filippo – 22.08.2011
![Page 2: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/2.jpg)
Blogics!
1. Run Blogics!2. Check the Environment, Sensors and Actuators tabs.3. What is there?
![Page 3: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/3.jpg)
Environment, sensors and actuators
![Page 4: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/4.jpg)
Blogics!
1. Check the Logic and Wires tabs2. What is there?3. What do you think that Blogics! does?
![Page 5: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/5.jpg)
Environment, sensors and actuators
When it is bright, the LED is turned on.When it is dark, the LED is turned off.
![Page 6: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/6.jpg)
Environment, sensors and actuators
When it is bright, the LED is turned on.When it is dark, the LED is turned off.
![Page 7: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/7.jpg)
Environment, sensors and actuators
When it is bright, the LED is turned on.When it is dark, the LED is turned off.
What if we wanted to simulate the behaviour of a firefly?
![Page 8: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/8.jpg)
Logic gate: NOT
When it is bright, the LED is turned offWhen it is dark, the LED is turned on.
![Page 9: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/9.jpg)
Logic gate: NOT with hardware
When it is bright, the LED is turned offWhen it is dark, the LED is turned on.
![Page 10: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/10.jpg)
Logic gate NOT with programming
When it is bright, the LED is turned offWhen it is dark, the LED is turned on.
Lilypad Arduino
![Page 11: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/11.jpg)
Logic gate NOT with programming
When it is bright, the LED is turned offWhen it is dark, the LED is turned on.
if (sensorValue < 40) { digitalWrite(ledPin, HIGH);} else { digitalWrite(ledPin, LOW);}
![Page 12: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/12.jpg)
And the firefly?
What if the light on turned on when it was dark, hot, dry, or bright, cold and over 100m of altitude, when no one was around, or in any condition when its speed was low?
It is good practice to simulate the circuit before building it with actual components!
![Page 13: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/13.jpg)
EXCERCISES
1. Build the following circuit and see what happens
2. Plays the buzzer when it is dry.3. Turns on a fan when it is dark and hot.4. Create your own!
![Page 14: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/14.jpg)
ANSWERS
2 Plays the buzzer when it is dry.
![Page 15: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/15.jpg)
ANSWERS
3 Turns on a fan when it is dark and hot.
![Page 16: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/16.jpg)
ANSWERS
4 Create your own!
![Page 17: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/17.jpg)
OTHERS
The fan is turned on when it is dark, hot, humid and there is someone in the room.
![Page 18: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/18.jpg)
(cont)
![Page 19: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/19.jpg)
(cont)
![Page 20: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/20.jpg)
(cont)
![Page 21: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/21.jpg)
OTHER
Fan is turned on if it is dark, hot and humid or if someone turns the switch on
![Page 22: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/22.jpg)
OTHER
Turns on the LED when it is dark and someone is in the room
![Page 23: BLOGICS! Using a Logic Circuit Simulator Pontifical Catholic University of Rio de Janeiro – PUC-Rio Introduction to Engineering – 2011.2 – ENG 1000 Coord:](https://reader034.fdocuments.in/reader034/viewer/2022051621/56649d555503460f94a32de8/html5/thumbnails/23.jpg)
Turns on the fan when it is hot and humid.
OTHER