electronics 101 for software developers

Post on 23-Jan-2017

791 Views

Category:

Technology

4 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Dror Helperdrorh@codevalue.net | @dhelper | http://blog.drorhelper.com

Electronics 101 for software developers

• Consultant @CodeValue

• Developing software (professionally) since 2002• Clean coder & Test Driven Developer

• OzCode Evangelist

• Blogger: http://blog.drorhelper.com

About.ME

???

We’re surrounded by itAffect the real worldConnect to your environmentControl cool gadgetsIoT, IoT, IoT!

It’s fun & easy

Why should you care about Electronics?

INTRODUCTION TO ELECTRONICS

Electricity & water

What would happen if we raise one side

V

I

R

• Electric potential energy per unit charge• Measured in Volts (V)

Voltage

V V

in

• The quantity of charge that flows through the circuit

• Measured in Amperes (A)

Current

Resistance

• The difficulty to pass through an electric conductor

• Measured in ohm(Ω)

Color 1st 2nd 3rd Multiplier ToleranceBlack 0 0 0 1Brown 1 1 1 10 ±1%Red 2 2 2 100 ±2%Orange 3 3 3 1KYellow 4 4 4 10KGreen 5 5 5 100K ±0.5%Blue 6 6 6 1M ±0.25%Violet 7 7 7 10M ±0.10%Grey 8 8 8 ±0.05%White 9 9 9Gold 0.1 ±5%Silver 0.01 ±10%

Resistor values

220Ω (±5%)

4.7KΩ (±10%)

1KΩ (±1%)

330KΩ (±0.5%)

2 2×10

4 7×100

1 0×100

3 3×10K

I X R = V

I currentR ResistanceV Voltage

Ohm Law

I

RV

I

Using Ohm law

3ё12V

I = ?

Calculate current in the system Decide which resistor to use

R=? 12V

I = 0.024A

The overall amount of work being done in a system in relation to timeMeasured in Watts(W)

Power

𝑃 𝑖𝑛>𝑃𝑎𝑙𝑙𝑜𝑤𝑒𝑑=𝐵𝑂𝑂𝑀 !

Parallel circuits

R1=50ё12V R2=200ё

Series circuit

R1=50ё

12V

R2=200ё𝐼= 12

200+50 =0 .048 𝐴V2 = ?

𝑉 2=𝐼 ×𝑅2=( 𝑉 𝑠

𝑅1+𝑅2)×𝑅2=

𝑉 𝑠×𝑅2

𝑅1+𝑅2=9 .6𝑉

CONNECTING COMPONENTS

Introducing the Light Emitted Diode (LED)• Allow current only in one direction• Has two legs – long leg should face

the +

Now let’s make something sparkle

+-

1. Keeps components in place2. Connects components

Solderless breadboard

Using a breadboardBe organized and eliminate wiring

Never short-circuit

Tip: clip components for better management

Adjustable resistorOR

Adjustable voltage divider

The potentiometer

Using the potentiometer

R1

V

R2

Say hello to my little friend

Connecting the right inputs

Tips on using the multimeter

Measure Resistance without currentMeasure Voltage in parallelMeasure Current in series

On demand break/connect

Push buttons/Switches

Using buttons

Can you guess what this is?a

b

c

d

e

f

a

g

d

bf

e c

HELLO MICRO CONTROLLERS

Microcontroller example: Arduino Uno

Generic pin on an integrated circuit

Can be controlled by user at run time.

There are digital and analog pins

General purpose Input/Output (GPIO)

Digital and analog signals

X = LOW/HIGH

0 ≤ X ≤ Max

Using GPIO

Using sensors

R2

R1

5v

A0

V2

1. Where to connect the GND2. Where to connect Vin and/or Signal3. Maximum Power (V x I) resistance

Tip: try to find circuit schema online

What to look for before connecting a sensor

RESOURCESWhere to go from here?

How to startBuy a starter kit • Sunfounder• Sparkfun• Seeed• Make• Keyes [insert number here] in 1

Build your own kit• Breadboard, Resistors, LEDs, sensors• Google for ideas• Choose a project and go from there

123d Circuits (https://123d.circuits.io)Fritzing (http://fritzing.org/)

Useful (and free) software

Books

Ebooks: www.oreilly.com coupon code: TS2016 Print: www.wordery.com

Arduino: https://www.arduino.cc/Raspberry PI: https://www.raspberrypi.org/Windows 10 IoT: https://dev.windows.com/en-us/iotMake: http://makezine.com/

Stack Exchange sites:Electrical engineering http://electronics.stackexchange.com/Raspberry PI http://raspberrypi.stackexchange.com/Arduino http://arduino.stackexchange.com/

Additional resources

Dror HelperC: 972.05.7668543e: drorh@codevalue.netB: blog.drorhelper.comw: http://www.oz-code.com

top related