# Working with microcontroller-generated audio frequencies (adapted from the Machine Science tutorial)

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Working with microcontroller-generated audio frequencies (adapted from the Machine Science tutorial) If we attach a speaker between a microcontroller output pin and ground, we can click the speaker in the same way we blink an LED. When the pin goes high (5 volts at the output) the current creates an electromagnetic field that causes the speaker to flex. When the pin goes low (zero volts at the output) the speaker contracts back to its previous position. Constantly flexing the speaker back and forth at the right speed will generate an audible tone. The process of the pin going high for a duration and then going low for a duration is called a cycle, and the total high-pin duration plus the low-pin duration is referred to as the period of the frequency. Frequency can be calculated two different ways: frequency = 1 / period -orfrequency = cycles / second Both equations produce the same result. Consider the example shown in the figure below: frequency = 1 / period frequency = 1 / (0.5 seconds) frequency = 2 cycles / second -orfrequency = cycles / second frequency = (3 cycles) / (1.5 seconds) frequency = 2 cycles / second The most common unit of frequency is the Hertz. One cycle per second is equal to one Hertz. 1 Hertz = 1 cycle / second Therefore, in the example shown above, the frequency is 2 Hertz. Now that you know how frequency and period are related, it is possible to determine the frequency of the tone your speaker will produce, just by looking at your code. The period of the tone will be the sum of the two delays in each cycle of your for... loop. Using the Machine Science compiler, we can make use of two delay functions: delay_ms(); -delay in milliseconds and delay_us(); -delay in microseconds (note use of letter u to stand for µ -the Greek letter Mu.) For example, in the following code, the delays are 1,000 microseconds each: delaymicroseconds(1000); < a 1000-microsecond delay delaymicroseconds(1000); < a 1000-microsecond delay Therefore, to calculate frequency: frequency = 1 / (1000 microseconds microseconds) frequency = 1 / (2000 microseconds) frequency = 1 / (0.002 seconds) frequency = 500 hertz

2 Playing Specific Frequencies By adjusting the delays in your for... loop, you can program the microcontroller to produce a tone with a specific frequency--in other words, a musical note. The table below shows seven musical notes, together with their frequencies. The note A has a frequency of 440 cycles per second; the note B has a frequency of 494 cycles per second; and so on. Let's start with the following code: //--- "Speaker_Start" Plays a pitch thru a speaker and lights an LED --- //--- Set up: > Attach a piezo speaker between ground and Digital pin 8 // > Wire an LED from Digital pin 7 thru a 330 ohm resistor to gnd #include "machinescience.h" // included software libraries to use #include "lcd.h" void setup() { // Only do once at startup pinmode(8, OUTPUT); // Define Speaker pin pinmode(6, OUTPUT); // Define LED pin lcd_init(); // initialize lcd screen // repeat forever lcd_clear(); lcd_instruction(goto_line1); lcd_text("beep!"); // Print message to LCD screen digitalwrite(6, HIGH); // Turn on LED for(i = 0; i < 300; i++) // number of vibrations (duration) { digitalwrite(8, HIGH); // speaker Pin high delaymicroseconds(1500); // delay before releasing speaker digitalwrite(8, LOW); // speaker Pin low delaymicroseconds(1500); // end loop for one pitch digitalwrite(6, LOW); // Turn off LED lcd_clear(); lcd_text("quiet."); // Print message to LCD screen delay(1000); // wait 1 sec (1000 milliseconds) The delays in the above code use an integer of 1500 in the delay statement to generate delays of 1500 millionths of a second. Now, if we wanted to figure out how long the delays in our on/off states (pulses) should be to produce a specific pitch (note), how would we calculate that?

3 Calculating Pulse Length from Frequency Let's use note A (440 hz) as an example. It's accomplished in two steps: 1. period = / frequency Each period (cycle, in hertz) is the length of one second divided by the frequency. We are using a delay measurement is in microseconds ( delay_us(); ) so a duration of one second is one million microseconds ( ). Therefore our period will be / 440, or once we know the total period of one cycle is millionths of a second, the last part is easy. The delay for each pulse-on and pulse-off is half of that. 2. pulse = period / divided by 2 is approximately So the code in our main loop to generate a frequency of A-440 for a duration of 200 clicks would be: for(i = 0; i < 200; i++) // For 200 times (duration) { digitalwrite(6, HIGH); // speaker Pin high delaymicroseconds(1136); // delay before releasing speaker digitalwrite(6, LOW); // speaker Pin low delaymicroseconds(1136); // end loop for one pitch Using a custom function Let's improve on the previous program with a version that does this math for us in a separate function so our main loop can just play a pitch without having to deal with switching pins high and low. Let's also use variables of type long when we need to do floating point calculations. // a168_speaker_w_function.c // > Wire an LED from D7 (pin 13) thru a 330 ohm resistor to gnd //---- Here we define a function called play_pitch void play_pitch(int freq){ // Define a function called play_pitch period pulse period = /freq; // Calculate period pulse = (period / 2 ); // Calculate pulse for(i = 0; i < 200; i++){ // Loop 200 times (duration) // end loop // end function definition //---- Having defined it, now we can use it in our main loop that follows: void setup(){ pinmode(6, OUTPUT); // Define Speaker pin pinmode(7, OUTPUT); // Define LED pin

4 void loop (){ play_pitch(440); // Turn on LED // Run the function we defined above // Turn off LED Adding duration calculation to our custom function: So far, every time we have played a pitch we've done so by clicking the speaker 200 times. The number of time we click the speaker determines the duration of the pitch. This presents a problem if we want to play a melody with each note being the same duration -because click 200 high frequency pulses takes a shorter amount of time than clicking 200 low frequency pulses. We can solve this by including in our function a calculation of duration as well, so the number of times the speaker clicks changes based on the frequency. We'll use a variable called cycles in an equation written so that higher frequencies have more speaker clicks. The algorithm has three parts: 1. We make the following calculations: period = / freq; pulse = period / 2; 2. We use the variable cycles in our For Loop (instead of a hard-coded value like 200) for(i=0; i<=cycles; i++) 3. In our main loop, when we call our play_pitch() function, we pass along frequency and duration: play_pitch(440, 100); So putting that together, we can make the following program: // speaker_freq_dur.c // > Wire an LED from D7 (pin 13) thru a 330 ohm resistor to gnd //---- Here we define a function called play_pitch void play_pitch(int freq, int duration){ long cycles; // variable for number of cycles (duration) period = /freq; //Calculate period pulse = (period / 2 ); //Calculate pulse for(i = 0; i < cycles; i++){ // Loop for number of cycles // end loop // end function definition //---- Having defined it, now we can use it in the program that follows void setup(){ pinmode(6, OUTPUT); // Define Speaker pin pinmode(7, OUTPUT); // Define LED pin

5 play_pitch(587, 200); play_pitch(659, 400); // Turn on LED // Run function with frequency & duration // Turn off LED Now if you initialized variable names like: int A = 440; or int longnote=800; or int shortnote=100; it would be possible to write statements like: play_pitch(a, shortnote); Try different variations. Here's a version that generates random pitches in an infinite loop: // speaker_random_freq.c //---- Here we define a function called play_pitch void play_pitch(int freq, int duration){ long cycles; // variable for number of cycles (duration) period = /freq; //Calculate period pulse = (period / 2 ); //Calculate pulse for(i = 0; i < cycles; i++){ // Loop for number of cycles // end loop // end function definition //---- Having defined it, now we can use it in our main loop that follows void setup (){ int r_freq; srand((int)15); //Set "seed" for random number generator pinmode(6, OUTPUT); // Define Speaker pin r_freq = rand(); // Grab a random number, store it in "freq" r_freq = r_freq/30; // scale freq by some amount play_pitch(r_freq, 150); // Run function with frequency & duration

### Project 1: Introduction to Arduino and LED Blink (Sketch Version) Description:

Project 1: Introduction to Arduino and LED Blink (Sketch Version) Description: The Arduino is a microprocessor. A Microprocessor is a compact programmable computing device with memory, processing, input,

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

Using Your Arduino, Breadboard and Multimeter Work in teams of two! EAS 199A Fall 2012 pincer clips good for working with breadboard wiring (push these onto probes) Your Multimeter probes leads Turn knob

### Ultrasonic Distance Measurement Module

Ultrasonic Distance Measurement Module General Description Distance measurement sensor is a low cost full functionality solution for distance measurement applications. The module is based on the measurement

### Arduino Starter Kit Tutorial

Arduino Starter Kit Tutorial Developed by M5 Department of Electrical and Computer Engineering UMass Amherst March 2010 UMassAmherstM5.org Arduino Kit 1x Arduino Duemilanove 1x USB Cable 1X Red Breadboard

### GPIO with ATmega328 (Arduino board)

GPIO with ATmega328 (Arduino board) This is pin configuration for the ATmega328 in PDIP28 package, which is used in Arduino Uno. The I/O pins are organized to ports. Ports are named port B, port C, etc.

### Learning How to Code in Arduino Worksheet 1: The Basics

Learning How to Code in Arduino Worksheet 1: The Basics Jason Krugman Physical Computing - Fall 2012 ***This guide is your basic step-by-step Arduino process that you will go through every time you use

### PROGRAMMING WITH ARDUINO - 1

PROGRAMMING WITH ARDUINO - 1 IESL RoboGames 2014 University of Moratuwa Department of Computer Science & Engineering Table of Contents Introduction... 2 Arduino Development Board... 2 How to Setup Arduino

### by Jody Culkin resources that can be used, redistributed or rewritten free of charge. often software or hardware.

what is an arduino? it s an open source electronics prototyping platform. by Jody Culkin what does that mean? open source resources that can be used, redistributed or rewritten free of charge. often software

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

LCD 1602 Shield Description: Arduino LCD 1602 adopts 2 lines with 16 characters LCD, with contrast regulating knob, backlight optional switch, and with 4 directional push-buttons, 1 choice button and1

### 1 Overview. 2 Basic Program Structure. 2.1 Required and Optional Parts of Sketch

Living with the Lab What s this void loop thing? Fall 2011 Gerald Recktenwald v: October 7, 2011 gerry@me.pdx.edu 1 Overview This document aims to explain two kinds of loops: the loop function that is

### DEPARTMENT OF ELECTRONICS ENGINEERING

UNIVERSITY OF MUMBAI A PROJECT REPORT ON Home Security Alarm System Using Arduino SUBMITTED BY- Suman Pandit Shakyanand Kamble Vinit Vasudevan (13103A0011) (13103A0012) (13103A0018) UNDER THE GUIDANCE

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

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board Abstract This application note is a tutorial of how to use an Arduino UNO microcontroller to

### Arduino Programming Part 1

Arduino Programming Part 1 EAS 199A, Fall 2010, Lecture 5 Gerald Recktenwald Portland State University gerry@me.pdx.edu Overview Discuss details, now that you had a taste Arduino Environment Basic code

### Basic Pulse Width Modulation

EAS 199 Fall 211 Basic Pulse Width Modulation Gerald Recktenwald v: September 16, 211 gerry@me.pdx.edu 1 Basic PWM Properties Pulse Width Modulation or PWM is a technique for supplying electrical power

### 8.1 Goal of this assignment Results Primer Assignment... 62

CHAPTER 8 Lab 8: Arduino Contents 8.1 Goal of this assignment........................... 61 8.2 Results.................................... 61 8.3 Primer.................................... 62 8.4 Assignment..................................

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

PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard University April 13, 2016 About Arduino: The Board Variety of models of Arduino Board (I am using Arduino Uno) Microcontroller constructd similarly

### Multiplexer Setup. Dan Zilinskas ECE 480 Team 8 Motion Capture For Runners

Multiplexer Setup Dan Zilinskas ECE 480 Team 8 Motion Capture For Runners Contents Introduction...3 Objective...3 Multiplexer Schematic and Information...4 IMU and Arduino...4 Getting Started (Initial

### This representation is compared to a binary representation of a number with N bits.

Chapter 11 Analog-Digital Conversion One of the common functions that are performed on signals is to convert the voltage into a digital representation. The converse function, digital-analog is also common.

### Arduino 101 Part 2. So far we have begun to get

Arduino 101 It's easy to connect many things to YourDuino. There are many pins for Ground and +V. The two pairs of pins on the right side are handy for connecting to your breadboard. Three-pin cables with

### Simple Serial MaxMSP Arduino

Simple Serial MaxMSP Arduino int inbyte = 0; // incoming serial byte pinmode(13, OUTPUT); // connect an LED here inbyte = Serial.read(); if (inbyte == 97) digitalwrite(13, HIGH); // letter 'a' turns LED

### Tadpole Sequencer Quick Start & Reference Guide

Thank you for your interest in Blue Lantern Modules. In this Reference Guide I will try to explain the various functions and workings of the Euro Tadpole 16 Step Sequencer. In brief I will sum up what

### 555 Timers. We are going to look at using the 555 to create two very different types of timer. A MONOSTABLE timer and an ASTABLE timer.

555 Timers We are now going to concentrate on specific IC s and how they can be used to perform useful functions. In turn we shall be looking at Timers, Amplifiers, Counters, Microprocessors and finally

### What you will do. Build a 3-band equalizer. Connect to a music source (mp3 player) Low pass filter High pass filter Band pass filter

Audio Filters What you will do Build a 3-band equalizer Low pass filter High pass filter Band pass filter Connect to a music source (mp3 player) Adjust the strength of low, high, and middle frequencies

### LAB4: Audio Synthesizer

UC Berkeley, EECS 100 Lab LAB4: Audio Synthesizer B. Boser NAME 1: NAME 2: The 555 Timer IC SID: SID: Inductors and capacitors add a host of new circuit possibilities that exploit the memory realized by

### Arduino Lesson 14. Servo Motors

Arduino Lesson 14. Servo Motors Created by Simon Monk Last updated on 2013-06-11 08:16:06 PM EDT Guide Contents Guide Contents Overview Parts Part Qty The Breadboard Layout for 'Sweep' If the Servo Misbehaves

### Trigonometric functions and sound

Trigonometric functions and sound The sounds we hear are caused by vibrations that send pressure waves through the air. Our ears respond to these pressure waves and signal the brain about their amplitude

### PIC Discussion. By: Eng. Tamar Jomaa

PIC Discussion By: Eng. Tamar Jomaa MicroC programming MicroC Programming Outlines of part A: 1) MicroC Basics 2) Simple Examples 3) Lab#8:Introduction to MicroC programming 1) MicroC Basics It is easy

### H-Bridge Motor Control

University of Pennsylvania Department of Electrical and Systems Engineering ESE 206: Electrical Circuits and Systems II Lab H-Bridge Motor Control Objective: The objectives of this lab are: 1. To construct

### ARRL Morse Code Oscillator, How It Works By: Mark Spencer, WA8SME

The national association for AMATEUR RADIO ARRL Morse Code Oscillator, How It Works By: Mark Spencer, WA8SME This supplement is intended for use with the ARRL Morse Code Oscillator kit, sold separately.

### Summer Outreach Programs 2015

http://www.cs.csub.edu/~is-green/ Phone: (661) 654-6005 Fax: (661) 654-6960 Email: isgreen@cs.csubak.edu California State University Bakersfield Department of Computer & Electrical Engineering & Computer

### Using an Arduino Uno with a Temperature Sensor and a 16x2 LCD: Time-Lapse Temperature Readings with High and Low Readings

Using an Arduino Uno with a Temperature Sensor and a 16x2 LCD: Time-Lapse Temperature Readings with High and Low Readings by Dave Mawdsley, member, DACS Linux SIG February 15, 2012 Parts List: Arduino

### Arduino Electronics Introduction

Welcome! This tutorial is designed to teach you the basics of making your own electronic circuits using the Arduino microcontroller, the blue thing on the right. You will learn how to safely connect different

### Arduino Uno -Arduino ProtoShield -Keypad -Dual HI/LO relay board -- CPS156

Arduino Door Lock Recently, while renovating at headquarters we discussed the purchase of combination door locks. You know-the ones with the keypad and the 4 digit PIN that unlocks the door. I decided

### Lecture 6 Introduction to the ATmega328 and Ardunio CSE P567

Lecture 6 Introduction to the ATmega328 and Ardunio CSE P567 Outline Lecture 6 ATmega architecture and instruction set I/O pins Arduino C++ language Lecture 7 Controlling Time Interrupts and Timers Lecture

### Digital Fundamentals

Digital Fundamentals Tenth Edition Floyd Chapter 1 2009 Pearson Education, Upper 2008 Pearson Saddle River, Education NJ 07458. All Rights Reserved Analog Quantities Most natural quantities that we see

### Controlling a Dot Matrix LED Display with a Microcontroller

Controlling a Dot Matrix LED Display with a Microcontroller By Matt Stabile and programming will be explained in general terms as well to allow for adaptation to any comparable microcontroller or LED matrix.

### Enabling DHT11 Humidity Sensor on the Intel Quark Microcontroller D2000

Enabling DHT11 Humidity Sensor on the Intel Quark Microcontroller D2000 Application Note Document Number: 334787-001EN You may not use or facilitate the use of this document in connection with any infringement

### CHAPTER 11: Flip Flops

CHAPTER 11: Flip Flops In this chapter, you will be building the part of the circuit that controls the command sequencing. The required circuit must operate the counter and the memory chip. When the teach

### Piezoelectrics. Some crystals, when squeezed, make a spark Turns out the process goes the other way too. Spark a quartz crystal, and it flexes

Piezoelectrics Big word piezein is greek for squeeze Spark a quartz crystal, and it flexes Some crystals, when squeezed, make a spark Turns out the process goes the other way too Piezo buzzers use this

### UC Berkeley, EECS Department

UC Berkeley, EECS Department EECS 40 Lab LAB5: Audio Synthesizer UID: B. Boser 1 The 555 Timer IC Inductors and capacitors add a host of new circuit possibilities that exploit the memory realized by the

### The 555 Timer IC. UC Berkeley, EECS Department EECS 40/42/100 Lab LAB4: Audio Synthesizer UID:

UC Berkeley, EECS Department EECS 40/42/100 Lab LAB4: Audio Synthesizer UID: B. E. Boser 1 Enter the names and SIDs for you and your lab partner into the boxes below. Name 1 SID 1 Name 2 SID 2 The 555

### Incremental Encoder Laboratory For Testing and Simulating Incremental Encoder signals Part No. ES002 Users Manual

Incremental Encoder Laboratory For Testing and Simulating Incremental Encoder signals Part No. ES002 Users Manual The Encoder Laboratory combines into the one housing and updates two separate encoder instruments

### Key Words Student Paper, School of Professional Studies

Motor Speed Sensing with PIC Microcontroller Brandon Upchurch, Olivet Nazarene University Faculty Advisor: Dr. Rodney Korthals, Olivet Nazarene University Student Paper Abstract A system was designed and

### Pulse width modulation

Pulse width modulation DRAFT VERSION - This is part of a course slide set, currently under development at: http://mbed.org/cookbook/course-notes We welcome your feedback in the comments section of the

### Purdue School of Engineering and Technology, IUPUI Electrical Engineering Technology, ECET307 Bonus Lab, Implementing Matlab to Arduino Dev Board

ECET 307, Bonus Lab Purdue School of Engineering and Technology, IUPUI Electrical Engineering Technology, ECET307 Bonus Lab, Implementing Matlab to Arduino Dev Board Objective: Learn how to compile and

### IR Communication a learn.sparkfun.com tutorial

IR Communication a learn.sparkfun.com tutorial Available online at: http://sfe.io/t33 Contents Getting Started IR Communication Basics Hardware Setup Receiving IR Example Transmitting IR Example Resources

### Analog and Digital Signals, Time and Frequency Representation of Signals

1 Analog and Digital Signals, Time and Frequency Representation of Signals Required reading: Garcia 3.1, 3.2 CSE 3213, Fall 2010 Instructor: N. Vlajic 2 Data vs. Signal Analog vs. Digital Analog Signals

### R1 R2 R3. Figure1. Resistances in series V1 I. Figure 2. Equivalent circuit of figure 1 if RE= R1+R2+R3 VRE =V

Supplementary Notes for Unit 2 - Part A (Unit 3 and 4 exams also includes the topics detailed in this note) Series circuits A series circuit is a circuit in which resistors are arranged in a chain, so

### Student Exploration: Circuits

Name: Date: Student Exploration: Circuits Vocabulary: ammeter, circuit, current, ohmmeter, Ohm s law, parallel circuit, resistance, resistor, series circuit, voltage Prior Knowledge Questions (Do these

### Interfacing Analog to Digital Data Converters

Converters In most of the cases, the PIO 8255 is used for interfacing the analog to digital converters with microprocessor. We have already studied 8255 interfacing with 8086 as an I/O port, in previous

### The Arduino makes an ideal platform for prototyping and data collection with the K series of CO2 sensors.

CO2Meter.com Revision: 1.1 Last Updated: 1/3/2010 Author: AndrewRobinson Application Note: Interfacing with Arduino over I2C The Arduino makes an ideal platform for prototyping and data collection with

### Pulse Width Modulation Applications

Pulse Width Modulation Applications Lecture 21 EE 383 Microcomputers Learning Objectives What is DTMF? How to use PWM to generate DTMF? How to use PWM to control a servo motor? How to use PWM to control

### Lesson 3: Arduino. Goals

Introduction: This project introduces you to the wonderful world of Arduino and how to program physical devices. In this lesson you will learn how to write code and make an LED flash. Goals 1 - Get to

### Voltage. Oscillator. Voltage. Oscillator

fpa 147 Week 6 Synthesis Basics In the early 1960s, inventors & entrepreneurs (Robert Moog, Don Buchla, Harold Bode, etc.) began assembling various modules into a single chassis, coupled with a user interface

### L201+ L53 L201+ L53 30-55 30-55 30-55 L201+ L53 L201+ L53 L201+ L53 L201+ L53 L201+ L201+ L201+ L53. *

36 46 56 VNSP NSP 72 40 78 77 76 26 71 71 71 27 L200 16 17 18 19 20 55 45 35 81 82 54 44 34 L119 L119 11 12 73 70 13 74 14 15 53 43 33 6 7 8 9 10 75 L200 52 42 32 1 2 3 4 5 51 41 31 >>> sending DMX with

### 2.2.9 LDR (Light Dependent Resistor) 25 2.2.10 Transistors 25

:» : :.:35152, 2013 2 5 1: 6 1.1 6 1.2 7 1.3 7 1.4 7 1.5 8 1.6 8 1.7 10 1.8 11 1.9 11 2: 14 2.1 14 2.2 14 2.2.1 14 2.2.2 16 2.2.3 19 2.2.4 20 2.2.5 21 2.2.6 Reed Relay 23 2.2.7 LCD 2x16 5VDC 23 2.2.8 RGB

### Accurate Measurement of the Mains Electricity Frequency

Accurate Measurement of the Mains Electricity Frequency Dogan Ibrahim Near East University, Faculty of Engineering, Lefkosa, TRNC dogan@neu.edu.tr Abstract The frequency of the mains electricity supply

### Light Theremin NXT. Overview. Challenge

Light Theremin NXT Overview Challenge Age Range Topics Subjects In this activity, use an NXT brick equipped with two light sensors to emulate a Theremin. One sensor will change pitch as the amount of light

### Basics of Arduino EPICS Workshop. Arduino (RedBoard), Breadboard, LEDs Professor John Steele Mechanical Engineering Department October 23, 2015

Basics of Arduino EPICS Workshop Arduino (RedBoard), Breadboard, LEDs Professor John Steele Mechanical Engineering Department October 23, 2015 What is an Arduino/RedBoard? Arduino Uno (and the Sparkfun

### Using Arduino Microcontrollers to Sense DC Motor Speed and Position

ECE480 Design Team 3 Using Arduino Microcontrollers to Sense DC Motor Speed and Position Tom Manner April 4, 2011 page 1 of 7 Table of Contents 1. Introduction ----------------------------------------------------------

### GT Sensors Precision Gear Tooth and Encoder Sensors

GT Sensors Precision Gear Tooth and Encoder Sensors NVE s GT Sensor products are based on a Low Hysteresis GMR sensor material and are designed for use in industrial speed applications where magnetic detection

### Arduino_Sound_Switch -- Overview

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

### Arduino Microcontroller Guide W. Durfee, University of Minnesota ver. oct-2011 Available on-line at www.me.umn.edu/courses/me2011/arduino/

Arduino Microcontroller Guide W. Durfee, University of Minnesota ver. oct-2011 Available on-line at www.me.umn.edu/courses/me2011/arduino/ 1 Introduction 1.1 Overview The Arduino microcontroller is an

### AC Watt Meter Project

1 AC Watt Meter Project 2014-09-08 Danger (Only for the non mains isolated versions) Important Warning! Safety issue: All electrical parts of the meter are connected to the live mains supply. Do NOT touch

### Measurement of Capacitance

Measurement of Capacitance Pre-Lab Questions Page Name: Class: Roster Number: Instructor:. A capacitor is used to store. 2. What is the SI unit for capacitance? 3. A capacitor basically consists of two

### Arduino Shield Manual

Arduino Shield Manual Version 1.4 www.dfrobot.com Copyright 2010 by DFRobot.com Table of Contents Arduino I/O Expansion Shield... 4 Introduction... 4 Diagram... 4 Sample Code... 4 Arduino Motor Shield...

### Microcontroller Systems. ELET 3232 Topic 8: Slot Machine Example

Microcontroller Systems ELET 3232 Topic 8: Slot Machine Example 1 Agenda We will work through a complete example Use CodeVision and AVR Studio Discuss a few creative instructions Discuss #define and #include

### Chapter #1: Detect Distance with the Ping))) (TM) Ultrasonic Sensor

Chapter 1: Detect Distance with the Ping))) Ultrasonic Detector Page 1 Chapter #1: Detect Distance with the Ping))) (TM) Ultrasonic Sensor WHAT IS THE PING))) SENSOR? The Ping))) sensor is a device you

### Creating a Project with PSoC Designer

Creating a Project with PSoC Designer PSoC Designer is two tools in one. It combines a full featured integrated development environment (IDE) with a powerful visual programming interface. The two tools

### Start A New Project with Keil Microcontroller Development Kit Version 5 and Freescale FRDM-KL25Z

Start A New Project with Keil Microcontroller Development Kit Version 5 and Freescale FRDM-KL25Z This tutorial is intended for starting a new project to develop software with Freescale FRDM-KL25Z board

### Lab 6 Introduction to Serial and Wireless Communication

University of Pennsylvania Department of Electrical and Systems Engineering ESE 111 Intro to Elec/Comp/Sys Engineering Lab 6 Introduction to Serial and Wireless Communication Introduction: Up to this point,

### Electronics 4: The Arduino Microcontroller - Programming Basics, I/O

BIOE 123 Module 5 Electronics 4: The Arduino Microcontroller - Programming Basics, I/O Lecture (30 min) Date Learning Goals Become familiar with using Arduino microcontroller Learn how to define variables

### Magic 8 Ball. Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name

MPS Magic 8 Ball Lab Exercise Magic 8 Ball Student's name & ID (1): Partner's name & ID (2): Your Section number & TA's name Notes: You must work on this assignment with your partner. Hand in a printer

### Arduino project. Arduino board. Serial transmission

Arduino project Arduino is an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board. Open source means that the

### - 35mA Standby, 60-100mA Speaking. - 30 pre-defined phrases with up to 1925 total characters.

Contents: 1) SPE030 speech synthesizer module 2) Programming adapter kit (pcb, 2 connectors, battery clip) Also required (for programming) : 4.5V battery pack AXE026 PICAXE download cable Specification:

### hands-on booklet David Cuartielles (Arduino Co-Founder) Arduino 8-bit Sound Generation

hands-on booklet 1 David Cuartielles (Arduino Co-Founder) Arduino 8-bit Sound Generation David Cuartielles (1974, Zaragoza, Spain) is a Telecommunications Engineer. In 2000 he developed the net-art called

### BTX450 Wireless Bluetooth Speaker

BTX450 Wireless Bluetooth Speaker User Manual 2012 Kinivo LLC. All rights reserved. Kinivo is a trademark of Kinivo LLC. Bluetooth word mark and the Bluetooth logo are registered trademarks of Bluetooth

### [F/T] [5] [KHz] [AMP] [3] [V] 4 ) To set DC offset to -2.5V press the following keys [OFS] [+/-] [2] [.] [5] [V]

FG085 minidds Function Generator Manual of Operation Applicable Models: 08501, 08501K, 08502K, 08503, 08503K Applicable Firmware Version: 1 ) 113-08501-100 or later (for U5) 2 ) 113-08502-030 or later

### A First Amateur Radio PIC Project Andy Palm N1KSN

A First Amateur Radio PIC Project Andy Palm N1KSN In case you haven't noticed, transceivers now use microprocessors extensively to control panel functions, generate RF signals, do digital signal processing,

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

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205] Users Manual Robokits India info@robokits.co.in http://www.robokitsworld.com Page 1 Bluetooth + USB 16 Servo Controller is used to control up to

### BXR 300C BXR 300R. Owner, s Manual P/N 040294

THE SOUND THAT CREATES LEGENDS BXR 300C BXR 300R Owner, s Manual P/N 040294 INTRODUCTION The Fender BXR 300 AMPLIFIER is the most recent effort in state of the art bass amplifier technology, and is a member

### After: bmotorreflected[port2]= 1; //Flip port2 s direction

Motors Motor control and some fine-tuning commands. motor[output] = power; This turns the referenced VEX motor output either on or off and simultaneously sets its power level. The VEX has 8 motor outputs:

### Basic Electrical Theory

Basic Electrical Theory Impedance PJM State & Member Training Dept. PJM 2014 10/24/2013 Objectives Identify the components of Impedance in AC Circuits Calculate the total Impedance in AC Circuits Identify

### Minimizing Power Supply Transient Voltage at a Digital Wireless Telecommunications Products' Test Fixture

Minimizing Power Supply Transient Voltage at a Digital Wireless Telecommunications Products' Test Fixture By Jim Gallo and Ed Brorein Agilent Technologies, Inc. Abstract This paper addresses the problem

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

Electronics Exercise 2: The 555 Timer and its Applications Mechatronics Instructional Laboratory Woodruff School of Mechanical Engineering Georgia Institute of Technology Lab Director: I. Charles Ume,

### University of Portsmouth Faculty of Technology Department of Electronic and Computer Engineering. Content

University of Portsmouth Faculty of Technology Department of Electronic and Computer Engineering Module: Digital Electronics and Microprocessors Module Code: B122 Module Topic: Microcontroller Applications

### Rectifier circuits & DC power supplies

Rectifier circuits & DC power supplies Goal: Generate the DC voltages needed for most electronics starting with the AC power that comes through the power line? 120 V RMS f = 60 Hz T = 1667 ms) = )sin How

### Bluetooth Portable Boombox

www.sharkk.com Bluetooth Portable Boombox Owner s Guide Introduction Thank you for your purchase of the SHARKK Bluetooth 4.0 Box Speaker. Please take the time to read this manual carefully before you begin

### USER MANUAL FOR ATMEGA 16/32 ROBOTICS MINI DEVELOPMENT BOARD V2.0 USING AVR STUDIO

1 USER MANUAL FOR ATMEGA 16/32 ROBOTICS MINI DEVELOPMENT BOARD V2.0 USING AVR STUDIO -------------------------------------------------------------------------------------------------------------------------------

### Data Communications Prof. Ajit Pal Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture # 03 Data and Signal

(Refer Slide Time: 00:01:23) Data Communications Prof. Ajit Pal Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture # 03 Data and Signal Hello viewers welcome

### Constructing a precision SWR meter and antenna analyzer. Mike Brink HNF, Design Technologist.

Constructing a precision SWR meter and antenna analyzer. Mike Brink HNF, Design Technologist. Abstract. I have been asked to put together a detailed article on a SWR meter. In this article I will deal

### Cello_Titan. A piece for electric cello and maxmsp Or a piece for Ulrich Maiß. Written by KTToeplitz. In 2005 Duration is around 8-10 minutes

Cello_Titan A piece for electric cello and maxmsp Or a piece for Ulrich Maiß. Written by KTToeplitz. In 2005 Duration is around 8-10 minutes THE PATCH The bottom of the patch is for the "utilitarian" things:

### Display Board Pulse Width Modulation (PWM) Power/Speed Controller Module

Display Board Pulse Width Modulation (PWM) Power/Speed Controller Module RS0 Microcontroller LEDs Motor Control Pushbuttons Purpose: To demonstrate an easy way of using a Freescale RS0K2 microcontroller

### Small Hardware Development and Prototyping Board for the SX28

Project Report: Small Hardware Development and Prototyping Board for the SX28 Project Number: PR57 1. Project Description 2. Schematic Diagram 3. Physical Diagram 4. Component Layout Diagram 5. Bill of

### Three Arduino Challenges to Connect the Logical World with the Physical One. ISTE 2015 -- Philadelphia

Three Arduino Challenges to Connect the Logical World with the Physical One ISTE 2015 -- Philadelphia Rachel Brusky (bruskr@d-e.org) Christopher Fleischl (fleisc@d-e.org) Trevor Shaw (shawt@d-e.org) Dwight-Englewood

### MoTeC USA GPS. Part # M GPS BL Available in 10 Hz or 20 Hz. USER MANUAL Version 1.4

MoTeC USA GPS Part # M GPS BL Available in 10 Hz or 20 Hz. USER MANUAL Version 1.4 MoTeC USA GPS Copyright Motec Systems USA 2008 The information in this document is subject to change without notice. While

### Entex Adventurevision Technical Specs V1.2 By Daniel Boris 12/18/2005

Entex Adventurevision Technical Specs V1.2 By Daniel Boris 12/18/2005 Disclaimer: All the information in this document comes from studying the actual Adventurevision hardware. The only technical document

### Lesson 4: Animation. Goals

Introduction: In this session you are going to use custom built tools in Arduino to help you turn images or animation into code that automatically uploads to your DIY Gamer. It is a fun and easy way to