1. Trang chủ
  2. » Tất cả

Simon Monk-Hacking Electronics_ Learning Electronics with Arduino and Raspberry Pi-McGraw-Hill (2017)

305 5 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Cấu trúc

  • Cover

  • Title Page

  • Copyright Page

  • Dedication

  • Contents at a Glance

  • Contents

  • Acknowledgments

  • Introduction

  • CHAPTER 1 Getting Started

    • Getting Stuff

      • Buying Components

      • Where to Buy Things to Hack

      • A Basic Toolkit

    • Stripping Wire

      • You Will Need

    • Joining Wires Together by Twisting

      • You Will Need

    • Joining Wires by Soldering

      • Safety

      • You Will Need

      • Soldering

      • Joining Wires

    • Testing a Connection

      • You Will Need

    • Hacking a Computer Fan to Keep Soldering Fumes Away

      • You Will Need

      • Construction

    • Summary

  • CHAPTER 2 Components

    • A Starter Kit of Components

    • Identifying Electronic Components

      • Resistors

      • Capacitors

      • Diodes

      • LEDs

      • Transistors

      • Integrated Circuits

      • Other Stuff

      • Surface Mount Components

    • What Are Current, Resistance, and Voltage?

      • Current

      • Resistance

      • Voltage

      • Ohm’s Law

    • What Is Power?

    • Reading a Schematic Diagram

      • The First Rule of Schematics: Positive Voltages Are Uppermost

      • Second Rule of Schematics: Things Happen Left to Right

      • Names and Values

      • Component Symbols

    • Summary

  • CHAPTER 3 Basic Hacks

    • Making a Resistor Get Hot

      • You Will Need

      • The Experiment

    • Using Resistors to Divide a Voltage

      • You Will Need

      • Construction

    • Converting a Resistance to a Voltage (and Make a Light Meter)

      • You Will Need

    • Hacking a Push Light to Make It Light Sensing

      • You Will Need

      • Breadboard

      • Construction

      • MOSFET Transistors

      • PNP and P-Channel Transistors

      • Common Transistors

    • Using a Power MOSFET to Control a Motor

      • You Will Need

      • Breadboard

    • Selecting a Switch

      • Push-Button Switches

      • Microswitches

      • Toggle Switches

    • Summary

  • CHAPTER 4 LEDs

    • Preventing an LED from Burning Out

      • You Will Need

      • Diodes

      • LEDs

      • Trying It Out

    • Selecting the Right LED for the Job

      • Brightness and Angle

      • Multicolor

      • IR and UV

      • LEDs for Illumination

    • Experimenting with RGB LEDs

      • You Will Need

    • Making a Constant Current Driver

      • You Will Need

      • Design

      • Breadboard

      • Construction

    • Powering Large Numbers of LEDs

    • Making LEDs Flash

      • You Will Need

      • Breadboard

    • How to Use Protoboard (LED Flasher)

    • Using Stripboard (LED Flasher)

      • Designing the Stripboard Layout

      • Construction

      • Troubleshooting

    • Laser Diode Modules

    • Hacking a Slot Car Racer

      • You Will Need

      • Storing Charge in a Capacitor

      • Design

      • Construction

      • Testing

    • Summary

  • CHAPTER 5 Batteries and Power

    • Selecting the Right Battery

      • Battery Capacity

      • Maximum Discharge Rate

      • Single-Use Batteries

      • Rechargeable Batteries

    • Charging Batteries (in General)

      • C

      • Over-Charging

      • Over-Discharging

      • Battery Life

    • Charging a NiMH Battery

      • Simple Charging

      • Fast Charging

    • Charging a Sealed Lead–Acid Battery

      • Charging with a Variable Power Supply

    • Charging a LiPo Battery

    • Hacking a Cell Phone Battery

    • Controlling the Voltage from a Battery

      • You Will Need

      • Breadboard

    • Boosting Voltage

    • Calculating How Long a Battery Will Last

    • Battery Backup

      • Diodes

      • Trickle Charging

    • Using Solar Cells

      • Testing a Solar Panel

      • Trickle Charging with a Solar Panel

      • Minimizing Power Consumption

    • Summary

  • CHAPTER 6 Hacking with Arduino

    • Blinking an LED

      • You Will Need

      • Setting Up Arduino

      • Modifying the Blink Sketch

    • Controlling a Relay Using an Arduino

      • Relays

      • Arduino Outputs

      • You Will Need

      • Construction

      • Software

    • Hacking a Toy for Arduino Control

      • You Will Need

      • Construction

      • The Serial Monitor

      • Software

    • Measuring Voltage with an Arduino

      • You Will Need

      • Construction

      • Software

    • Controlling an LED with an Arduino

      • You Will Need

      • Construction

      • Software (Flashing)

      • Software (Brightness)

    • Playing a Sound with an Arduino

      • You Will Need

      • Construction

      • Software

    • Using Arduino Shields

    • Controlling a Relay from a Web Page

      • You Will Need

    • Switching with an Arduino and Transistor

      • You Will Need

      • Construction

      • Software

    • Using an Alphanumeric LCD Shield with Arduino

      • You Will Need

      • Construction

      • Software

    • Controlling a Servo Motor with an Arduino

      • You Will Need

      • Construction

      • Software

    • Typing Passwords Automatically

      • You Will Need

      • Construction

      • Software

    • Summary

  • CHAPTER 7 Hacking with Raspberry Pi

    • Setting Up a Raspberry Pi

      • Preparation

      • Fetching the Example Code

      • Connecting to Your Pi from a Second Computer

    • Blinking an LED

      • You Will Need

      • Software

    • Controlling a Relay with Raspberry Pi

    • Controlling a Relay from a Web Page

      • Software

    • Summary

  • CHAPTER 8 Hacking with Modules

    • Detecting Movement

      • You Will Need (PIR and LED)

      • Breadboard

      • You Will Need (PIR and Arduino)

      • Construction

      • Software

      • PIR and Raspberry Pi

    • Using Ultrasonic Rangefinder Modules

      • You Will Need

      • The HC-SR04 Rangefinder

    • Using a Wireless Remote Module

      • You Will Need

      • Breadboard

      • Using a Wireless Remote Module with Arduino

      • You Will Need

      • Software

    • Using a Motor Control Module

      • You Will Need

      • Breadboard

      • Using the Control Pins

    • Making a Robot Rover with Raspberry Pi

      • You Will Need

      • Construction

      • Software

    • Using a Seven-Segment Display with Arduino

      • You Will Need

      • Construction

      • Software

    • Using a Seven-Segment Display with Raspberry Pi

      • You Will Need

      • Construction

      • Software

    • Using RFID Modules

      • You Will Need

      • Construction

      • Software

    • Summary

  • CHAPTER 9 Hacking with Sensors

    • Measuring Temperature with an Arduino

      • You Will Need

      • Construction

      • Software

    • Threshold Sensing with Raspberry Pi

      • You Will Need

      • Construction

      • Software

    • Switching with a Sensor and Comparator Chip

      • You Will Need

      • Construction

    • Using a Digital Temperature Sensor

      • You Will Need

      • Construction

      • Software

    • Arduino Egg and Spoon

      • You Will Need

      • Construction

      • Software

    • Measuring Something’s Color

      • You Will Need

      • Construction

      • Software

    • Summary

  • CHAPTER 10 Audio Hacks

    • Hacking Audio Leads

      • General Principals

      • Soldering Audio Connectors

      • Converting a Stereo Signal to Mono

    • Using a Microphone Module

    • Making an FM Bug

      • You Will Need

      • Construction

      • Testing

    • Selecting Loudspeakers

    • Making a 1-Watt Audio Amplifier

      • You Will Need

      • Construction

      • Testing

    • Generating Tones with a 555 Timer

      • You Will Need

      • Construction

    • Making a USB Music Controller

      • You Will Need

      • Construction

      • Software

    • Summary

  • CHAPTER 11 Mending and Breaking Electronics

    • Avoiding Electrocution

    • Taking Something Apart AND Putting It Back Together Again

    • Checking a Fuse

    • Testing a Battery

    • Testing a Heating Element

    • Finding and Replacing Failed Components

      • Testing Components

      • Desoldering

      • Replacement

    • Scavenging Useful Components

    • Reusing a Cell Phone Power Adapter

    • Summary

  • CHAPTER 12 Tools

    • Using a Multimeter (General)

      • Continuity and Diode Test

      • Resistance

      • Capacitance

      • Temperature

      • AC Voltage

      • DC Voltage

      • DC Current

      • AC Current

      • Frequency

    • Using a Multimeter to Test a Transistor

    • Using a Lab Power Supply

    • Introducing the Oscilloscope

    • Software Tools

      • Simulation

      • Fritzing

      • EAGLE PCB

      • Online Calculators

    • Summary

  • Appendix Parts

    • Kits to Accompany This Book

    • Tools

    • Components

      • Component Starter Kits

      • Resistors

      • Capacitors

      • Semiconductors

      • Hardware and Miscellaneous

      • Modules

  • Index

    • A

    • B

    • C

    • D

    • E

    • F

    • G

    • H

    • I

    • J

    • K

    • L

    • M

    • N

    • O

    • P

    • R

    • S

    • T

    • U

    • V

    • W

Nội dung

HowTo-Color (8) / Hacking Electronics / Simon Monk / 236-3 / Front Matter blind folio i 00_FM.indd 6/1/17 3:23 PM HowTo-Color (8) / Hacking Electronics / Simon Monk / 236-3 / Front Matter blind folio ii About the Author Dr Simon Monk (Preston, UK) has a degree in Cybernetics and Computer Science and a PhD in Software Engineering Monk spent several years as an academic before he returned to industry, co-founding the mobile software company Momote Ltd He has been an active electronics hobbyist since his early teens and is a full-time writer on hobby electronics and open-source hardware Dr Monk is the author of numerous electronics books, specializing in open-source hardware platforms, especially Arduino and Raspberry Pi He is also co-author with Paul Scherz of Practical Electronics for Inventors, Fourth Edition You can follow Simon on Twitter, where he is @simonmonk2 00_FM.indd 6/1/17 3:23 PM HowTo-Color (8) / Hacking Electronics / Simon Monk / 236-3 / Front Matter blind folio iii Hacking Electronics Learning Electronics with Arduino® and Raspberry Pi Second Edition Simon Monk New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi San Juan Seoul Singapore Sydney Toronto 00_FM.indd 6/1/17 3:23 PM Copyright © 2017 by McGraw-Hill Education All rights reserved Except as permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher ISBN: 978-1-26-001221-7 MHID: 1-26-001221-2 The material in this eBook also appears in the print version of this title: ISBN: 978-1-26-001220-0, MHID: 1-26-001220-4 eBook conversion by codeMantra Version 1.0 All trademarks are trademarks of their respective owners Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark Where such designations appear in this book, they have been printed with initial caps McGraw-Hill Education eBooks are available at special quantity discounts to use as premiums and sales promotions or for use in corporate training programs To contact a representative, please visit the Contact Us page at www.mhprofessional.com Information has been obtained by McGraw-Hill Education from sources believed to be reliable However, because of the possibility of human or mechanical error by our sources, McGraw-Hill Education, or others, McGraw-Hill Education does not guarantee the accuracy, adequacy, or completeness of any information and is not responsible for any errors or omissions or the results obtained from the use of such information TERMS OF USE This is a copyrighted work and McGraw-Hill Education and its licensors reserve all rights in and to the work Use of this work is subject to these terms Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill Education’s prior consent You may use the work for your own noncommercial and personal use; any other use of the work is strictly prohibited Your right to use the work may be terminated if you fail to comply with these terms THE WORK IS PROVIDED “AS IS.” McGRAW-HILL EDUCATION AND ITS LICENSORS MAKE NO GUARANTEES OR WARRANTIES AS TO THE ACCURACY, ADEQUACY OR COMPLETENESS OF OR RESULTS TO BE OBTAINED FROM USING THE WORK, INCLUDING ANY INFORMATION THAT CAN BE ACCESSED THROUGH THE WORK VIA HYPERLINK OR OTHERWISE, AND EXPRESSLY DISCLAIM ANY WARRANTY, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE McGraw-Hill Education and its licensors not warrant or guarantee that the functions contained in the work will meet your requirements or that its operation will be uninterrupted or error free Neither McGraw-Hill Education nor its licensors shall be liable to you or anyone else for any inaccuracy, error or omission, regardless of cause, in the work or for any damages resulting therefrom McGraw-Hill Education has no responsibility for the content of any information accessed through the work Under no circumstances shall McGraw-Hill Education and/or its licensors be liable for any indirect, incidental, special, punitive, consequential or similar damages that result from the use of or inability to use the work, even if any of them has been advised of the possibility of such damages This limitation of liability shall apply to any claim or cause whatsoever whether such claim or cause arises in contract, tort or otherwise HowTo-Color (8) / Hacking Electronics / Simon Monk / 236-3 / Front Matter blind folio v To Roger, for making it possible for me to turn a hobby into an occupation 00_FM.indd 6/1/17 3:23 PM HowTo-Color (8) / Hacking Electronics / Simon Monk / 236-3 / Front Matter blind folio vi This page intentionally left blank 00_FM.indd 6/1/17 3:23 PM HowTo-Color (8) / Hacking Electronics / Simon Monk / 236-3 / Front Matter Contents at a Glance Getting Started   2 Components 19 Basic Hacks 33 4 LEDs 53 Batteries and Power 81 Hacking with Arduino 105 Hacking with Raspberry Pi 147 Hacking with Modules 161 Hacking with Sensors 195 10 Audio Hacks 217 11 Mending and Breaking Electronics 237 12 Tools 247 A Parts 259 Index   265 vii 00_FM.indd 6/1/17 3:23 PM HowTo-Color (8) / Hacking Electronics / Simon Monk / 236-3 / Front Matter blind folio viii This page intentionally left blank 00_FM.indd 6/1/17 3:23 PM HowTo-Color (8) / Hacking Electronics / Simon Monk / 236-3 / Front Matter Contents Acknowledgments   xix Introduction   xxi CHAPTER Getting Started Getting Stuff Buying Components Where to Buy Things to Hack A Basic Toolkit Stripping Wire You Will Need Joining Wires Together by Twisting You Will Need Joining Wires by Soldering Safety You Will Need Soldering 10 Joining Wires 11 Testing a Connection 12 You Will Need 12 Hacking a Computer Fan to Keep Soldering Fumes Away 14 You Will Need 14 Construction 14 Summary 18 CHAPTER Components 19 A Starter Kit of Components 19 Identifying Electronic Components 20 Resistors 20 Capacitors 21 Diodes 22 ix 00_FM.indd 6/1/17 3:23 PM ... HowTo-Color (8) / Hacking Electronics / Simon Monk / 236-3 / Front Matter blind folio iii Hacking Electronics Learning Electronics with Arduino? ? and Raspberry Pi Second Edition Simon Monk New York Chicago San... sound level, and color ●● Interfacing the Raspberry Pi and Arduino with external electronics ●● Using servo motors xxi 00_FM.indd 21 6/1/17 3:23 PM HowTo-Color (8) / Hacking Electronics / Simon Monk... platforms, especially Arduino and Raspberry Pi He is also co-author with Paul Scherz of Practical Electronics for Inventors, Fourth Edition You can follow Simon on Twitter, where he is @simonmonk2 00_FM.indd

Ngày đăng: 24/12/2018, 11:32