Gay | Custom Raspberry Pi Interfaces | E-Book | www.sack.de
E-Book

E-Book, Englisch, 229 Seiten

Gay Custom Raspberry Pi Interfaces

Design and build hardware interfaces for the Raspberry Pi
1. ed
ISBN: 978-1-4842-2406-9
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark

Design and build hardware interfaces for the Raspberry Pi

E-Book, Englisch, 229 Seiten

ISBN: 978-1-4842-2406-9
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark



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 peripherals are provided. Explores ADC, DAC, rotary encoders, CMOS shift registers. I2C I/O extenders. Readers will discover low cost display and sensor options for embedded system projects. Master 12C communications using Raspbian Linux in C++. Perform ADC and DAC experiments. Debounce buttons and switches using hardware and software solutions. Read rotary encoders for direction and step. Develop flywheel rotary encoder effects for ease of tuning. 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. 
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 
Conquer stuttering buttons and switches through hardware and software debouncing 
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 
Provide your own hardware devices for embedded applicationsPerform 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.

Warren Gay has been an electronics enthusiast since childhood and often dragged discarded TV sets home after school. In high school he learned to program the IBM-1130 and then pursued a career in software development at Ryerson Polytechnical, in Toronto. Since then he has worked professionally for over 30 years, mainly in C/C++, under Unix and Linux. Meanwhile, the love of electronics has never faded since the early creation of his home-brewed Intel 8008 system in the 70's to the present day projects employing the Raspberry Pi. Warren also holds an advanced amateur radio license and was able to work the Mir space station (U2MIR) using packet radio in August 1991.He's authored other books including Sams Teach Yourself Linux in 24 Hours, Linux Socket Programming by Example, and Advanced Unix Programming.

Gay Custom Raspberry Pi Interfaces jetzt bestellen!

Autoren/Hrsg.


Weitere Infos & Material


1;Contents at a Glance;4
2;Contents;5
3;About the Author;13
4;About the Technical Reviewer;14
5;Chapter 1: Introduction;15
5.1;Raspberry Pi 3 and Zero;16
5.2;Why GPIO Is Important;16
5.3;What to Purchase;16
5.4;Software to Download;18
5.5;Let’s Begin;18
6;Chapter 2: 3V/5V Signal Interfacing;19
6.1;7400 Series (TTL);20
6.2;3.3V Logic;21
6.3;Voltage Dividers;23
6.4;7400 Series Derivative Families;25
6.5;Unused CMOS Inputs;26
6.5.1;Converting 5V to 3V Input: 74LVC245;26
6.5.2;Converting 5V to 3V Input: 74LVC244;28
6.5.3;CD4049/CD4050;30
6.5.4;Input Protection Diodes;30
6.6;Converting 3 Volts to 5 Volts with the HCT Family;33
6.6.1;74HCT245;34
6.6.2;74HCT244;36
6.7;Switching Speed;36
6.8;Summary;37
6.9;Bibliography;38
7;Chapter 3: VGA LCD Monitors;39
7.1;VGA Converters;39
7.2;Resolution and Refresh Rates;40
7.3;/boot/config.txt;41
7.4;Confirming Resolution;47
7.5;Summary;47
7.6;Bibliography;48
8;Chapter 4: I2C LCD Displays;49
8.1;LCD Module 1602A;49
8.2;I2C Serial Interface;50
8.3;I2C Module Configuration;51
8.4;I2C Module Output;52
8.5;I2C Module Input;55
8.6;PCF8574P Chip;56
8.7;3 Volts to 5 Volts;56
8.8;Attaching the I2C Serial Module;58
8.9;Displaying Data;60
8.10;Reading from the LCD1602;62
8.11;Class LCD1602;65
8.12;I2C Baud Rate;66
8.13;Profit and Loss;67
8.14;Summary;68
9;Chapter 5: MC14490 and Software Debouncing;69
9.1;Hardware: MC14490;70
9.2;Chip Operation;71
9.3;Capacitor C1;71
9.4;Experiment;72
9.5;More Inputs;75
9.6;Software Debouncing;76
9.7;Experiment;78
9.8;Summary;80
10;Chapter 6: PCF8591 ADC;81
10.1;The YL-40 PCB;81
10.2;Voltage Range;84
10.3;I2C Bus;84
10.4;I2C Addresses;84
10.5;DAC (AOUT);84
10.6;Removing YL-40 LED D1;87
10.7;Hacking YL-40 I2C Address;88
10.8;I2C Bus Setup;89
10.9;Reading from PCF8591;90
10.9.1;Experiment;90
10.10;Writing to the DAC;91
10.10.1;Experiment;91
10.10.2;Experiment;92
10.11;Limitations;93
10.12;Extending Voltage Range;93
10.13;Repairing the Temp Sensor;94
10.14;Conversion to Celsius;97
10.15;Reading Temperature;98
10.15.1;Experiment;98
10.16;The YL-40 LDR;99
10.16.1;Experiment;99
10.17;1N914 Experiment;99
10.18;Software;103
10.19;Potential Experiments;104
10.20;Summary;104
10.21;Bibliography;104
11;Chapter 7: Potentiometer Input Controls;105
11.1;Potentiometers;105
11.2;Voltage Dividers;107
11.3;ADC Circuit;109
11.4;Pot Resistance;109
11.5;Taper;110
11.6;Effect of ADC Bits;110
11.7;Experiment;111
11.8;Applying Potentiometer Controls;113
11.9;Selection Resolution;115
11.10;Summary;115
11.11;Bibliography;116
12;Chapter 8: Rotary Encoders;117
12.1;Keyes KY-040 Rotary Encoder;117
12.2;The Switch;119
12.3;Operation;121
12.4;Voltage;122
12.5;Evaluation Circuit;122
12.6;Interfacing to the Pi;124
12.7;Experiment;126
12.8;Experiment;127
12.9;Sequence Errors;128
12.10;Experiment;129
12.11;FM Dial 1;129
12.12;FM Dial 2;131
12.13;Class Switch;133
12.14;Main Routine;140
12.15;Summary;141
12.16;Bibliography;141
13;Chapter 9: More Pi Inputs with 74HC165;142
13.1;74HC165 Pinout;142
13.2;Function Table;144
13.3;Breadboard Experiment;145
13.4;Program;147
13.5;Logic Analyzer View;149
13.6;Profit and Loss;150
13.7;Even More Inputs;151
13.8;Other Bit Counts;152
13.9;Combining GPIOs;152
13.10;Chip Enable;153
13.11;CD4012B;153
13.12;Summary;153
14;Chapter 10: More Pi Outputs with 74HC595;154
14.1;74HC165 Pinout;154
14.2;Function Table;155
14.3;Breadboard Experiment;156
14.4;Experiment Run;159
14.5;Input and Output;161
14.6;Additional Outputs;164
14.7;Profit and Loss;165
14.8;Summary;165
15;Chapter 11: MCP23017 I/O Port Extender;166
15.1;MCP23017;166
15.2;Wiring;168
15.3;Output GPIO Experiment;170
15.4;Input Experiment;171
15.5;Software Operations;172
15.5.1;I2C Header Files;173
15.5.2;Opening the I2C Driver;174
15.5.3;I2C Write;174
15.5.4;I2C Read;175
15.5.5;Configuration;176
15.6;Interrupt Capability;177
15.7;Interrupt Profit and Loss;181
15.8;Summary;181
16;Chapter 12: MPD/MPC Hardware Controls;182
16.1;Audio Preparation;182
16.1.1;MPD/MPD;184
16.2;Hardware Setup;187
16.2.1;Test Volume Control;188
16.2.2;Test Rotary Control;189
16.2.3;Test LCD;189
16.3;The mpcctl Program;189
16.3.1;Main Program;190
16.3.2;Rotary Encoder Thread;194
16.3.3;LCD Thread;198
16.3.4;MPC Status Thread;200
16.3.5;Volume Control Thread;201
16.3.6;Program Summary;202
16.4;Summary;203
16.5;Bibliography;203
17;Chapter 13: Custom Keypads;204
17.1;Breadboard Setup;204
17.2;Output Tests;206
17.3;Input Tests;206
17.4;High-Side Driver;207
17.5;Low-Side Driver;208
17.6;Driving an LED;208
17.7;The Keypad;209
17.8;Keypad Program;214
17.8.1;The main Program;215
17.8.2;The key_lookup Function;217
17.8.3;The i2c_write Function;218
17.8.4;The i2c_read Function;219
17.9;Combination Lock;220
17.10;Combination Lock;221
17.10.1;The main Program;222
17.10.2;The get_key_code Function;224
17.11;Interrupts;225
17.12;Summary;225
17.13;Bibliography;225
18;Index;226



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.