Arduino Electronics Blueprints
Make common electronic devices interact with an
Arduino board to build amazing out-of-the-box projects
Don Wilcher
BIRMINGHAM - MUMBAI
Arduino Electronics Blueprints
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is
sold without warranty, either express or implied. Neither the author, nor Packt
Publishing, and its dealers and distributors will be held liable for any damages
caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
First published: July 2015
Production reference: 1200715
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-360-1
www.packtpub.com
Credits
Author
Don Wilcher
Reviewers
Samuel de Ancos
Liam Lacey
Commissioning Editor
Nadeem N. Bagban
Acquisition Editor
Harsha Bharwani
Content Development Editor
Ajinkya Paranjape
Technical Editor
Tejaswita Karvir
Copy Editor
Dipti Mankame
Project Coordinator
Harshal Ved
Proofreader
Safis Editing
Indexer
Priya Sane
Graphics
Sheetal Aute
Production Coordinator
Komal Ramchandani
Cover Work
Komal Ramchandani
About the Author
Don Wilcher is a passionate educator of electronics and robotics technology and an
electrical engineer with 26 years of experience. He has authored several books on Lego
Robotics and Arduinos. His latest book published by Maker Media, titled Make: Basic
Arduino Projects, has been approved by the Alabama State Department of Education
to be on their reading list. He's also a Certified Electronics Technician (CETa) and
Exam Administrator (CA) with ETA International as well as State Certified Teacher
for Career Technical Education (CTE) as a Level 2 Specialist in electronics technology.
He has worked on industrial robotic systems, automotive electronic modules/systems,
and embedded wireless controls for small consumer appliances. While at the Chrysler
Corporation, Don developed a weekend enrichment pre-engineering program for
inner city kids. He's a contributing writer and webinar lecturer for Design News
Magazine. He is also an electronics and robotics technologist who has developed
21st century educational products and training materials for Makers, hardware
start-up entrepreneurs, and educators.
I would like to thank my wife, Mattalene, and three children,
Tiana, D'Vonn, and D'Mar, for their patience and understanding
as I worked diligently to build and test Arduino circuits, coding,
and writing during family time activities. This book is dedicated to
you all. Also, I would like to thank my awesome Packt Publishing
editors: Ajinkya Paranjape (content development editor), Harsha,
Bharwani (acquisition editor), and Tejaswita V. Kavir (technical
editor) for your patience, dedication, comments, and great
suggestions on creating a wonderful book. I look forward to
working with you all soon on another book project.
About the Reviewers
Samuel de Ancos lives in Madrid, Spain. He loves developing software. He is
currently working as a senior engineer at Carriots.com IoT and M2M platform and
is a member of the Fourcoders software developers team. He writes a blog about
software developing (in Spanish).
He has more than 7 years of experience in developing web applications with PHP
/ MySql / MongoDB using frameworks such as Symfony 1.4 / 2.x / Silex and also
has more than 5 years of experience with Python, knowledge of the Tornado Web
Server framework, Web.py framework, and the Bottle framework. He has more than
4 years of experience in developing the IoT and M2M platforms with knowledge of
MongoDB, RabbitMQ, and Redis.
Liam Lacey is a software developer who specializes in C/C++ development, mainly
in the fields of audio and MIDI, of OS-level applications. Most of his development
skills have been self-taught through a strong passion for the field; however, he was
first introduced to software development at the university, where he received a first
class BSc honors in audio and music technology. He has designed and developed
software modules for new products, from the concept/prototype stage all the way
through to the production stage, within teams and as an independent developer.
He has a strong interest in audio plugin development, connected devices, music
interaction, new interfaces for musical expression, and augmented instruments
using platforms such as Arduino and JUCE. He is also a guitarist, musician,
composer, producer, performer, and sound designer.
He aims to develop his current software development skills toward a highly
professional level as well as develop skills in other related areas, such as audio
DSP, sound synthesis and design, and electronics.
www.PacktPub.com
Support files, eBooks, discount offers, and more
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF
and ePub files available? You can upgrade to the eBook version at www.PacktPub.
com and as a print book customer, you are entitled to a discount on the eBook copy.
Get in touch with us at service@packtpub.com for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign
up for a range of free newsletters and receive exclusive discounts and offers on Packt
books and eBooks.
TM
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital
book library. Here, you can search, access, and read Packt's entire library of books.
Why subscribe?
• Fully searchable across every book published by Packt
• Copy and paste, print, and bookmark content
• On demand and accessible via a web browser
Free access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access
PacktLib today and view 9 entirely free books. Simply use your login credentials for
immediate access.
[ i ]
Table of Contents
Preface v
Chapter 1: A Sound Effects Machine 1
Parts list 1
A sound effects machine block diagram 2
Building the sound effects machine 3
Introducing SPI communication 6
Adding digital logic switches for WAV file selection 10
Adding SD and WAV file libraries to your Arduino sketch 12
The TMRpcm library installation 14
Adding a random function to play sounds automatically 19
Adding an LED bar graph display for selected sound 24
Summary 29
Chapter 2: Programmable DC Motor Controller with an LCD 31
Parts list 32
A programmable motor controller block diagram 32
Building the programmable motor controller 34
Let's build it! 36
Interfacing a discrete digital logic circuit with Arduino 40
Interfacing a small DC motor with a digital logic gate 45
A sketch of the LCD selection cursor 48
The partially programmable DC motor controller program sketch that comes
without an LCD selection feature 49
The partially programmable DC motor controller program sketch with an LCD
selection feature 50
Summary 53
Table of Contents [ ii ]
Chapter 3: A Talking Logic Probe 55
Parts list 56
A talking logic probe block diagram 56
A talking logic probe – testing the EMIC 2 TTS module 58
EMIC 2 TTS module basics 63
EMIC 2 TTS module's key features 64
Electrical connections 65
Let's build it! 66
How does the talking logic probe code work 72
DecTalk speech synthesizer engine 78
Summary 80
Chapter 4: Human Machine Interface 81
Parts list 82
An HMI controller block diagram 82
Testing the transistor motor driver 84
Testing the pushbutton switch 85
Making the web page physical 87
Now serving, the Arduino 88
Getting into the real world using Breakout 88
Pre-lab exercise 89
Setting up the Breakout file directory 90
The motor control HTML script 91
Summary 97
Chapter 5: IR Remote Control Tester 99
Parts list 100
An IR remote control tester block diagram 100
IR signals and communication protocols 102
littleBits electronic modules 103
Wiring the IR receiver module 104
Wiring the Arduino and the LCD 109
IR Tester code 112
Summary 118
Chapter 6: A Simple Chat Device with LCD 119
Parts list 121
A Simple Chat device block diagram 121
Building a serial-based Simple Chat device 124
Serial-based Simple Chat device code 125
The Nordic nRF8001 BLE IC 129
Table of Contents [ iii ]
The RedBearLab BLE shield 130
Installing the RBL_nRF8001 library 132
Uploading the BLEControllerSketch code to the Arduino Uno 136
Connecting with an Android smartphone 148
Summary 150
Chapter 7: Bluetooth Low Energy Controller 153
Parts list 155
BLE Controller block diagrams 155
Building a BLE DC motor controller 157
Building a BLE seven segment LED display controller 163
What's inside a seven segment LED display? 163
Wiring the seven segment LED display to the BLE shield 164
Summary 170
Chapter 8: Capacitive Touch Sensing 173
Parts list 174
A capacitive touch controller block diagram 174
Building a capacitive touch controller 176
The 555 timer IC's monostable operation 180
A Do It Yourself Design Challenge! 182
A buttonless servo motor controller 186
Summary 187
Chapter 9: Arduino-SNAP Circuit AM Radio 189
Parts list 190
Radio communication basics 190
Modulation 191
The Arduino-SNAP circuit AM radio block diagram 192
The littleBits latch electronic module 193
The UTC 7642 linear IC one-chip AM radio circuit 195
Building the IR remote trigger circuit 196
Building the Arduino-SNAP circuit interface 196
Testing the Arduino-SNAP circuit interface 198
Building the SNAP circuit AM radio 200
Subcircuit integration 201
DIY challenge – RedBearLab BLE control 202
Summary 204
Chapter 10: Arduino Scrolling Marquee 207
Parts list 208
The LCD and OLED basics 209
Table of Contents [ iv ]
The Arduino scrolling marquee block diagram 212
Wiring the OLED LCD 213
Adding the code 214
Building an IR-controlled scrolling marquee 217
Adding the IR code 219
A DIY serial monitor LCD marquee 221
Summary 224
Index 227
[ v ]
Preface
You have purchased your first Arduino, and now you're wondering what project
to build with it. There are hundreds of websites with an assortment of electronic
gadgets and devices to build, but the search and choosing the first project can be
overwhelming. Besides building awesome Arduino gadgets, some of the website
projects leave out how the electronics and code work with a programmable
prototyping platform. Also, the projects found on the Web don't provide additional
challenges to test your new Maker skills as well.
The Arduino Electronics Blueprints book was written to address the concerns mentioned
in a user friendly and educational format. Every chapter in the book starts off with
either a historical reference to electronic discoveries or a brief discussion of present
technologies used in contemporary consumer, entertainment, or industrial products.
The book was designed to show how to build awesome electronic devices using
parts found in laboratory bins or junk boxes. Also, new prototyping materials such as
littleBits electronic modules and Elenco SNAP circuit kits are introduced to readers as
well. The new and exciting prototyping materials presented allow us to rapidly build
the target Arduino device discussed in some of the book's chapters. To aid readers in
building the fun Arduino projects, a Parts list of electronic components is included in
each chapter of the book. Detailed circuit schematic and wiring diagrams
0 коментара
За да коментирате, трябва да сте влезли в профила си.
Влезте