the world in blocks 1v05workshopweekend.net/img/arduino-projects/system-thinking.pdf · arduino 7....

16
THE WORLD IN BLOCKS System Thinking for Electronics Malcolm Knapp May 3rd 2015 1

Upload: others

Post on 06-Aug-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The World in Blocks 1V05workshopweekend.net/img/arduino-projects/system-thinking.pdf · Arduino 7. The Arduino is the Processor Arduino Analog Interface Digital Interface PWM Signal

THE WORLD IN BLOCKSSystem Thinking for Electronics

Malcolm Knapp May 3rd 2015

1

Page 2: The World in Blocks 1V05workshopweekend.net/img/arduino-projects/system-thinking.pdf · Arduino 7. The Arduino is the Processor Arduino Analog Interface Digital Interface PWM Signal

Go to http://workshopweekend.net/

arduino/resources !

and download the Arduino Pin out !

2

Page 3: The World in Blocks 1V05workshopweekend.net/img/arduino-projects/system-thinking.pdf · Arduino 7. The Arduino is the Processor Arduino Analog Interface Digital Interface PWM Signal

Start with naming

System Arduino

LED

Potentiometer

Potentiometer Arduino LED

3

Page 4: The World in Blocks 1V05workshopweekend.net/img/arduino-projects/system-thinking.pdf · Arduino 7. The Arduino is the Processor Arduino Analog Interface Digital Interface PWM Signal

Naming Signals

Potentiometer Arduino LED

Analog Signal

Digital Signal

Input Signal

Output Signal

4

Analog Signal Digital Signal

Time Time

Page 5: The World in Blocks 1V05workshopweekend.net/img/arduino-projects/system-thinking.pdf · Arduino 7. The Arduino is the Processor Arduino Analog Interface Digital Interface PWM Signal

Naming Interfaces

Potentiometer Arduino LED

Analog Interface Digital Interface

Analog Signal

Digital Signal

5

Potentiometer Arduino LED

Page 6: The World in Blocks 1V05workshopweekend.net/img/arduino-projects/system-thinking.pdf · Arduino 7. The Arduino is the Processor Arduino Analog Interface Digital Interface PWM Signal

Exercise: What else works

Potentiometer

Analog Interface Digital Interface

Analog Signal

Digital Signal

Analog Signal

Photoresistor Divider

Analog Signal

Thermistor Divider

6

Input OutputProcessor

Abstraction of the system

Input Signal

Output Signal

Arduino LED

Page 7: The World in Blocks 1V05workshopweekend.net/img/arduino-projects/system-thinking.pdf · Arduino 7. The Arduino is the Processor Arduino Analog Interface Digital Interface PWM Signal

Input OutputProcessor

Inputs, Processors, and Outputs

Potentiometer Thermistor Divider

Photoresistor Divider Momentary Switch Ultrasonic Distance

Piezo Speaker IR Receiver Computer

LED Servo

DC Motor Mosfet

Piezo Speaker Computer

Arduino

7

Page 8: The World in Blocks 1V05workshopweekend.net/img/arduino-projects/system-thinking.pdf · Arduino 7. The Arduino is the Processor Arduino Analog Interface Digital Interface PWM Signal

The Arduino is the Processor

Arduino

Analog Interface

Digital Interface PWM Signal

Digital Signal

ascii Text Interface

ascii Text Signal

8

Page 9: The World in Blocks 1V05workshopweekend.net/img/arduino-projects/system-thinking.pdf · Arduino 7. The Arduino is the Processor Arduino Analog Interface Digital Interface PWM Signal

The Definitive Arduino Uno Diagram

9

Page 10: The World in Blocks 1V05workshopweekend.net/img/arduino-projects/system-thinking.pdf · Arduino 7. The Arduino is the Processor Arduino Analog Interface Digital Interface PWM Signal

Arduino Input InterfacesHardware Firmware Read Values

Digital 0V or 5V digitalRead (pin) LOW or HIGH

Analog 0V to 5V analogRead (pin) 0 to 1023

Serial rx pin or USB Serial.read() ascii text

10

Page 11: The World in Blocks 1V05workshopweekend.net/img/arduino-projects/system-thinking.pdf · Arduino 7. The Arduino is the Processor Arduino Analog Interface Digital Interface PWM Signal

Arduino Output Signals

Hardware Firmware Input Values

Digital 0V or 5V digitalWrite (pin, value) LOW or HIGH

PWM 10%-90% Duty Cycle analogWrite (pin, value ) 0 to 254

Serial tx pins/ USB Serial.print (“text”) text

11

Page 12: The World in Blocks 1V05workshopweekend.net/img/arduino-projects/system-thinking.pdf · Arduino 7. The Arduino is the Processor Arduino Analog Interface Digital Interface PWM Signal

12

Period Period

On Time

Off Time

Duty Cycle = On Time/ Period

Duty Cycle = 50%

Period Period

On Time + Off Time = Period

Square Wave

Pulse Width Modulation (PWM)

90% Duty Cycle

10% Duty Cycle

Average Value: 2.5

Average Value: 4.5

Average Value: .5

5

0

In a PWM signal the period stays the same but the On Time varies

Duty Cycle = 90%

Duty Cycle = 10%

Pulse Width Modulation (PWM)

Malcolm Knapp

5

0

5

0

5

0

Page 13: The World in Blocks 1V05workshopweekend.net/img/arduino-projects/system-thinking.pdf · Arduino 7. The Arduino is the Processor Arduino Analog Interface Digital Interface PWM Signal

Transforming Signals

Scaling Logical

multiplication by a scaling factorIF statement with

AND, OR, NOT, greater than, less than, equal to

13

Page 14: The World in Blocks 1V05workshopweekend.net/img/arduino-projects/system-thinking.pdf · Arduino 7. The Arduino is the Processor Arduino Analog Interface Digital Interface PWM Signal

Remote Refrigerator Temperature Monitor

14

Temperature Sensor

Digital

KeypadDigital

ServerSMS

Arduino

SMS Interface

GSM Module

SMS Interface

Digital

LCD display

Digital Interface

3 LEDs

Digital Interface

Digital

Digitalascii

Digital and ascii Interfaces

Digital and ascii

Interfaces

Page 15: The World in Blocks 1V05workshopweekend.net/img/arduino-projects/system-thinking.pdf · Arduino 7. The Arduino is the Processor Arduino Analog Interface Digital Interface PWM Signal

There are even more blocks!

15

Filter

Analog Interface

Analog Signal

TFT display

Digital Interface

Xbee

Digital Interface

Wireless Signal

GPS

Digital Signal

Stepper Motor

Digital Interface

Flex Sensor

Analog Signal

Page 16: The World in Blocks 1V05workshopweekend.net/img/arduino-projects/system-thinking.pdf · Arduino 7. The Arduino is the Processor Arduino Analog Interface Digital Interface PWM Signal

Now it is your turn!

16