O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Arduino Projects for Amateur Radio

Book Description

BOOST YOUR HAM RADIO'S CAPABILITIES USING LOW-COST ARDUINO MICROCONTROLLER BOARDS!

Do you want to increase the functionality and value of your ham radio without spending a lot of money? This book will show you how! Arduino Projects for Amateur Radio is filled with step-by-step microcontroller projects you can accomplish on your own--no programming experience necessary.

After getting you set up on an Arduino board, veteran ham radio operators Jack Purdum (W8TEE) and Dennis Kidder (W6DQ) start with a simple LCD display and move up to projects that can add hundreds of dollars' worth of upgrades to existing equipment. This practical guide provides detailed instructions, helpful diagrams, lists of low-cost parts and suppliers, and hardware and software tips that make building your own equipment even more enjoyable. Downloadable code for all of the projects in the book is also available.

Do-it-yourself projects include:

  • LCD shield
  • Station timer
  • General purpose panel meter
  • Dummy load and watt meter
  • CW automatic keyer
  • Morse code decoder
  • PS2 keyboard CW encoder
  • Universal relay shield
  • Flexible sequencer
  • Rotator controller
  • Directional watt and SWR meter
  • Simple frequency counter
  • DDS VFO
  • Portable solar power source

Table of Contents

  1. Cover
  2. Title Page
  3. Copyright Page
  4. Dedication
  5. About the Author
  6. Contents
  7. Preface
  8. Acknowledgments
  9. 1 Introduction
    1. Which Microcontroller to Use?
    2. We Chose Arduino, So Now What?
    3. Interpreting Table 1-1
    4. Making the Choice
    5. What Else Do You Need?
    6. Software
    7. Downloading and Installing the Arduino Integrated Development Environment
    8. Installing the Software
    9. Running Your First Program
  10. 2 I Don’t Know How to Program
    1. I Don’t Need No Stinkin’ CW!
    2. Like CW, Like Programming
    3. The Five Program Steps
    4. Step 1. Initialization
    5. Step 2. Input
    6. Step 3. Processing
    7. Step 4. Output
    8. Step 5. Termination
    9. Arduino Programming Essentials
    10. The Blink Program
    11. Data Definitions
    12. Where’s the main() Function?
    13. The setup() Function
    14. The loop() Function
    15. I Thought There Were Five Program Steps?
    16. Modifying the Blink Sketch
    17. Saving Memory
    18. Remove Unused Variables
    19. Use a Different Data Type
    20. Avoid Using the String Class
    21. The F() Macro
    22. The freeRam() Function
    23. Conclusion
  11. 3 The LCD Shield Project
    1. Libraries: Lessening the Software Burden
    2. Not All LCDs Are the Same
    3. LCD Shield Parts List
    4. Assembling the LCD Shield
    5. Breakaway Header Pins
    6. Soldering Components to the Shield
    7. Adding Components Using a Schematic
    8. An Alternative Design
    9. Loading the Example Software and Testing
    10. A “Code Walk-Through” of the “HelloWorld” Sketch
    11. Explore the Other Examples
    12. Using Your LCD Display with the TEN-TEC Rebel
    13. Under the Rebel Hood
    14. Software Modifications
    15. Conclusion
  12. 4 Station Timer
    1. Software Version of ID Timer
    2. Magic Numbers
    3. Preprocessor Directives
    4. Fixing Bad Magic Numbers: #define
    5. A Second Way to Remove Magic Numbers: const
    6. Fixing Flat Forehead Mistakes
    7. Encapsulation and Scope
    8. Fixing Our Program Bug
    9. The static Data Type Specifier
    10. Using a Real Time Clock (RTC) Instead of a Software Clock
    11. The Inter-Integrated Circuit (I2C or I2C) Interface
    12. The I2C and the DS1307 RTC Chip
    13. BCD and the DS1307 Registers
    14. Constructing the RTC/Timer Shield
    15. The Adafruit RTClib Library
    16. Initializing the RTC
    17. Running the Program
    18. The RTC Timer Program
    19. The loop() Function
    20. A Software Hiccup
    21. Conclusion
  13. 5 A General Purpose Panel Meter
    1. Circuit Description
    2. Construction
    3. An Alternate Design Layout
    4. Loading the Example Software and Testing
    5. Code Walk-Through
    6. Instantiating the lcd and lbg Objects
    7. The loop() Code
    8. Testing and Calibration of the Meter
    9. Changing the Meter Range and Scale
    10. Voltmeter
    11. Ammeter
    12. Changing the Scale
    13. Conclusion
  14. 6 Dummy Load
    1. Mechanical Construction
    2. Resistor Pack Spacing
    3. Fabricating the Lid Connections
    4. Attaching the Lid to the Resistor Pack
    5. Electronic Construction
    6. Doing the Math
    7. Software
    8. Conclusion
  15. 7 A CW Automatic Keyer
    1. Required Software to Program an ATtiny85
    2. Connecting the ATtiny85 to Your Arduino
    3. The Proper Programming Sequence
    4. Some Things to Check If Things Go South
    5. Using the Digispark
    6. Compiling and Uploading Programs with Digispark
    7. The CW Keyer
    8. Adjusting Code Speed
    9. Capacitance Sensors
    10. The volatile Keyword
    11. Construction
    12. Conclusion
  16. 8 A Morse Code Decoder
    1. Hardware Design Considerations
    2. Signal Preprocessing Circuit Description
    3. Notes When Using the Decoder with the TEN-TEC Rebel
    4. Decoder Software
    5. Search a Binary Tree of ASCII Characters
    6. Morse Decode Program
    7. Farnsworth Timing
    8. Conclusion
  17. 9 A PS2 Keyboard CW Encoder
    1. The PS2 Keyboard
    2. Testing the PS2 Connector
    3. The PS2 Keyboard Encoder Software
    4. Adding the PS2 Library Code to Your IDE
    5. Code Walk-Through on Listing 9-1
    6. Overloaded Methods
    7. The sendcode() Method
    8. Some Bit-Fiddling
    9. Isolating the Arduino from the Transmitter
    10. Testing
    11. Other Features
    12. Change Code Speed
    13. Sidetone
    14. Long Messages
    15. Conclusion
  18. 10 Project Integration
    1. Integration Issues
    2. The Real Time Clock (RTC) Shield
    3. CW Decoder Shield
    4. PS2 Keyboard Keyer
    5. The Expansion Board
    6. Software Project Preparation
    7. C++, OOP, and Some Software Conventions
    8. C++ Header Files
    9. Class Declaration
    10. public and private Members of a Class
    11. Function Prototypes
    12. cpp Files
    13. Class Constructor Method
    14. IntegrationCode.ino
    15. Header Files
    16. Constructors
    17. How the Terms Class, Instantiation, and Object Relate to One Another
    18. The Dot Operator (.)
    19. The loop() Function
    20. Conclusion
  19. 11 Universal Relay Shield
    1. Construction
    2. Circuit Description
    3. Construction of the Relay Shield
    4. Testing the Relay Shield
    5. Test Sketch “Walk-Through”
    6. Conclusion
  20. 12 A Flexible Sequencer
    1. Just What Is a Sequencer?
    2. The Sequencer Design
    3. Timing
    4. Constructing the Sequencer
    5. A Purpose-Built Sequencer
    6. Programming and Testing the Sequencer
    7. Initial Testing of the Sequencer
    8. Loading the Sequencer Program and Testing
    9. Sequencer Code “Walk-Through”
    10. Modifying the Sequence Order and Delay Time
    11. Configuring the Jumpers for Different Situations
    12. Modifying the Relay Shield from Chapter 11
    13. Alternate Listing for the Relay Shield Sequencer
    14. Conclusion
  21. 13 Rotator Controller
    1. The Arduino Antenna Rotator Controller
    2. Supported Rotators
    3. Relay Shield
    4. Panel Meter Shield
    5. The Control Panel
    6. Adding the I2C Interface to the Relay Shield from Chapter 11
    7. Connecting the Rotator Controller
    8. Early Cornell-Dublier Electronics (CDE) Models
    9. Later Models from HyGain, Telex, and MFJ
    10. Yaesu Models G-800SDX/DXA, G-1000SDX/DXA, and G-2800DXA
    11. Software
    12. Arduino Beam Heading Software
    13. Moving the Beam
    14. Setting a New Heading
    15. Storing a New Heading in EEPROM
    16. World Beam Headings
    17. Finding the Coordinates for a QTH
    18. Finding a Beam Heading
    19. Conclusion
  22. 14 A Directional Watt and SWR Meter
    1. SWR and How It Is Measured
    2. Obtaining the Antenna System SWR
    3. Detectors
    4. Constructing the Directional Watt/SWR Meter
    5. Design and Construction of the Directional Coupler/Remote Sensor
    6. The Sensor Board
    7. Final Assembly of the Coupler/Sensor
    8. Interface Shield Construction
    9. LCD Shield Options
    10. Final Assembly
    11. Testing the Directional Wattmeter/SWR Indicator
    12. Calibrating the Directional Wattmeter
    13. Software Walk-Through
    14. Definitions and Variables
    15. setup()
    16. loop()
    17. Further Enhancements to the Directional Wattmeter/SWR Indicator
    18. Conclusion
  23. 15 A Simple Frequency Counter
    1. Circuit Description
    2. Constructing the Shield
    3. An Alternate Design for Higher Frequencies
    4. Code Walk-Through for Frequency Counter
    5. Displaying the Tuned Frequency of Your Display-less QRP Rig
    6. Double Conversion Applications
    7. Adding a Frequency Display to the MFJ Cub QRP Transceiver
    8. Adding a Frequency Display to a NorCal 40
    9. Direct Conversion Applications
    10. Other Radio Applications
    11. Conclusion
  24. 16 A DDS VFO
    1. Direct Digital Synthesis
    2. The DDS VFO Project
    3. DDS VFO Circuit Description
    4. The Analog Devices AD9850 Breakout Module
    5. Constructing the DDS VFO Shield
    6. Adding an Output Buffer Amplifier for the DDS VFO
    7. The Front Panel and Interconnection
    8. DDS VFO Functional Description
    9. Overview
    10. EEPROM Memory Map
    11. SW1, the User Frequency Selection Switch (UFSS)
    12. SW2, the Band-Up Switch (BUS)
    13. SW3, the Band-Down Switch (BDS)
    14. SW4, Plus Step Switch (PSS)
    15. SW5, Minus Step Switch (MSS)
    16. SW6, the Encoder Control
    17. The DDS VFO Software
    18. EEPROM Initialization Program
    19. The KP VFO Software (VFOControlProgram.ino)
    20. setup()
    21. loop()
    22. Testing the DDS VFO
    23. Calibrating the DDS VFO
    24. Using the DDS VFO with Your Radio
    25. The Pixie QRP Radio
    26. Blekok Micro 40SC
    27. CRKits CRK 10A 40 meter QRP Transceiver
    28. Other Applications of the DDS VFO and Additional Enhancements
    29. Conclusion
  25. 17 A Portable Solar Power Source
    1. The Solar Sensor
    2. Solar Charger Controller
    3. Panel Positioning and Stepper Motor
    4. Stepper Wiring
    5. Stepper Motor Driver
    6. Control Inputs
    7. Solar Panel Support Structure
    8. Stepper Motor Details
    9. Mounting the Stepper Motor
    10. Solar Panel Connections
    11. Placing the Quick Connectors
    12. The Motor Controller Shield
    13. Routing Power Cables
    14. Motor Controller Shield Wiring
    15. Altitude Positioning
    16. The Software
    17. Final Assembly
    18. Assembly and Disassembly
    19. Conclusion
  26. A Suppliers and Sources
  27. B Substituting Parts
  28. C Arduino Pin Mapping
  29. Index