MAKECourse
  • Home
  • About
  • Course Materials
    • Software
    • Course Kits
    • TA hours
  • Videos
    • Intro to Programming Videos
    • Advanced Topics >
      • DAC and ADC Tutorial
      • SD Card Data Logging
      • DC Motor Control
  • Schedule
    • Syllabus
  • Student Projects
    • Awesome Prizes
    • Fall 2020 Projects
    • Fall 2016 Awesome Prize Winners
    • Fall 2016 Projects
    • Spring 2016 Awesome Prize Winners
    • Spring 2016 Projects
    • Fall 2015 Awesome Prize Winners
    • Fall 2015 Projects
    • Spring 2015 Awesome Prize Winners
    • Spring 2015 Projects
    • Fall 2014 Projects
    • Spring 2014 Projects

Week 11: Segment 2: USe of Comparator Interrupts for detecting sound events with a microphone

This segment focuses on comparator interrupts. Comparator interrupts are similar to external pin interrupts in that they cause the execution of an Iterrupt Service Routine (ISR) when an event occurs on an Arduino input pin. The difference to standard external interrupts is that the comparator interrupt can be triggered by an 'analog' voltage change, i.e. a change that can be smaller than a digital change from 0 to 5V or vice versa. Responding to sound events recorded with a microphone is a prime example for using a comparator interrupt.

Goals:

  • Understand the use of comparator interrupts that are triggered by an analog (or arbitrary) voltage change.
  • Learn to use the microphone that came with the Arduino Kit.

In-Class Project:
  • Set up the microphone and operate it using  a comparator interrupt
  • Use the set-up to control an Arduino function via claps or similar sound events.

Materials for this segment:
  • Watch the video on the right 
  • Arduino sketch featured in the video (see link below video).
  • The Atmega328p data sheet.
  • An interesting discussion thread about programming comparator interrupts with the Arduino.

Main Arduino sketch used in the tutorial:
t15_microphone_interrupt.zip
File Size: 2 kb
File Type: zip
Download File

[Home] [Course Materials] [Syllabus] [Student Projects] [Contact]
Powered by Create your own unique website with customizable templates.