You are previewing Electronics Cookbook.
O'Reilly logo
Electronics Cookbook

Book Description

Arduino and Raspberry Pi have brought many new people to the world of electronics, particularly artists, hobbyists, and designers who aren't trained in electrical engineering. If you’re among them, don’t fret. Rather than run out and get an EE degree, just pick up this handy cookbook whenever you need to solve a problem on your project.

Author Simon Monk (Raspberry Pi Cookbook) breaks down this complex subject into recipes that provide immediate solutions to specific issues. With this book, you can quickly search electronics topics and find the recipe you need. Each recipe includes a discussion on why and how the solution works, and allows you to explore as much or as little theory as you’re comfortable with.

Table of Contents

  1. Theory
    1. 1.0. Introduction
    2. 1.1. Understanding Current
    3. 1.2. Understanding Voltage
    4. 1.3. Ohm’s Law
    5. 1.4. Kirchhoff’s Current Law
    6. 1.5. Kirchhoff’s Voltage Law
    7. 1.6. Understanding Power
    8. 1.7. Alternating Current
  2. Resistors
    1. 2.0. Introduction
    2. 2.1. Reading Resistor Packages
    3. 2.2. Finding Standard Resistor Values
    4. 2.3. Potentiometers (Variable Resistors)
    5. 2.4. Resistors in Series
    6. 2.5. Resistors in Parallel
    7. 2.6. Voltage Divider
    8. 2.7. Power Rating
    9. 2.8. Photoresistors
    10. 2.9. Thermistor
    11. 2.10. Wires and Conductors
  3. Capacitors and Inductors
    1. 3.0. Introduction
    2. 3.1. Capacitor Basics
    3. 3.2. Types of Capacitor
    4. 3.3. Reading Capacitor Packages
    5. 3.4. Capacitors in Parallel
    6. 3.5. Capacitors in Series
    7. 3.6. Supercapacitors
    8. 3.7. Energy Stored in a Capacitor
    9. 3.8. Inductor Basics
    10. 3.9. Transformers
  4. Diodes
    1. 4.0. Introduction
    2. 4.1. Diode Basics
    3. 4.2. Types of Diode
    4. 4.3. Zener Diodes
    5. 4.4. LEDs (Light Emitting Diodes)
    6. 4.5. Photodiodes
  5. Transistors and Integrated Circuits
    1. 5.0. Introduction
    2. 5.1. Bipolar Junction Transistors
    3. 5.2. Darlington Transistors
    4. 5.3. MOSFETs
    5. 5.4. IGBTs 
    6. 5.5. Choosing the Right Transistor
    7. 5.6. TRIACs
    8. 5.7. Phototransistors
    9. 5.8. Opto-couplers and Opto-isolators
    10. 5.9. IC Basics
  6. Switches and Relays
    1. 6.0. Introduction
    2. 6.1. Switch Basics
    3. 6.2. Types of Switch
    4. 6.3. Reed Switches
    5. 6.4. Relays
  7. Power Supplies
    1. 7.0. Introduction
    2. 7.1. AC to AC
    3. 7.2. Ungregulated AC to DC Power Supplies
    4. 7.3. Full-wave Recification
    5. 7.4. AC to Regulated DC
    6. 7.5. Variable Regulated AC to DC
    7. 7.6. Voltage Regulation from a Battery Source
    8. 7.7. A Constant-Current Power Supply
    9. 7.8. Efficient DC Voltage Regulation (Switchers)
    10. 7.9. DC to DC Step-Up (Boost Converters)
    11. 7.10. Mains Inverters
    12. 7.11. Mains Switched Mode Power Supply (SMPS)
    13. 7.12. Voltage Multiplier
    14. 7.13. High Voltage Supply 450V
    15. 7.14. Even Higher Voltage Supply (> 1kV)
    16. 7.15. Very Very High Voltage Supply (Solid-State Tesla Coil)
    17. 7.16. Fuses
    18. 7.17. Polarity Protection
  8. Batteries
    1. 8.0. Introduction
    2. 8.1. Estimating Battery Life
    3. 8.2. Selecting a Non-Rechargeable Battery
    4. 8.3. Selecting a Rechargeable Battery
    5. 8.4. Trickle Charging
    6. 8.5. Automatic Battery Backup
    7. 8.6. Charging LiPo Batteries
    8. 8.7. Joule Thief
  9. Solar Power
    1. 9.0. Introduction
    2. 9.1. Solar Power Basics
    3. 9.2. Choosing a Solar Panel
    4. 9.3. Measuring the Actual Output Power of a Solar Panel
    5. 9.4. Powering an Arduino with Solar
    6. 9.5. Powering a Raspberry Pi with Solar
  10. Arduino and Raspberry Pi
    1. 10.0. Introduction
    2. 10.1. Arduino
    3. 10.2. Downloading and Using the Book’s Arduino Sketches
    4. 10.3. Raspberry Pi
    5. 10.4. Downloading and Running this Book’s Python Programs
    6. 10.5. Running a Program on Raspberry Pi on Startup
    7. 10.6. Other Boards
    8. 10.7. GPIO (General Purpose IO) Pins
    9. 10.8. Arduino Digital Ouputs
    10. 10.9. Raspberry Pi Digital Outputs
    11. 10.10. Arduino Digital Inputs
    12. 10.11. Raspberry Pi Digital Inputs
    13. 10.12. Arduino Analog Inputs
    14. 10.13. Arduino Analog Output
    15. 10.14. Raspberry Pi PWM Output
    16. 10.15. Raspberry Pi I2C (IC to IC Interface)
    17. 10.16. Raspberry Pi SPI (Serial Programming Interface)
    18. 10.17. Level Conversion
  11. Switching
    1. 11.0. Introduction
    2. 11.1. The BJT as a Switch
    3. 11.2. High-side Switching using a BJT
    4. 11.3. The MOSFET as a Switch
    5. 11.4. High-side Switching with a MOSFET
    6. 11.5. BJT verses MOSFET
    7. 11.6. Switching with Arduino
    8. 11.7. Switching with a Raspberry Pi
    9. 11.8. Push-Pull Driving
    10. 11.9. Controlling a Relay from a GPIO Pin
    11. 11.10. Controlling a Solid State Relay from a GPIO Pin
  12. Sensors
    1. 12.0. Introduction
    2. 12.1. Using a Switch
    3. 12.2. Position Sensing with a Quadrature Encoder
    4. 12.3. Resistive Sensors (Analog Input)
    5. 12.4. Adding Analog Inputs to Raspberry Pi
    6. 12.5. Resistive Sensors (Step Response)
    7. 12.6. Measuring Light Intensity with a Photoresistor
    8. 12.7. Measuring Temperature with a Thermistor (Voltage Divider)
    9. 12.8. Measuring Temperature with a Thermistor (Step Response)
    10. 12.9. Measuring Rotation using a Potentiometer
    11. 12.10. Measuring Temperature with a TMP36
    12. 12.11. Using a DS18B20 Digital Temperature Sensor
    13. 12.12. Measuring Humidity
    14. 12.13. Measuring Distance
  13. Motors
    1. 13.0. Introduction
    2. 13.1. Switching DC Motors On and Off
    3. 13.2. Mewasuring the Speed of a DC Motor
    4. 13.3. Controlling the Direction of a DC Motor
    5. 13.4. Servomotors
    6. 13.5. Bipolar Stepper Motors
    7. 13.6. Unipolar Stepper Motors
  14. LEDs and Displays
    1. 14.0. Introduction
    2. 14.1. Standard LEDs
    3. 14.2. Driving High-Power LEDs
    4. 14.3. Powering Lots of LEDs
    5. 14.4. Switching Lots of LEDs at the Same Time
    6. 14.5. Multiplexing 7-Segment Displays
    7. 14.6. Charlieplexing
    8. 14.7. RGB LEDs
    9. 14.8. Addressable LED Strips
    10. 14.9. I2C 7-Segment LED Displays
    11. 14.10. OLED I2C Displays
    12. 14.11. Alphanumeric LCD Displays
  15. Digital ICs
    1. 15.0. Introduction
    2. 15.1. Decoupling Capacitors
    3. 15.2. Logic Families
    4. 15.3. Serial to Parallel Shift Registers
    5. 15.4. Flip Flops 
    6. 15.5. Frequency Dividers
    7. 15.6. Decimal Counters
  16. Analog
    1. 16.0. Introduction
    2. 16.1. Low-Pass Filtering (RC)
    3. 16.2. A Transistor Oscillator
    4. 16.3. Ring Oscillator
    5. 16.4. Emitter Follower Buffer
    6. 16.5. Oscillator Using an NE555 IC (50% Duty Cycle)
    7. 16.6. Oscillator Using an NE555 IC (Variable Duty Cycle)
    8. 16.7. One Shot Timer Using an NE555 IC 
    9. 16.8. PWM Motor Speed Control
    10. 16.9. PWM of an Analog Signal Using a NE555 Timer IC
    11. 16.10. Voltage Controlled Oscillator (VCO)
  17. Operational Amplifiers
    1. 17.0. Introduction
    2. 17.1. Selecting an Op-Amp
    3. 17.2. Powering an Op-Amp (Split Supply)
    4. 17.3. Powering an Op-amp (Single Supply)
    5. 17.4. Inverting Amplifier
    6. 17.5. Non-Inverting Amplifier
    7. 17.6. Unity Gain Buffer
    8. 17.7. Active Low-Pass Filter
    9. 17.8. Active High Pass Filter
    10. 17.9. Band-Pass Filter
    11. 17.10. Comparitors
  18. Audio
    1. 18.0. Introduction
    2. 18.1. Decibels
    3. 18.2. Playing Sounds on Arduino
    4. 18.3. Playing Sound with a Raspberry Pi
    5. 18.4. Electret Microphone Pre-amp
    6. 18.5. Linear Power Amplifier (1W)
    7. 18.6. Digital Power Amplifier (10W)