Fork me on GitHub

Project Notes

#641 Electronics Cookbook

Book notes: Electronics Cookbook: Practical Electronic Recipes with Arduino and Raspberry Pi, by Simon Monk. Published May 23, 2017.

Build

Notes

See also:

Contents

Preface

  • Who Should Read This Book
  • Why I Wrote This Book
  • A Word on Electronics Today
  • Navigating This Book
  • Online Resources
  • Conventions Used in This Book
  • Using Code Examples
  • O’Reilly Online Learning
  • How to Contact Us
  • Acknowledgments

1. Theory

  • 1.0. Introduction
  • 1.1. Understanding Current
  • 1.2. Understanding Voltage
  • 1.3. Calculate Voltage, Current, or Resistance
  • 1.4. Calculate Current at Any Point in a Circuit
  • 1.5. Calculate the Voltages Within Your Circuit
  • 1.6. Understanding Power
  • 1.7. Alternating Current

2. Resistors

  • 2.0. Introduction
  • 2.1. Read Resistor Packages
  • 2.2. Find Standard Resistor Values
  • 2.3. Select a Variable Resistor
  • 2.4. Combine Resistors in Series
  • 2.5. Combine Resistors in Parallel
  • 2.6. Reduce a Voltage to a Measurable Level
  • 2.7. Choose a Resistor that Won’t Burn Out
  • 2.8. Measure Light Levels
  • 2.9. Measure Temperature
  • 2.10. Choose the Right Wires

3. Capacitors and Inductors

  • 3.0. Introduction
  • 3.1. Store Energy Temporarily in Your Circuits
  • 3.2. Identify Types of Capacitors
  • 3.3. Read Capacitor Packages
  • 3.4. Connect Capacitors in Parallel
  • 3.5. Connect Capacitors in Series
  • 3.6. Store Huge Amounts of Energy
  • 3.7. Calculate the Energy Stored in a Capacitor
  • 3.8. Modify and Moderate Current Flow
  • 3.9. Convert AC Voltages

4. Diodes

  • 4.0. Introduction
  • 4.1. Block the Flow of Current in One Direction
  • 4.2. Know Your Diodes
  • 4.3. Use a Diode to Restrict DC Voltages
  • 4.4. Let There Be Light
  • 4.5. Detect Light

5. Transistors and Integrated Circuits

  • 5.0. Introduction
  • 5.1. Switch a Stronger Current Using a Weaker One
  • 5.2. Switch a Current with Minimal Control Current
  • 5.3. Switch High Current Loads Efficiently
  • 5.4. Switch Very High Voltages
  • 5.5. Choosing the Right Transistor
  • 5.6. Switching Alternating Current
  • 5.7. Detecting Light with Transistors
  • 5.8. Isolating Signals for Safety or Noise Elimination
  • 5.9. Discover Integrated Circuits

6. Switches and Relays

  • 6.0. Introduction
  • 6.1. Switch Electricity Mechanically
  • 6.2. Know Your Switches
  • 6.3. Switching Using Magnetism
  • 6.4. Rediscover Relays

7. Power Supplies

  • 7.0. Introduction
  • 7.1. Convert AC to AC
  • 7.2. Convert AC to DC (Quick and Dirty)
  • 7.3. Convert AC to DC with Less Ripple
  • 7.4. Convert AC to Regulated DC
  • 7.5. Converting AC to Variable DC
  • 7.6. Regulate Voltage from a Battery Source
  • 7.7. Make a Constant-Current Power Supply
  • 7.8. Regulate DC Voltage Efficiently
  • 7.9. Convert a Lower DC Voltage to a Higher DC Voltage
  • 7.10. Convert DC to AC
  • 7.11. Power a Project from 110 or 220V AC
  • 7.12. Multiply Your Voltage
  • 7.13. Supply High Voltage at 450V
  • 7.14. Even Higher Voltage Supply (> 1kV)
  • 7.15. Very Very High Voltage Supply (Solid-State Tesla Coil)
  • 7.16. Blow a Fuse
  • 7.17. Protect from Polarity Errors

8. Batteries

  • 8.0. Introduction
  • 8.1. Estimating Battery Life
  • 8.2. Selecting a Nonrechargeable Battery
  • 8.3. Selecting a Rechargeable Battery
  • 8.4. Trickle Charging
  • 8.5. Automatic Battery Backup
  • 8.6. Charging LiPo Batteries
  • 8.7. Get Every Drop of Power with the Joule Thief

9. Solar Power

  • 9.0. Introduction
  • 9.1. Power Your Projects with Solar
  • 9.2. Choose a Solar Panel
  • 9.3. Measure the Actual Output Power of a Solar Panel
  • 9.4. Power an Arduino with Solar
  • 9.5. Power a Raspberry Pi with Solar

10. Arduino and Raspberry Pi

  • 10.0. Introduction
  • 10.1. Explore Arduino
  • 10.2. Downloading and Using the Book’s Arduino Sketches
  • 10.3. Explore Raspberry Pi
  • 10.4. Downloading and Running This Book’s Python Programs
  • 10.5. Run a Program on Your Raspberry Pi on Startup
  • 10.6. Explore Alternatives to Arduino and Raspberry Pi
  • 10.7. Switch Things On and Off
  • 10.8. Control Digital Outputs with Arduino
  • 10.9. Control Digital Outputs from Raspberry Pi
  • 10.10. Connect Arduino to Digital Inputs Like Switches
  • 10.11. Connect Raspberry Pi to Digital Inputs Like Switches
  • 10.12. Read Analog Inputs on Arduino
  • 10.13. Generate Analog Output on Arduino
  • 10.14. Generate Analog Output on Raspberry Pi
  • 10.15. Connect Raspberry Pi to I2C Devices
  • 10.16. Connect Raspberry Pi to SPI Devices
  • 10.17. Level Conversion

11. Switching

  • 11.0. Introduction
  • 11.1. Switch More Power than Your Pi or Arduino Can Handle
  • 11.2. Switch Power On the High Side
  • 11.3. Switch Much More Power
  • 11.4. Switch Much More Power on the High Side
  • 11.5. Choose Between a BJT and MOSFET
  • 11.6. Switch with Arduino
  • 11.7. Switch with a Raspberry Pi
  • 11.8. Reversible Switching
  • 11.9. Control a Relay from a GPIO Pin
  • 11.10. Control a Solid-State Relay from a GPIO Pin
  • 11.11. Connect to Open-Collector Outputs

12. Sensors

  • 12.0. Introduction
  • 12.1. Connect a Switch to an Arduino or Raspberry Pi
  • 12.2. Sense Rotational Position
  • 12.3. Sense Analog Input from Resistive Sensors
  • 12.4. Add Analog Inputs to Raspberry Pi
  • 12.5. Connect Resistive Sensors to the Raspberry Pi without an ADC
  • 12.6. Measure Light Intensity
  • 12.7. Measure Temperature on Arduino or Raspberry Pi
  • 12.8. Measure Temperature without an ADC on the Raspberry Pi
  • 12.9. Measure Rotation Using a Potentiometer
  • 12.10. Measure Temperature with an Analog IC
  • 12.11. Measure Temperature with a Digital IC
  • 12.12. Measure Humidity
  • 12.13. Measure Distance

13. Motors

  • 13.0. Introduction
  • 13.1. Switch DC Motors On and Off
  • 13.2. Measure the Speed of a DC Motor
  • 13.3. Control the Direction of a DC Motor
  • 13.4. Setting Motors to Precise Positions
  • 13.5. Move a Motor a Precise Number of Steps
  • 13.6. Choose a Simpler Stepper Motor

14. LEDs and Displays

  • 14.0. Introduction
  • 14.1. Connect Standard LEDs
  • 14.2. Drive High-Power LEDs
  • 14.3. Power Lots of LEDs
  • 14.4. Switch Lots of LEDs at the Same Time
  • 14.5. Multiplex Signals to 7-Segment Displays
  • 14.6. Control Many LEDs
  • 14.7. Change the Colors of RGB LEDs
  • 14.8. Connect to Addressable LED Strips
  • 14.9. Use an I2C 7-Segment LED Display
  • 14.10. Display Graphics or Text on OLED Displays
  • 14.11. Display Text on Alphanumeric LCD Displays

15. Digital ICs

  • 15.0. Introduction
  • 15.1. Protecting ICs from Electrical Noise
  • 15.2. Know Your Logic Families
  • 15.3. Control More Outputs Than You Have GPIO Pins
  • 15.4. Build a Digital Toggle Switch
  • 15.5. Reduce a Signal’s Frequency
  • 15.6. Connect to Decimal Counters

16. Analog

  • 16.0. Introduction
  • 16.1. Filter Out High Frequencies (Quick and Dirty)
  • 16.2. Create an Oscillator
  • 16.3. Flash LEDs in Series
  • 16.4. Avoid Drops in Voltage from Input to Output
  • 16.5. Build a Low-Cost Oscillator
  • 16.6. Build a Variable Duty Cycle Oscillator
  • 16.7. Make a One-Shot Timer
  • 16.8. Control Motor Speed
  • 16.9. Apply PWM to an Analog Signal
  • 16.10. Make a Voltage-Controlled Oscillator (VCO)
  • 16.11. Explore Decibel Measurement

17. Operational Amplifiers

  • 17.0. Introduction
  • 17.1. Select an Op-Amp
  • 17.2. Power an Op-Amp (Split Supply)
  • 17.3. Power an Op-Amp (Single Supply)
  • 17.4. Make an Inverting Amplifier
  • 17.5. Make a Noninverting Amplifier
  • 17.6. Buffer a Signal
  • 17.7. Reduce the Amplitude of High Frequencies
  • 17.8. Filter Out Low Frequencies
  • 17.9. Filter Out High and Low Frequencies
  • 17.10. Compare Two Voltages

18. Audio

  • 18.0. Introduction
  • 18.1. Play Sounds on an Arduino
  • 18.2. Play Sound with a Raspberry Pi
  • 18.3. Incorporate an Electret Microphone Into a Project
  • 18.4. Make a 1W Power Amplifier
  • 18.5. Make a 10W Power Amplifier

19. Radio Frequency

  • 19.0. Introduction
  • 19.1. Make an FM Radio Transmitter
  • 19.2. Create a Software FM Transmitter Using Raspberry Pi
  • 19.3. Build an Arduino-Powered FM Receiver
  • 19.4. Send Digital Data Over a Radio

20. Construction

  • 20.0. Introduction
  • 20.1. Create Temporary Circuits
  • 20.2. Create Permanent Circuits
  • 20.3. Design Your Own Circuit Board
  • 20.4. Explore Through-Hole Soldering
  • 20.5. Explore Surface-Mount Soldering
  • 20.6. Desolder Components
  • 20.7. Solder Without Destroying Components

21. Tools

  • 21.0. Introduction
  • 21.1. Use a Lab Power Supply
  • 21.2. Measure DC Voltage
  • 21.3. Measure AC Voltage
  • 21.4. Measure Current
  • 21.5. Measure Continuity
  • 21.6. Measure Resistance, Capacitance, or Inductance
  • 21.7. Discharge Capacitors
  • 21.8. Measure High Voltages
  • 21.9. Use an Oscilloscope
  • 21.10. Use a Function Generator
  • 21.11. Simulation
  • 21.12. Working Safely with High Voltages

Parts and Suppliers

  • Parts
  • Prototyping Equipment
  • Resistors
  • Capacitors and Inductors
  • Transistors, Diodes
  • Integrated Circuits
  • Opto-Electronics
  • Modules
  • Miscellaneous
  • Equipment

Arduino Pinouts

  • Arduino Uno R3
  • Arduino Pro Mini

Raspberry Pi Pinouts

  • Raspberry Pi 2 Model B, B+, A+, Zero
  • Raspberry Pi Model B, Rev. 2, A
  • Raspberry Pi Model B, Rev. 1

Units and Prefixes

  • Units
  • Unit Prefixes
  • Index
About LEAP#641 Books

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

Project Source on GitHub Return to the LEAP Catalog
About LEAP

LEAP is my personal collection of electronics projects - usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting.

Projects are often inspired by things found wild on the net, or ideas from the many great electronics podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know or send a pull-request.

NOTE: For a while I included various scale modelling projects here too, but I've now split them off into a new repository: check out LittleModelArt if you are looking for these projects.

Project Gallery view the projects as an image gallery Notebook reference materials and other notes Follow the Blog follow projects and notes as they are published in your favourite feed reader