25,99 €
A straightforward demystification of electronics and the Internet of Things A Geek Girl's Guide to Electronics and the Internet of Things breaks down and simplifies electronics and the Internet of Things for the layperson. Written by a leading technical school instructor with a talent for bringing complex topics to everyday people, this book provides concrete examples and practical advice for anyone interested in building, repairing, or studying electronics and functional Internet of Things (IoT) devices. A Geek Girl's Guide to Electronics and the Internet of Things explores a wide range of topics including, among others: * Ohm's and Watt's Law * Series and Parallel Circuits * Diodes, transistors, capacitors and relays * Motors and Pulse with Modulation * Using light to control electricity * Photovoltaic Cells and Transducers * Enhancing circuits with Arduino * Connecting circuits to networks The distinguished author's website includes videos to help you build and enhance projects, along with deeper information to enrich your learning. Additionally, the book goes beyond theory and teaches readers how circuit components become IoT devices and provide the data that drive our modern world. The combination of hands-on activities and solid pedagogy ensures long-lasting retention of the material for everyone.
Sie lesen das E-Book in den Legimi-Apps auf:
Seitenzahl: 603
Veröffentlichungsjahr: 2020
Cover
Introduction
Who Will Benefit Most from This Book
Sourcing Parts and Supplemental Materials
Special Features
What Does This Book Cover?
Part I: IoT and Electricity Basics
CHAPTER 1: IoT and Electronics
IoT in a Nutshell
Parts of an IoT System
Challenges in Implementing IoT
IoT into the Future
CHAPTER 2: Electricity: Its Good and Bad Behavior
Try This: Creating Some Static
Electricity at an Atomic Level
Conductors and Insulators
Characteristics of Electricity
Induction and Conduction
Try This: Creating a Simple Breadboard Circuit
The Basic Circuit
Circuit Protection Devices
CHAPTER 3: Symbols and Diagrams
Types of Diagrams
Schematic Symbols
So Many Switches!
Drawing Your Circuit
Try This: Adding a Switch and Creating a Schematic
CHAPTER 4: Introduction to the Arduino Uno
What Is Arduino?
The Arduino Board
Analog vs. Digital
The Arduino IDE
Try This: Creating a Simple Arduino-Controlled Circuit
Try This: Changing Pins
Try This: Creating Arduino Running Lights
Try This: Adding a Switch to Your Circuit
Try This: Using the Serial Monitor
CHAPTER 5: Dim the Lights
Using a Multimeter
Try This: Repurposing a Power Supply
Measuring Voltage, Current, and Resistance
Try This: Dimming the Lights
Try This: Measuring Circuit Values
Using Arduino to Measure Electricity
Try This: Using an Arduino Voltmeter
Try This: Using an Arduino Ohmmeter
Try This: Using an Arduino Ammeter
Try This: Using an Arduino Continuity Tester
Try This: Building a Dimmable Arduino Camp Light
Soldering, Perfboards, and Shrink Tubing
CHAPTER 6: Feel the Power
Watt’s Law and the Power Wheel
Watts and Horsepower
Battery Power
The Other Resistor Value
Wattmeters
Try This: Using an Arduino Wattmeter
CHAPTER 7: Series and Parallel Circuits
Series, Parallel, and Complex Circuits
Try This: Testing Series and Parallel Configurations
Calculating Values in Series and in Parallel
Sources in Series and Parallel
Try This: Calculating Circuit Values
Part II: Using Common Components
CHAPTER 8: Diodes: The One-Way Street Sign
Try This: Creating a Simple Polarity Tester
Determining Anode and Cathode
Types of Diodes
Try This: Using a Seven-Segment LED
CHAPTER 9: Transistors
Try This: Using a Transistor as an Amplifier
The Purpose of Transistors
Types of Transistors
Try This: Using a Transistor as a Switch
CHAPTER 10: Capacitors
A Quick Look at Capacitors
Try This: Creating a Time Delay Circuit
Capacitor Uses
Try This: Creating an Astable Multivibrator
Try This: Using Capacitors in Series and Parallel
CHAPTER 11: The Magic of Magnetism
The Electricity/Magnetism Relationship
Try This: Building an Electromagnet
Magnetism in Circuits
Relays
Try This: Building a Relay Oscillator
Try This: Setting Up an Emergency Lighting System
CHAPTER 12: Electricity's Changing Forms
Try This: Creating a Water Alarm
Common Transducers
Try This: Creating a Night-Light Circuit
Try This: Creating an Arduino Laser Security System
CHAPTER 13: Integrated Circuits and Digital Logic
Integrated Circuits
Try This: Creating an Astable Multivibrator
Operational Amplifiers
Digital Logic
Try This: Exploring AND and OR Gates
Logic Probes and Oscilloscopes
Part III: More Please
CHAPTER 14: Pulse Width Modulation
Pulse Width Modulation Explained
Try This: Using a PWM LED Dimmer
Try This: Using a PWM Motor Control
Try This: Trying PWM and an Arduino
CHAPTER 15: Sources of Electricity
Chemical Reactions
Try This: Making a Thermocouple
Light
Try This: Displaying PV Output on an Arduino
Friction
Magnetism
Pressure
Wrapping It Up
CHAPTER 16: Transformers and Power Distribution
What Is a Transformer?
Try This: Verifying Transformer Output
Alternating Current Values
Power Distribution Using Transformers
CHAPTER 17: Inverters and Rectifiers
Inverters vs. Rectifiers and Their Uses
Construction of Inverters
Try This: Filtering a Circuit
Construction of Rectifiers
Single-Phase vs. Three-Phase Power
Try This: Building a Small Variable Power Supply
CHAPTER 18: Radio Waves and Tuned Circuits
Radio Waves
Try This: Building a Radio Receiver
Making Waves
Try This: Building an Arduino FM Radio
Tuned Circuits
Part IV: Putting the I in IoT
CHAPTER 19: Connecting Your Circuits to the Cloud
The Arduino IoT Cloud
Try This: Setting Up Your Device
Try This: Using Things, Properties, and Widgets
CHAPTER 20: Just for Fun
Electronic Fabrics and Wearables
Try This: Lighting Up a Teddy Bear
Paper Circuits
Try This: Creating a Conductive Paint Circuit
Try This: Creating a Copper Tape Circuit
Try This: Building Squishy Circuits
CHAPTER 21: What's Next?
The World Is Your Oyster
Recommended Reading and Resources
Words of Encouragement
Index
End User License Agreement
Chapter 3
Table 3.1: Commonly Used Electronics Designators
Chapter 7
Table 7.1: Series and Parallel Circuit Rules
Chapter 8
Table 8.1: Sample LED Voltage Ranges
Chapter 15
Table 15.1: Primary and Secondary Cells
Chapter 1
Figure 1.1: An IoT system
Chapter 2
Figure 2.1: Bending water
Figure 2.2: Atomic structure of gold
Figure 2.3: Excerpt from the periodic table of elements
Figure 2.4: Good conductors
Figure 2.5: Allotropes of carbon
Figure 2.6: Electrons flowing in a conductor
Figure 2.7: Conduction
Figure 2.8: Induction
Figure 2.9: Simple electrical circuit
Figure 2.10: Soldering on a PCB
Figure 2.11: Expanding breadboards
Figure 2.12: Bottom of breadboard
Figure 2.13: Breadboard clip
Figure 2.14: Breadboard features
Figure 2.15: Binding post close-up
Figure 2.16: Power rails jumpered together
Figure 2.17: An IC in DIP format across a breadboard dip
Figure 2.18: Breadboard rows and columns
Figure 2.19: LEDs
Figure 2.20: Jumpers, wire stripper, needle-nose pliers, and safety glasses...
Figure 2.21: Completed LED circuit
Figure 2.22: LED shorted out
Figure 2.23: Ohm's law
Figure 2.24: Carbon film resistors
Figure 2.25: Resistor color code
Figure 2.26: Voltage divider
Figure 2.27: Fuses and a circuit breaker
Figure 2.28: Imprint on a fuse casing
Chapter 3
Figure 3.1: Block diagram and schematic
Figure 3.2: Conductor symbols
Figure 3.3: Common schematic symbols
Figure 3.4: Poles and throws
Figure 3.5: A sampling of switches
Figure 3.6: Schematic symbols for switches
Figure 3.7: Datasheet
Figure 3.8: What you need
Figure 3.9: Wiring diagram of simple circuit with switch
Figure 3.10: Vertical resistor
Figure 3.11: Completed circuit with switch
Figure 3.12: Schematic for simple circuit with switch
Chapter 4
Figure 4.1: Arduino Uno board
Figure 4.2: ATmega328 microcontroller
Figure 4.3: TX and RX lights and USB port
Figure 4.4: Adapter for 9V battery and a transformer
Figure 4.5: Power jack and USB port
Figure 4.6: Power connections
Figure 4.7: Digital and analog pins, LED 13, and GND
Figure 4.8: A square wave
Figure 4.9: An analog wave
Figure 4.10: Binary values across 5 volts
Figure 4.11: Arduino reset button
Figure 4.12: Default Arduino IDE screen
Figure 4.13: Renaming a sketch
Figure 4.14: Project materials
Figure 4.15: Selecting the port
Figure 4.16: A flashing LED circuit
Figure 4.17: Choosing the Blink sketch
Figure 4.18: Changed Blink sketch
Figure 4.19: Running Lights in action
Figure 4.20: A pushbutton circuit
Figure 4.21: Serial Monitor with data
Chapter 5
Figure 5.1: A typical multimeter
Figure 5.2: AC-to-DC power transformer
Figure 5.3: Testing polarity
Figure 5.4: Taking measurements
Figure 5.5: Potentiometer
Figure 5.6: Dimming via potentiometer
Figure 5.7: Simple circuit
Figure 5.8: Measuring the circuit
Figure 5.9: Measuring voltage rise
Figure 5.10: Voltmeter and Serial Monitor
Figure 5.11: Arduino ohmmeter
Figure 5.12: Arduino ohmmeter output
Figure 5.13: A shunt resistor schematic
Figure 5.14: Ammeter circuit
Figure 5.15: Ammeter output
Figure 5.16: Arduino continuity tester
Figure 5.17: Camp lamp schematic
Figure 5.18: A button circuit
Figure 5.19: Breadboard configuration, one row
Figure 5.20: Breadboard configuration, four rows
Figure 5.21: A soldering station
Figure 5.22: Clipping solder leads
Figure 5.23: Perfboards
Figure 5.24: A heat gun and shrink tubing
Chapter 6
Figure 6.1: Sample datasheet
Figure 6.2: The power wheel
Figure 6.3: Resistors
Figure 6.4: Power meters
Figure 6.5: Electric supply bill
Figure 6.6: An LCD front and back
Figure 6.7: An LCD wiring diagram
Figure 6.8: HelloWorld sketch
Figure 6.9: Multimeter and circuit
Figure 6.10: Wattmeter connections
Figure 6.11: Adding a library
Figure 6.12: Wattmeter on an LCD
Figure 6.13: A completed meter and circuit
Figure 6.14: Meter and circuit connections
Chapter 7
Figure 7.1: Series, parallel, and complex circuits
Figure 7.2: LED circuits
Figure 7.3: Incandescent lamp circuits
Figure 7.4: A parallel branch current
Figure 7.5: Kirchhoff's laws
Figure 7.6: Parallel resistances
Figure 7.7: Wire gauge
Figure 7.8: Batteries and holders
Figure 7.9: Improper battery connection
Figure 7.10: Sources in series and parallel
Figure 7.11: Aiding and opposing sources
Figure 7.12: LED series circuit calculation
Figure 7.13: Solving the complex circuit
Chapter 8
Figure 8.1: Simple polarity tester
Figure 8.2: Perfboard polarity tester
Figure 8.3: Diodes and the PN junction
Figure 8.4: An anode and a cathode
Figure 8.5: Various diodes
Figure 8.6: Common diode symbols
Figure 8.7: A Zener voltage regulator
Figure 8.8: A power diode voltage divider/regulator
Figure 8.9: A bridge rectifier
Figure 8.10: A flyback diode
Figure 8.11: Seven-segment LED wiring
Figure 8.12: A bar LED
Chapter 9
Figure 9.1: A transistor face
Figure 9.2: A transistor pinout
Figure 9.3: An amplifier circuit schematic
Figure 9.4: An amplifier circuit
Figure 9.5: An amplifier current flow
Figure 9.6: Signal and power transistors
Figure 9.7: The hierarchy of transistors
Figure 9.8: Transistor symbols
Figure 9.9: An N-channel MOSFET
Figure 9.10: A transistor and heat sink
Figure 9.11: A circuit schematic
Figure 9.12: A transistor switch circuit
Chapter 10
Figure 10.1: Inside a capacitor
Figure 10.2: Common capacitor types
Figure 10.3: Failed electrolytic capacitor
Figure 10.4: Capacitor symbols
Figure 10.5: Time delay circuit
Figure 10.6: Capacitor charged and discharging
Figure 10.7: Transient response
Figure 10.8: Astable multivibrator circuit
Figure 10.9: Inserting a switch
Figure 10.10: Capacitors in parallel
Chapter 11
Figure 11.1: Magnetic domains
Figure 11.2: Magnetic lines of flux
Figure 11.3: Wind farm
Figure 11.4: Electromagnet
Figure 11.5: Magnetism in Circuits
Figure 11.6: Homopolar motor
Figure 11.7: Inductor schematic symbols
Figure 11.8: Inductors on a motherboard
Figure 11.9: Doorbell circuit
Figure 11.10: Reed relays
Figure 11.11: Magnetic alarm
Figure 11.12: A relay
Figure 11.13: Relay oscillator circuit
Figure 11.14: Emergency lighting circuit
Chapter 12
Figure 12.1: Water alarm
Figure 12.2: Inside a buzzer
Figure 12.3: Speakers and microphones
Figure 12.4: Light-based circuit control devices
Figure 12.5: Light bulbs
Figure 12.6: Laser pointer
Figure 12.7: Night-light circuit
Figure 12.8: Electron flow in the night-light
Figure 12.9: Laser alarm circuit
Figure 12.10: Calculating analog in values
Chapter 13
Figure 13.1: Inside a 555 timer IC
Figure 13.2: Mark time, space time, and cycle
Figure 13.3: A 555 Astable timer circuit schematic
Figure 13.4: A 555 timer pinout
Figure 13.5: A 555 timer circuit
Figure 13.6: A completed astable circuit
Figure 13.7: Inverting and noninverting op-amp
Figure 13.8: Decimal, binary, and hexadecimal
Figure 13.9: Logic gates and truth tables
Figure 13.10: A logic gate pinout
Figure 13.11: An AND gate pinout and circuit
Figure 13.12: OR gate and NOT (inverter) pinouts
Figure 13.13: Logic pulser
Figure 13.14: Oscilloscope
Chapter 14
Figure 14.1: Duty cycles
Figure 14.2: Datasheet with duty cycle
Figure 14.3: PWM LED dimmer circuit schematic
Figure 14.4: PWM LED dimmer circuit pinout
Figure 14.5: PWM LED circuit complete
Figure 14.6: Complete circuit with oscilloscope
Figure 14.7: Flyback diode
Figure 14.8: Clamping Zener diodes
Figure 14.9: PWM motor circuit with flyback diode
Figure 14.10: Simple Arduino PWM circuit
Chapter 15
Figure 15.1: A homemade voltaic cell
Figure 15.2: Homemade thermocouple
Figure 15.3: Construction of a PV cell
Figure 15.4: PV cells, panels, and array
Figure 15.5: Project pinout
Figure 15.6: PV cell’s Serial Monitor output
Figure 15.7: Completed PV monitoring circuit
Figure 15.8: Inside a motor/generator
Chapter 16
Figure 16.1: Common transformers
Figure 16.2: Inside a transformer
Figure 16.3: Phase relationships
Figure 16.4: Calculating current, voltage, and turns ratios
Figure 16.5: Autotransformers, variacs, and taps
Figure 16.6: A transformer label
Figure 16.7: A 555 timer circuit
Figure 16.8: A transistor section
Figure 16.9: Completed transformer circuit
Figure 16.10: Demo circuit readings
Chapter 17
Figure 17.1: Typical PV system
Figure 17.2: A small inverter
Figure 17.3: An inverted signal circuit
Figure 17.4: Inverting current
Figure 17.5: An Arduino PWM circuit
Figure 17.6: A square wave
Figure 17.7: A single RC filter stage
Figure 17.8: Four RC filter stages
Figure 17.9: Filtered oscilloscope outputs
Figure 17.10A: Half-wave rectification
Figure 17.10B: Full-wave rectification, center tap transformer
Figure 17.10C: Full-wave rectification, bridge rectifier
Figure 17.11: Single-phase and three-phase power
Figure 17.12: Variable power supply circuit
Figure 17.13: A variable power supply
Chapter 18
Figure 18.1: The electromagnetic spectrum
Figure 18.2: A crystal radio and amplifier schematic
Figure 18.3: Amplifier circuit complete
Figure 18.4: A simplified radio transmitter
Figure 18.5: A simplified radio receiver
Figure 18.6: AM and FM waves
Figure 18.7: The TEA5767 FM radio shield
Figure 18.8: Installing a library
Figure 18.9: Finding a library
Figure 18.10: Displaying line numbers in the IDE
Figure 18.11: Radio module connections
Figure 18.12: Potentiometer station selection
Figure 18.13: Tuned circuits
Chapter 19
Figure 19.1: The Arduino Create main screen
Figure 19.2: A blue LED dimmer circuit
Figure 19.3: Your Things screen
Figure 19.4: The properties of Blue_Light
Figure 19.5: The Editor page
Figure 19.6: The
thingProperties.h
tab
Figure 19.7: The Secret tab
Figure 19.8: The ReadMe.adoc tab
Figure 19.9: The IoT Cloud thing
Figure 19.10: Welcome to Dashboards
Figure 19.11 Widgets
Figure 19.12: The widgets added screen
Figure 19.13: Linking the widget
Chapter 20
Figure 20.1: A sewable LED kit
Figure 20.2: SMD examples
Figure 20.3: The thread circuit
Figure 20.4: Separate LED boards
Figure 20.5: Threading the needle
Figure 20.6: Sewing the components
Figure 20.7: Project complete
Figure 20.8: SMT stick-on LEDs and circuits
Figure 20.9: Graphite conductors
Figure 20.10: A painted circuit
Figure 20.11: Paint over a painted circuit
Figure 20.12: A copper tape circuit
Figure 20.13: The copper tape card front
Figure 20.14: Finishing the card
Figure 20.15: The insulating square
Figure 20.16: The lit blue dough square
Figure 20.17: The lit flag
Cover
Table of Contents
Begin Reading
iii
xxiii
xxiv
xxv
xxvi
xxvii
1
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
161
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
385
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
iv
v
vii
ix
xi
437
Audrey O’Shea
Welcome to the world of electronics! This is an exciting place to be, and I'm so glad that you've decided to join me in this journey. IoT and electronics are inseparable, as you'll soon see. We'll start with learning about electronic components and creating some useful circuits. In addition to traditional electronic circuits on breadboards, many chapters have circuits that use the programming power of an Arduino board. Finally we'll be connecting your circuits to the Internet so you can control them from anywhere. This book starts small and helps you grow in knowledge as it progresses and encourages you to reach even further. My true hope is that it will get you excited about working with electronics, regardless of whether it's a hobby or a new career, and that it will give you confidence to do whatever it is that makes your heart sing, no matter who or where you are in life.
I'm here to tell you that virtually everyone can do electronics, you included. Although this is a male-dominated field, I encourage you not to let that deter you from getting into the game. If you're female or any other non-traditional geek, follow your passion like I did. Like me, you may be the only woman in the room, but that's perfectly fine. It's an exciting and dynamic career field, and if you're different from the stereotypical electronics geek in some way, that's great! You bring a different perspective, which makes you that much more valuable.
This book is intended for beginners, or those with some basic electronics knowledge who want to fill in those knowledge gaps with tidbits of information that can make all the difference. You'll start with the basics and progress to more interesting (difficult) projects as you go along. This book contains more than 35 “Try This” projects where you can see how things work and solidify what you're learning. Some of the projects include the following:
Creating a super-bright camping light using LEDs
Building a laser trip alarm
Making paper and clay electronics for kids
Creating light-activated circuits
Constructing an Arduino wattmeter
Connecting your projects to the Internet
You'll learn some science behind how things work so the components and connections will make sense, and you'll learn how to avoid some of the pitfalls of circuit building. For example, after studying the material in this book, you'll know why you need a flyback diode for a motor (and understand what one is), instead of having to figure it out when the circuit fails and you're on your third set of components. However, I expect there may be some of that in your future, too, as you take your own ideas and build them into new and interesting circuits. Mistakes are part of the learning process. That's the fun of experimenting! You will create prototype circuits on breadboards, and if you're happy with the result, you can solder them onto something more permanent because you'll know how to do that, too.
I wouldn't want to teach you to fly and then leave you on your own, so throughout the book I've included some of my favorite places to find information and components.
My website, cliffjumpertek.com, also has additional reference materials, tutorials, and videos of the book's projects to help with your journey, should you need it.
TIP Throughout the book, you'll find tips that will provide you with supplemental information, usually to make something easier so you don't have to learn from trial and error.
WARNING Included in this book are warnings—please take these seriously! Make sure you read all of these because they have information to protect you or others from injury and/or your project from damage.
NOTE Notes are supplemental material or interesting tidbits of information.
Time to turn the page and get started on your future in electronics! I'll see you there.
This book is designed to provide you with a foundation of knowledge in electronics, IoT, and the Arduino environment. Its multitude of projects are the springboard to a deeper understanding and ever more challenging projects.
Chapter 1
: IoT and Electronics
The book starts with an explanation of how electronic circuit boards fit into the world of IoT. The components of an IoT system are explained, showing how IoT starts with electronic sensors and then interfaces with computers and communication systems. It also notes some of the challenges in developing and using IoT systems, as well as where IoT may be headed in the future.
Chapter 2
: Electricity: Its Good and Bad Behavior
Understanding how electricity behaves will help you to determine why circuits are or are not working. This chapter delves into the science behind electricity. It also explains electricity's characteristics and the relationship between those electrical characteristics. You'll learn how to build a simple circuit and then how to create a circuit on a breadboard, which is the foundation for most of the circuits created in the rest of the book.
Chapter 3
: Symbols and Diagrams
The field of electronics uses symbols to represent components when communicating information. This chapter teaches the basic symbology used and how to create a breadboard circuit using a schematic as a guide.
Chapter 4
: Introduction to the Arduino Uno
The Arduino is a popular platform for creating IoT implementations. In this chapter, you'll learn the form and function of the Arduino Uno and its programming platform. You'll also learn about analog and digital signals and the role of binary, all while building projects.
Chapter 5
: Dim the Lights
This chapter gets its name from one of the eight labs included in it; however, it's more about measuring electricity. You'll learn to use a multimeter and create a voltmeter, ohmmeter, and ammeter using an Arduino board. There's also a great project for creating a camp lamp, and it finishes with a lesson on soldering, perfboards, and shrink tubing, so you'll know how to put those projects together on a more permanent basis.
Chapter 6
: Feel the Power
Power is another characteristic of an electrical circuit and is explained in this chapter. You'll learn the relationship between Ohm's law and Watt's law as well as power from batteries, power ratings of resistors, and ways to measure circuit power. You'll also learn how to use an LCD screen with an Arduino board.
Chapter 7
: Series and Parallel Circuits
Electricity behaves differently depending on the path that it takes through a circuit. This chapter explains the implications of letting it take those different paths. You'll also learn about the effect of wire size and composition. In the spirit of full disclosure, this chapter involves math.
Chapter 8
: Diodes: The One-Way Street Sign
This is the first of several chapters about specific electronic components. You'll learn about diode construction and why diodes behave as they do, along with some common uses for diodes. The projects show you how to work with seven-segment LEDs and bar LEDs.
Chapter 9
: Transistors
You may know that transistors are the foundation of our modern computer processors, but they can do so much more. This chapter explains different types of transistors and their uses while giving you some practice working with them.
Chapter 10
: Capacitors
Another powerhouse when it comes to computer circuits is the lowly capacitor. They're found everywhere and sometimes taken for granted. This chapter teaches you the characteristics of capacitors and gives you some experience putting them to work.
Chapter 11
: The Magic of Magnetism
Magnetism and electricity are like two sides of a coin. This chapter examines that relationship and how magnetism is put to serious work. You'll also learn about relays, which are a component of many industrial electronic circuits.
Chapter 12
: Electricity's Changing Forms
Working with electricity is even more fun when you can change it into light and heat and sound, or vice versa. This chapter shows you several ways to do just that, along with the science behind the changes.
Chapter 13
: Integrated Circuits and Digital Logic
Integrated circuits make our work easier by having an entire circuit on a chip the size of your thumbnail, or even smaller, while digital logic chips can be the decision-makers on our circuits. This chapter explores both and introduces the oscilloscope, which lets you see in real time what is happening electrically in a circuit.
Chapter 14
: Pulse Width Modulation
Pulse width modulation (PWM) enables a digital signal to control an analog device, such as a motor. In this chapter, you'll build a PWM circuit on a breadboard and then learn how to accomplish the same magic using an Arduino board.
Chapter 15
: Sources of Electricity
Sources of electricity are touched upon in other chapters, but this one brings all the pieces together in one place. Here you can practice making some electrical current of your own and build an Arduino circuit to monitor the output of a photovoltaic cell.
Chapter 16
: Transformers and Power Distribution
Transformers are used to change the electrical properties of a circuit and play a big role in power supplies and power distribution. This chapter examines the types and roles of transformers. It also explains how they accomplish changing electrical properties and gives you some experience working with one.
Chapter 17
: Inverters and Rectifiers
Many times a circuit needs to be converted from DC to AC or AC to DC. The devices that perform that task are called inverters and rectifiers, respectively. In this chapter, you'll learn how both work and how to filter circuits for a more desirable and consistent output. You'll even build a small variable power supply.
Chapter 18
: Radio Waves and Tuned Circuits
Radio waves are the communication vehicles of our cell phone networks, local area networks, and free music stations. Their use grows every day, so knowing how they work is important whether you're working with computers or IoT devices. This chapter explains AM and FM and introduces working with an Arduino shield to create a radio.
Chapter 19
: Connecting Your Circuits to the Cloud
Being able to control devices remotely is an important aspect of many IoT implementations. This chapter teaches you how to do just that using a Wi-Fi enabled Arduino board and the Arduino IoT cloud.
Chapter 20
: Just for Fun
While working with electronics is always fun, most of the time electronic circuits are created for serious work. This chapter explores some of the not-so-serious uses of electricity. If you're the least bit creative, and I'm sure you are, then this chapter is for you!
Chapter 1
: IoT and Electronics
Chapter 2
: Electricity: Its Good and Bad Behavior
Chapter 3
: Symbols and Diagrams
Chapter 4
: Introduction to the Arduino Uno
Chapter 5
: Dim the Lights
Chapter 6
: Feel the Power
Chapter 7
: Series and Parallel Circuits
“Toto, I have a feeling we're not in Kansas anymore.”
—Dorothy, The Wizard of Oz
Sci-fi movies and shows have always been my obsession. As a child, I would watch in awe when reruns of The Jetsons showed people talking on video phones, the almost-human robot maid, and sidewalks that moved. Then there were the Star Trek reruns where characters walked around with communicators that allowed them to talk to anyone just by tapping them. Later, Star Wars had language translators that would automatically translate into any other language … rather like what Google Translator does now.
Forty or fifty years ago, many devices and capabilities that are commonplace now were considered ridiculous, impossible, or mere fantasy. Were these movies and TV shows predictions of the future, or did they help to shape the future by putting these notions of “impossible” devices into someone's mind to start working on? Either way, many of those devices exist now for us in some form or another. Even 20 years ago, most people still depended on their home phones for communication. Do you know anyone who still has a landline at home? They are few and far between.
The Electronics Technicians Association was founded in 1978 as the electronics industry was beginning to grow slowly. Now, it's growing by leaps and bounds on a daily basis. It's astonishing how far electronics have come in such a relatively short time when compared to human existence, and it's even more incredible when we ponder how far we will be 50 years from now. Many of the technological advances of the future will be here due to artificial intelligence, machine learning, and the myriad of sensors starting to cover our world. The world is about to take another leap forward, and if you want to be part of that journey, learning electronics is the place to start. As so many maps show us … “You Are Here.”
What is IoT? As you may know, IoT stands for “Internet of Things.” IoT refers to a vast array of connected devices that gather and transmit data over interconnected networks with or without human intervention, sometimes even responding to the captured data automatically as machines talk to machines and learn from each other. (When IoT involves manufacturing processes, it is often called industrial IoT [IIoT].) IoT can include data gathered by proximity sensors on your car's front that detect deer in the roadway and signal your brakes to immediately slow down the car without you doing anything. It also includes when moisture levels (or lack thereof) are transmitted from a field to that field's watering system, signaling to turn on the irrigation system without a human lifting a finger. Even a dog's GPS-enabled location device is part of an IoT system, as is the Tile that I press to locate my often-misplaced car keys.
Other systems considered part of IoT are smart cities, smart grids, smart homes, smart watches, and manufacturing machines talking to and learning from each other. Smart devices are used in hospitals, schools, retail, and nearly any other service or business you can think of. Last year, I attended a virtual meeting with someone from a major networking device company. He was speaking from his office about power over Ethernet and how the interconnected devices controlling heat, lighting, air quality, etc., all ran automatically in the high-rise office building he was in. I noticed a model of a pig on the credenza behind him and asked about it. Yes, it was a pig wearing an IoT collar.
What does this have to do with learning electronics? Everything! Electronic sensors and circuits are the beating heart of an IoT system.
What comprises an IoT system changes depending on who you ask, but regardless of what particular twist an industry or company may put on it, certain things must be there. For an overview of an IoT system, see Figure 1.1.
What is an IoT device? IoT devices include sensors, circuits, software, actuators (things that do something, such as switch from one state to another), and microprocessors, all rolled into a neat little package. These devices also need a way to communicate and send data to a place where it will be processed, manipulated, and action taken based on the data, or they need to be able to communicate to receive instructions based on the data that was gathered by some other device. Therefore, an IoT device can be on either the sending end or the receiving end, or possibly both.
Figure 1.1: An IoT system
Take, for example, a smart home with a remote-controlled thermostat, which has a few layers of things going on. First, the thermostat is a device. It has a sensor that measures the temperature and sends that information to a circuit board with a microprocessor where the reading is converted into data, which is manipulated. If certain conditions within the software program are met, the microprocessor sends a command to another component, telling it to turn the furnace either off or on. This example is machine to machine but involves sensors, circuits, software, microprocessors, communication, and actuators.
Another function of this device would be the ability to access the device from a cell phone via the Internet and Wi-Fi to tell the device to turn up the heat before the user gets home. This example involves a user interface, which is part of the entire user experience, but here we have the cell phone acting as a device and the thermostat acting as another device, communicating via the Internet.
The first part of any IoT system is a device that senses something physical, whether a particular condition or event. It could be a fiber optic cable in a building's concrete that picks up a pressure change, or it could be a proximity sensor, heat sensor, humidity sensor, optical sensor (ambient light, IR, UV), gas sensor, position sensor, magnetic sensor, motion sensor (accelerometer, gyroscope), color sensor (light again), or touch sensor (pressure). A search for sensors on an electronics components site at the time of this writing yielded tens of thousands of results.
As mentioned in the preceding section, a sensor receives some form of raw data and passes it on to a circuit and most likely a microprocessor, where the data received is interpreted. Take, for example, a temperature. The sensor doesn't send “temperature” to the circuit. Instead, a change in the temperature causes a rise or fall in either current or voltage through the device, which is passed to a circuit where it is read and interpreted according to instructions, known as software, controlling what the microprocessor tells the circuit to do. In future chapters, you'll learn how to work with some of these sensors and what the technology is that drives them.
Choosing the right sensor is an important first step, and several characteristics need to be considered.
What's being measured:
Temperature, light, pressure, etc.
Electrical:
Current, voltage, and power limitations.
Physical:
How much pressure, heat, light, etc., can it endure and remain viable?
Accuracy:
How far might it vary from the actual measurement?
Sensitivity:
How much does the input need to change before the output changes?
Reliability:
What is the track record of this sensor? When does it stop being accurate? How often does it break down?
Range:
What are the minimum and maximum values that can be measured?
Once the right sensor is found, the circuitry and software can be designed to interpret the information that is provided by the sensor. A myriad of choices exists for all of these. A microprocessor can be a single chip designed to perform logic or a microprocessor platform, such as an Arduino device. The choice of processor may determine the choice of software that is used.
Because the “I” in IoT stands for Internet, the assumption can be made that the device is expected to be interconnected in some way either through a local area network (LAN) or through the Internet. However, different levels and aspects of communication may be used by IoT devices.
A device may communicate with other devices, such as a moisture sensor in a field that triggers a watering system to work, or devices in a factory assembly line that communicate with other devices to either slow down or speed up the processes based on conditions. This is machine-to-machine communication. Systems like these may even use machine learning, which is a process where computers use algorithms to look for related data and learn, changing their programming based on data without human intervention. Machine learning is far too complicated to explain here but definitely an emerging technology worth paying attention to.
In the automatic watering system example, the devices may be connected only to a LAN, but most likely they will be gathering data and sending it, via one or more protocols and networks, to a place where it is processed.
Protocols are essentially rules for communication, and they are the topic of much learning and discussion in the computer world. Standards typically define how a network is built and what protocols are used on it. Networking standards are needed to ensure that different devices, possibly from different vendors or manufacturers, are all able to communicate effectively. Knowing what type of communication is needed and used by each part of an IoT system is an important consideration. Any of the following standards might be part of an IoT system:
Ethernet:
Wired LAN networking standard
Bluetooth:
Short-range wireless, usually connecting mobile devices
Wi-Fi:
Wireless networking standard allowing wireless networks to connect to a wired system or each other
Cellular:
For longer-range wireless connectivity via the cellular system
Each of these standards may have multiple protocols that are used with that particular standard, and any of them may allow a device to connect to the Internet. Often more than one will be used. In the case of the smart thermostat, it may use Wi-Fi to connect to a local LAN using Ethernet, which is connected to the Internet via some other method, such as a cable modem, fiber optics, or satellite. The remote user may be connecting their cell phone to the thermostat via Wi-Fi or the cellular network. All of these standards need to work in harmony for successful communications across an IoT system.
Data analytics is the growing field of sorting and analyzing raw data to derive meaningful and actionable information from it. It is the stuff of algorithms and perhaps insight gained from the experience of working with data. Four basic types of data analysis exist.
Descriptive
Diagnostic
Predictive
Prescriptive
Descriptive analytics identifies what has happened based on data. It is often based on key performance indicators (KPIs). For example, did sales go up or down and by how much or what percentage? Did the field have to be watered more often or less often?
Diagnostic analytics attempts to explain why the changes occurred. It can look at data outliers and what was occurring when the change in data occurred.
Once the what and why are known, predictive data analysis models can be built to anticipate problems before they happen or identify future trends.
Finally, prescriptive data analysis gives the user a course of action to take to avoid the problems identified in predictive models or to take full advantage of what's around the corner.
Data is more valuable than the hardware and software used to mine it from various sources, so managing that data is a primary concern for any business. The field of data management is concerned with collecting data, maintaining its physical security, securing the privacy of any personally identifiable information (PII), and preserving that data in a cost-effective and efficient manner. Data analytics is part of data management, and the way this data is used can cause a business to flourish or fail.
The user experience refers to every place that the user and the IoT system come into contact with each other. If, for example, an employee is tasked with identifying a problem quickly and accurately, then the interface that the employee uses needs to have the right information in an application that is easy to use, and it needs to be updated in a timely manner.
Depending on the situation or business, the user experience can also include interacting with customer service or other personnel, how easy the phone system is to use, etc.
Implementing technology is not without challenges, particularly in an IoT system. One of the biggest challenges for remote IoT devices is power. Running electrical wires is not always practical, and batteries have a limit to their capacity, so creating a system that runs on as little power as possible, or perhaps renewables like solar power, is a significant hurdle to overcome in developing an IoT solution.
Another major concern is the security and ownership of data. If data is stored by a provider, who owns and has access to the data? What encryption will be used to transmit the data from where it's gathered to where it's used? These are questions that any businessperson would want to know before implementing a system. Determining the right data to gather is probably the first question to answer, because measuring the wrong facts won't help a business make the right decisions.
Perhaps the biggest challenge of all is cohesiveness. If a system is cohesive, then it works together smoothly, which can be a problem when so many different systems are involved. Beginning with the sensors that detect data, through the circuitry and networks that transfer and store the data, then send the data to a user's interface on a device such as a phone or computer, and back again as the user responds through a local network to the web and then to the actuator; during this process, there needs to be a seamless way to transmit and manipulate the data. With so many protocols and systems involved, that can be difficult indeed. Developing a system needs to start with a bird's-eye view of the major parts, working down to the component level to ensure that all of the system's parts work together to move data around smoothly.
IoT and IIoT will not be going away in the foreseeable future. In fact, they will continue to grow as processes and machines get smarter and people find more uses for IoT. What may have started as a curiosity, with devices that were more fun than function in the hands of a few hackers, is now a major industry and will be causing paradigm shifts in virtually all industries and businesses.
Devices and sensors will continue to get smaller, get less expensive, and work better. We will learn how to better harvest the data from IoT devices and put them to more and more uses. Already billions of IoT devices are being used, and the number increases exponentially as every day forward-thinking inventors and electronics enthusiasts devise more uses for the technology. Where will you fit into this growing industry? Perhaps the best place to start is with a basic understanding of electronics, and to that end, read on.
“Never trust an atom. They make up everything.”
Unknown
You probably already have an idea of how electricity behaves. If you turn on a light switch, electricity is converted to light. It makes motors run and can be created by a generator to charge our cell phones when the power is out. You also know that it's a bad idea to stand outside in a lightning storm because it's likely also raining, and if you're wet and the tallest thing around, you're practically inviting lightning to strike you. Electricity can keep us alive if it's powering our heart, and it can kill us if we don't respect it. What you may not understand is why electricity behaves the way it does, which is what this chapter is about. If you're going to be the next Bill Gates or Steve Jobs and invent something that will alter life as we know it, you'll need to start with a basic understanding of how and why electricity behaves the way it does.
First, a little static electricity lab.
This lab is just for fun. Most grade-school kids have rubbed a balloon on their head or combed their hair with a plastic comb and seen the magic that is static electricity. What happens is that the energy of friction pulls electrons from the atoms of the hair onto the comb or balloon, giving it a negative charge and the hair a positive charge. The negatively charged balloon attracts the more positively charged hair. (Opposites attract.) If two balloons are negatively charged, they will push away from each other. (Like charges repel.) You can also do other fun things with static. The following sections contain a few for your amusement.
For these projects, you need the following materials:
Fur, wool cloth, or hair (a source of electrons)
PVC pipe about 2′ long
Styrofoam plates
Water faucet
Balloon
Fluorescent tube
Water glass or glass vase
Styrofoam ball
Aluminum foil
String
Rub a Styrofoam plate with a wool cloth to charge it and then set it on a flat surface.
Rub a second Styrofoam plate to charge it as well.
Try to put the two plates together. If they push away from each other, you know they're both negatively charged. Now, put your hand a few inches above the plate that's on the table and try to place the other plate on top of the first one. It should float up to your neutral (no charge) hand. It is being pulled by your hand and pushed by the other plate.
Negatively charge the PVC pipe by rubbing it with the fur or wool cloth.
Turn a water faucet on so that it is running a small steady stream.
Move the charged PVC pipe near but not touching the water. You should see the water bend toward the more negatively charged PVC pipe (
Figure 2.1
).
Negatively charge the balloon by rubbing it with the wool cloth, hair, or fur.
Enter a darkened room.
Touch the balloon to the two electrodes sticking out of the fluorescent tube. The tube completes the circuit and inside the tube the electrons excite the gasses and cause the glow.
Figure 2.1: Bending water
The static electricity generated this way will have enough voltage but not enough current to light a light-emitting diode (LED), which we'll talk about later. It does have enough voltage to excite the electrons of the gasses in the fluorescent tube. The process is similar to someone walking across a carpet and then touching a metal doorknob. They may get quite a shock when the negatively charged electrons jump to the more positively charged doorknob. The electrons move quickly and may cause sound or a flash of light and be thousands of volts but not a lot of current. Current and voltage will be explained soon.
Wrap a small Styrofoam ball with aluminum foil.
Tie a string around the ball.
Tape the end of the string to the inside bottom of the water glass or glass vase, making sure that the ball will hang freely when the glass is turned upside down.
Turn the glass upside down.
Charge the PVC pipe and bring it toward the glass. The ball is attracted to the negatively charged PVC pipe.
While these were fun demonstrations of static electricity and the law of charges (like charges repel each other, opposite charges attract), static electricity does have some serious industrial uses. Static electricity is responsible for transporting toner inside a printer from the negative toner container to the more positive (but still negative) drum and finally onto the positively charged paper. Static is also used in some pollution control systems where particles are charged and then attracted to plates with the opposite charge, reducing pollution. Static is also used in applying paint to cars. What causes those charges? Read on.
What is electricity? To understand it, you need to look at atomic structure. Figure 2.2 shows a two-dimensional drawing of a three-dimensional object, an atom. To be specific, it is the structure of a gold atom. Atoms are the building blocks of everything, including human beings. At the center of the atom is the nucleus, which contains particles called protons and neutrons. Orbiting around the nucleus is a cloud of particles called electrons. Electrons are located in orbitals and shells at various distances from the nucleus in the center depending on the energy they exhibit at the moment. A gold atom has 79 protons, 79 electrons, and 118 neutrons.
Figure 2.2: Atomic structure of gold
Matter that is made of only one type of atom is called an element. These elements and the information about each can be found on the periodic table of elements (Figure 2.3). While there are 94 naturally occurring elements, more have been created by humans. Each element is assigned an atomic number, which is equal to the number of protons in the nucleus of the atom, so our gold atom's atomic number is 79.
Protons have a positive charge, neutrons have no charge, and electrons have a negative charge. Atoms seek to be in balance, so when they are at a ground state, atoms always have the same number of protons and electrons, making the atom have a net neutral (no) charge. When an atom is acted upon by some outside force such as friction, it can lose or gain electrons. This process of losing and gaining electrons is called ionization. Because electrons are negative, if the atom loses an electron, it becomes a positive ion. It will have more positively charged particles (protons) than negatively charged particles (electrons) and therefore a net positive charge. If an atom gains an electron, it becomes a negative ion because there are more negatively charged particles (electrons) than positively charged particles (protons).
Figure 2.3: Excerpt from the periodic table of elements
NOTE The designations of positive and negative were chosen by Benjamin Franklin as a way to explain his observations of electrical behavior.
The law of charges tells us that opposites attract, so the positively charged protons are always pulling on (attracting) the negatively charged electrons. When ionization occurs, the electrons the atom loses (or gains) will be located in the outermost shell, which is called the valence shell. If an electron in a lower shell is acted upon by some outside energy, such as heat or light, it can jump to a higher shell. When it loses its energy, it falls back down toward the nucleus. Only a certain number of electrons can exist in a given shell, but right now we don't need to explore that any further.
What does this have to do with electricity? Everything! What we know as electricity is the movement of those electrons from atom to atom in the same general direction, as they're trying to balance atoms in a chain reaction.
Certain elements will easily give up their valence electrons. We call those elements good conductors. Examples of good conductors are gold, aluminum, copper, silver, and mercury. Each of these conductors has characteristics that make them better than the others in certain situations. For example, silver is the best conductor, but gold is often used for connections on computer boards because of its tendency to avoid corrosion. Mercury is a liquid that has been used in devices such as thermostats, thermometers, and motion switches, and for measuring pressure. However, because it has been identified as a pollutant, the electrical and electronics industries have been working to replace mercury in electrical and electronic devices. Despite their efforts, many devices containing mercury still exist. Copper is used in household wiring because it is less expensive. Aluminum is used in buildings, too, but it is less conductive than copper and weighs much less, so it is useful where a lighter-weight material is needed. Copper and aluminum also have different thermal characteristics, which leads builders to choose one over the other in certain situations. Notice that silver has only one electron in its valence band. So do copper and gold, while mercury has two valence electrons and aluminum has three. While there are many other good conductors, these are the ones most often used in electrical circuits (Figure 2.4).
Figure 2.4: Good conductors
Materials that are good insulators are glass, plastic, rubber, and dry wood. Insulators do not readily give up electrons, and most are compounds, meaning that they are made from more than one type of atom. Rubber, for example, has the chemical composition C5H8, which is five atoms of carbon and eight atoms of hydrogen. Glass is made from silicon and oxygen. Other materials, such as boron and cobalt, are added to glass to change its properties. Boron, chlorine, and sulfur are elements that are considered insulators. Sulfur has six valence electrons and chlorine has seven, while boron has only three.
Silicon and germanium are semiconductors. In pure form, they are not good conductors or insulators. Yet, when their properties are changed by doping them with other chemicals, they become useful. Both are used in electronic circuits. Some diodes, which are explained in Chapter 8, “Diodes: The One-Way Street Sign,” are made of germanium, while silicon is the building material of integrated circuit chips. Silicon and germanium both have four valence electrons.
A single element can exist in different forms called allotropes. Allotropes of the same atom may behave differently. For example, carbon in the form of graphite is a conductor, but when compressed over time into a diamond, it acts as an insulator (see Figure 2.5). When in doubt, do your research to confirm a material's properties before you use it in your circuits.
Figure 2.5: Allotropes of carbon
Human beings, by the way, can be good conductors. Our skin is a decent insulator, so very low voltages are safe to handle. However, higher voltages, such as the 120VAC found in U.S. household wiring, can prove fatal or at the least provide an uncomfortable shock. Wet or sweat-soaked skin becomes more conductive, so be sure to use caution when working with electricity.
Electricity has certain characteristics that you must understand to determine if the circuit you want to build will work. The first three characteristics to be aware of are current, voltage, and resistance. Current, voltage, and resistance must