Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Mastering Arduino
Mastering Arduino

Mastering Arduino: A project-based approach to electronics, circuits, and programming

Arrow left icon
Profile Icon Jon Hoffman
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (5 Ratings)
Paperback Sep 2018 372 pages 1st Edition
eBook
$24.99 $35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Jon Hoffman
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Full star icon Empty star icon 4 (5 Ratings)
Paperback Sep 2018 372 pages 1st Edition
eBook
$24.99 $35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$24.99 $35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Mastering Arduino

Basic Electronics

For as long as I can remember, I have been fascinated by electronics. When I was seven or eight years old, I can remember taking apart a hand-held transistor radio and struggling for several days to put it back together without letting my parents know I took it apart. Even though I would take little devices apart and put them back together, I really did not understand basic electronics until I took a basic electronics course in high school. That class gave me enough knowledge to begin to understand how the electronic devices that I have been taking apart actually worked. It also laid the foundation for all electronic projects that I have done since.

What you will learn in this chapter:

  • What the four building blocks of an electronic circuit are
  • What a multimeter is
  • What some of the more popular basic electronic components are
  • What the properties of electricity...

Electronic building block

When I want to build something, whether it is prototyping something with the Arduino, coding an application or building wooden steps to our back door, I usually try to break the project down into individual blocks. It really helps me focus on each individual part of the design rather than getting overwhelmed by the whole design. We can usually break an electronic project into four separate blocks. The following diagram illustrates how these blocks work together:

Let's look at each one of these blocks starting with the power supply.

Power supply

The power supply is the source of electricity for the project. For most of the experiments in this book, the power supply will be some low-voltage...

Multimeter

A multimeter, also known as a Volt-Ohm-Milliameter, is an electronic measuring instrument that is typically used to measure voltage, current, and resistance. There are analog multimeters that operate by moving a pointer to display the measurement, but today most multimeters are digital with an LCD that is used to display exactly what the measurement is.

A multimeter can cost as low as USD $10 and up to USD $400 for a really nice Fluke 87V. Unless you are planning on using the multimeter for professional purposes, I would recommend getting a low-cost multimeter like the ones shown in the following photograph:

The digital multimeter has three main parts, which are the display, selection knob, and the probe ports.

The display will show what the measurement is. Some of the higher-end multimeters have a backlit display to make it easier to read in low light.

The selection...

Electronic components

There are numerous types of electronic components that we will be using in our projects. These components can be obtained for a relatively low cost from many online retailers. It is important to be familiar with what some of the more popular components because they will be used in many of the circuits we create. Let's start off by looking at the component that we will be using is almost all circuits that we create, the resistor.

Resistor

The resistor will be used in almost every circuit that we create. A resistor is an electronic component that has a specific amount of electrical resistance that never changes. The resistor limits the flow of electrons in the circuit. We will see how resistance works...

What is electricity?

Everything in the universe is made up of atoms. Atoms are made up of three primary components, which are the proton, neutron, and electron. The protons and neutrons make up the nucleus of the atom while the electrons orbit the nucleus like the moon orbits the Earth. The proton has a positive charge and the electron has a negative charge.

Electricity is created when particles become charged. Some particles become positively charged while others becomes negatively charged. Particles with opposite charges attract each other while particles with the same charge repel each other.

Since the electrons are in constant motion, occasionally an electron will escape from its atom and joins another atom. The atom that the electron escaped from now will have a net positive charge while the atom that gained the electron while having a net negative charge. Electricity is...

Current

Current, in an electronic circuit, is the flow of the charged particles (electrons). The current is measured by the number of charged particles passing the point of the circuit, that is being measured, per second.

Current is measured in amperes and can be measured with most standard multimeters. One ampere is equal to 6.241×1018 electrons passing the point being measured per second.

If we think of electricity as water flowing through a pipe, the following diagram will help visualize what current is:

Voltage

Voltage is the amount of potential energy between two points, where one point has more charged particles than the other. The difference in this charge is called the voltage. We can think of the voltage as the pressure within the circuit to push the charged particles through the circuit. Voltage is measured in volts.

To continue with the water in a pipe analogy, we can think of voltage as the water pressure within the pipe pushing the water through. The following diagram illustrates this:

Resistance

Resistance is how much the flow of current is reduced or impeded. All circuits have some resistance from the wire and components that make up the circuit; however, most circuits include resistors that add extra resistance to the circuit. These resistors enable us to limit the flow of charged particles within the circuit. Resistance is measured in Ohms.

Using the water in a pipe analogy again, resistance is the smallest part of the pipe that is impeding the water flow.

Now let's see how these three properties work together by examining Ohm's law.

Ohm's law

Ohm's law stated that the current flowing through a circuit is directly proportional to the voltage applied to the circuit. This means that if the voltage of the circuit increases, then the current will also increase if the resistance stays the same.

Ohm's law also states that current flowing through a circuit is inversely proportional to the resistance of the circuit. This means that if the resistance of a circuit increases, then the current flow will decrease if the voltage stays the same.

The standard formula for Ohm's law states that the current is equal to the voltage divided by the resistance:

While the preceding formula is how Ohm's law is usually introduced, it really consists of three formulas:

V/R

V/I

I*R

In this book, we will use the V/I the most to calculate the resistance needed...

What is power?

Power is the amount of electrical energy transformed into another type of energy (heat, light or work) per second. Power is an important concept because it is what allows our electric circuit to do something. For example, if we created a circuit with a battery and a resistor, the resistor will convert the electrical energy to heat (or thermal) energy. All resistors also have a maximum power rating that they can handle therefore to ensure that we do not damage the resistors in a circuit we will need to know how to calculate power. Power is calculated by multiplying the voltage by the current and is measured in Watts.

Most of the low-cost resistors that we can get from online retailers are rated at 1/4 (or 0.25) Watts so we will assume that the resistors we are using for the projects in this book are rated at that 1/4 Watt. Now let's say in our project we are...

Resistor color codes

The value of a resistor is marked on its body using color bands. The majority of the resistors contain four bands but there are also some resistors that have five and six bands. The following picture shows what a resistor with four bands looks like:

With a four-band resistor the first two bands, from left to right, indicate the resistor's value. The third band is the multiplier and the fourth band is the tolerance. Resistors that have five bands use the first three bands to indicate the resistor's value, then the fourth band is the multiplier and the fifth band is the tolerance. The following table shows the color values:

Color

Value

Multiplier

Tolerance

Black

0

1

Brown

1

10

Red

2

100

Orange

3

1K

Yellow

4

10K

Green

5

100K

Blue

6

1M

Violet

7

10M

Grey

8

100M

...

Summary

In this chapter, we gave a very brief introduction to electricity and some of the more popular electronic components that we will be using later in this book. This chapter will give you enough knowledge to get you started building very basic prototypes. It is recommended that once you start more advanced projects you do further reading on electricity and electronic components.

In the next chapter, we will look at circuits and how to read circuit diagrams.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Covers enough electronics and code for users at any level
  • Includes complete circuit diagrams for all projects
  • Final robot project combines knowledge from all the chapters

Description

Mastering Arduino is an all-in-one guide to getting the most out of your Arduino. This practical, no-nonsense guide teaches you all of the electronics and programming skills that you need to create advanced Arduino projects. This book is packed full of real-world projects for you to practice on, bringing all of the knowledge in the book together and giving you the skills to build your own robot from the examples in this book. The final two chapters discuss wireless technologies and how they can be used in your projects. The book begins with the basics of electronics, making sure that you understand components, circuits, and prototyping before moving on. It then performs the same function for code, getting you into the Arduino IDE and showing you how to connect the Arduino to a computer and run simple projects on your Arduino. Once the basics are out of the way, the next 10 chapters of the book focus on small projects centered around particular components, such as LCD displays, stepper motors, or voice synthesizers. Each of these chapters will get you familiar with the technology involved, how to build with it, how to program it, and how it can be used in your own projects.

Who is this book for?

Mastering Arduino is for anybody who wants to experiment with an Arduino board and build simple projects. No prior knowledge is required, as the fundamentals of electronics and coding are covered in this book as well as advance projects.

What you will learn

  • Explains the basics of electronics and circuits along with the Arduino IDE and basic C operations
  • Use sensors to build a mini weather station
  • Control LEDs using code
  • Power a robot arm using stepper motors
  • Remotely control your Arduino using RF, Bluetooth LE, and Bluetooth Classic
  • Make a sound tone generator with buttons

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 28, 2018
Length: 372 pages
Edition : 1st
Language : English
ISBN-13 : 9781788830584
Vendor :
Arduino
Category :
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Sep 28, 2018
Length: 372 pages
Edition : 1st
Language : English
ISBN-13 : 9781788830584
Vendor :
Arduino
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 142.97
Mastering Arduino
$43.99
Industrial Internet Application Development
$54.99
Internet of Things Programming Projects
$43.99
Total $ 142.97 Stars icon

Table of Contents

22 Chapters
The Arduino Chevron down icon Chevron up icon
Basic Electronics Chevron down icon Chevron up icon
Circuit Diagrams Chevron down icon Chevron up icon
Basic Prototyping Chevron down icon Chevron up icon
Arduino IDE Chevron down icon Chevron up icon
Programming the Arduino - The Basics Chevron down icon Chevron up icon
Programming the Arduino - Beyond the Basics Chevron down icon Chevron up icon
Motion Sensor Chevron down icon Chevron up icon
Environment Sensors Chevron down icon Chevron up icon
Obstacle Avoidance and Collision Detection Chevron down icon Chevron up icon
Fun with Lights Chevron down icon Chevron up icon
Fun with Sound Chevron down icon Chevron up icon
Using LCD Displays Chevron down icon Chevron up icon
Speech Recognition and Voice Synthesizing Chevron down icon Chevron up icon
DC Motors and Motor Controllers Chevron down icon Chevron up icon
Servo Motors Chevron down icon Chevron up icon
Using a Relay Chevron down icon Chevron up icon
Remotely Controlling the Arduino Chevron down icon Chevron up icon
Creating a Robot Chevron down icon Chevron up icon
Bluetooth LE Chevron down icon Chevron up icon
Bluetooth Classic Chevron down icon Chevron up icon
Another Book You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(5 Ratings)
5 star 60%
4 star 0%
3 star 20%
2 star 20%
1 star 0%
Avirup Basu Oct 13, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The book is great. It covers all the basics and advanced stuffs when it comes to "Programming using the Arduino platform". Additionally it covers aspects related to core basic electronics which should be necessary according to me. The chapters are well written with detailed explanation and a project based approach. This book should is good for students and developers who wanna get their hands dirty with Arduino.Overall, a great book and very well written. :)
Amazon Verified review Amazon
David Craig Aug 12, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
There is a vast difference between the sharing of information and telling people that you know something. Jon Hoffman's book is rare in that it addresses a need to provide a well rounded education to those that have no previous knowledge of Arduino in the areas of programming or in basic electronics. Arduino is a hobby and while aspects of it may be seen in the real world, kits are designed for those that like to tinker and this naturally draws a population of people that are curious and have no formal education in these things. There will be people that have knowledge of programming and no knowledge of circuitry and those that have an electronics background but never coded before, and those that are just walking in fresh. Not every chapter will be for everyone. And the book is not filled with coded examples of doing something outside the box. There are books like the Arduino Cookbook that will give you snippets of interesting projects but do not help you understand why you are required to have a 1k resistor or why you are creating an array. And that is the point of this book, the Why. "Mastering" being the concept of teaching you how to eventually understand and "master" the basics so that you will understand the projects in more advanced books and, ideally, create your own.The internet has plenty of resources. Unfortunately, the internet also has a large collection of pseudo intellectual bullies and I have seen way too many posts that consist of 1 question, 5 responses letting the initial requestor know that they are an idiot for even asking, followed by 4 people who have the same question and... no answer. Many products do not come with instructions or sample code and most hobbyists are simply trying to get a simple example to help them in their way. This book will also help you navigate these waters as it introduces the concepts of datasheet, fritzing (diagrams), and provide you with enough know how that might help you phrase questions and steer these boards without too much hazing.I purchased the book from the Packt website. For the full price of the book you can also get a digital copy which is pretty handy.
Amazon Verified review Amazon
ruben Oct 07, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
In this book Mastering Arduino, I have seen in this title as a very good guide to all the audience that wants to follow and learn from a material that has the requirements from the beginning to develop projects and understand the basics of Arduino.In all the chapters we can see the sequence of the material. I have seen the book and it helps to me to understand how I can learn programming with structures and control structures, also explains the basics of electronics, how we can mix all the stuff in a prototype, I like the chapter about structures of programming, because it can help us how to create a code with programming skills. In the last chapters we can see the application of the previous chapters, I appreciate the use of Bluetooth, this is the first book I see it has the content of Bluetooth and its applications with Arduino. It explains how integrate all in the different projects, Electronics, Programming, sensors, Communications.We can summarice the content in the following:Chapter 1: Introduction to Arduino boards, technical information, good to see this chapter, some times we need to create new things with it.Chapter 2: Basic electronics concepts and where to apply it, this is useful to understand the basics, great.Chapter 3: Circuit diagrams, useful to understand the circuits, complement with the last chapter.Chapter 4: Prototyping, great to have, how we can integrate the tools to create a prototypeChapters 5,6, and 7: Give us the ability to create and understand the coding in Arduno, how it works, how we can structure a sketch.Chapters 8-19: Give us the tool to develop projects, I could apply the first projects and give me some ideas how can integrate all in applications.Chapter 20-21: These two chapters like a lot because none of the books I have learned before explained the usage of Bluetooth.Rubén Oliva Ramos.
Amazon Verified review Amazon
Victor Oct 07, 2018
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
I got this book expecting to introduce myself to Arduino for a specific project I have to complete. By one side, the book helped me a lot, since half of it is devoted to specific projects, well detailed, that allowed me to understand the problem I was facing and how to solve it. The not interesting, from my perspective, are the 6 first chapters!!!! Somebody who wants to go into Arduino has to have some idea about electricity or programming. A book named "Mastering Arduino" cannot devote itself to explain how electricity works!!! If you are interested on the book just take a look into the contents to see if this is exactly what you need.
Amazon Verified review Amazon
Rachel Smibert Jul 07, 2023
Full star icon Full star icon Empty star icon Empty star icon Empty star icon 2
The media could not be loaded. I bought this book because of the page count being a big factor for me because I thought the more pages the more info there would be. I was wrong this is very basic stuff and it is good for beginners but just the very beginning if you know what I mean. The words are typed so big and the pictures are printed so big that is only left enough room for like a few sentences and this was an appt of the pages so you don’t get as much as I thought I would out of this book. Save up your money and buy a good name book like the dummies books with like 600plus pages in it. You’ll be saving your money in the end.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.