Arduino_Sound_Switch -- Overview

Similar documents
Your Multimeter. The Arduino Uno 10/1/2012. Using Your Arduino, Breadboard and Multimeter. EAS 199A Fall Work in teams of two!

PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver

1602 LCD adopts standard 14 pins(no backlight) or 16pins(with backlight) interface, Instruction of each pin interface is as follows:

Arduino Lab 1 - The Voltage Divider

Arduino Lesson 16. Stepper Motors

Quick Start Guide for High Voltage Solar Inverter DC-AC Board EVM. Version 1.3

Physics 120 Lab 6: Field Effect Transistors - Ohmic region

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board

CHAPTER 11: Flip Flops

Electronics 5: Arduino, PWM, Mosfetts and Motors

Basic Pulse Width Modulation

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

Cornerstone Electronics Technology and Robotics I Week 15 Voltage Comparators Tutorial

Arduino Lesson 13. DC Motors. Created by Simon Monk

BLOCK OCCUPANCY DETECTOR WITH SEMAPHORE OPERATION BOD1/DAP4-BR

SYSTEM 4C. C R H Electronics Design

IR Communication a learn.sparkfun.com tutorial

SYSTEM 45. C R H Electronics Design

Programming with the Arduino: open-source hardware in an introductory programming laboratory. Paul Cruickshank

Introduction to Arduino

Arduino project. Arduino board. Serial transmission

Inwall 4 Input / 4 Output Module

Introduction to Arduino

Set up and Blink - Simulink with Arduino

Surveillance System Using Wireless Sensor Networks

If an occupancy of room is zero, i.e. room is empty then light source will be switched off automatically

Allen-Bradley/Rockwell

Theory and Practice of Tangible User Interfaces. Thursday Week 2: Digital Input and Output. week. Digital Input and Output. RGB LEDs fade with PWM

DMX-K-DRV. Integrated Step Motor Driver + (Basic Controller) Manual

RC Camera Control. User Guide v /20/2012

Experiment1: Introduction to laboratory equipment and basic components.

Lab Experiment 1: The LPC 2148 Education Board

cs281: Introduction to Computer Systems Lab08 Interrupt Handling and Stepper Motor Controller

Green House Monitoring and Controlling Using Android Mobile Application

1 Coffee cooling : Part B : automated data acquisition

Experiment 2 Introduction to TI C2000 Microcontroller, Code Composer Studio (CCS) and Matlab Graphic User Interface (GUI)

Arduino Lesson 14. Servo Motors

GLOLAB Two Wire Stepper Motor Positioner

Basic DC Motor Circuits. Living with the Lab Gerald Recktenwald Portland State University

Basic DC Motor Circuits

Controlling a Dot Matrix LED Display with a Microcontroller

EVAL-UFDC-1/UFDC-1M-16

Lab 3 Rectifier Circuits

CHAPTER 11 LATCHES AND FLIP-FLOPS

2 : BISTABLES. In this Chapter, you will find out about bistables which are the fundamental building blocks of electronic counting circuits.

PIKA Technical Bulletin #41. V-12 RAN Trunk Interface Implementation

Servo Motors (SensorDAQ only) Evaluation copy. Vernier Digital Control Unit (DCU) LabQuest or LabPro power supply

Artificially Intelligent Home Automation System Based on Arduino as the Master Controller

Hardware Connections between Arduino and IMU Nori Wilkins Apr. 5, 2013

UPS PIco. to be used with. Raspberry Pi B+, A+, B, and A. HAT Compliant. Raspberry Pi is a trademark of the Raspberry Pi Foundation

GRADE 11A: Physics 5. UNIT 11AP.5 6 hours. Electronic devices. Resources. About this unit. Previous learning. Expectations

RADIO FREQUENCY IDENTIFICATION (RFID) GARAGE DOOR ENTRY SYSTEM

The components. E3: Digital electronics. Goals:

BUILD YOUR OWN RC SWITCH (Issue 3)

C4DI Arduino tutorial 4 Things beginning with the letter i

EXPERIMENT 2 TRAFFIC LIGHT CONTROL SYSTEM FOR AN INTERSECTION USING S7-300 PLC

Inductors in AC Circuits

Lab 6 Introduction to Serial and Wireless Communication

Introduction to Electronic Signals

DC Motor with Shaft Encoder

Massachusetts Institute of Technology

Application Note. Line Card Redundancy Design With the XRT83SL38 T1/E1 SH/LH LIU ICs

ABACOM - netpio.

Configure Inverter output for two utility settings, (1)120V/60Hz, (2)220V/50Hz

Chapter 4: Pulse Width Modulation

CONTROL SWITCHER User s Manual (Preliminary)

HIGH RELIABILITY POWER SUPPLY TESTING

Impulse G+/VG+ Series 3, 24 VDC Interface Card Terminal Designations

C8051F020 Utilization in an Embedded Digital Design Project Course. Daren R. Wilcox Southern Polytechnic State University Marietta, Georgia

Arduino Motor Shield (L298) Manual

DEPARTMENT OF ELECTRONICS ENGINEERING

Lab 1: The Digital Oscilloscope

MIDECO 64-outputs MIDI note decoder USER MANUAL. Roman Sowa 2012

Motorising the Peco Turntable - a different approach

EARTH PEOPLE TECHNOLOGY SERIAL GRAPH TOOL FOR THE ARDUINO UNO USER MANUAL

Tutorial. replace them with cell-phone operated module. The advantages of a cell-phone operated bot are:-

MODEL 5010 DUAL CHANNEL SMOKE/FIRE DETECTION MODULE

Rotary Encoder Interface for Spartan-3E Starter Kit

FREQUENCY RESPONSE OF AN AUDIO AMPLIFIER

Lab 4 - Data Acquisition

Wireless In-Ear Audio Monitor

Simplify Data Acquisition with a Built-in LXI Web Server

Design Project: Power inverter

Current Loop Tuning Procedure. Servo Drive Current Loop Tuning Procedure (intended for Analog input PWM output servo drives) General Procedure AN-015

USER GUIDE Programming Adapter Cable for Fujitsu Flash Microcontroller- F²MC-16LX/FR Family Fujitsu Microelectronics America, Inc.

Audio Only Broadcast through Flash Media Live Encoder On Windows

Conversion Between Analog and Digital Signals

8-bit RISC Microcontroller. Application Note. AVR182: Zero Cross Detector

Sequential Logic: Clocks, Registers, etc.

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Lab #5: Design Example: Keypad Scanner and Encoder - Part 1 (120 pts)

TV Remote Controller Decoder

SHADOWSENSE PERFORMANCE REPORT: LATENCY

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

Microcontroller to Sensor Interfacing Techniques

MCP4725 Digital to Analog Converter Hookup Guide

PROGRAMMABLE LOGIC CONTROL

Pulse Width Modulated (PWM) Controller for 12 Volt Motors

Special Lecture. Basic Stamp 2 Programming. (Presented on popular demand)

Transcription:

Arduino_Sound_Switch -- Overview Sound-Controlled Switch Using Arduino Objectives: After performing this lab exercise, learner will be able to: Work with Arduino IDE Use sound sensor module FC-04 to detect sound input Program Arduino board as a sound controlled switch Practice working with measuring equipment and laboratory tools like digital oscilloscope and signal generator Use digital oscilloscope to debug/analyze the circuit Equipment: To perform this lab experiment, learner will need: Digital Storage Oscilloscope (TBS1000B-Edu from Tektronix or any equivalent) Arduino Uno or equivalent board (could be any other opensource Arduino clone) with its USB cable Electronic Components Resistor (470 ohms) - for optional external LED Switch (Push-to-on) LED (optional - if you want bigger light / indication) Breadboard and connecting wires

Theory / Key Concepts: Before performing this lab experiment, it is important to learn following concepts: Arduino is a popular open-source microcontroller board that support rapid prototyping of embedded systems. Arduino also provide a custom, easy-to-use programming environment (or IDE) for developing a program and flashing it on the Arduino board. For more details, refer - www.arduino.cc Sound sensor module FC-04 detects sound input through a microphone and provides digital ouput (0V or V cc ) depending upon the level of sound against a threshold (V ref ). The functional block diagram for FC-04 module is shown below: The threshold can be adjusted using a potentiometer. Arduino can be programmed read the digital output of the sound sensor and drive an digital output line (for LED or relay) on/off based on sound level. The output can be toggled on/off with a clap or sound - this is the principle of clap switch. Flowchart / Program: Learner can understand the logic of sound-controlled switch using given flowchart:

Arduino_Sound_Switch -- Procedures Step 1 Check Your Understanding: Before performing this lab experiment, learners can check their understanding of key concepts by answering these? What is the command / instruction for reading the state of a sensor output connected to digital input of Arduino? digitalread analogread isdigitalon isanalogon A debounce period is used in the code to? Bouncing the input state Bouncing the output state Avoid rapid switching due to consecutive input sound Extend the duration of output

Extend the duration of output LED state is toggled with each clap. For our code, how should the FC-04 potentiometer be set? To give stream of HIGH going pulse output for Arduino To give a HIGH pulse for sound detected To give a LOW pulse for sound detected To give a stream of LOW going pulses Step 2 Circuit diagram / Connection Details Using the jumper / connecting wires prepare the circuit as shown below - Choose R LED = 470 ohm. Feed the output from sound sensor to pin 2 of the Arduino Step 3 Experiment Setup Make the arrangement as shown in figure below (Arduino clone is being used here) -

PC is connected to Arduino via USB cable Sound sensor V cc, Ground and Output pins are connected to Arduino pin 4, 3 and 2 respectively. Connect oscilloscope channel 1 to Arduino pin 13 (clap switch output ) and Channel 2 to pin 2 (sound sensor output) Step 4 Make the Circuit Work Flash the code on Arduino Set the potentiometer of sound sensor in such a way that there is no HIGH output without sound - only sound / clap should generate a HIGH pulse. Make a sound / clap - the LED on pin 13 of Arduino should toggle (on and off) with each clap Step 5 Taking the Measurements Set the time base of the oscilloscope to about 50ms/div. Clap / make sound - capture Ch1 and Ch2 waveforms. Correlate the sound sensor output (Ch2) and Clap-Switch ouput (Ch1) You can also capture screenshot for each measurement set.

Cough to make a longer sound or series of pulses from sound sensor FC-04. You will see because of debounce time, clapswitch will generate only 1 pulse (ignores the consecutive pulses for debounce duration) Step 6 Analyzing the Result Try finding delay between 1st pulse from sound sensor and toggling of clap-switch. This will give an estimate of how long Arduino takes to process the pulse and drive the LED on/off. Try playing with debounce time - make is low (say 10ms) or very high (1s). Find the effect on clap-switch output. Step 7

Conclusion The analysis of the observed results confirm that (As expected): The Arduino can be used as sound-controlled switch using sound sensor Debounce time is used to ignore the consecutive pulses from sound sensor and avoid false switching