Table of Contents:
  • 1. Getting started
  • 1.1 Overview
  • 1.2 Getting started
  • 1.3 Arduino UNO R3 processing board
  • 1.3.1 Arduino UNO R3 host processor-the ATmega328
  • 1.3.2 Arduino UNO R3/ATmega328 hardware features
  • 1.3.3 ATmega328 Memory
  • 1.3.4 ATmega328 Port System
  • 1.3.5 ATmega328 Internal Systems
  • 1.3.6 Arduino UNO R3 open source schematic
  • 1.4 Arduino Mega 2560 processing board
  • 1.4.1 Arduino Mega 2560 host processor- the ATmega2560
  • 1.4.2 Arduino Mega 2560 /ATmega2560 hardware features
  • 1.4.3 ATmega2560 Memory
  • 1.4.4 ATmega2560 Port System
  • 1.4.5 ATmega2560 Internal Systems
  • 1.5 Arduino Mega 2560 open source schematic
  • 1.6 Example: Autonomous Maze Navigating Robot
  • 1.6.1 Structure chart
  • 1.6.2 UML activity diagrams
  • 1.6.3 Arduino UNO R3 Systems
  • 1.7 Other Arduino-based platforms
  • 1.8 Extending the hardware features of the Arduino platforms
  • 1.9 Application: Arduino Hardware Studio
  • 1.10 Summary
  • 1.11 References
  • 1.12 Chapter problems
  • 2. Programming
  • 2.1 Overview
  • 2.2 The big picture
  • 2.3 Arduino development environment
  • 2.3.1 Background
  • 2.3.2 Quick start guide
  • 2.3.3 Arduino development environment overview
  • 2.3.4 Sketchbook concept
  • 2.3.5 Arduino software, libraries, and language references
  • 2.3.6 Writing an Arduino sketch
  • 2.4 Anatomy of a program
  • 2.4.1 Comments
  • 2.4.2 Include files
  • 2.4.3 Functions
  • 2.4.4 Program constants
  • 2.4.5 Interrupt handler definitions
  • 2.4.6 Variables
  • 2.4.7 Main program
  • 2.5 Fundamental programming concepts
  • 2.5.1 Operators
  • 2.5.2 Programming constructs
  • 2.5.3 Decision processing
  • 2.6 Application 1: Robot IR sensor
  • 2.7 Application 2: Art piece illumination system
  • 2.8 Application 3: Friend or foe signal
  • 2.9 Summary
  • 2.10 References
  • 2.11 Chapter problems
  • 3. Embedded systems design
  • 3.1 What is an embedded system?
  • 3.2 Embedded system design process
  • 3.2.1 Project description
  • 3.2.2 Background research
  • 3.2.3 Pre-design
  • 3.2.4 Design
  • 3.2.5 Implement prototype
  • 3.2.6 Preliminary testing
  • 3.2.7 Complete and accurate documentation
  • 3.3 Example: Blinky 602A autonomous maze navigating robot system design
  • 3.4 Application: Control algorithm for the Blinky 602A Robot
  • 3.5 Summary
  • 3.6 References
  • 3.7 Chapter problems
  • 4. Atmel AVR operating parameters and interfacing
  • 4.1 Overview
  • 4.2 Operating parameters
  • 4.3 Battery operation
  • 4.3.1 Embedded system voltage and current drain specifications
  • 4.3.2 Battery characteristics
  • 4.4 Input devices
  • 4.4.1 Switches
  • 4.4.2 Pullup resistors in switch interface circuitry
  • 4.4.3 Switch debouncing
  • 4.4.4 Keypads
  • 4.4.5 Sensors
  • 4.5 Output devices
  • 4.5.1 Light emitting diodes (LEDs)
  • 4.5.2 Seven segment LED displays
  • 4.5.3 Code example
  • 4.5.4 Tri-state LED indicator
  • 4.5.5 Dot matrix display
  • 4.5.6 Liquid crystal character display (LCD) in C
  • 4.5.7 Programming a serial configured LCD
  • 4.5.8 Liquid crystal character display (LCD) using the Arduino development environment
  • 4.5.9 High power DC devices
  • 4.6 DC solenoid control
  • 4.7 DC motor speed and direction control
  • 4.7.1 DC motor operating parameters
  • 4.7.2 H-bridge direction control
  • 4.7.3 Servo motor interface
  • 4.7.4 Stepper motor control
  • 4.7.5 AC devices
  • 4.8 Interfacing to miscellaneous devices
  • 4.8.1 Sonalerts, beepers, buzzers
  • 4.8.2 Vibrating motor
  • 4.9 Application: special effects LED cube
  • 4.9.1 Construction hints
  • 4.9.2 LED Cube Arduino sketch code
  • 4.10 Summary
  • 4.11 References
  • 4.12 Chapter problems
  • 5. Analog to digital conversion (ADC)
  • 5.1 Overview
  • 5.2 Sampling, quantization and encoding
  • 5.2.1 Resolution and data rate
  • 5.3 Analog-to-digital conversion (ADC) process
  • 5.3.1 Transducer interface design (TID) circuit
  • 5.3.2 Operational amplifiers
  • 5.4 ADC conversion technologies
  • 5.4.1 Successive-approximation
  • 5.5 The Atmel ATmega328 and ATmega2560 ADC system
  • 5.5.1 Block diagram
  • 5.5.2 ATmega328 ADC registers
  • 5.5.3 ATmega2560 ADC registers
  • 5.6 Programming the ADC using the Arduino development environment
  • 5.7 ATmega328: Programming the ADC in C
  • 5.8 ATmega2560: Programming the ADC in C
  • 5.9 Example: ADC rain gage indicator with the Arduino UNO R3
  • 5.9.1 ADC rain gage indicator using the Arduino development environment
  • 5.9.2 ADC rain gage indicator in C
  • 5.9.3 ADC rain gage using the Arduino development environment, revisited
  • 5.10 One-bit ADC, threshold detector
  • 5.11 Digital-to-analog conversion (DAC)
  • 5.11.1 DAC with the Arduino development environment
  • 5.11.2 DAC with external converters
  • 5.11.3 Octal channel, 8-bit DAC via the SPI
  • 5.12 Application: Art piece illumination system, revisited
  • 5.13 Arduino Mega 2560 example: Kinesiology and Health Laboratory instrumentation
  • 5.14 Summary
  • 5.15 References
  • 5.16 Chapter problems
  • 6. Interrupt subsystem
  • 6.1 Overview
  • 6.1.1 ATmega328 interrupt system
  • 6.1.2 ATmega2560 interrupt system
  • 6.1.3 General interrupt response
  • 6.2 Interrupt programming overview
  • 6.3 Programming ATmega328 interrupts in C and the Arduino development environment
  • 6.3.1 External interrupt programming-Atmega328
  • 6.3.2 ATmega328 internal interrupt programming
  • 6.4 Programming ATmega2560 interrupts in C and the Arduino development environment
  • 6.4.1 External interrupt programming-Atmega2560
  • 6.4.2 ATmega2560 internal interrupt programming
  • 6.5 Foreground and background processing
  • 6.6 Interrupt examples
  • 6.6.1 Application 1: Real time clock in C
  • 6.6.2 Application 2: Real time clock using the Arduino development environment
  • 6.6.3 Application 3: Interrupt driven USART in C
  • 6.7 Summary
  • 6.8 References
  • 6.9 Chapter problems
  • 7. Timing subsystem
  • 7.1 Overview
  • 7.2 Timing related terminology
  • 7.2.1 Frequency
  • 7.2.2 Period
  • 7.2.3 Duty cycle
  • 7.3 Timing system Overview
  • 7.4 Timer system applications
  • 7.4.1 Input capture, measuring external timing event
  • 7.4.2 Counting events
  • 7.4.3 Output compare, generating timing signals to interface external devices
  • 7.4.4 Industrial implementation case study (PWM)
  • 7.5 Overview of the Atmel ATmega328 and ATmega2560 timer systems
  • 7.6 Timer 0 system
  • 7.6.1 Modes of operation
  • 7.6.2 Timer 0 registers
  • 7.7 Timer 1
  • 7.7.1 Timer 1 registers
  • 7.8 Timer 2
  • 7.9 Programming the Arduino UNO R3 and Mega 2560 using the built-in Arduino development environment timing features
  • 7.10 Programming the timer system in C
  • 7.10.1 Precision delay in C
  • 7.10.2 Pulse width modulation in C
  • 7.10.3 Input capture mode in C
  • 7.11 Application 1: Servo motor control with the PWM system in C
  • 7.12 Application 2: Inexpensive laser light show
  • 7.13 Summary
  • 7.14 References
  • 7.15 Chapter problems
  • 8. Serial communication subsystem
  • 8.1 Overview
  • 8.2 Serial communications
  • 8.3 Serial communication terminology
  • 8.4 Serial USART
  • 8.4.1 System overview
  • 8.5 System operation and programming using Arduino development environment features
  • 8.6 System operation and programming in C
  • 8.6.1 Serial peripheral interface-SPI
  • 8.7 SPI programming in the Arduino development environment
  • 8.8 SPI programming in C
  • 8.9 Two-wire serial interface, TWI
  • 8.9.1 Arduino development environment
  • 8.10 Application 1: USART communication with LCD
  • 8.11 Application 2: SD/MMC card module extension via the USART
  • 8.12 Application 3: Equipping an Arduino processor with a voice chip
  • 8.13 Application 4: Programming the Arduino UNO R3 ATmega328 via the ISP
  • 8.13.1 Programming procedure
  • 8.14 Application 5: TMS1803 3-bit LED drive controller
  • 8.15 Summary
  • 8.16 References
  • 8.17 Chapter problems
  • 9. Extended examples
  • 9.1 Overview
  • 9.2 Extended example 1: Automated fan cooling system
  • 9.3 Extended example 2: Fine art lighting system
  • 9.4 Extended example 3: Flight simulator panel
  • 9.5 Extended example 4: Submersible robot
  • 9.5.1 Requirements
  • 9.5.2 Structure chart
  • 9.5.3 Circuit diagram
  • 9.5.4 UML activity diagram
  • 9.5.5 Microcontroller code
  • 9.5.6 Project extensions
  • 9.6 Extended example 5: Weather station
  • 9.6.1 Requirements
  • 9.6.2 Structure chart
  • 9.6.3 Circuit diagram
  • 9.6.4 UML activity diagrams
  • 9.6.5 Microcontroller code
  • 9.7 Autonomous maze navigating robots
  • 9.8 Extended example 6: Blinky 602A robot, revisited
  • 9.8.1 Requirements
  • 9.8.2 Circuit diagram
  • 9.8.3 Structure chart
  • 9.8.4 UML activity diagrams
  • 9.8.5 Microcontroller code
  • 9.9 Extended example 7: Mountain maze navigating robot
  • 9.9.1 Description
  • 9.9.2 Requirements
  • 9.9.3 Circuit diagram
  • 9.9.4 Structure chart
  • 9.9.5 UML activity diagrams
  • 9.9.6 Microcontroller code
  • 9.9.7 Mountain maze
  • 9.9.8 Project extensions
  • 9.10 Extended example 8: Robot wheel odometry
  • 9.11 Summary
  • 9.12 References
  • 9.13 Chapter problems
  • A. ATmega328 register set
  • B. ATmega328 header file
  • C. ATmega2560 register set
  • D. ATmega2560 header file
  • Author's biography.