Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Electronics 101 for software developers

978 views

Published on

These days it seems as if everybody talks about the internet of things (IoT). With a cheap Arduino, Raspberry PI (or another microcontroller) every developer has the power to control the real world.
Suddenly confronted with resistors, digital inputs, analog interfaces and a weird bread board full of holes – a developer is reminded that the world of hardware can be confusing and sometimes downright frustrating.

Published in: Technology
  • Be the first to comment

Electronics 101 for software developers

  1. 1. Dror Helper drorh@codevalue.net | @dhelper | http://blog.drorhelper.com Electronics 101 for software developers
  2. 2. • Consultant @CodeValue • Developing software (professionally) since 2002 • Clean coder & Test Driven Developer • OzCode Evangelist • Blogger: http://blog.drorhelper.com About.ME
  3. 3. ???
  4. 4. We’re surrounded by it Affect the real world Connect to your environment Control cool gadgets IoT, IoT, IoT! It’s fun & easy  Why should you care about Electronics?
  5. 5. INTRODUCTION TO ELECTRONICS
  6. 6. Electricity & water
  7. 7. What would happen if we raise one side V I R
  8. 8. • Electric potential energy per unit charge • Measured in Volts (V) Voltage V V in
  9. 9. • The quantity of charge that flows through the circuit • Measured in Amperes (A) Current
  10. 10. Resistance • The difficulty to pass through an electric conductor • Measured in ohm(Ω)
  11. 11. Color 1st 2nd 3rd Multiplier Tolerance Black 0 0 0 1 Brown 1 1 1 10 ±1% Red 2 2 2 100 ±2% Orange 3 3 3 1K Yellow 4 4 4 10K Green 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 9 Gold 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
  12. 12. I X R = V I  current R  Resistance V  Voltage Ohm Law I RV I
  13. 13. Using Ohm law 312V I = ? Calculate current in the system Decide which resistor to use R=?12V I = 0.024A
  14. 14. The overall amount of work being done in a system in relation to time Measured in Watts(W) 𝐼 × 𝑉 = 𝑃 Power 𝑃𝑖𝑛 > 𝑃𝑎𝑙𝑙𝑜𝑤𝑒𝑑 = 𝐵𝑂𝑂𝑀!
  15. 15. Parallel circuits R1=5012V R2=200 𝐼𝑡𝑜𝑡𝑎𝑙 = 𝐼1 + 𝐼2 = 𝑉 𝑅1 + 𝑉 𝑅2 𝑉𝑡𝑜𝑡𝑎𝑙 = 𝑉1 = 𝑉2 𝑅𝑡𝑜𝑡𝑎𝑙 = 1 1 𝑅1 + 1 𝑅2 𝑅 = 1 1 50 + 1 200 = 40 𝐼 = 12 40 = 0.3𝐴
  16. 16. Series circuit R1=50 12V R2=200 𝐼𝑡𝑜𝑡𝑎𝑙 = 𝐼1 = 𝐼2 𝑉𝑡𝑜𝑡𝑎𝑙 = 𝑉1 + 𝑉2 𝑅𝑡𝑜𝑡𝑎𝑙 = 𝑅1 + 𝑅2 𝐼 = 12 200 + 50 = 0.048𝐴 V2 = ? 𝑉2 = 𝐼 × 𝑅2 = 𝑉𝑠 𝑅1 + 𝑅2 × 𝑅2 = 𝑉𝑠 × 𝑅2 𝑅1 + 𝑅2 = 9.6𝑉
  17. 17. CONNECTING COMPONENTS
  18. 18. 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 + -
  19. 19. 1. Keeps components in place 2. Connects components Solderless breadboard
  20. 20. Using a breadboard Be organized and eliminate wiring Never short-circuit
  21. 21. Adjustable resistor OR Adjustable voltage divider The potentiometer
  22. 22. Using the potentiometer R1 V R2
  23. 23. Say hello to my little friend
  24. 24. Connecting the right inputs
  25. 25. Tips on using the multimeter Measure Resistance without current Measure Voltage in parallel Measure Current in series
  26. 26. On demand break/connect Push buttons/Switches
  27. 27. Using buttons
  28. 28. Can you guess what this is? a b c d e f a g d bf e c
  29. 29. HELLO MICRO CONTROLLERS
  30. 30. Microcontroller example: Arduino Uno
  31. 31. 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)
  32. 32. Digital and analog signals X = LOW/HIGH 0 ≤ X ≤ Max
  33. 33. Using GPIO
  34. 34. Using sensors R2 R1 5v A0 V2
  35. 35. 1. Where to connect the GND 2. Where to connect Vin and/or Signal 3. Maximum Power (V x I)  resistance Tip: try to find circuit schema online What to look for before connecting a sensor
  36. 36. RESOURCES Where to go from here?
  37. 37. How to start Buy 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
  38. 38. 123d Circuits (https://123d.circuits.io) Fritzing (http://fritzing.org/) Useful (and free) software
  39. 39. Books Ebooks: www.oreilly.com coupon code: TS2016 Print: www.wordery.com
  40. 40. Arduino: https://www.arduino.cc/ Raspberry PI: https://www.raspberrypi.org/ Windows 10 IoT: https://dev.windows.com/en-us/iot Make: 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
  41. 41. Dror Helper C: 972.05.7668543 e: drorh@codevalue.net B: blog.drorhelper.com w: http://www.oz-code.com

×