Get control of other components around you using some additional circuitry, you can "press" buttons with you Arduino

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

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

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

ARDUINO SEVERINO SERIAL SINGLE SIDED VERSION 3 S3v3 (REVISION 2) USER MANUAL

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

Arduino ADK Back. For information on using the board with the Android OS, see Google's ADK documentation.

DS1307 Real Time Clock Breakout Board Kit

Arduino Lesson 13. DC Motors. Created by Simon Monk

Cornerstone Electronics Technology and Robotics I Week 15 Voltage Comparators Tutorial

Introduction to Arduino

Glolab Talking Phone Dial Monitor

How to connect to a Class II router using a mobile-phone data cable specifically for Solwise & Safecom routers

CHAPTER 11: Flip Flops

NELSON VOLTAGE MONITOR INSTALLATION & PROGRAMMING MANUAL

DEPARTMENT OF ELECTRONICS ENGINEERING

How To Use A 1232 On A 1236 On A Computer Or A Cell Phone

ECEN 1400, Introduction to Analog and Digital Electronics

Arduino Due Back. Warning: Unlike other Arduino boards, the Arduino Due board runs at 3.3V. The maximum. Overview

Arduino Lesson 16. Stepper Motors

Adafruit MCP9808 Precision I2C Temperature Sensor Guide

Adafruit Proto Shield for Arduino

ROCK BAND 3 WIRELESS KEYBOARD:

How to Move Canon EF Lenses. Yosuke Bando

1 Coffee cooling : Part B : automated data acquisition

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

Capacitive Touch Sensor Project:

Sage 925VST Application Note Testing Through WiFi and VoIP Phones

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

Lab 6 Introduction to Serial and Wireless Communication

RGB LED Strips. Created by lady ada. Last updated on :00:18 PM EST

Thermistor. Created by Ladyada. Last updated on :30:46 PM EDT

MCP4725 Digital to Analog Converter Hookup Guide

The basic set up for your K2 to run PSK31 By Glenn Maclean WA7SPY

Pololu DRV8835 Dual Motor Driver Shield for Arduino

Installation & Operation Manual

Using Arduino Microcontrollers to Sense DC Motor Speed and Position

Arduino project. Arduino board. Serial transmission

mdm-mp3 minidirector with MP3 Player

RC Camera Control. User Guide v /20/2012

Sending an SMS with Temboo

DMX512 TO 0-10 VOLT ANALOG CONVERTER OWNERS MANUAL

Mini Bluetooth Adapter for Pskmail without wires - V 1

Arduino Lab 1 - The Voltage Divider

HAM841K ALARM CONTROL PANEL FOR COMMERCIAL AND RESIDENTIAL SECURITY SYSTEMS

Arduino Motor Shield (L298) Manual

GLOLAB Two Wire Stepper Motor Positioner

Adafruit SHT31-D Temperature & Humidity Sensor Breakout

Whale 3. User Manual and Installation Guide. DC Servo drive. Contents. 1. Safety, policy and warranty Safety notes Policy Warranty.

MODEL 5010 DUAL CHANNEL SMOKE/FIRE DETECTION MODULE

Spurious diagnostic trouble codes in the airbag system (SRS)

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

Arduino Lesson 14. Servo Motors

C4DI Arduino tutorial 4 Things beginning with the letter i

Kit Watt Audio Amplifier

ezsystem elab16m Project 1F: Alarm System (Full Project description)

Objectives: Part 1: Build a simple power supply. CS99S Laboratory 1

Advanced LED Controller (LED Chaser)

PIR Motion Sensor. Created by Ladyada. Last updated on :15:25 PM EST

STEREO BLUETOOTH WIRELESS SPORTS In-Ear Headphones

Alpha 10 SERVICE MANUAL. Downloaded from MAX 10 Meter Amateur Transceiver AM/FM/CW/SSB 6 BAND PROGRAMMABLE MODEL AM-1000.

Arduino Lesson 4. Eight LEDs and a Shift Register

AirCasting Particle Monitor Bill of Materials

GLOLAB Universal Telephone Hold

CAN-Bus Shield Hookup Guide

2 X 250Watt Class D Audio Amplifier Board IRS2092 User s Guide

revolution Contents: Introduction Power 28-pin Project Board with input/output cables

SUPER SNOOPER BIG EAR

Intro to Intel Galileo - IoT Apps GERARDO CARMONA

K6002 TEMPERATURE CONTROLLER. Specifications

LAB 7 MOSFET CHARACTERISTICS AND APPLICATIONS

Animated Lighting Software Overview

Multimedia. User Guide

conventional system operation

ANTI-THEFT SYSTEM Volvo 850 DESCRIPTION & OPERATION BASIC ALARM ACCESSORIES & EQUIPMENT Volvo Anti-Theft Systems

BUILD YOUR OWN RC SWITCH (Issue 3)

RN-52 Bluetooth Hookup Guide

INTRODUCTION. We are living in an age of Information Technology. Electronics is at the very foundation of the

GSM-DL2 GSM auto dialer

UM1724 User manual. STM32 Nucleo boards. Introduction

Arduino Lesson 1. Blink

Joule Thief 3.0 Kit. June 2012, Rev Joule Thief 3.0

4/Really Getting Started with Arduino

Preserving music from LPs and tapes

Physics 3330 Experiment #2 Fall DC techniques, dividers, and bridges R 2 =(1-S)R P R 1 =SR P. R P =10kΩ 10-turn pot.

BUILDING INSTRUCTIONS

Assembly and User Guide

igadgitz Bluetooth Audio Transmitter & Receiver (BTT009 / U3442) User Guide

Firmware version: 1.10 Issue: 7 AUTODIALER GD30.2. Instruction Manual

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

K4401 SOUND GENERATOR. them at the touch of a button. Specifications

Considerations When Specifying a DC Power Supply

MODEL 2202IQ (1991-MSRP $549.00)

RIU-IP Remote IP Interface User Guide

Troubleshooting Tips Lifestyle SA-2 & SA-3 Amplifier. Troubleshooting Tips

USING YOUR DMX PROFUSION

An Introduction to MPLAB Integrated Development Environment

AUTOMATIC CALL RECORDER JAMECO PART NO

MANUAL FOR RX700 LR and NR

Configuring the 930A for Common PBX Metallic Signaling Interfaces

Electronics 5: Arduino, PWM, Mosfetts and Motors

Transcription:

HACKING BUTTONS Get control of other components around you using some additional circuitry, you can "press" buttons with you Arduino Discover : Optocoupler, connecting with other components Time : minutes Level : Builds on projects :,,9 Warning : You're no longer a beginner if you're doing this project. You'll be opening up an electronic device and modifying it. You'll void your device's warranty, and if you're not careful, you might damage the device. Make sure you're familiar with all the electronic concepts in the earlier projects before you attempt this one. We recommend you use inexpensive items you don't mind damaging for your first few projects, until you develop experience and confidence. While the Arduino can control a lot of things, sometimes it is easier to use tools that are created for specific purposes. Perhaps you want to control a television or a music player, or drive a remote control car. Most electronic devices have a control panel with buttons, and many of those buttons can be hacked so that you can "press" them with an Arduino. Controlling recorded sound is a good example. If you wanted to record and play back recorded sound, it would take a lot of effort to get Arduino to do that. It's much easier to get a small device that records and plays back sound, and replace its buttons with outputs controlled by your Arduino. N Optocouplers are integrated circuits that allow you to control one circuit from a different one without any electrical connection between the two. Inside an optocoupler is an LED and a light detector. When the LED in the optocoupler is turned on by your Arduino, the light detector closes a switch internally. The switch is connected to two of the output pins ( and ) of the optocoupler. When the internal switch is closed, the two output pins are connected. When the switch is open, they're not connected. This way, it's possible to close switches on other devices without connecting them to your Arduino. In this example, the diagrams are for controlling a digital recording module that allows you to record and playback 0 seconds of sound, but the basic premise holds for any device that has a switch you can access. While it's possible to use this example without soldering any wires, it certainly makes things easier. For more information about soldering, see "Knock lock" project (#).

INGREDIENTS RESISTOR 0 x OPTOCOUPLER x

BUILD THE CIRCUIT Fig. - [Circuit] IOREF RESET.V V Vin A0 A A A A A POWER ANALOG IN RX TX L DIGITAL (PWM~) ON AREF RESET ~ ~0 ~9 ~ ~ ~ TX RX 0 + - a b c d e f g h i j + - 9 9 0 0 9 9 0 0 9 9 + - 0 0 a b c d e f g h i j + - N Fig. - [Schematic] ARDUINO UNO A0 A A A A A V ~ ~0 ~9 ~ ~ ~ TX RX 0 0 OPTOCOUPLER EXTERNAL CIRCUIT BUTTON PAD CONTACTS

) Connect ground to your breadboard through the Arduino. ) Place the optocoupler on the breadboard so that is straddles the center of the board (see circuit diagram). ) Connect pin on the optocoupler to Arduino pin in series with a 0-ohm resistor (remember, you're powering an LED inside, you don't want to burn it out). Connect pin of the optocoupler to ground. ) On the main board of the sound module there are a number of electrical components, including a playback button. To control the switch, you're going to have to remove the button. Flip the circuit board over and find the tabs that hold the button in place. Gently bend the tabs back and remove the button from the board. ) Under the button are two small metal plates. This pattern is typical of many electronic devices with pushbuttons. The two "forks" of this pattern are the two sides of the switch. A small metal disc inside the pushbutton connects these two forks when you press the button. ) When the forks are connected, the switch is closed on the circuit board. You will be closing the switch with the optocoupler. This method, closing a switch with an optocoupler, works only if one of the two sides of the pushbutton's switch is connected to ground on your device. If you're not sure, take a multimeter and measure the voltage between one of the forks and the ground on your device. You need to do this with the device turned on, so be careful not to touch anywhere else on the board. Once you know which fork is ground, disconnect the power to your device. ) Next, connect one wire to each of the small metal plates. If you are soldering these wires, be careful to not join the two sides of the switch together. If you are not soldering and using tape, make sure your connection is secure, or the switch won't close. Make sure neither wire connects to the other fork, or your switch will be closed all the time. ) Attach the two wires to pins and of the optocoupler. Connect the side of the switch that is grounded to pin of the optocoupler. Connect the other fork to pin of the optocoupler.

THE CODE Name a constant Most of the fun with this project is in the circuit and the optocoupler. The code is similar to the first project you made with the Arduino. You're going to play the sound every 0 seconds by turning pin HIGH. Create a constant for the optocoupler control pin. const int optopin = ; Configure the pin direction In setup(), set the optocoupler pin into an output. void setup() { pinmode(optopin, OUTPUT); } Pull the pin high and low The loop() turns optopin HIGH for a few milliseconds, long enough for the optocoupler to close the switch on the device. Then the optopin becomes LOW. void loop() { digitlawrite(optopin, HIGH); delay(); digitlawrite(optopin, LOW); Wait for a while Wait for seconds for the whole message to play back before starting the loop() again. } delay(000); Upload the program to the Arduino then set it aside while you write your Processing sketch.

USE IT Attach the battery to the sound recorder. Press and hold the record button on the device. While you're holding the button, you can record audio into the microphone. Use your voice, the cat, or the pots and pans in the kitchen to make some noise (but be careful with the cat). Once you've satisfactorily recorded a sound, power your Arduino with the USB cable. Your recording should start to play. If you recorded for the full 0 seconds, the sound should start again just a few moments after it ends. Try experimenting with different sounds and durations of toggling the playback with the delay() in your program. If you trigger the switch while a sound is playing, it will stop. How can you take advantage of this to create unique sequences of sounds? Integrated circuits are in virtually every electronic device. The large pin chip on your Arduino is an IC that houses the brains of the board. There are other ICs that support this one with communication and power. The optocoupler and main chip on the Arduino are Dual In-line Package (DIP) chips. These DIP chips are the kind that most hobbyists use because they easily fit in a breadboard and don't have to be permanently soldered to be used. The project example only played sound back at a regular interval. How could you incorporate the inputs from earlier projects to trigger these sounds? What other battery powered things do you have around the house that need an Arduino to control them? This technique of controlling an electronic device with an optocoupler by connecting to the two sides of a switch can be used in many other devices. What other devices do you want to control? Optocouplers can control devices that are on a different circuit. The two circuits are electrically separated from each other inside the component.