<div><p>This book equips the reader with skills necessary to design and build custom hardware interfaces for the Raspberry Pi. A thorough chapter on interfacing 5-volt systems to 3.3-volt Raspberry Pis expands the readerβs choice of peripheral options. Ready to go C++ programs involving GPIO and I2C
Custom Raspberry Pi Interfaces Design and build hardware interfaces for the Raspberry Pi
β Scribed by Gay, Warren
- Publisher
- Apress
- Year
- 2017
- Tongue
- English
- Leaves
- 229
- Edition
- 1st ed. 2017
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Design and build custom hardware interfaces for the Raspberry Pi and discover low cost display and sensor options for embedded system projects.
With this book you'll master 12C communications using Raspbian Linux in C++ and perform ADC and DAC experiments. You'll experiment with debounce buttons and switches using hardware and software solutions. Develop flywheel rotary encoder effects for ease of tuning and construct a hardware interface to the Music Playing Daemon (MPD) with developed software. Discover how to add your own hardware keypad for remote combination lock applications.
Custom Raspberry Pi Interfacesoffers a thorough chapter on interfacing 5-volt systems to 3.3-volt Raspberry Pis designed to expand your choice of peripheral options. Ready to go C++ programs involving GPIO and I2C peripherals are provided. This book also explores ADC, DAC, rotary encoders, CMOS shift registers. I2C I/O extenders.
What you'll learn:
Build simple, low cost input/output interfaces including rotary encoders
Interface with 5-volt devices from a 3-volt Raspberry Pi system
Apply analog to digital and digital to analog conversions on the Pi
Read potentiometers (volume control) from the Pi
Determine step, directions, and velocity of a rotary encoder
Perform remote interfacing using the I2 PCF8574 chip
Work with external CMOS devices like the 74HC595 (in C++)
Who this book is for:Students and hobbyists interested in building custom interfaces for their Raspberry Pis.
β¦ Table of Contents
Contents at a Glance......Page 4
Contents......Page 5
About the Author......Page 13
About the Technical Reviewer......Page 14
Chapter 1: Introduction......Page 15
What to Purchase......Page 16
Letβs Begin......Page 18
Chapter 2: 3V/5V Signal Interfacing......Page 19
7400 Series (TTL)......Page 20
3.3V Logic......Page 21
Voltage Dividers......Page 23
7400 Series Derivative Families......Page 25
Converting 5V to 3V Input: 74LVC245......Page 26
Converting 5V to 3V Input: 74LVC244......Page 28
Input Protection Diodes......Page 30
Converting 3 Volts to 5 Volts with the HCT Family......Page 33
74HCT245......Page 34
Switching Speed......Page 36
Summary......Page 37
Bibliography......Page 38
VGA Converters......Page 39
Resolution and Refresh Rates......Page 40
/boot/config.txt......Page 41
Summary......Page 47
Bibliography......Page 48
LCD Module 1602A......Page 49
I2C Serial Interface......Page 50
I2C Module Configuration......Page 51
I2C Module Output......Page 52
I2C Module Input......Page 55
3 Volts to 5 Volts......Page 56
Attaching the I2C Serial Module......Page 58
Displaying Data......Page 60
Reading from the LCD1602......Page 62
Class LCD1602......Page 65
I2C Baud Rate......Page 66
Profit and Loss......Page 67
Summary......Page 68
Chapter 5: MC14490 and Software Debouncing......Page 69
Hardware: MC14490......Page 70
Capacitor C1......Page 71
Experiment......Page 72
More Inputs......Page 75
Software Debouncing......Page 76
Experiment......Page 78
Summary......Page 80
The YL-40 PCB......Page 81
DAC (AOUT)......Page 84
Removing YL-40 LED D1......Page 87
Hacking YL-40 I2C Address......Page 88
I2C Bus Setup......Page 89
Experiment......Page 90
Experiment......Page 91
Experiment......Page 92
Extending Voltage Range......Page 93
Repairing the Temp Sensor......Page 94
Conversion to Celsius......Page 97
Experiment......Page 98
1N914 Experiment......Page 99
Software......Page 103
Bibliography......Page 104
Potentiometers......Page 105
Voltage Dividers......Page 107
Pot Resistance......Page 109
Effect of ADC Bits......Page 110
Experiment......Page 111
Applying Potentiometer Controls......Page 113
Summary......Page 115
Bibliography......Page 116
Keyes KY-040 Rotary Encoder......Page 117
The Switch......Page 119
Operation......Page 121
Evaluation Circuit......Page 122
Interfacing to the Pi......Page 124
Experiment......Page 126
Experiment......Page 127
Sequence Errors......Page 128
FM Dial 1......Page 129
FM Dial 2......Page 131
Class Switch......Page 133
Main Routine......Page 140
Bibliography......Page 141
74HC165 Pinout......Page 142
Function Table......Page 144
Breadboard Experiment......Page 145
Program......Page 147
Logic Analyzer View......Page 149
Profit and Loss......Page 150
Even More Inputs......Page 151
Combining GPIOs......Page 152
Summary......Page 153
74HC165 Pinout......Page 154
Function Table......Page 155
Breadboard Experiment......Page 156
Experiment Run......Page 159
Input and Output......Page 161
Additional Outputs......Page 164
Summary......Page 165
MCP23017......Page 166
Wiring......Page 168
Output GPIO Experiment......Page 170
Input Experiment......Page 171
Software Operations......Page 172
I2C Header Files......Page 173
I2C Write......Page 174
I2C Read......Page 175
Configuration......Page 176
Interrupt Capability......Page 177
Summary......Page 181
Audio Preparation......Page 182
MPD/MPD......Page 184
Hardware Setup......Page 187
Test Volume Control......Page 188
The mpcctl Program......Page 189
Main Program......Page 190
Rotary Encoder Thread......Page 194
LCD Thread......Page 198
MPC Status Thread......Page 200
Volume Control Thread......Page 201
Program Summary......Page 202
Bibliography......Page 203
Breadboard Setup......Page 204
Input Tests......Page 206
High-Side Driver......Page 207
Driving an LED......Page 208
The Keypad......Page 209
Keypad Program......Page 214
The main Program......Page 215
The key_lookup Function......Page 217
The i2c_write Function......Page 218
The i2c_read Function......Page 219
Combination Lock......Page 220
Combination Lock......Page 221
The main Program......Page 222
The get_key_code Function......Page 224
Bibliography......Page 225
Index......Page 226
π SIMILAR VOLUMES
<p><p>Design and build custom hardware interfaces for the Raspberry Pi and discover low cost display and sensor options for embedded system projects. </p><p>With this book you'll master 12C communications using Raspbian Linux in C++ and perform ADC and DAC experiments. You'll experiment with debounc
The Raspberry Pi is one of the cheapest and most popular single-board computers, as such it has become a platform for users to create their own interesting hardware and software projects. It's capable of doing everything you'd expect a desktop computer to do, from browsing the Internet and playing h
Blinking LED is a popular application when getting started in embedded development. By customizing and utilising LED-based modules into the Raspberry Pi board, exciting projects can be obtained. A countdown timer, a digital clock, a traffic light controller, and a remote light controller are a list