100% found this document useful (1 vote)
24 views

Full download Science and Engineering Projects Using the Arduino and Raspberry Pi: Explore STEM Concepts with Microcomputers 1st Edition Paul Bradt pdf docx

Microcomputers

Uploaded by

sobeyoseth43
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
24 views

Full download Science and Engineering Projects Using the Arduino and Raspberry Pi: Explore STEM Concepts with Microcomputers 1st Edition Paul Bradt pdf docx

Microcomputers

Uploaded by

sobeyoseth43
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Experience Seamless Full Ebook Downloads for Every Genre at textbookfull.

com

Science and Engineering Projects Using the Arduino


and Raspberry Pi: Explore STEM Concepts with
Microcomputers 1st Edition Paul Bradt

https://textbookfull.com/product/science-and-engineering-
projects-using-the-arduino-and-raspberry-pi-explore-stem-
concepts-with-microcomputers-1st-edition-paul-bradt/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Science and Engineering Projects Using the Arduino and


Raspberry Pi: Explore STEM Concepts with Microcomputers
1st Edition Paul Bradt
https://textbookfull.com/product/science-and-engineering-projects-
using-the-arduino-and-raspberry-pi-explore-stem-concepts-with-
microcomputers-1st-edition-paul-bradt-2/
textboxfull.com

Beginning Robotics with Raspberry Pi and Arduino: Using


Python and OpenCV Jeff Cicolani

https://textbookfull.com/product/beginning-robotics-with-raspberry-pi-
and-arduino-using-python-and-opencv-jeff-cicolani/

textboxfull.com

Beginning Robotics with Raspberry Pi and Arduino: Using


Python and OpenCV 2nd Edition Jeff Cicolani

https://textbookfull.com/product/beginning-robotics-with-raspberry-pi-
and-arduino-using-python-and-opencv-2nd-edition-jeff-cicolani/

textboxfull.com

Beginning Robotics with Raspberry Pi and Arduino: Using


Python and OpenCV 2nd Edition Jeff Cicolani

https://textbookfull.com/product/beginning-robotics-with-raspberry-pi-
and-arduino-using-python-and-opencv-2nd-edition-jeff-cicolani-2/

textboxfull.com
Internet of Things with Raspberry Pi and Arduino 1st
Edition Rajesh Singh (Author)

https://textbookfull.com/product/internet-of-things-with-raspberry-pi-
and-arduino-1st-edition-rajesh-singh-author/

textboxfull.com

Action movement light and sound with Arduino and Raspberry


Pi First Edition Monk

https://textbookfull.com/product/action-movement-light-and-sound-with-
arduino-and-raspberry-pi-first-edition-monk/

textboxfull.com

Internet Of things With Raspberry Pi And Arduino First


Edition. Edition Rajesh Singh

https://textbookfull.com/product/internet-of-things-with-raspberry-pi-
and-arduino-first-edition-edition-rajesh-singh/

textboxfull.com

Raspberry Pi Home Automation with Arduino 2nd Edition


Andrew K. Dennis

https://textbookfull.com/product/raspberry-pi-home-automation-with-
arduino-2nd-edition-andrew-k-dennis/

textboxfull.com

Hacking Electronics: Learning Electronics with Arduino and


Raspberry Pi, 2nd Edition Simon Monk

https://textbookfull.com/product/hacking-electronics-learning-
electronics-with-arduino-and-raspberry-pi-2nd-edition-simon-monk/

textboxfull.com
TECHNOLOGY IN AC TION™

Science and
Engineering Projects
Using the Arduino
and Raspberry Pi
Explore STEM Concepts with
Microcomputers

Paul Bradt
David Bradt
Science and
Engineering Projects
Using the Arduino
and Raspberry Pi
Explore STEM Concepts
with Microcomputers

Paul Bradt
David Bradt
Science and Engineering Projects Using the Arduino and Raspberry Pi:
Explore STEM Concepts with Microcomputers
Paul Bradt David Bradt
Houston, TX, USA Houston, USA

ISBN-13 (pbk): 978-1-4842-5810-1 ISBN-13 (electronic): 978-1-4842-5811-8


https://doi.org/10.1007/978-1-4842-5811-8

Copyright © 2020 by Paul Bradt and David Bradt


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.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark
symbol with every occurrence of a trademarked name, logo, or image we use the names, logos,
and images only in an editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of opinion as to whether or not
they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of
publication, neither the authors nor the editors nor the publisher can accept any legal
responsibility for any errors or omissions that may be made. The publisher makes no warranty,
express or implied, with respect to the material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Aaron Black
Development Editor: James Markham
Coordinating Editor: Jessica Vakili
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.
For information on translations, please e-mail [email protected], or visit http://www.apress.
com/rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook
versions and licenses are also available for most titles. For more information, reference our Print
and eBook Bulk Sales web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is
available to readers on GitHub via the book’s product page, located at www.apress.com/
978-1-4842-5810-1. For more detailed information, please visit http://www.apress.com/
source-code.
Printed on acid-free paper
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.
Table of Contents
About the Authors��������������������������������������������������������������������������������xi

About the Technical Reviewer�����������������������������������������������������������xiii


Acknowledgments������������������������������������������������������������������������������xv
Introduction��������������������������������������������������������������������������������������xvii

Chapter 1: Key Technology Tools����������������������������������������������������������1


Arduino Basics������������������������������������������������������������������������������������������������������1
Arduino Setup��������������������������������������������������������������������������������������������������2
Ports and Interfaces����������������������������������������������������������������������������������������3
Lessons Learned About the Arduino����������������������������������������������������������������6
Raspberry Pi Basics����������������������������������������������������������������������������������������������8
Raspberry Pi Setup����������������������������������������������������������������������������������������10
Lessons Learned About the Raspberry Pi������������������������������������������������������15
Basic Electronics Definitions������������������������������������������������������������������������������18
Summary������������������������������������������������������������������������������������������������������������18

Chapter 2: Data Logging Basics����������������������������������������������������������19


Data Logging with the Arduino����������������������������������������������������������������������������20
Data Logging with the Raspberry Pi�������������������������������������������������������������������26
Summary������������������������������������������������������������������������������������������������������������35

v
Table of Contents

Chapter 3: Physics and Mathematics Basics������������������������������������37


Temperature��������������������������������������������������������������������������������������������������������37
Force�������������������������������������������������������������������������������������������������������������������38
Pressure��������������������������������������������������������������������������������������������������������������39
Basic Concept of Algebra������������������������������������������������������������������������������������40
Statistical Concepts��������������������������������������������������������������������������������������������41
Direct Compared to Inferred Measurements�������������������������������������������������������41
Summary������������������������������������������������������������������������������������������������������������42

Chapter 4: Simple Science and Engineering Projects������������������������43


Buoyancy of Air���������������������������������������������������������������������������������������������������43
Arduino Buoyancy of Air Version��������������������������������������������������������������������45
Raspberry Pi Buoyancy of Air Version������������������������������������������������������������52
Buoyancy Recap��������������������������������������������������������������������������������������������59
Demonstrating Pressure�������������������������������������������������������������������������������������59
Pressure/Force Recap�����������������������������������������������������������������������������������65
Capturing Counts������������������������������������������������������������������������������������������������65
Counts Recap������������������������������������������������������������������������������������������������70
Summary������������������������������������������������������������������������������������������������������������70

Chapter 5: Advanced Physics and Mathematics for Science and


Engineering����������������������������������������������������������������������������������������71
Basics Terms of Calculus������������������������������������������������������������������������������������72
How Heat Transfer Works������������������������������������������������������������������������������������72
Conduction Heat Transfer������������������������������������������������������������������������������72
Convection Heat Transfer�������������������������������������������������������������������������������74
Radiation Heat Transfer���������������������������������������������������������������������������������76
All Three Heat Transfer Mechanisms Work Together!������������������������������������77

vi
Table of Contents

Mass�������������������������������������������������������������������������������������������������������������������78
Velocity and Acceleration������������������������������������������������������������������������������������78
Inertia������������������������������������������������������������������������������������������������������������������81
Momentum����������������������������������������������������������������������������������������������������������81
Friction����������������������������������������������������������������������������������������������������������������81
More Advanced Aspects of Calculus�������������������������������������������������������������������83
Summary������������������������������������������������������������������������������������������������������������84

Chapter 6: Time/Condition-­Dependent Projects���������������������������������85


Conduction Heat Transfer Through an Aluminum Rod�����������������������������������������85
Ensure Consistency in Temperature Sensor Readings����������������������������������90
Aluminum Rod Conduction Heat Transfer Recap�������������������������������������������94
Conduction Heat Transfer Through a Window�����������������������������������������������������94
Window Conduction Heat Transfer Recap����������������������������������������������������103
Convection Heat Transfer����������������������������������������������������������������������������������103
Convection Heat Transfer Recap������������������������������������������������������������������108
Zero Gravity Demonstration������������������������������������������������������������������������������108
Zero Gravity Recap��������������������������������������������������������������������������������������118
Measuring Frictional Force Projects�����������������������������������������������������������������118
Arduino Frictional Force Project������������������������������������������������������������������119
Operational Schematic��������������������������������������������������������������������������������121
Arduino Frictional Force Recap�������������������������������������������������������������������124
Raspberry Pi Frictional Force Project����������������������������������������������������������124
Raspberry Pi Frictional Force Recap�����������������������������������������������������������131
Acceleration Projects����������������������������������������������������������������������������������������131
Acceleration Direct to Computer�����������������������������������������������������������������131

vii
Table of Contents

Acceleration with Computer Recap�������������������������������������������������������������������139


Acceleration Measurement Without a Computer�����������������������������������������139
Acceleration Without Computer Recap�������������������������������������������������������������148
Summary����������������������������������������������������������������������������������������������������������148

Chapter 7: Light and Imaging Projects���������������������������������������������149


Radiation Heat Transfer�������������������������������������������������������������������������������������149
Analysis of Heat Transfer�����������������������������������������������������������������������������161
Radiation Heat Transfer Recap��������������������������������������������������������������������162
Astrophotography with the Raspberry Pi Camera���������������������������������������������162
Assembling the Meade ETX-60AT and Raspberry Pi�����������������������������������165
Astrophotography Meade ETX-60AT Setup Recap���������������������������������������169
Assembling the 4 1/2-Inch Reflector Telescope and the Raspberry Pi�������������169
Components Needed to Assemble the Raspberry Pi 3
Mounting System to the 4 1/2-Inch Telescope�������������������������������������������172
Reflector Telescope Setup Recap����������������������������������������������������������������175
Basic Raspistill Previewing an Image with the Terminal Command Line����������175
Using Raspistill to Capture an Image�����������������������������������������������������������177
More Advanced Raspistill Input Without a Keyboard�����������������������������������177
Raspistill Image Capture Recap�������������������������������������������������������������������179
Astrophotography Raspberry Pi Python GUI������������������������������������������������������179
Initiating the GUI������������������������������������������������������������������������������������������183
PI_SN003 Raspberry PI GUI Recap��������������������������������������������������������������184
Assembling the Raspberry Pi and Touchscreen in the Case�����������������������������184
Raspberry Pi, Touchscreen, and Case����������������������������������������������������������184
Modification of the Case and Assembly������������������������������������������������������185
Components and Assembly of the Raspberry Pi Case Recap����������������������188

viii
Table of Contents

Camera Modifications, Camera Case, and Power Cables����������������������������������188


Camera Modifications����������������������������������������������������������������������������������188
Building the Camera Case���������������������������������������������������������������������������189
Final Assembly of the Camera in the Case��������������������������������������������������196
Power Cord Combination�����������������������������������������������������������������������������197
Camera, Camera Case, and Power Cord Assembly Recap���������������������������197
Building the Shelf for the Meade ETX-60AT������������������������������������������������197
Shelf Components and Assembly Recap�����������������������������������������������������203
Helpful Hints Using the Telescope and Raspberry Pi����������������������������������������203
Lessons Learned Recap������������������������������������������������������������������������������207
Example Images and Enhancing Them Using a Video Capture GUI�������������������207
Example Images Taken with the Upgraded Meade ETX-60AT
Astrophotography System���������������������������������������������������������������������������208
Recap of Example Images and Enhancement Techniques��������������������������217
Summary����������������������������������������������������������������������������������������������������������217

Appendix: Reference Material����������������������������������������������������������219


Soldering Safety������������������������������������������������������������������������������������������������219
General Shop Safety������������������������������������������������������������������������������������220
Manufacturing Techniques��������������������������������������������������������������������������������220
Soldering�����������������������������������������������������������������������������������������������������221
Basic Arduino and Raspberry Pi Python Commands�����������������������������������222
3D Printing���������������������������������������������������������������������������������������������������224
Computer-Aided Design Options�����������������������������������������������������������������������225
Project Management for Engineering���������������������������������������������������������������226
Decision Analysis for Engineering���������������������������������������������������������������������226
Thermal Conductivity Coefficients��������������������������������������������������������������������227
Coefficients of Friction��������������������������������������������������������������������������������������228

ix
Table of Contents

Astronomy Terms����������������������������������������������������������������������������������������������228
Specifications of the Meade ETX-60AT�������������������������������������������������������������229
Setup, Updates, and Repairs�����������������������������������������������������������������������231
Helpful Books����������������������������������������������������������������������������������������������������232

Index�������������������������������������������������������������������������������������������������233

x
About the Authors
Paul Bradt 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 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.

xi
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.

xiii
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.

xv
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.

xvii
Introduction

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.

xviii
Introduction

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

xix
Introduction

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.

xx
Introduction

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!

xxi
CHAPTER 1

Key Technology Tools


This chapter will highlight some of the basics about the Arduino and the
Raspberry Pi. It will help the reader get started if they are unfamiliar with
these powerful devices. It is amazing what these devices can do and this
chapter provides some basic aspects for getting them set up to run.

A
 rduino Basics
The Arduino is a powerful microcontroller that is ready to program and
acts as an intermediary device between a personal computer and various
sensors. It is relatively new technology that is a great tool for gaining
insight into physical properties and other scientific parameters.
The Arduino board was first developed in Italy in 2004 as a tool to help
train students in programming. It is an open source tool and as such has
developed a large base of helpful web sites and user groups. It represents
a breakthrough as an easy-to-use, relatively inexpensive, programmable
interface between a computer and various sensors. The software
development package and all of the online resources help make this an
ideal data logging tool for science fair/college projects.
The Arduino, Adafruit, SparkFun, Hacktronics, and other web sites are
great places to start. There are also several introductory books to help the
researcher get started using this device. Getting started with Arduino by
Banzi is a very good beginner’s book on Arduino.
Other sources of information for the Arduino novice are maker faires
and user group activities.
© Paul Bradt and David Bradt 2020 1
P. Bradt and D. Bradt, Science and Engineering Projects Using the Arduino and Raspberry Pi,
https://doi.org/10.1007/978-1-4842-5811-8_1
Chapter 1 Key Technology Tools

There are several versions and sizes, but for the projects in this book,
the Arduino Uno and the Integrated Development Environment (IDE)
version 1.89 were utilized. Figure 1-1 shows an example of the Arduino
Uno. The authors recommend for the person unfamiliar with Arduinos
to use an official version and not a clone. The authors have never
experienced a problem with an official Arduino, but there are many clones,
and the authors have experienced problems with one of them.

Figure 1-1. Arduino Uno

A
 rduino Setup
Setting up an Arduino is relatively straightforward; the reader should
follow these basic steps to get the device running:

1. The Arduino is connected to a computer via a USB


connection to the input port (see Figure 1-3).

2. Load code using the IDE (see Figure 1-2).

3. Open the serial monitor to get data.

These steps sound basic, and after the reader completes these steps a few
times, they will see how easy it is to connect and run an Arduino. In many cases,

2
Chapter 1 Key Technology Tools

the challenges occur with the code. If the reader is copying code from a source,
it is important to type it in exactly as it looks. Even then there could be errors, but
that is part of the adventure, and it’s very rewarding when the code runs.

Figure 1-2. Arduino IDE

P
 orts and Interfaces
Figure 1-3 shows the main ports of the Arduino Uno.

3
Chapter 1 Key Technology Tools

Figure 1-3. Arduino Ports

There are five primary port groupings that are used to connect to the
Arduino:

Computer port: This is the primary port that is


directly connected to the computer. It is a ­micro-­
USB port that powers and enables the user to
upload the sketches or programs to the Arduino.

Battery power port: This port allows an Arduino


to be unplugged from a computer and use battery
power to operate. A standard wall power supply that
provides 9–12 V DC can also be used.

Sensor power ports: These plug connections


provide 3.3 V and 5 V DC power. There is also a reset
connection and input voltage connection.

Analog device ports: These connections are for


analog inputs.

Digital device ports: These are for digital inputs


and outputs.

4
Chapter 1 Key Technology Tools

IDE (Integrated Development Environment):


The IDE is the program that is used to develop the
code. It is the programming tool that runs on a
computer and has features to help the developer
write code. The IDE tool must be downloaded from
the Arduino web site.

Sketch: The code that runs on an Arduino is called


a sketch. Once the code is developed in the IDE, it is
uploaded to the Arduino.

Libraries: These are code modules that are installed


on the Arduino and called up by the program when
needed. Libraries add a lot of functionality and do
not require any additional coding.

There are other components and hardware that can be used with the
Arduino:

Shields/breakout boards: These are add-on boards


that are either inserted into the standard Arduino
board ports or connected via wires.

Sensors: A sensor is a device that senses some type


of data. It can be used to directly measure a physical
aspect, or it can be used with some mathematics to
infer a physical measurement.

Effectors: An effector imparts some change in the


physical world when activated. Motors, solenoids,
and servos are some examples.

LCDs: Liquid Crystal Display can be used to show


data.

LEDs: Light-Emitting Diodes or other incandescent


lights can also indicate an event has occurred.

5
Chapter 1 Key Technology Tools

Lessons Learned About the Arduino


The Arduino is relatively easy to use, but the authors found there are a few
key points that will help when using this powerful device:

• Each Arduino attaches to a specific com port. The port


may have to be changed or selected in the tools tab
under “port” to get the IDE to recognize the Arduino.

• If the code is being pasted into the IDE, do not copy


from Microsoft Word or another word processor. First,
put it in a text editor such as Notepad, Notepad++,
or some other C/C++ IDE editor and then copy it
from there. Important note: Notepad and Notepad++
are not development tools like the IDE. One other
very important item of note is when the code was
transcribed into the book format some of the code text
that must be on one line may show up on two lines in
this book. The authors have tried their best to highlight
the code that should be on one line in the IDE by
bolding it in the Listing. Please contact the authors if
there are questions at [email protected].

• It is a good idea to test the devices with a basic program


to be sure they work, before moving to a more complex
program.

• If the final code is complex, get each piece of code


working before adding more modules. This way, it is
easier to find the module where the problem is located.

• The authors recommend for long timing events or


complex programs to not use the “delay command,”
because it locks the Arduino and prevents it from doing
anything else. Instead, use the “milli command” that

6
Chapter 1 Key Technology Tools

tracks time intervals between events and still allows


other actions to occur. The milli code might be a little
more complex, but it allows the Arduino to perform
other functions simultaneously. Using the delay
command for short events or simple programs like
the ones in this book, such as a switch debounce, is
recommended.

• A feature built into the Arduino IDE is the “auto-format


command.” It can be found under the tools tab or using
“Alt+T.” This command helps identify missing items and
also helps organize the code for improved readability.

• One more key aspect of Arduino coding is the “loop


command.” There are a few different types, but common
ones such as “void loop” and the “for command”
perform several operations and then repeat them.

• Check the wiring twice before applying power. It can be


difficult to see which port a wire is plugged into when
there are several wires.

• It is hard to know what code is on an Arduino. One easy


way that helps determine what is loaded on an Arduino
is saving code with a descriptive name, date, and even
time information. This helps programmers who may
need to go back to a previous code version.

• One other very helpful trick is to put the descriptive


name of the code on a piece of tape and stick it on top
of the computer port. This helps when working on, or
programing, several different Arduinos.

• One of the advantages of the Arduino is that once it is


programmed, it remembers the code. When a power
source is plugged into the battery power port, it will

7
Chapter 1 Key Technology Tools

operate the Arduino. According to the Arduino web site,


any power source that can supply 9–12 V DC, 250 mA, or
more will work. The plug must be 2.1 mm with the center
pin providing positive voltage and the exterior of the plug
the negative terminal. Some power supplies do not deliver
enough current or do not provide stable power. If an
Arduino is behaving strangely, try a different power supply.

• Some programs need special ways to use and


communicate with the Arduino. To do this, the reader
should understand these special connection ports on
the Arduino Uno: analog A5 is the SCL (Clock port) and
A4 is the SDA (Data port).

Raspberry Pi Basics
The Raspberry Pi 3 is a powerful minicomputer. This piece of technology
comes with a lot of features like any other modern computer. It is an
experimental/hobbyist device developed around 2011 in the United
Kingdom to teach programming. For its low cost, it has many capabilities
and allows the user to configure it in many ways. There are several models
on the market. For this book, the authors choose the Raspberry Pi 3
Model B V1.2 (Figures 1-4 and 1-5). There is a new Raspberry Pi 4 that
was recently released that has more features. The authors researched the
setup and use of the Raspberry Pi 4, and it appears to be the same as the
Raspberry Pi 3. We believe these projects will work the same if you have a
Raspberry Pi 4.

8
Chapter 1 Key Technology Tools

Figure 1-4. Raspberry Pi

Figure 1-5. Raspberry Pi Ports

Once the Raspberry Pi 3 is up and running, it is just like a normal


personal computer. It has a graphical user interface (GUI) similar to any
computer that enables you to open programs or files with the click of a
mouse. It uses a version of the Linux program for the operating system
(OS) called Debian, so it is a bit of a hobbyist machine and occasionally
may have an issue. There are a lot of online resources to find help.

9
Chapter 1 Key Technology Tools

The Raspberry Pi 3 has a 1.2 GHz 64-bit quad-core CPU, 1 GB RAM, an


integrated wireless connection, four USB ports, an Ethernet port, and an
HDMI connection. It is a truly powerful device for only ≈ $25. The Raspberry
Pi 4 has a 1.4 GHz 64-bit quad core CPU, options of 2, 4, 8 GB RAM and
costs from $35 to 75. The Raspberry Pi 4 will run hotter than the Pi 3 and it is
recommended to have a cooling fan but it is faster.

Raspberry Pi Setup
These are the general steps to set up the Pi:
1. Insert the SD card.
2. Plug in the monitor.
3. Plug in the keyboard.
4. Plug in the mouse.

5. Start the system.

The authors recommend that the reader do all their programming in


versions of Python 3.X or later. The exception to this recommendation is if
the reader has legacy code that runs on an earlier version like Python 2.7.X.
Some projects in this book require additional modules to run. The
“pip” command is typed into the terminal area to install code modules.
The reader should be aware that the pip command installs a module in the
base Python area, which may be specific to Python 2.7.3. If the reader has
upgraded to or is using a newer version of Python, they will need to use
pip3 or Python 3.
Operating the Raspberry Pi is much like a personal computer. It has a
GUI along with several programs such as a spreadsheet, word processor,
and other built-in items. Figure 1-6 provides an example of the interface.

10
Chapter 1 Key Technology Tools

Figure 1-6. Raspberry Pi GUI with Spreadsheet

For the purposes of this book, the authors will focus primarily on how
to connect sensors to the Raspberry Pi and get data out of them. There are
many other uses for the Raspberry Pi that will not be covered in this text.
Figure 1-7 shows the General-Purpose Input/Output or GPIO pins,
although it may not be easy to determine the pin number on the Raspberry Pi.
A ribbon cable is also shown that connects to a nice interface board made
by MCM. This interface board has pin numbers and makes it a lot easier to
connect sensors to the Raspberry Pi. More about this in the next chapter.

11
Another Random Scribd Document
with Unrelated Content
so that the power of the lever increases in proportion to its diminution
in length.
The wear and tear of the machinery was less than in an ordinary
locomotive, there being fewer working parts, whilst the centre of
gravity was considerably lowered.
The above advantages summarised amounted to the advantages
of the long-stroke crank without a long-stroke cylinder, and
consequently the absence of a high-piston velocity.

Fig. 48.—THE “ALBION,” A LOCOMOTIVE BUILT ON THE


“CAMBRIAN” SYSTEM
The “Albion” made its initial trip in June, 1848, the length of line
selected being from Bradford to Skipton, on the Leeds and Bradford
Railway; the distance was about 18 miles. The speed attained and
the low fuel consumption are stated to have more than satisfied the
builders and others concerned. The “Albion” was afterwards tried on
the Midland Railway between Derby and Birmingham, and the result
of these trials showed that the coke consumption was 5lb. per mile
less than with the ordinary locomotives, although the trains hauled
were of greater weight than usual. We have been unable to obtain
further details of the working of this interesting locomotive. The
patentee appears to have sent details of the duties performed by the
“Albion” to the Institution of Mechanical Engineers in 1849; but these
were not printed in the “Proceedings,” nor is the Secretary of the
Institution now able to find any trace of the papers in question among
the archives of the Institution. Messrs. Thwaites Bros., the builders,
inform us that about 30 years ago the engine in question was
working at Penistone, near Sheffield, and that she was afterwards
taken over by the Manchester, Sheffield and Lincolnshire Railway.
Unfortunately, the locomotive department of that railway does not
appear to have preserved any particulars relating to the “Cambrian”
locomotive after it came into the possession of the Manchester,
Sheffield and Lincolnshire Railway.
The other three engines with “Cambrian” machinery were tank
locomotives. Two of these were propelled in a similar manner to the
“Albion,” the segmental cylinder being below the frames, and located
between the driving and leading wheels, both pairs of which were 5ft.
3in. diameter, the trailing wheels being 3ft. 9in. diameter. One of
these two tank engines had a raised fire-box, similar to that of the
“Albion”; but the other had a “Gothic” fire-box, with the wood lagging
exposed to view. The other features of the former were a boiler 12ft.
long, and a steam dome on the fire-box, fitted with two Salter safety
valves, placed side by side. This engine had the “link” motion. Three
water-tanks were provided, one beneath the foot-plate, the second
below the frames between the leading and driving wheels, and the
third extended from the front of the leading axle under the smoke-
box, and terminated at the buffer beam. The wheel base was, L. to
D. 9ft. 6in., D. to T. 5ft. 8in. The engine had inside frames and
bearings.
The locomotive with the “Gothic” fire-box was fitted with a gab
reversing gear, worked off the leading axle; the throw of the cranks
was 19in. The boiler was 12ft. long and 3ft. 5in. diameter, and
contained 121 tubes. Two water-tanks were provided—one beneath
the foot-plate, the other below the frames between the leading and
driving wheels. The wheel base of this engine was, L. to D. 11ft., D.
to T. 5ft. 8in.
The third Cambrian tank engine of which we possess the
drawings was a six-wheel locomotive, with single driving wheels 5ft.
6in. diameter, the leading and trailing wheels being 3ft. 9in. diameter.
The wheel base was 15ft. 5in., equally divided.
This engine also had a “Gothic” fire-box, and was provided with a
sledge brake, which acted on the rails between the driving and
trailing wheels. The reversing gear was of the fork pattern. The
water-tanks were fixed—one below the foot-plate, the other beneath
the frames, between the driving and trailing wheels. The boiler was
11ft. 2in. long, and contained 126 tubes. The machinery in this
engine was arranged in an entirely different manner, the segmental
cylinder being below the smoke-box. The driving shaft passed
through the cylinder, and projected beyond the frames on either side
of the engine, and vibrated in an arc, as did that of the “Albion”; but
instead of a lever being attached to each end of the cranks, the latter
only extended in one direction, so that at one end the crank was
fixed on the driving shaft, while to its other extremity was pivoted a
connecting-rod, 4ft. long, the other end of which was pivoted on a
vertical arm, the upper end of this arm being attached to the frame
by a horizontal bolt, on which it hung. It is very difficult to explain the
method of propulsion without a drawing, but it will be understood that
the connecting-rod from the driving shaft to the hanging-rod only
vibrated. Another crank, 6ft. long, was also attached to the bottom
end of the vertical swinging-rod; the other end of this crank was
connected with the driving wheel by means of the usual outside pin.
It will, therefore, be seen that by means of the hanging-rod the
vibrating motion was transformed into a rotary one. The feed pumps
were worked off the vertical rod, the motion of which was similar to
that of a pendulum, with the connecting-rods fastened to its bottom
end. The drawings of these four remarkable locomotives are on a
large scale, and are well executed; parts of them being coloured,
they are also mostly in a good state of preservation.
CHAPTER IX.
The era of “light” and combination locomotives—Samuel’s “Lilliputian” and “Little
Wonder”—The broad-gauge “Fairfield,” constructed by Bridges Adams—
Samuel’s “Enfield”—Original broad-gauge “singles” converted into tank engines
—The rise of “tank” engines, “saddle,” and “well”—Adams’ “light” engines on
Irish railways—The Norfolk Railway adopts them—England’s “Little England”
exhibited at the 1851 Exhibition—Supplied to the Edinburgh and Glasgow, the
Liverpool and Stockton, Dundee and Perth, and Blackwall Railways—
Hawthorne’s “Plews” for the Y.N. and B.R.—Crampton’s monster “Liverpool”—
Taylor’s design for a locomotive—Pearson’s prototype of the “Fairlie” engine—
Ritchie’s non-oscillating engine—Timothy Hackworth again to the front—His
celebrated “Sanspareil, No. 2”— His challenge to Robert Stephenson
unaccepted—Bury’s “Wrekin”—Caledonian Railway locomotive, No. 15
—“Mac’s Mangle” on the L. and N.W.R.
Many curious contrivances were introduced into the construction of the
locomotive about the period now under review. Among these early proposals
for the improvement of locomotion, few are more interesting than the
combined locomotive and carriage introduced some fifty years ago by Mr. W.
Bridges Adams.
Mr. Adams had a wide experience of every section of railway
construction. Indeed, in the preface to one of his books, in writing of his
experience, he says that he had “years of practical utility in planning the
construction of nearly all machines that run on roads and rails also—from
navvy’s barrow up to a locomotive engine.”
Nor are Mr. Adams’ contributions to railway literature inconsiderable, for,
besides writing several books between 1838 and 1862, he was at one time
editor of a periodical, and also wrote voluminously under the pseudonym of
“Junius Redivivus.”
Having thus briefly mentioned Mr. W. B. Adams as being entitled to a far
more important position in the evolution of our locomotives than is usually
accorded him, we will now proceed to discuss the subject of combined
locomotives and railway carriages, of which Mr. Adams was the chief
advocate. The first machine of the kind, however, appears to have been
constructed by Mr. Samuels, of the Eastern Counties Railway, for the
purpose of quickly and economically conveying the officials of the railway
over the system.
This engine was apparently called both the “Lilliputian” and the “Little
Wonder.” It was constructed in 1847, and made its first trip to Cambridge on
Saturday, October 23rd, leaving London at 10.30 a.m., and reaching the
University town at 2.45 p.m. Stops were made at three intermediate stations
for water, etc., which occupied about half an hour, so that the 57½ miles
were covered in about 105 minutes’ running time.
The total length of the “Little Wonder” was 12ft. 6in., in which space was
included the boiler, machinery, water-tank, and seats for seven passengers.
The frame was hung below the axles, and carried on four wheels 3ft. 4in.
diameter.
The floor was 9in. above rail level. The machinery consisted of two
cylinders, 3½in. diameter, and placed one on each side of the vertical boiler;
the driving axle was cranked. The stroke was 6in. The boiler was cylindrical
in shape, 19in. diameter and 4ft. 3in. high; it contained 35 tubes, 3ft. 3in.
long and 1½in. diameter; the tube heating surface being 38 sq. ft. The fire-
box was circular in shape, 16in. diameter and 14in. high, its heating surface
being 5½ sq. ft.
The link motion, feed pumps, etc., were provided. The water-tank held 40
gallons, and was placed under the seats. The usual speed of the “Little
Wonder” with a full load was 30 miles an hour; and as high a rate as 44
miles an hour was often attained. The coke consumption was only 2½lb. per
mile. The weight of the whole vehicle, including fuel and water, was only
25½ cwt.
Samuels’ initial effort with light locomotives having been so successful, it
occurred to him that branch traffic could be much more cheaply worked by
means of a combined engine and carriage, instead of the usual locomotive
and train of carriages.
Mr. Adams also had for some time been in favour of a combination of the
kind, and Mr. Gregory, the engineer of the Bristol and Exeter Railway, was
also in favour of the system being tried on the short branches of that railway,
the passenger carriages on one at least of which were at that time drawn by
horses. Acting upon the advice of Mr. Gregory, the directors of the Bristol
and Exeter Railway ordered Mr. Adams to construct a vehicle and engine for
working the traffic on the Tiverton branch. The machine was completed in
December, 1848, and a satisfactory trial of it was made upon the broad-
gauge metals of the West London Railway. This combination, which was
constructed by Mr. Adams at Fairfield Works, Bow, E., was called the
“Fairfield” (Fig. 49), and was brought into use on the Tiverton branch on
December 23rd, 1848.
Its length was 39ft., and the boiler was placed in a vertical position. The
driving wheels were 4ft. 6in. diameter, and were originally made of solid
wrought-iron. The middle and trailing wheels, 3ft. 6in. diameter, were of
wood, and loose on their axles as well as their journals, the middle wheels
having a lateral transverse of 6in.

Fig. 49.—THE “FAIRFIELD,” ADAMS’S COMBINED BROAD-GAUGE


ENGINE AND TRAIN, FOR THE BRISTOL AND EXETER
RAILWAY
The boiler was vertical, 3ft. in diameter and 6ft. high, and contained 150
tubes; the fire-box was 2ft. high and 2ft. 6in. in diameter. The cylinder was
8in. diameter, with 12in. stroke. The connecting-rods worked on a separate
crank-shaft, which communicated with the driving wheels by side-rods, the
axle of the driving wheels being straight, with crank pins on the outside.
The boiler was placed behind the driving axle, the tank, capable of
holding 200 gallons of water, being in front of it; and the coke-box was
attached to the front part of the carriage behind the driver. The working
pressure was 100lb.
The bottom of the framing was within 9in. of the rails, so that by keeping
the centre of gravity low greater safety might be ensured at high speed, and
freedom from oscillation obtained.
The first-class carriage was in the form of a saloon, and accommodated
sixteen passengers; whilst the second-class compartment seated thirty-two.
The entire weight of the machine was about 10 tons, and when occupied
with forty-eight passengers it amounted to about 12½ tons.
On the experimental trip, on December 8th, 1848, the “Fairfield” left
Paddington Station at 10.30 a.m. for Swindon, 77 miles down the line, with a
party of gentlemen connected with various railways. Mr. Gooch officiated as
driver on both the up and down journeys.
Though the rails were greasy from the prevailing rain, in addition to a
head wind—and, what was worse, a leak in the boiler—the machine soon
attained considerable speed, and for a portion of the way reached the rate of
49 miles an hour. On arriving at Swindon the fire was extinguished, the leak
partially repaired, and, after a reasonable sojourn, the party returned to
town. The run back was exceedingly satisfactory, the speed of 49 miles
being maintained for a considerable part of the way, the passage from
Slough to Paddington being performed in 30 minutes.
As previously stated, the crank-shaft was unprovided with wheels, the
motion being conveyed to the driving wheels by means of cranks fixed on
the outsides of the driving axle, and connected to similar cranks on the
driving wheels by means of connecting-rods.
This method has erroneously been called “Crampton’s system,” but it
should be noticed that Adams used it for several years previous to
Crampton adopting the plan in question. These combined engines and
carriages were, in fact, built under a patent obtained by Mr. Adams in 1846,
and, therefore, some time before Crampton adopted the inside cylinder and
intermediate driving shaft.
It was found in practice that the vertical boiler of the “Fairfield” was not a
success, so after some nine months’ trial it was replaced by a horizontal
tubular boiler. Then, after further experience, several drawbacks to the
efficient working of branch line traffic by means of the combined engine and
carriage were evident. So the engine was disconnected from the carriage
and given an extra pair of wheels, and became, in fact, a miniature four-
wheeled tank locomotive, a style of engine Adams afterwards became noted
for building.
Mr. Samuel having obtained the sanction of the directors of the Eastern
Counties Railway, Mr. Adams constructed a locomotive carriage for the
Enfield branch traffic. The “Enfield” (Fig. 50), in appearance resembled a
four-wheel tank engine and a four-wheel carriage, built together on a
continuous frame, instead of being connected by couplings and buffers.
The whole framing, with the exception of the two buffer bars, was of
wrought-iron, and was 8ft. 6in. in width, bound together by deep cross-bars.
The engine was of the outside cylinder class. The cylinders were 7in. in
diameter, with a 12in. stroke. They were simply bolted down to the surface
of a stout wrought-iron plate, in the middle of which the boiler was placed.
The driving wheels were 5ft. in diameter, and, as well as the front pair of
wheels of the carriage, were without flanges, those of the leading engine
wheels and the hind pair of the carriage being sufficient to retain the engine
on the rails, whilst greater freedom was thus obtained for passing around
curves. The boiler was constructed in the usual manner, and was 5ft. in
length by 2ft. 6in. in diameter, and had 115 1½in. tubes 5ft. 3in. long, giving
230ft. of tube-heating surface. The dimensions of the fire-box were 2ft.
10½in. by 2ft. 6in., being an area of 25 sq. ft., making the total heating
surface 255 sq. ft. The water was carried below the floor of the carriage in
wrought-iron tubes 12in. in diameter and 12ft. long.
The coke was carried in a chest placed behind the foot-plate of the
engine and immediately in front of the carriage head. The side frames were
ingeniously trussed by diagonal bars of iron, and were thus rendered of
great strength without adding much weight to the machine.

Fig. 50.—THE “ENFIELD,” COMBINED ENGINE AND TRAIN FOR THE


EASTERN COUNTIES RAILWAY

The leading engine wheels, together with the running wheels of the
carriage, were 3ft. in diameter. The carriage was divided into four
compartments, the two middle ones being for first-class and the two external
ones for second-class passengers. The guard’s seat was on the top of the
carriage head. A vertical shaft with a hand-wheel on its upper end passed
down the side of the head, and was connected beneath the framing with two
transverse rocking shafts, carrying the brake blocks, placed one on each
side of the driving wheels, thus giving the guard a ready means of control
over the speed of the engine.
To bring up the buffers to the line of those of ordinary carriages, separate
timber beams were passed across each end of the carriage, the front one
being supported by neat wrought-iron brackets, rising from the framing. The
total weight of the whole was not more than 10 tons, including its supply of
coke and water, and accommodation was afforded for 42 passengers, to
convey which, at 40 miles per hour, the calculated consumption of coke was
7lb. per mile.
Mr. Samuel stated that the accommodation provided by the combined
engine and carriage was not sufficient for the traffic, so two additional
carriages (one with a guard’s compartment) were added, the train thus
having accommodation for 150 passengers. The “Enfield” worked this train
regularly at 37 miles an hour speed.
From January 29th to September 9th, 1849, the train travelled 14,021
miles, and was in steam 15 hours daily, but only five of which were spent in
running. The total time in steam during the above period was 2,162 hours,
the total coke consumed being 1,437 cwt., of which 743 cwt. was consumed
in running, 408 in standing, and 286 in raising the steam. The average coke
consumption per mile was 11.48lb., but a considerable portion of this was
spent in standing, the actual consumption for running being only about 6lb.
per mile.
In addition to the passenger traffic, the “Enfield” hauled all the goods and
coal traffic on the branch, which, during the period under review, amounted
to 169 tons of goods and 1,241 tons of coal. On June 14th, 1849, the
“Enfield” took the 10 a.m. train from Shoreditch to Ely, 72 miles, the train
consisting of three passenger carriages and two horse-boxes; but the
“Enfield” arrived eight minutes before time, and the coke consumed only
amounted to 8¾lb. per mile for the trip, including that used in raising steam.
When tried between Norwich and London, the “Enfield” performed the
journey of 126 miles in 3 hours 35 minutes, including stoppages. An ordinary
train had, at that time, never made the journey so quickly.
Although the “Enfield” appeared to use so little fuel, the broad-gauge
“Fairfield” does not seem to have been an economical machine. A special
trial was made between Gooch’s famous 8ft. single “Great Britain” and
“Fairfield,” between Exeter and Bristol. A loaded wagon weighing 10 tons
was drawn by the “Fairfield,” making a total weight of 26½ tons, of which the
engine portion can be reckoned at 9½ tons and 17 tons for the weight of the
train. The distance is 76 miles, and the time allowed for the 8 a.m. train,
including ten stops, was 2 hours 35 minutes; but the “Fairfield” took 3 hours
17 minutes to cover the distance, and consumed 13lb. of coke per mile, only
6.3lb. of water being evaporated for each pound of coke.
The duty performed by the two locomotives is thus tabulated:—

Consumption
Load in Coke per
of Coke per
tons. mile.
ton per mile.
“Great Britain” 100 26 lb. 0.26 lb.
“Fairfield” 17 13 lb. 0.76 lb.
But, in comparison with the old “Venus,” the “Fairfield” comes out no
better.
The “Venus,” it will be remembered, was one of the original broad-gauge
engines built for the Great Western Railway by the Vulcan Foundry
Company, with 8ft. driving wheels. This engine had her driving wheels
reduced to 6ft. diameter, and a small water-tank fitted on the foot-plate in
place of a tender, thus being converted into a six-wheel “single” tank engine.
The “Venus” only used 14lb. of coke per mile in working the Tiverton branch;
while the “Fairfield” consumed 19lb. of coke per mile on the same work. The
evaporating powers of the “Venus” had been greatly improved since N.
Wood’s experiments in 1838, as at that time she consumed 52.7lb. of coke
per mile run.

Fig. 51.—“RED STAR,” A 7 ft. SINGLE BROAD-GAUGE SADDLE TANK


ENGINE. CYLINDERS, 16in. BY 18in.

In addition to “Venus,” several other of the early broad-gauge


locomotives were reconstructed as tank engines. Fig. 51 (“Red Star”) is a
good example of the peculiar tank locomotives on the G.W.R. 60 years ago.
In addition to the “Fairfield” and “Enfield,” combined engines and
carriages were constructed by Mr. Adams for several other railways. One for
the Cork and Bandon Railway had cylinders 9in. diameter, and
accommodation for 131 passengers. This engine was constructed in such a
manner as to enable it to run independently of the carriage. Another engine
and carriage was built for a Scotch railway, and was guaranteed to work at
40 miles an hour. But the advantage of having the engine separate from the
carriage was so great that Mr. Adams soon ceased to build the combination
vehicles, and instead constructed his celebrated “light” locomotives; these,
and the somewhat similar “Little England” engines, built by England and Co.,
were at one time very popular.
Fig. 52, representing “No. 148,” one of the first batch of outside cylinder
engines on the Southern Division of the L. and N. W. R., shows also a good
example of Stephenson’s “long boiler” locomotive. “148” was built by Jones
and Potts, of Newton-le-Willows in 1847. The cylinders were 15in. diameter,
the stroke being 24in. The driving wheels were without flanges, and were
6ft. 6in. in diameter. The leading wheels were 4ft. diameter. This engine was
destroyed in a collision at Oxford on January 3rd, 1855, in which accident
seven people lost their lives.

Fig. 52.—“No. 148,” LONDON AND NORTH WESTERN RAILWAY; AN


EXAMPLE OF STEPHENSON’S “LONG BOILER” ENGINES

At this period a fashion for “tank” engines had become prevalent, and
most of the locomotive builders produced designs, each having
characteristic features. Thus Sharp Brothers and Company’s “tank” engines
had outside cylinders, with the tank between the frames and below the
boiler, whilst the coal was carried in a bunker affixed to an extension of the
foot-plate. Somewhat similar “single tank” engines were made by the same
firm for the Manchester and Birmingham Railway (London and North
Western Railway). The two engines in question were Nos. 33 and 34, and
were used in working the traffic between Manchester and Macclesfield, the
daily duty of each averaging 114½ miles. These engines commenced work
in May, 1847. They weighed 21 tons in working order; the driving wheels
were 5ft. 6in. diameter, and the leading and trailing 3ft. 6in. Two water-tanks
were provided, one between the leading and driving wheels, the other under
the coal bunker, at the rear of the trailing wheels. The two tanks contained
480 gallons of water. A wooden float attached to a vertical rod was fitted to
show the amount of water in the tanks! The bunker contained half a ton of
coals. These engines were fitted with sand-boxes; but these were placed in
front of the leading wheels only, although the locomotives were specially
constructed for running either bunker or chimney in front. However, the
introduction of the sand-box was a step in the right direction; yet Tredgold
only mentions the innovation in an apologetic manner. He says (after
describing the working of the apparatus) that “it is very seldom required on
the Macclesfield line, owing to the ballast between the rails being mostly
sand; but when the rails are moist it is necessary in starting a heavy train to
open the sand-cock.” Tredgold then proceeds to give a detailed explanation
of “how it is done.”
In September, 1849, Walter Neilson, of Glasgow, obtained a patent for
his design of tank engine.
The tank was of the now well-known “saddle” kind, and covered the
whole boiler, barrel, and smoke-box; the bottom of the saddle tank rested on
the frames on either side of the boiler, so that the tank was semi-circular in
shape, instead of being but an arc, as is the practice with modern “saddle
tanks.” Neilson was, however, sufficiently ingenious not to limit the design of
his saddle tank, for we find that “the tank may be supported from the boiler,
instead of the framing, if necessary, and its length may be made shorter
than that of the boiler, if required.” The boiler was fed with water drawn from
the smoke-box end of the tank, to obtain the advantage of the escaping
heat. The coal bunkers were placed at the sides of the fire-box, and
extended some distance towards the back buffer beam, but a bunker was
not provided at the end, so as to allow “of ready access to the couplings of
the wagons behind.” The engine in question had inside frames, underhung
springs, outside cylinders, single driving wheels, unprovided with flanges,
and small leading and trailing wheels. A short cylindrical dome was placed
over the fire-box, and on this were fixed two “Salter” pattern safety valves,
covered by a brass casing.
“Light locomotives” was the popular name of tank engines when the
general use of such engines was being urged as a method of reducing the
working expenses of unremunerative railways. We have previously alluded
to Mr. W. Bridges Adams and his combined engines and carriages. This
gentleman and Mr. England were the principal advocates of the “light”
locomotive, and both attained some success in connection therewith.
The engines in question would now be considered absurdly light, but
nearly fifty years ago far different ideas of “light” and “heavy,” as applied to
locomotive engines, obtained.

Fig. 53.—ADAMS’S “LIGHT” LOCOMOTIVE FOR THE LONDONDERRY


AND ENNISKILLEN RAILWAY
The practice of Adams and England regarding “light” locomotives differed
considerably. The former was a firm advocate of four wheels and a long
wheel base. England, on the other hand, preferred his light locomotives to
be supported by six wheels. In 1847, Adams built a light locomotive (Fig. 53)
for the Londonderry and Enniskillen Railway (Ireland), with outside cylinders
9in. in diameter, the stroke being 15in. The driving wheels were 5ft. in
diameter, and located in front of the fire-box; the other pair of wheels were
3ft. diameter, and were placed beneath the smoke-box. The fire-box was 2ft.
9in. long, the boiler 2ft. 3in. diameter and 10ft. 3in. long; height of top of
boiler from rails, 5ft. 8in. The connecting-rods were 5ft. 3in. long; the steam
pressure was 120lb. The water-tank was placed beneath the boiler, and
reached to within a few inches of the surface of the rails. Mr. Adams built a
similar engine for the St. Helen’s Railway. In November, 1849, a broad-
gauge light locomotive was built at Mr. Adams’ Fairfield Works, for service
on the Holyhead breakwater. The engine in question was from designs
prepared by Mr. Thos. Gray, resident engineer of C. and J. Rigby, the
contractors for the breakwater. This engine had cylinders 8in. diameter, the
stroke being 18in.
In July, 1849, Adams supplied two of his light engines to the Cork and
Bandon Railway. These differed from those already described, as the driving
wheels were the leading ones, the smaller pair of wheels being at the rear.
The Irish names of the engines signified “Running Fire” and “Whirlwind.”
In August, 1853, the engineer of the Cork and Bandon Railway reported
that “the cost of repairs to the engines was very small, more particularly on
the light engines, which have worked all the fast passenger trains in a
satisfactory manner, and with the same consumption of coke as heretofore
—viz., about 10lb. per mile. These engines were put upon the line in July,
1849, since which period they have been daily working the passenger traffic.
The principal item of cost in their repairs during the four years has been a
new crank axle to each of the two light engines, as also a new set of tyres
on the driving wheels. The light special trains conveyed by these engines
generally occupy about 26 minutes between the two termini of Cork and
Bandon.” These two light locomotives continued to work traffic over the Cork
and Bandon Railway for several years.
On May 1st, 1851, Mr. Peto, the chairman of the Norfolk Railway,
provided four light engines with 12in. cylinders, and weighing 10 tons each,
to work the branch traffic of that railway under the following circumstances.
The Norfolk Railway was worked by the Eastern Counties, and the
branch or local trains of the former were supposed to meet the main line
trains of the latter line at the junctions.
But the Eastern Counties trains had a habit of being behindhand, putting
in an appearance at the junctions any time between thirty minutes and an
hour after the times given in the time-tables. As a result, the traffic on the
Norfolk branch lines was thoroughly disorganised; indeed, so little could it be
depended upon that local passengers almost completely neglected the line.
Then the Eastern Counties Railway worked the Norfolk branches with the
main line engines, and charged the Norfolk Railway the average expense
per mile incurred in working with these engines.
Such a method did not meet with the approval of the chairman of the
Norfolk Railway, so Mr. Peto obtained the sanction of the Eastern Counties
Railway to allow the Norfolk Company to work the local branch traffic itself,
and independent of the arrival and departure of the main line trains. Mr.
Peto’s new system met with instantaneous and complete success, a great
saving being effected. Thus the coke consumption of Adams’ light engines,
introduced by Mr. Peto, only averaged 10lb. per train mile; but the Norfolk
Railway had been paying the Eastern Counties Railway at the rate of 27lb.
per mile, that being the average coke consumption of the Eastern Counties
Railway main line engines. A large and remunerative local passenger traffic
was built up by reason of the improved local services.
The advantages claimed by Mr. Adams for his light engines were as
follows:—Less dead weight, less friction, and less crushing and deflecting of
the rails.
We will now proceed to give some account of England’s light
locomotives, popularly called “Little Englanders”; but this cognomen then
had a very different meaning, as applied to locomotives, than the words
have at the present time in their application to certain individuals. England
constructed his premier light engine in 1849, and the “Little England” (Fig.
54) was exhibited at the Exhibition of 1851. The chief dimensions were:—
Driving wheels, 4ft. 6in. diameter, located in front of the fire-box; leading and
trailing wheels, 3ft. diameter; inside cylinders, placed between the leading
and driving wheels, and not under the smoke-box; the frames were outside.
The fire-box was of the Bury type, with safety valves, similar to those
previously described as on the Bury engine still at work on the Furness
Railway. A dome was placed on the boiler barrel over the cylinders, so that
the steam pipes proceeded in a curved vertical line from the dome to the
cylinders. The dome was on a square seating. An auxiliary pipe for the
escape of the steam was provided at the back of the chimney, but was only
about one-half as high as the chimney. At the rear of the foot-plate was a
well-tank, holding water sufficient for a 50-mile trip. A prize medal was
awarded to this engine at the Exhibition.
England and Co. in August, 1850, sent one of their light engines to the
Edinburgh and Glasgow Railway on the following conditions: A guarantee
that the engine should work the express trains between Edinburgh and
Glasgow, consisting of seven carriages, and keep good time as per time-bill,
while the fuel consumption was not to exceed 10lb. of coke per mile. If the
light engine performed these conditions to the satisfaction of the railway
company’s engineer, the Edinburgh and Glasgow Railway was to purchase
the locomotive for £1,200. But if the work done and the quantity of fuel
consumed were not as guaranteed, England and Co. were to remove the
engine and pay all expenses of the trial.
Fig. 54.—ENGLAND & CO.’S “LITTLE ENGLAND” LOCOMOTIVE,
EXHIBITED AT THE PREMIER INTERNATIONAL
EXHIBITION, LONDON, 1851

This “Little England” was tried in competition with the “Sirius,” the coke
consumption of the former being 8lb. 3oz. per mile against 29lb. 1oz. of the
“Sirius,” both performing exactly the same work. The “Little England” so
frequently ran in before her time that the driver had to be ordered to take
longer time on the trips for fear of an accident happening in consequence of
the train arriving before it was expected. The speed of this light engine
frequently exceeded 60 miles an hour, and during the heavy winds and
gales of January, 1851, the “Little England” was the only locomotive on the
line that kept time. With a train of five carriages the coke consumption only
amounted to 6½lb. per mile. On the Campsie Junction line, the “Little
England” hauled a train of seven carriages and a brake-van, all of which
were overloaded with passengers, over the several gradients of Nebrand, at
30 miles an hour. Although the train stopped at a station on the incline, the
light engine successfully started from the station and continued the ascent.
An ordinary engine was sent to assist the train at the rear, in case the “Little
England” proved unequal to the task, but it is said that the bank engine was
unable to keep up with the train!
The following table shows the result of the trial of the “Little England” on
the Edinburgh and Glasgow Railway:—

(A) = Including lighting up and standing 4 hours between


each trip.
Number of Daily No. of Time on Coke Consumed.
Carriages
Number of Mileage
Daily Stoppages
No. of each
Timetrip.
on WhileConsumed.
Coke
per Train. (47½)
Carriages Mileage
(3 each way).
Stoppages each trip. running.
While (A)
each way. Per Mile.
per Train. (47½) (3 each way). running.
lbs. (A)oz.
oz. lbs.
each way. Per Mile.
7 8 3 9 7
7 95 90 8 3 9 7
6
5 miles. min. 7 4 9 7
4 6 5 8 5

On September 7th, 1850, another “Little Englander” commenced service


on the Liverpool and Stockport Railway, under guarantee to haul a train of
seven carriages up an incline of 1 in 100, stopping and starting upon it, at a
speed of 25 miles an hour, and consuming not more than 10lb. of coke per
mile; on the level the speed was to be 45 miles an hour. This engine
frequently drew ten carriages under the conditions laid down for only seven.
In June, 1849, a “Little Englander” had been supplied to the Dundee and
Perth Railway for working the mail train of four carriages. This the engine did
successfully for a considerable time.
After the abolition of rope traction on the Blackwall Railway “Little
Englanders” were used for the passenger trains.
England and Co. guaranteed these light engines to haul trains of six
carriages at a speed of 40 miles an hour on gradients of 1 in 100, at a coke
consumption of only 10lb. per mile. These engines cost £1,200 each, and
the builders were willing to back them for 1,000 guineas a side, with a load
in proportion to the weight of any other engine, or the amount of fuel
consumed. We do not think anyone ever cared to accept this challenge.
In March, 1848, a patent was granted to McConochie and Claude, of
Liverpool, for various improvements in the locomotive. The cylinders were
inside, behind the leading wheels, the valve gearing being outside the frame
and worked by eccentrics on the naves of the driving wheels. It will be
remembered that the valve gearing of Stephenson’s “No. 185” was on this
plan. The pumps were worked off the driving wheels, as in the “Jenny
Linds.” A double-beat safety valve was provided.
To enable a low-pitched boiler to be employed, the axle was cranked at
the extreme ends, so that at each extremity of the axle only one return
crank-arm was provided, the wheel itself forming the second one, and a pin
connecting the wheel and axle-crank formed the shaft upon which the
connecting-rod worked.
To increase the weight upon the driving axle, a toggle joint was placed
between the bearing of the trailing axle and the springs; a rod connected the
knuckle of the toggle joint with the piston of a small steam cylinder.
When the driver wished to obtain additional adhesion for the driving
wheels, he admitted steam to this auxiliary cylinder, which drove the toggle
joint into an upright position, thereby removing the weight from the trailing
wheels and placing it upon the driving wheels. Several other novel proposals
were included in the specification in question.
In 1848, Hawthorne, of Newcastle, built an engine named “Plews,” No.
180, of the York, Newcastle, and Berwick Railway (makers’ number of
engine, 711). The locomotive had a copper fire-box. The boiler was 10ft. 8in.
long, of oval shape, and consequently had to be stayed with four plates; 229
brass tubes of 1¾in. external diameter were provided; two lever safety
valves were fixed on a raised fire-box and enclosed in a brass casing; the
steam pressure was 120lb. A very large cast-iron dome placed on the centre
ring of the boiler was a characteristic of the “Plews.”
The cylinders were placed between the outside and inside frames,
diameter 16in. and stroke 20in.; whilst the slide-valves were outside the
cylinders, being worked by four eccentrics, on the outside of the wheels, but
within the outside frames. The driving wheels were 7ft. diameter, the leading
and trailing being 4ft. diameter; the whole of the bearings were outside.
When at rest, the steam was turned into the tender for the purpose of
heating the feed-water. The tender was carried on six wheels of 3ft. 6in.
diameter, and was capable of holding 1,400 gallons of water.
Brake blocks were provided for both sides of the six wheels, and an
ingenious arrangement of tooth wheels and rack applied the whole of the
blocks by means of a few turns of the brake handle.
Crampton’s engine, “Liverpool” (Fig. 55), has been described as the
“ultimatum for the narrow-gauge.” Why, we are at a loss to understand;
many other narrow-gauge engines have been constructed of greater power,
and certainly of more compact and pleasing design. The “ultimatum of
locomotive ugliness” would have been a correct title for the “Liverpool.”
Fig. 55.—CRAMPTON’S “LIVERPOOL,” L. AND N.W.R.

The engine in question was built by Bury, Curtis, and Kennedy, for the
London and North Western Railway, in 1848. The one good point about the
engine was the immense heating surface, which amounted to 2,290 sq. ft.
When our locomotive superintendents make up their minds to construct
express locomotives with such an amount of heating surface, we shall hear
no more of “double engine running,” and our express trains may be
expected to average a speed of over 50 miles an hour from start to finish
(including stops) on all trips.
The general arrangement of the “Liverpool” was similar to the engines on
Crampton’s system already described—viz., the driving wheels at the back
of the fire-box and outside cylinders fixed about the centre of the frames.
This engine had three pairs of carrying wheels under the boiler, in addition to
the driving wheels. The cylinders were outside, fixed upon transverse
bearers, formed of iron plates 1¼in. thick, curved to the shape of the boiler
and passing below it. The cylinders were 18in. diameter, the stroke being
24in. Metallic packing, consisting of two concentric rings of cast-iron, each
with a wedge and circular steel spring, was used for the purpose of making
the pistons steam-tight. The valves were above the cylinders, and were
inclined, the eccentrics being of large size and outside the driving wheels.
The regulator was located in a steam-box on the top of the boiler barrel; the
steam reached the valves by means of curved vertical copper pipes outside
the boiler, whilst the exhaust was conveyed to the smoke-box by similar
horizontal “outside” pipes. The two exhaust pipes united within the smoke-
box beneath the bottom of the chimney, the blast orifice being 5½in.
diameter.
The leading wheels were 4ft. 3in. diameter, the two intermediate pairs
4ft., and the driving wheels 8ft. in diameter. The area of the fire-grate was
21.58ft. The tubes were of brass, 12ft. 6in. long; 292 were 2³/₁₆th in
diameter, the remaining eight being 1¾in. diameter. The heating surface
was:—Tubes, 2,136.117 sq. ft.; fire-box, 154.434 sq. ft. The pumps were
horizontal, fixed on the frames over the leading wheels; they were worked
by extension piston-rods, worked through the covers of the cylinders.
The engine weighed (loaded) 35 tons, of which weight 12 tons were on
the driving axle. The tender weighed 21 tons. With a light load the
“Liverpool” attained a speed of nearly 80 miles an hour, whilst on one
occasion she hauled the train conveying Franconi’s troupe and horses,
consisting of 40 vehicles, from Rugby to Euston under the schedule time.
Three engines had been engaged to haul the same train from Liverpool to
Rugby, when time was lost. The power of the “Liverpool” would, therefore,
appear to have exceeded that of three of the usual London and North
Western Railway locomotives of that date.
Adams’ idea of a straight driving shaft connected by means of outside
rods with the driving wheels soon attracted attention, and in 1849 Crampton
incorporated the principle in his patent locomotive specification of that year.
But it was some two years later before any engines were built under this
particular patent of Crampton’s. These locomotives will be described in due
sequence.
We will now give a few details of some engines that would have been
most interesting had we knowledge that they were ever built. We possess
drawings of the engines in question, but lack authentic details of their
performances, so we will mention the principal features of the designs, as
given in the patent specifications. George Taylor, of Holbeck, Leeds,
obtained his patent on June 3rd, 1847. The drawing shows the boiler to be
hung below the wheels, of which there are only four; these were to be 15ft.
diameter, and in addition the wheels were geared up 2 to 1, so that one
revolution of the cogged driving wheel would have propelled the engine six
times the distance of a driving wheel of 5ft. diameter. The cylinders were
inside the frames, over the boiler, and, of course, at the rear of the smoke-
box; the connecting-rods were attached to cranks on either side of a central
cog-wheel, which engaged with a cog-wheel of half its diameter, fixed on the
centre of the rear axle. The motion being conveyed to the centre of the axle,
instead of alternately on each side, as is usual, practically abolished the
oscillating motion so apparent in two-cylinder engines. An examination of
the drawing of this locomotive design of George Taylor shows with what
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like