Paul Bradt and David Bradt

Science and Engineering Projects Using the Arduino and Raspberry Pi

Explore STEM Concepts with Microcomputers

Paul Bradt
Houston, TX, USA
David Bradt
Houston, USA
ISBN 978-1-4842-5810-1e-ISBN 978-1-4842-5811-8
Apress standard
© Paul Bradt and David Bradt 2020
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.

The authors dedicate this book to all of the Science, Technology, Engineering, Math (STEM) teachers who guide and shape the paths of many young minds (including ours) to question, learn, and utilize new technology to solve problems. Without these unsung heroes, the world would not have powerful cell phones, highly reliable cars, the Internet, and many other amazing things we routinely take for granted.

Introduction

The authors’ journey developing this book started in 2013 when they discovered the Arduino microcontroller. It is interesting how something big really starts with one step as they found the Arduino incredibly powerful. Users are able to program it with computer code, and then it executes its instructions for as long as it has power. The authors started evaluating various applications of the Arduino around the house and in their hobby endeavors. In 2017, they started experimenting with the Raspberry Pi minicomputer which enables users to take projects to a whole new level with a low-cost computer that interfaces with sensors. Since a Raspberry Pi is very affordable, a real computer can now be dedicated to operating a system permanently. While requiring some technical steps to set up, both of these tools can be used to gather data, automate tasks, and provide a lot of fun. The authors found it very satisfying to watch a device do several tasks, especially when they set it up. This book chronicles some science and engineering projects the authors developed over the past few years and provides helpful hints, along with a few things to avoid.

There are two primary areas of focus or goals of this book. The first goal is to help the reader explore the Arduino and Raspberry Pi. The second goal is exploring science and engineering in interesting and fun ways.

The projects and concepts in this book are meant to accomplish the first goal by providing information to get an Arduino or Raspberry Pi system set up, running, and ready to capture data. The text provides enough detail for users with average assembly or electrical skills to complete them. Additionally, the goals of learning are to gain knowledge and skills. When the reader engages in a project that requires them to try new things, it reinforces how they learn and gain confidence and encourages them to try even more complex tools and techniques.

The second goal is exploring concepts of STEM (Science, Technology, Engineering, Mathematics) and working through examples to demonstrate basic scientific and engineering concepts. Finally, the authors provide some detail on the mathematics needed to understand and explain the science demonstrated.

Science and engineering provide critical skill sets for the modern world that can be used in everyday life. People use these skills to develop the technology that the modern world relies on. This book can establish these skill sets for a fruitful and rewarding career.

The authors hope this book inspires the reader to expand and explore their own STEM projects by including a wide range from beginner to advanced. From these examples, the reader can learn many techniques, tools, and technologies and apply them beyond the ones listed here; but first, the authors introduce STEM.

What Is STEM?

STEM (Science, Technology, Engineering, Mathematics) is a program based on educating students in science, technology, engineering, and mathematics in an integrated, interdisciplinary approach to learning.

School systems today strive to improve education in STEM. This goal is an area where educators can use outside help developing and improving students’ knowledge when they actively contribute, design, and build hands-on projects. In many ways, the young mind is excited and motivated building projects. They develop an in-depth understanding of what is required and how it works. The authors believe this is the best way to learn and remember these concepts, which results in a solid STEM foundation for students.

A question not often understood is how the scientific method is different from an engineering approach. Understanding the difference between science and engineering can be seen in the original Star Trek series. Mr. Spock was the science officer, and Montgomery Scott (Scotty) was the chief engineer. Their jobs and how they approached new scenarios or problems really provide a great explanation about the differences and similarities between science and engineering. Let’s examine some examples.

Mr. Spock used the term fascinating when describing a new event or phenomenon. The role of science is to expand knowledge and investigate new events. This fascination with new and unique areas is key for a scientist. Scotty, the engineer, on the other hand always had to fix the warp engines, the transporter, or some other critical system. The normal role of an engineer is to develop and implement solutions to problems. In one of the episodes, Scotty indicated he would rather read his engineering journals to learn about how others solved problems than go on shore leave!

Science

Researchers use the scientific method as a tool to understand questions in their area of interest. Based on the information they have initially, they develop a hypothesis and then methods to test the validity of the hypothesis. When sufficient test data are gathered and analyzed, the researcher either accepts or rejects the hypothesis. In many cases, positive or negative results point to the next step or direction of exploration and contribute to the general body of scientific and engineering knowledge.

Engineering

The primary goal of engineering is to evaluate alternatives and choose the optimal solution to minimize or eliminate specific problems or issues. Solutions are not necessarily new, but may be repurposed concepts applied to different problem areas. Other aspects of engineering include planning the work, selecting components to meet requirements, and following through on managing and completing a project. Often projects or systems fail because the planning, scheduling, and logistics of activities are not adequately engineered for an optimum solution. These skills are important and necessary in any job.

Science and engineering use many of the same tools and techniques, but it is important to understand the distinction between scientific experimentation and the engineering process of developing optimal solutions. For one thing, they both use the language of mathematics to describe percentages, results, probability, and other physical parameters. However, science’s goal is to expand knowledge which is different than engineering’s goal of selecting an optimum solution and proceeding with solving the problem. One other difference is a scientific test often gains new knowledge, whereas an engineering test often demonstrates how a system performs a function. In many ways, they are synergistic as science often provides new tools and ideas for engineers to use to solve problems.

In the authors’ minds, the roots of some key technological advancements that exist now can be traced back 50 years to the original Star Trek TV show. For example, in the show, they used tricorders to gather data about aliens, equipment failures, medical problems, and a host of other out of this world challenges. They had communicators that allowed them to contact crewmembers all over alien worlds. Finally, they had the replicators that allowed them to produce any type of food they desired. Today we don’t have tricorders, but we do have some examples that 50 years ago would have been amazing. Today there are personal computers, cell phones, 3D printing, and incredible sensors based on the early transistors of the 1960s. The Arduino and the Raspberry Pi, two examples of new technology, can be built into devices similar to the incredibly versatile Star Trek tricorders.

Both Mr. Spock and Scotty realized they needed each other (science and engineering) to accomplish the goals of exploration and keep the Enterprise flying safely through space. In today’s complex world, integrating science and engineering is key to researching problems and developing solutions.

In the following chapters, the authors will demonstrate all of the components of STEM needed to research scientific questions, use new technology (Arduino and Raspberry Pi), employ engineering techniques, and use mathematics to quantify the scientific data. As Star Trek boldly went forth to explore new worlds, the authors hope the students of today do the same!

Acknowledgments

This book would not be possible without the authors’ gaining early technical insight regarding the Raspberry Pi and Arduino from others. Jared Brank and Dennis Pate provided a lot of basic information, key insights, and Arduino hardware early in the process. The authors thank the following individuals who listened to them on many occasions and provided help, insight, and inspiration with their own experiences with the Raspberry Pi and other projects: Jeff Dunehew, Todd Franke, and Fitz Walker. Additionally, significant assistance with 3D printing was provided by Mitch Long and David Thoerig.

Producing this book would not have been possible without the excellent help and guidance regarding scope and early editorial reviews by Joanna Opaskar and Ed Weisblatt. The authors also utilized many ideas from Andrew Bradt and Laura Brank’s science fair experience. Most important was the support and advice from Andrea Bradt.

Table of Contents
Summary 217
Index 233
About the Authors
Paul Bradt
../images/488244_1_En_BookFrontmatter_Figb_HTML.jpg

has a BS in Computer Science from the University of Houston–Clear Lake. He currently owns a small business and writes books, develops code, and does IT support work. He has experimented with the Arduino and Raspberry Pi system and believes them to be excellent tools for developing an understanding of electronic components and hardware interaction in integrated systems. He believes they are very useful as a teaching aid in learning computer programming, science, and engineering. He likes to perform sophisticated troubleshooting of computer problems and has found that online resources can be a great help for novice users to get their experiments operating quickly and effectively.

 
David Bradt
../images/488244_1_En_BookFrontmatter_Figc_HTML.jpg

has a BS in Mechanical Engineering from New Mexico State University with many years of experience in the aerospace industry and in the petrochemical industry. He enjoys building and designing devices to measure and control systems. He has found the Arduino and Raspberry Pi to be incredibly powerful little devices that with a little bit of work can do many different tasks. He is a big fan of Star Trek: The Original Series and astronomy.

 
About the Technical Reviewer
Sri Manikanta Palakollu

is an undergraduate student pursuing his bachelor’s degree in Computer Science and Engineering at SICET under JNTUH. He is a founder of the OpenStack Developer Community in his college. He started his journey as a competitive programmer. He always loves to solve problems that are related to the data science field. His interests include data science, app development, web development, cybersecurity, and technical writing. He has published many articles on data science, machine learning, programming, and cybersecurity in publications like Hacker Noon, freeCodeCamp, Noteworthy, and DDI through the Medium platform.

 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.105.124