Professional Documents
Culture Documents
RadioShack Presents 18 More Awesome Projects
RadioShack Presents 18 More Awesome Projects
When RadioShack announced last year that it was starting to stock Arduinos we knew just what to do: we went shopping. It's one of our favorite tools to use and we were
up for any excuse to use more of them.
The cool thing about Arduino is that it lets you do so many different things that it's really about what the user can think of. And we thought of so many things to do.
Thanks to the Arduino we were able to feed pets with tweets, water our plants automatically, make a guitar pedal for crazy sounds, and so much more.
So please dig into all these projects of ours and find out what the Arduino is capable of. Redo a whole project or even just a part of one and make it your own. It's all
about your own expression of what's great and the Arduino can be your new best friend in making it happen.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Table of Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .359
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Disclaimer
All do-it-yourself activities involve risk, and your safety is your own responsibility, including proper use of equipment and safety gear, and determining whether you have
adequate skill and experience. Some of the resources used for these projects are dangerous unless used properly and with adequate precautions, including safety gear.
Some illustrative photos do not depict safety precautions or equipment, in order to show the project steps more clearly. The projects are not intended for use by children.
Many projects on Instructables are user-submitted, and appearance of a project in this format does not indicate it has been checked for safety or functionality. Use of the
instructions and suggestions is at your own risk. Instructables, Inc. disclaims all responsibility for any resulting damage, injury, or expense. It is your responsibility to make
sure that your activities comply with all applicable laws.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Author:randofo
The Arduino Guitar Pedal is a digital multi-effect pedal based upon the Lo-Fi Arduino Guitar Pedal originally posted by Kyle McDonald . I made a few modifications to his
original design. The most noticeable changes are the built-in preamp, and the active mixer stage which lets you combine the clean signal with the effects signal. I also
added a sturdier case, foot switch, and rotary switch to have 6 discreet steps between the different effects.
The cool thing about this pedal is that it can be endlessly customized. If you don't like one of the effects, simply program another one. In this way, this pedal's potential is
largely dependent upon your skills and imagination as a programmer.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 3: Solder
Insert the male header pins into the Maker Shield and solder them into place.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 4: Template
Print out the attached template on full-sheet adhesive paper.
Cut out each of the two squares.
(The file has the pattern repeated twice in case to optimize use of the paper, and in case you need an extra.)
Step 5: Drill
Peel off the backing of the adhesive template and stick it squarely on the front of the casing.
Drill all of the crosses with a 1/8" drill bit.
Starting from the left side, widen the first three holes with a 9/32" drill bit.
Widen the last hole of the top row with a 5/16" dill bit.
And then widen the singular hole in the bottom right with a 1/2" spade bit to finish off the front of the case.
Peel off the adhesive template from the front of the case.
Next, stick the next adhesive template to the back edge. In other words, stick it to the edge face most closely abutting the potentiometer holes.
Drill the crosses first with 1/8" holes and then widen them with larger 3/8" holes.
Peel away this template as well, and the case should be ready.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
Arduino_Guitar_Pedal.zip (3 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'Arduino_Guitar_Pedal.zip']
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
Distortion Pedal
With Stutter
Effect by
Harrymatic
Plush Fuzz
Pedal by randofo
The Fuzz of
1000 Faces by
randofo
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Scanner Pedal
Board by raxel
Multi-Switch
Foot Pedal
(Photos) by nsnip
FET Distortion
Pedal by Cookie
Monster!
Arduino Xylophone
by audreyobscura on June 6, 2012
Author:audreyobscura audreyObscura.com
i work at instructables! i make things with technology, eat pho, and play electric ukulele.
I made a xylophone that uses an Arduino Mega to detect when a note is struck, and generate MIDI output. This project is wondeful because I essentially made a
xylophone, a drumkit, and any other MIDI controlled sound instrument, with one tool. The following steps will outline what I used to make this xylophone.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
//Xylophone
//Adapted for an ArduinoMega
//from Jenna deBoisblanc and Spiekenzie Labs initial code
//*******************************************************************************************************************
// User settable variables
//*******************************************************************************************************************
int pinRead;
char pinAssignments[6] ={
'A0','A1','A2','A3','A4','A5','A6','A7','A8','A9','A10','A11'};
byte PadNote[16] = {
57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72};
// MIDI notes from 0 to 127 (Mid C = 60)
int PadCutOff[16] =
{
400,400,200,800,400,400,400,400,400,400,400,400,400,400,400,400};
// Minimum Analog value to cause a drum hit
int MaxPlayTime[16] = {
90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90};
// Cycles before a 2nd hit is allowed
#define midichannel 1;
// MIDI channel from 0 to 15 (+1 in "real world")
boolean VelocityFlag = true;
// Velocity ON (true) or OFF (false)
//*******************************************************************************************************************
// Internal Use Variables
//*******************************************************************************************************************
boolean activePad[16] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
// Array of flags of pad currently playing
int PinPlayTime[16] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
// Counter since pad started to play
byte status1;
int pin = 0;
int hitavg = 0;
//*******************************************************************************************************************
// Setup
//*******************************************************************************************************************
void setup()
{
Serial.begin(57600);
// connect to the serial port 115200
}
//*******************************************************************************************************************
// Main Program
//*******************************************************************************************************************
void loop()
{
for(int pin=0; pin < 16; pin++)
//
{
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
//int pin = 3;
//
for (pinRead=0; pinRead < 16, pin++){
hitavg = analogRead(pinAssignments[pin]);
//Serial.println(hitavg);
// read the input pin
if((hitavg > PadCutOff[pin]))
{
if((activePad[pin] == false))
{
if(VelocityFlag == true)
{
//
hitavg = 127 / ((1023 - PadCutOff[pin]) / (hitavg - PadCutOff[pin]));
// With full range (Too sensitive ?)
hitavg = (hitavg / 8) -1 ;
// Upper range
}
else
{
hitavg = 127;
}
MIDI_TX(144,PadNote[pin],hitavg); //note on
PinPlayTime[pin] = 0;
activePad[pin] = true;
}
else
{
PinPlayTime[pin] = PinPlayTime[pin] + 1;
}
}
else if((activePad[pin] == true))
{
PinPlayTime[pin] = PinPlayTime[pin] + 1;
if(PinPlayTime[pin] > MaxPlayTime[pin])
{
activePad[pin] = false;
MIDI_TX(144,PadNote[pin],0);
}
}
}
}
//*******************************************************************************************************************
// Transmit MIDI Message
//*******************************************************************************************************************
void MIDI_TX(byte MESSAGE, byte PITCH, byte VELOCITY)
{
status1 = MESSAGE + midichannel;
Serial.write(status1);
Serial.write(PITCH);
Serial.write(VELOCITY);
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
What is MIDI?
by
amandaghassaei
Musical MIDI
Shoes by
thobson
Arduino/Ableton
Color Organ;
MIDI controlled
(video) by _Aias
Controlling
Cubase with
Arduino based
MIDI by pstretz
Acoustic Guitar
Diy Piezo
Pickups by
rbneville
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
SNF Drumming
MIDI Glove
using Arduino
and light
sensors
(Photos) by
Bruno Ratnieks
Arduino playing
"Puff the Magic
Dragon" on a
piezo (video) by
earthshine
Converting a
rescued toy into
a MIDI controller
by zen.webb
Author:amandaghassaei
amandaghassaei.com
Currently working for instructables!
Parts list:
(1x) Arduino Uno REV 3 Radioshack #276-128
(20x) Amber Super-bright LED Indicator Radioshack #55050630
(1x) Arduino Proto Shield Radioshack #276-140
(1x) 9V Alkaline Battery Radioshack #23-866
(1x) Heavy-Duty 9V Snap Connectors Radioshack #270-324
(20x) 1/4 watt resistors (sample calculation below)
from the specs of the LEDs I used:
"Continuous forward current: 25mA"
"Forward voltage: 3V"
using the following relationship:
V(volts) = I(amps) * R(ohms)
rearranged to:
R=V/I
we can calculate the resistance as follows:
voltage across resistor = 5V - 3V = 2V
2V / 0.025A = 80ohms
I used 100 ohm resistors so that the LEDs wouldn't be operating at their maximum ratings. Check the datasheet of the LEDs you use to calculate these values.
I've attaching a fritzing document with a breadboard and schematic view of the circuit (and included them above) for reference.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. top of wand
2. bottom of wand
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. only first and last pins soldered
Image Notes
1. check alignment
Image Notes
1. all pins soldered
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
10 Digital Pin 4
11 Digital Pin 3
12 Digital Pin 2
13 Digital Pin 1
14 Digital Pin 0
15 Analog Pin 5
16 Analog Pin 4
17 Analog Pin 3
18 Analog Pin 2
19 Analog Pin 1
20 Analog Pin 0
Bottom of wand
Image Notes
1. top of wand
2. bottom of wand
Image Notes
1. top of wand
2. bottom of wand
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0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, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }; void sendToWand(boolean letterArray[]){//function to get array data for (t=0; t<12;
t++){ //for each time step for (l=0; l<6; l++){ //for first six rows of data data1 = data1 << 1;//bitwise shift left data1 |= pgm_read_byte_near(letterArray + (l*12+t));//add next
value from dataset } for (l=6; l<14; l++){ //for next eight rows of data data2 = data2 << 1;//bitwise shift left data2 |= pgm_read_byte_near(letterArray + (l*12+t));//add next
value from dataset } for (l=14; l<20; l++){ //for next six rows of data data3 = data3 << 1;//bitwise shift left data3 |= pgm_read_byte_near(letterArray + (l*12+t));//add next
value from dataset } //SET PINS: PORTB = data1; PORTD = data2; PORTC = data3; delay(refreshrate); //clear data storage data1=0; data2=0; data3=0; } } void
sendToWandMW(boolean letterArray[]){//M and W are extra wide- they have a special function to get array data (with 15 time steps instead of 12) //send data to leds via
port/pin manipulation for (t=0; t<15; t++){ //for each time step for (l=0; l<6; l++){ //for first six rows of data data1 = data1 << 1;//bitwise shift left data1 |=
pgm_read_byte_near(letterArray + (l*15+t));//add next value from dataset } for (l=6; l<14; l++){ //for next eight rows of data data2 = data2 << 1;//bitwise shift left data2 |=
pgm_read_byte_near(letterArray + (l*15+t));//add next value from dataset } for (l=14; l<20; l++){ //for next six rows of data data3 = data3 << 1;//bitwise shift left data3 |=
pgm_read_byte_near(letterArray + (l*15+t));//add next value from dataset } //SET PINS: PORTB = data1; PORTD = data2; PORTC = data3; delay(refreshrate); //clear
data storage data1=0; data2=0; data3=0; } } // //SAME AS ABOVE BUT WRITTEN USING ARDUINO LIBRARY COMMANDS: // //// for (t=0; t<12; t++){ //for each time
step of matrix //// //// for (int pin= 13; pin>=0; pin--) {//this loop sets digital pins 0-13 either high or low depending on the value of the corresponding matrix element //// if
(letterArray[(13-pin)*12+t]) {//if matrix element == 1 then turn led on //// digitalWrite(pin, HIGH); //// } //// else {//if matrix element == 0 then turn led off //// digitalWrite(pin,
LOW); //// } //// } //// //// //the following lines address the analog pins indivially and set them either high or low depending on matrix element //// if (letterArray[14*12+t]) {//if
matrix element == 1 then turn led on //// digitalWrite(A5, HIGH); //// } //// else {//if matrix element == 0 then turn led off //// digitalWrite(A5, LOW); //// } //// if
(letterArray[15*12+t]) { //// digitalWrite(A4, HIGH); //// } //// else { //// digitalWrite(A4, LOW); //// } //// if (letterArray[16*12+t]) { //// digitalWrite(A3, HIGH); //// } //// else { ////
digitalWrite(A3, LOW); //// } //// if (letterArray[17*12+t]) { //// digitalWrite(A2, HIGH); //// } //// else { //// digitalWrite(A2, LOW); //// } //// if (letterArray[18*12+t]) { ////
digitalWrite(A1, HIGH); //// } //// else { //// digitalWrite(A1, LOW); //// } //// if (letterArray[19*12+t]) { //// digitalWrite(A0, HIGH); //// } //// else { //// digitalWrite(A0, LOW); //// }
//// //// //// delay(refreshrate);//delay after each column of data is displayed //// }//go to next time step void setup() { //port/pin assignments- set all pins to output- more info
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
here: http://www.arduino.cc/en/Reference/PortManipulation DDRB = 0xFF;//port b- digital pins 8-13 DDRC = 0xFF;//port c- anlog pins 0-5 DDRD = 0xFF;//port d- digital
pins 0-7 //the three lines above are the same as setting all pins as outputs using arduino library: // pinMode(A0, OUTPUT); // pinMode(A1, OUTPUT); // pinMode(A2,
OUTPUT); // pinMode(A3, OUTPUT); // pinMode(A4, OUTPUT); // pinMode(A5, OUTPUT); // // for (int pin=0; pin<14; pin++){ // pinMode(pin, OUTPUT); // } //run
intialization so we know device is working- leds should light up in order from top of wand to bottom for (byte j=0; j<20; j++){ //for each time step for (byte i=0; i<6; i++){ //for
first six rows of data data1 = data1 << 1;//bitwise shift left data1 |= load[(i*20+j)];//add next value from dataset } for (byte i=6; i<14; i++){ //for next eight rows of data data2
= data2 << 1;//bitwise shift left data2 |= load[(i*20+j)];//add next value from dataset } for (byte i=14; i<20; i++){ //for next six rows of data data3 = data3 << 1;//bitwise shift
left data3 |= load[(i*20+j)];//add next value from dataset } PORTB = data1; PORTD = data2; PORTC = data3; delay(100); } ////SAME AS ABOVE LOOP, BUT USING
ARDUINO LIBRARY: // //turn on each LED one by one using arduino library commands // for (int pin= 13; pin>=0; pin--){//turn on each digital pin sequentially for 100ms //
digitalWrite(pin, HIGH); // delay(100); // digitalWrite(pin,LOW); // } // //the following lines turn on each analog pin individually // digitalWrite(A5, HIGH); // delay(100); //
digitalWrite(A5,LOW); // digitalWrite(A4, HIGH); // delay(100); // digitalWrite(A4,LOW); // digitalWrite(A3, HIGH); // delay(100); // digitalWrite(A3,LOW); // digitalWrite(A2,
HIGH); // delay(100); // digitalWrite(A2,LOW); // digitalWrite(A1, HIGH); // delay(100); // digitalWrite(A1,LOW); // digitalWrite(A0, HIGH); // delay(100); //
digitalWrite(A0,LOW); //clear data storage data1 = 0; data2 = 0; data3 = 0; //clear ports- set all arduino pins to 0Volts PORTB = data1; PORTD = data2; PORTC = data3; }
void loop() { //space at beginning of text PORTB = 0; PORTD = 0; PORTC = 0; delay(refreshrate*3); for (n=0; n<dimtext; n++) {//go through each character of povtext and
call function sendToWand to display letter if (povtext.charAt(n)=='A') { sendToWand(letterA); } else if (povtext.charAt(n)=='B') { sendToWand(letterB); } else if
(povtext.charAt(n)=='C') { sendToWand(letterC); } else if (povtext.charAt(n)=='D') { sendToWand(letterD); } else if (povtext.charAt(n)=='E') { sendToWand(letterE); } else if
(povtext.charAt(n)=='F') { sendToWand(letterF); } else if (povtext.charAt(n)=='G') { sendToWand(letterG); } else if (povtext.charAt(n)=='H') { sendToWand(letterH); } else if
(povtext.charAt(n)=='I') { sendToWand(letterI); } else if (povtext.charAt(n)=='J') { sendToWand(letterJ); } else if (povtext.charAt(n)=='K') { sendToWand(letterK); } else if
(povtext.charAt(n)=='L') { sendToWand(letterL); } else if (povtext.charAt(n)=='M') { sendToWandMW(letterM); } else if (povtext.charAt(n)=='N') { sendToWand(letterN); }
else if (povtext.charAt(n)=='O') { sendToWand(letterO); } else if (povtext.charAt(n)=='P') { sendToWand(letterP); } else if (povtext.charAt(n)=='Q') { sendToWand(letterQ);
} else if (povtext.charAt(n)=='R') { sendToWand(letterR); } else if (povtext.charAt(n)=='S') { sendToWand(letterS); } else if (povtext.charAt(n)=='T') { sendToWand(letterT);
} else if (povtext.charAt(n)=='U') { sendToWand(letterU); } else if (povtext.charAt(n)=='V') { sendToWand(letterV); } else if (povtext.charAt(n)=='W') {
sendToWandMW(letterW); } else if (povtext.charAt(n)=='X') { sendToWand(letterX); } else if (povtext.charAt(n)=='Y') { sendToWand(letterY); } else if
(povtext.charAt(n)=='Z') { sendToWand(letterZ); } else if (povtext.charAt(n)==' ') { PORTB = 0; PORTD = 0; PORTC = 0; delay(refreshrate*3);//off for 3 pixels } //space
between each character PORTB = 0; PORTD = 0; PORTC = 0; delay(refreshrate); } //space at end of text PORTB = 0; PORTD = 0; PORTC = 0; delay(refreshrate*3); }
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
POV on Basic
Stamp by
WyoJustin
Simple POV
w/Ardweeny Persistence of
Vision by
duboisvb
Arduino Analog
Hard Drive POV
Clock (Photos)
by davidhend
GUI Controlled
LED Matrix by
ben_k
Arduino
Persistence of
Vision Display
(Photos) by
Mr.What
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Magic POV
Wand (yet
another POV
toy) by
rleddington
LilyPad Wrist
Band POV by
quasiben
Author:amandaghassaei
amandaghassaei.com
Currently working for instructables!
Parts List:
(1x) Automatic Pet Feeder Amazon
(2x) 10K Ohm 1/4-Watt Carbon Film Resistor (1 package) Radioshack #271-1335
(1x) Arduino Ethernet Shield w/o PoE Module Radioshack #276-130
(4x) CdS Photoresistors 5 pack (1 package) Radioshack #276-1657
(1x) Grid-Style PC Board Radioshack #276-147
(2x) White Super-bright LED Indicator Radioshack #55050633
(1x) Male Header Pins 40 Position Jameco #160882
(4x) "D" Alkaline Batteries (1 package) Radioshack #23-865
(2x) 4.7K Ohm 1/4-Watt Carbon Film Resistor (1 package)
(2x) current limiting resistors, see the sample calculation below
from the specs of the LEDs I used:
"Continuous forward current: 30mA"
"Forward voltage: 3.6V"
using the following relationship:
V(volts) = I(amps) * R(ohms)
rearranged to:
R=V/I
we can calculate the resistance as follows:
voltage across resistor = 5V - 3.6V = 14V
1.4V / 0.03A = 47ohms
I used 100 ohm 1/4W 5% Carbon Film Resistors Radioshack #271-1311 so that the LEDs wouldn't be operating at their maximum ratings. Check the datasheet of the
LEDs you use to calculate these values.
Additional Materials:
drill
Solder Radioshack #64-013
22 Gauge Wire Radioshack #278-1224
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 3: Schematic
The schematic is shown above, I've also attached a fritzing document for your reference. This feeder is programmed to manually dispense food when the "set" and
"volume" buttons are depressed at the same time. By wiring light sensitive resistors across these buttons we can simulate the mechanical pushbutton action as follows:
When the photoresistors are not exposed to light their resistance will be very high and the processor in the feeder will think that the buttons aren't being pressed. By
telling the arduino to light up some LEDs near the photoresistors, the resistance will decrease low enough for the feeder's processor to think that the buttons are being
depressed.
I've also attached two pushbuttons in the circuit so that I could manually turn the LEDs on for troubleshooting purposes. These buttons are not essential to the project (but
useful).
I also be diverted some power from the feeder's four D batteries to power the arduino.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. 4 D batteries from feeder
2. white led
3. photo resistors
4. pushbutton
5. from button lead
6. to button lead
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. digital pin 2
2. digital pin 3
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. 10k and 4.7k resistors in series with photoresistors.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. 4 D batteries from feeder
2. white led
3. photo resistors
4. pushbutton
5. from button lead
6. to button lead
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. Vin and ground
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
// twitter URL
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
boolean requested;
long lastAttemptTime = 0;
String currentLine = "";
String tweet = "";
boolean readingTweet = false;
void setup() {
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
// reserve space for the strings:
currentLine.reserve(256);
tweet.reserve(150);
// initialize serial:
Serial.begin(9600);
// attempt a DHCP connection:
if (!Ethernet.begin(mac)) {
// if DHCP fails, start with a hard-coded address:
Ethernet.begin(mac, ip);
}
// connect to Twitter:
connectToServer();
testing();
}
void loop()
{
if (justFed){
if (client.connected()) {
if (client.available()) {
// read incoming bytes:
char inChar = client.read();
// add incoming byte to end of line:
currentLine += inChar;
// if you get a newline, clear the line:
if (inChar == '\n') {
currentLine = "";
}
// if the current line ends with <text>, it will
// be followed by the tweet:
if ( currentLine.endsWith("<text>")) {
// tweet is beginning. Clear the tweet string:
readingTweet = true;
tweet = "";
}
// if you're currently reading the bytes of a tweet,
// add them to the tweet String:
if (readingTweet) {
if (inChar != '<') {
tweet += inChar;
}
else {
// if you got a "<" character,
// you've reached the end of the tweet:
readingTweet = false;
Serial.println(tweet);
if(tweet == ">feed me!"){
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
Serial.println("LED ON!");
delay(1000);//turn on for 1 sec
digitalWrite(2, LOW);
digitalWrite(3, LOW);
justFed = 0;
}
if(tweet != ">feed me!"){
digitalWrite(2, LOW);
digitalWrite(3, LOW);
Serial.println("LED OFF!");
}
// close the connection to the server:
client.stop();
}
}
}
}
else if (millis() - lastAttemptTime > requestInterval) {
// if you're not connected, and two minutes have passed since
// your last connection, then attempt to connect again:
connectToServer();
}
}
else if (millis() - lastAttemptTime > 14400000){//if four hours has passed since last feeding
justFed = 1;
}
}
void testing(){
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
digitalWrite(2,
digitalWrite(3,
delay(1000);
digitalWrite(2,
digitalWrite(3,
HIGH);
HIGH);
LOW);
LOW);
void connectToServer() {
// attempt to connect, and wait a millisecond:
Serial.println("connecting to server...");
if (client.connect(serverName, 80)) {
Serial.println("making HTTP request...");
// make HTTP GET request to twitter:
client.println("GET /1/statuses/user_timeline.xml?screen_name=nomnomnomfeeder&ount=1 HTTP/1.1");
client.println("HOST: api.twitter.com");
client.println();
}
// note the time of this connect attempt:
lastAttemptTime = millis();
}
You will need to make a two edits before this firmware is ready to use.
1. Insert your IP address in the following line at the top of the firmware:
IPAddress ip(192,168,22,112 ); //<<< ENTER YOUR IP ADDRESS HERE!!!
if you don't know your IP address open File>>Examples>>Ethernet>>DhcpAddressPrinter, upload this code to your arduino with the ethernet shield plugged in (and
ethernet cable connected), and open the serial monitor Tools>>SerialMonitor
2. Change the username of your twitter account in the following line (from the function connectToServer():
client.println("GET /1/statuses/user_timeline.xml?screen_name=nomnomnomfeeder &ount=1 HTTP/1.1");
Upload firmware on your arduino board, plug in the ethernet modem/router. Tweet "feed me!" from your twitter account and you should see your pet feeder dispense food
in a minute or less. The feeder will not receive any further tweets for four hours (to prevent over feeding), during this time, tweet another message to replace "feed me!"
as your most recent message.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
Displaying
Twitter feed
without a PC! by
fabrizio.granelli
Terrarium
Twitter
Monitoring by
MarioBoehmer
Arduino
Ethernet Shield
Tutorial by
randofo
Twitter
controlled
Arduino
Outputs - no PC
- LCD Display +
Sensor data to
Twitter by
XenonJohn
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Pet Curfew: An
Arduino
Controlled Pet
Door by tareker
Vacation Pet
Feeder from
Recycled
Materials by
Revolt Lab
Do not
Enter(Twitterupdates)
(Without
Ethernet Sheild)
(Photos) by
vishalapr
Author:noahw
Editor of the Workshop and Outside channels...I'm back!
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. solar charge controller
2. AC power input
3. DC cigarette lighter
4. solar panel charging jack
5. AC charging indicator lights
6. DPDT switch
7. solar charge controller cut off switch
8. binding posts
9. stereo head unit
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
Indestructible
Speaker
Instructable by
Attmos
Waterproof,
Solar BOOMbox
AKA: Post
Apocalyptic
Power Supply
by a rigger
Make MP3
Player Portable
Boom Tube by
joe
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
BOOM "BOX"
(For Any Ipod or
Mp3 Player etc. .
. ) by rickick
Shelf speakers
w/ipod dock
(Part I - speaker
boxes) by mfryer
Waterproof
Firestarting
Case by
mr2percent
Author:audreyobscura audreyObscura.com
i work at instructables! i make things with technology, eat pho, and play electric ukulele.
Living in a city, I use my bike as means of transit, riding from home to work, work to studio, errands, etc. When I ride at night, I am often concerned if other
vehicles/people on the road can see my hand signals when I am about to turn. To make my night rides safer, I decided to build a turn signal system for my bike!
The following instructable will go over how to use a 555 timer to flash an array of LEDs, and how to mount LEDs in an acrylic panel, and cast it in resin.
Step 1: Materials
You will need the following materials and tools to embark on this project.
Materials :
The circuit
(1X) 555 timer - (Radioshack #276-1718)
(1X) 4.7 uF capacitor - (Radioshack #272-1024)
(1X) 100K resistor - (Radioshack #271-1347)
(1X) 10K resistor - (Radioshack #271-1335)
(1X) 220 Ohm Resistor - (Radioshack #271-1313)
(2X) tactile switches - (Radioshack #275-002)
(1X) proto board - (Radioshack #276-170)
(1X) single core wire - (Radioshack #278-1221)
(1X) 9v battery clip - (Radioshack #276-1718)
(1X) SPST switch - (Radioshack #270-324)
(30X) LEDs - (Radioshack #55050630)
(1X) solder - (Radioshack #64-013)
In this project I use a water-tight method of encapsulating circuits in polyester casting resin. This way I am able to ride in the all weather conditions, and still use the turn
signals.
Turn signal and circuit housing
acrylic panel
silicone
casting resin and catalyst
quick set epoxy
pipe clamp, from the hardware store, slightly larger than the diameter of your bike seat's stem.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 9: Wire your circuit to the LEDs on the plate, connect your switches.
Connect two wires from the ground rail on your circuit to your negative LED arrays on the acrylic panel.
Extend two very long wires from your resisted output rail to two tactile switches. These wires should be the distance you need your wires to travel on your bike frame,
running from the rear, to your handlebars. Mine were a bit longer than 5 ft long, and then I trimmed as necessary later.
Wire your tactile switches so that the wires are soldered caddy-corner to eachother, then run two more 5 ft wires back to the positive leads on the LED arrays.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. angle grinder clamped to a work bench = DIY belt sander.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. separate which wires activate the right and left sides of the blinker.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
Blinking Cruiser
Bike Light by joe
The Versatile
555 Timer by
blinkyblinky
Knight rider
bike flasher by
Higgs Boson
Blinking Courier
Bag Light by joe
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Bicycle Safety
Lighting and
Turn Signals
From (Mostly)
Recycled Parts
by Amberwolf
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Author:amandaghassaei
amandaghassaei.com
Currently working for instructables!
Parts List:
(1x) Arduino Uno REV 3 Radioshack 276-128
(1x) Switch-Magnetic Reed Radioshack 55050593
(1x) 10K Ohm 1/4-Watt Carbon Film Resistor Radioshack #271-1335
(1x) 9V Alkaline Battery Radioshack #23-866
(1x) Heavy-Duty 9V Snap Connectors Radioshack #270-324
(1x) PC Board with Copper Radioshack #276-147
(1x) Parallax 27977-RT Serial Backlit LCD Radioshack 276-120
(x2) SPST PC-Mountable Submini Toggle Switch Radioshack #275-645
(2x) Male Header Pins Jameco 103393
(1x) Female Pin Sockets Jameco 308567
Additional Materials:
22 Gauge Wire Radioshack #278-1224
Solder Radioshack #64-013
sand paper
plywood
wood glue
hot glue
screws
zip ties
sugru
Download Arduino IDE
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 1: Schematic
The schematic for this project is shown above.
It consists of three switches:
-one to connect to a 9V power supply
-one to switch the backlight of the LCD on and off
-a magnetic switch (called a reed switch) which closes each time the wheel completes one full rotation.
The Parallex LCD is designed to connect to the arduino using only three pins (ignore the labels and the other pins int his schematic). One to 5V, one to ground, and a
third to serial out (TX)- on the arduino, serial out is digital pin 1.
10kOhm resistors are connected to the reed and backlight switches to prevent excess current between 5V and ground (you should never directly connect 5V and ground
on the arduino!)
Step 2: Protoboard
Solder three rows of header pins on the protoboard so that the arduino will snap to it as shown in the images above.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. switch
2. magnet
Image Notes
1. i made a mistake here- the black wire should be connected to A0
Image Notes
1. i made a mistake here- the black wire should be connected to A0
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. I made a mistake here- the black wire should be connected to A0
Image Notes
1. switch attached to bike frame
2. magnet attached to spoke
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. switch
2. magnet
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
circumference = 2*3.14*radius;
pinMode(reed, INPUT);
// TIMER SETUP- the timer interrupt allows precise timed measurements of the reed switch
//for more info about configuration of arduino timers see http://arduino.cc/playground/Code/Timer1
cli();//stop interrupts
//set timer1 interrupt at 1kHz
TCCR1A = 0;// set entire TCCR1A register to 0
TCCR1B = 0;// same for TCCR1B
TCNT1 = 0;
// set timer count for 1khz increments
OCR1A = 1999;// = (1/1000) / ((1/(16*10^6))*8) - 1
// turn on CTC mode
TCCR1B |= (1 << WGM12);
// Set CS11 bit for 8 prescaler
TCCR1B |= (1 << CS11);
// enable timer compare interrupt
TIMSK1 |= (1 << OCIE1A);
sei();//allow interrupts
//END TIMER SETUP
Serial.begin(9600);
}
ISR(TIMER1_COMPA_vect) {//Interrupt at freq of 1kHz to measure reed switch
reedVal = digitalRead(reed);//get val of A0
if (reedVal){//if reed switch is closed
if (reedCounter == 0){//min time between pulses has passed
mph = (56.8*float(circumference))/float(timer);//calculate miles per hour
timer = 0;//reset timer
reedCounter = maxReedCounter;//reset reedCounter
}
else{
if (reedCounter > 0){//don't let reedCounter go negative
reedCounter -= 1;//decrement reedCounter
}
}
}
else{//if reed switch is open
if (reedCounter > 0){//don't let reedCounter go negative
reedCounter -= 1;//decrement reedCounter
}
}
if (timer > 2000){
mph = 0;//if no new pulses from reed switch- tire is still, set mph to 0
}
else{
timer += 1;//increment timer
}
}
void displayMPH(){
Serial.println(mph);
}
void loop(){
//print mph once a second
displayMPH();
delay(1000);
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 6: LCD
Solder a row of female header sockets on the copper side of the protoboard- three of these will be used to connect to the LCD screen. The LCD should fit nicely on top of
the protoboard.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. Adjust contrast
2. switches must be in this configuration to send messages to LCD
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
void loop() {
}
Image Notes
1. to 5V
2. to ground
3. to digital pin 2
Image Notes
1. to switch
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
}
}
else{//if reed switch is open
if (reedCounter > 0){//don't let reedCounter go negative
reedCounter -= 1;//decrement reedCounter
}
}
if (timer > 2000){
mph = 0;//if no new pulses from reed switch- tire is still, set mph to 0
}
else{
timer += 1;//increment timer
}
}
void displayMPH(){
Serial.write(12);//clear
Serial.write("Speed =");
Serial.write(13);//start a new line
Serial.print(mph);
Serial.write(" MPH ");
//Serial.write("0.00 MPH ");
}
void loop(){
//print mph once a second
displayMPH();
delay(1000);
checkBacklight();
}
I used timer interrupts in this piece of code to keep the variable "timer" incrementing at 1kHz. More info about interrupts and an explanation of how I set it up can be found
here .
Image Notes
1. to arduino Vin
2. to arduino ground
Image Notes
1. black lead of battery connect to arduino ground
2. read lead from switch connects to arduino Vin
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
enclosure.stl (1 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'enclosure.stl']
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
Wireless Altoids
Cycle Computer
by Alexdlp
Arduino
Skateboard
Speedometer by
leonardor
Digital
Anemometer
(wind meter) by
dan
Arduino Timer
Interrupts by
amandaghassaei
Amp up your
VW Bug
Speedometer by
kcrichar
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Arduino Bicycle
Alarm and
Lights by
cheeyah
Tachometer
Add
made from a
Cadence/Speed/Odometer
bicycle
to Your Spin
speedometer
(cyclocomputer)
Bike. by
by josie
vatosupreme
Electronic Instrument
by amandaghassaei on March 16, 2012
Author:amandaghassaei
amandaghassaei.com
Currently working for instructables!
Parts List:
(x1) Arduino Uno (Duemilanove is fine, but make sure it is ATMEL328P) Radioshack #276-128
(x1) Arduino ProtoShield Radioshack #276-140
(x1) PC Board with Copper Radioshack #276-147
(x9) High Tact Switch Radioshack #275-002 (I really liked the feel of these buttons, but they only come in a surface mount version, which makes them fairly difficult to
solder because of the small leads. Additionally, since these buttons are square it is harder to drill a hole for them in an enclosure. If you are a beginner, you might want to
use a different type of button, any of these momentary switches will work)
(x1) 10KOhm Audio Control Potentiometer with SPST Switch Radioshack #271-215 (this will be used to control volume and turn the device on/off)
(x1) 50K-Ohm Linear-Taper Potentiometer Radioshack #271-1716
(x2) 220F 35V 20% Radial-lead Electrolytic Capacitor (or anything between 200 and 300 uF) Radioshack #272-1029
(x2) SPST PC-Mountable Submini Toggle Switch Radioshack #275-645
(x2) Silver Tone Knurled Knob (or any knob with 0.25" inner diameter) Radioshack # 274-424
(x9) 1N914/4148-Type Diode (two packages) Radioshack #276-1122
(x3) 2K ohm 1/2W 5% Carbon Film Resistor (1 package)
(x10) 10K Ohm 1/4-Watt Carbon Film Resistor (2 packages) Radioshack #271-1335
(x8) 20K Ohm 1/4-Watt Carbon Film Resistor (2 packages)
(x1) 4.7K Ohm 1/4-Watt Carbon Film Resistor Radioshack #271-1330
(x1) 1K Ohm 1/4-Watt Carbon Film Resistor Radioshack #271-1321
(x1) 5K Ohm 1/4-Watt Carbon Film Resistor
(x1) 9V Alkaline Battery Radioshack #23-853
(x1) Heavy-Duty 9V Snap Connectors Radioshack #270-324
(x1) Amber Super-bright LED Indicator Radioshack #55050630
(x1) White Super-bright LED Indicator Radioshack #55050633
(x1) 1/8" Stereo In-Line Audio Jack Radioshack #274-274
(x1) LM386 Low Voltage Audio Power Amplifier (8-Pin DIP) Radioshack 276-1731
(1x) 8 Pin Socket 276-1995 Radioshack 276-1995
Additional materials:
22 Gauge Wire Radioshack #278-1224
Solder Radioshack #64-013
drill
plywood
polyurethane finish
sand paper
hot glue
super glue
four wood screws
Heat Shrink Wrap Radioshack #278-1610
Electrical Tape Radioshack #64-2375
I've included fritzing breadboard diagrams (divided into a few parts) and schematics for this project as well as all firmware. You can find these documents throughout the
body of this instructable or download them all in one zip file below.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. to digital pin 0
2. to digital pin 7
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. input pins from arduino
2. ground
3. audio out
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. audio out
2. 20k
3. 5k
4. 20k
5. 10k
6. 220uF
7. 220uf
8. 9v
9. 100nF
File Downloads
Image Notes
1. ground
2. from amp
3. to headphone jack
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. to 5V
2. to ground
3. to arduino input pin
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. from gain pot
2. ground
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. remove side pin
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
MIDIroute.zip (5 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'MIDIroute.zip']
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
Related Instructables
Ripping Drum
Tracks from
MIDI files by
jdlink
What is MIDI?
by
amandaghassaei
Electronic
Drums Lingo by
doggyd69b
Converting a
rescued toy into Drum Beats in
Arduino MIDI
a MIDI controller Audacity by
Rockband
by zen.webb
instructables_user_4783
Drumset (video)
by roycetaft
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Linux
Recording
Studio Software
Components by
reteo
Portable MIDI
Tone Generator
On-the-Cheap
by lewisb42
Author:randofo
Building a simple walking robot is really easy. Don't let the number of steps fool you into believing otherwise. This robot is basically made with a handful of household
items and some simple electronics that you can easily pick up at Radioshack. In fact, this robot is entirely zip tied together, which makes building it and modding it
extremely easy. If at any point you are unhappy with how its built, cut the zip ties away and zip tie it together differently.
The "brains" of this robot are also easily modifiable since it is based on an Arduino development board. Programming it and changing the code is extremely straightforward. Even people with no programming experience can usually get up to speed pretty quickly and start coding their own robotic routines.
For me, this robot was mainly an experiment to see what would happen if I built a full-on robot that was like one of the many Simple Bots that I have built. It was
interesting to see how much more robust one of these creatures become when you give it some computer logic.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 2: Saw
Get a 2" wide aluminum ruler.
Cut a 10" section off one end using a hacksaw.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 3: Bend
Clamp the cut section of ruler in a bench vise such that 5" are sticking out.
Bend the aluminum slightly (to about 30 degrees) using a rubber mallet or hammer.
If you don't have a bench vise, hang the ruler halfway off the edge of your workbench, place a block of wood atop the ruler and clamp it firmly in place. You have now
made an impromptu bending rig.
Simply hammer down on the ruler until it bends down over the edge of the workbench.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 5: Drill
Widen the second hole from center with a 1/8" drill bit on each arm of the servo horn.
Repeat this for the second servo.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 7: Mark
One inch from the edge of each of the far sides of the ruler, make a centered mark.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 8: Drill
Drill the two marks that were just made with 3/4" spade bits.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 9: Remove
Remove the servo horn from the servo by unscrewing the set screw.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
/*
Simple Walker Robot
by Randy Sarafan
This code is for controlling a simple quadruped robot and having it respond to obstacles that approach.
For more information visit the project page:
http://www.instructables.com/id/Simple-Walker-Robot/
This code is based on both the Arduino Sweep example by BARRAGAN
and the Arduino Ping example by Tome Igoe
*/
#include <Servo.h>
Servo myservo;
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
// variable to
//changing this
int pos1 = 70; // variable to
//changing this
store
value
store
value
}
void loop() {
long duration, inches, cm;
// The PING))) is triggered by a HIGH pulse of 2 or more microseconds.
// Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
pinMode(pingPin, OUTPUT);
digitalWrite(pingPin, LOW);
delayMicroseconds(2);
digitalWrite(pingPin, HIGH);
delayMicroseconds(5);
digitalWrite(pingPin, LOW);
// The same pin is used to read the signal from the PING))): a HIGH
// pulse whose duration is the time (in microseconds) from the sending
// of the ping to the reception of its echo off of an object.
pinMode(pingPin, INPUT);
duration = pulseIn(pingPin, HIGH);
// convert the time into a distance
inches = microsecondsToInches(duration);
//if something is closer than a foot, back away
if(inches <= 12){
backward();
}
//if nothing is closer than a foot, go forwards
if(inches > 12){
forward();
}
}
//function for going forwards
void forward(){
myservo.write(pos + 20);
myservo1.write(pos1 - 20);
delay(rate);
myservo.write(pos - 20);
myservo1.write(pos1 + 20);
delay(rate);
}
//function for backing away
void backward(){
myservo.write(pos + 25);
myservo1.write(pos1 + 50);
delay(rate);
myservo.write(pos - 25);
myservo1.write(pos1 - 30);
delay(rate);
}
long microsecondsToInches(long microseconds)
{
// According to Parallax's datasheet for the PING))), there are
// 73.746 microseconds per inch (i.e. sound travels at 1130 feet per
// second). This gives the distance travelled by the ping, outbound
// and return, so we divide by 2 to get the distance of the obstacle.
// See: http://www.parallax.com/dl/docs/prod/acc/28015-PING-v1.3.pdf
return microseconds / 74 / 2;
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
Simple_Walker_Robot.pde (3 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'Simple_Walker_Robot.pde']
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
How to modify a
servo motor for
continuous
rotation ( One
motor walker
robot ) by
robomaniac
How to freeform
the bicore (
BEAM robotics )
by robomaniac
The BallBot1
Robot Project ...
by
SolidWorksMagi
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Simple Bots:
Walker by
randofo
How to Build a
Robot - The
BeetleBot by
robomaniac
Large Dancing
Robot by
leevonk
Author:audreyobscura audreyObscura.com
i work at instructables! i make things with technology, eat pho, and play electric ukulele.
The Arduino is able to output sound through a library that has been developed called the Tone Library .
By creating an interface and a program that can call certain values to be output to an audio out, the Arduino Synthesizer is a robust tool for making a rudimentary noise
machine. It uses granular synthesis techniques to generate a distinctive sound that can be a whole lot of fun for musicians, artists, tinkerers, and hobbyists.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. Frequency One
2. Delay One
3. Frequency 2
4. Delay 2
5. Sync Frequency
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. tactile switch
2. LEDs
3. photoresistor
4. SPDT switch
Image Notes
1. audio jack.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. bridge made between two holes on the board with solder.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. SPDT switch
2. audio jack
Step 15: Solder in the resistors for photo resistor, tactile switch, and SPDT switch
Extend two jumper wires from the ground rail, and a jumper wire from the positive rail, out to the middle of the board. Form connections to your remaining 10K ohm
resistors.
Connect a small jumper wire from Analog 5 that will run to the lead of the photo resistor.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. undefined
2. 220 Ohm resistors run to the positive leads of the LEDs from PWM 9-11 on the Protoboard
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
Auduino (Lo-fi
Synth for
arduino) by
TobaTobias
Turn your
Arduino into a 4
voice wavetable
synth with only
a few
components...
by madshobye
Arduino Guitar
Pedal by randofo
Loud Objects
Noise Toy (AKA
The Arduino
Noise Machine)
by blinkyblinky
3 Channel
arduino
Powered
Christmas Light
Controller! by
Robot Lover
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
SuperScope:
Circuit
Simulation
through
ArduinoProcessing
Interface by
supercapacitor
Electronic
Instrument by
amandaghassaei
RC Car to Robot
by randofo
Self-Watering Plant
by randofo on June 22, 2012
Author:randofo
Plants liven up any space by adding a sense of airiness and life. That is - of course - when you don't forget to water them, and they shrivel up and die. I am very bad at
remembering to water plants. That is why I built this self-watering plant to do it for me. Using a soil sensor, and an Arduino-controlled water pump, I have created a
system that will never forget to do it. Instead of remembering to water my plants when the soil goes dry, I only have to remember to once and a while refill the water
reservoir. In this way, I have decreased my obligation to these plants and put it off to a much later date. Perhaps further iterations of this device can be connected to a
rain barrel so that I won't even have to worry about refilling my reservoir, and the entire system can be fully automated.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 4: Mark
Position the water pump, Arduino, 9V battery holder, and circuit board in the bottom of the case.
Make marks in each of their mounting holes.
The pump will probably not have a mounting hole, so just make a mark on each side such that it can easily be zip tied down.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 5: Drill
Drill all of the holes that you have just marked with a 1/8" drill bit.
You may need to widen the zip tie holes to 3/16".
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 7: Fasten
Zip tie the water pump securely into the case.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
/*
Self-Watering Plant
by Randy Sarafan
Reads a soil moisture sensor and turns on a relay that controls a water pump.
The soil moisture sensor involves a 10K resistor between pins A1 and ground,
and a probe connected to pin A1 and another connected to +5V. These probes
are embedded and inch apart in the plant's soil.
For more information, check out:
http://www.instructables.com/id/Self-Watering-Plant/
*/
// Analog input pin that the soil moisture sensor is attached to
const int analogInPin = A1;
// value read from the soil moisture sensor
int sensorValue = 0;
// if the readings from the soil sensor drop below this number, then turn on the pump
int dryValue = 700
void setup() {
pinMode(12, OUTPUT);
// initialize serial communications at 9600 bps:
Serial.begin(9600);
}
void loop() {
// read the analog in value:
sensorValue = analogRead(analogInPin);
//Turns on the water pump if the soil is too dry
//Increasing the delay will increase the amount of water pumped
if(sensorValue < dryValue){
digitalWrite(12, HIGH);
delay(10000);
digitalWrite(12, LOW);
}
// print the sensor to the serial monitor:
Serial.print("sensor = " );
Serial.println(sensorValue);
//slow your roll - I mean... slow down the code a little
delay(100);
}
Keep in mind that you may need to adjust the trigger threshold for your particular plant setup.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
Garduino:
Gardening +
Arduino by
liseman
Self watering
recycled plant
pot for growing
herbs and
flowers by
iPodGuy
Self Watering
Window Boxes
by
Katiemariesmith
GarduinoAutomated
Gardening
System by
dls02010
Another ez
cheap Earthfilled box
(without PVC!)
by Cool-fool
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Hints for a
Complete
GOURMET
GARDEN, on
the cheap! by
lucianoabcd
Create a Holistic
Garden Plus 16
Gardening Tips
by
AngryRedhead
How To Turn
Your Old Grill
Into A Planter by
klmogle
RC Car to Robot
by randofo on February 9, 2012
Author:randofo
Converting an RC car into a robot is a quick and easy way to get started with robotics. At the very least, when you get bored of playing with your remote control car after
three days, you can turn it into a robot that will do all of your evil bidding. Well, maybe not all of it, but at least a sizable amount.
In this Instructable I will go over the bare minimum you need to get started. Think of it as a template for making a basic robot that can be expanded with sensors, code,
and additional hardware to do some really amazing things. You can now impress your family, make new friends, and scare your pets with the power of robot magic.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 3: Unplug
Unplug the motors from the connectors on the main board.
If your remote control car is hard wired to the motherboard, cut the motor wires loose.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 5: Power
Remove the cover from the M-type power plug and slide it onto the wires for the 9V connector (such that you can twist it back on after you solder the wires).
Solder the red wire to the middle connection tab. Solder the black wire to the outer connection tab.
Twist the cover back onto the plug.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 8: Attach
Plug the 9V clip to the 9V battery and zip tie it to the underside of the RC car.
Trim away the excess bits of zip tie.
Step 9: Shield
Plug the Arduino Motor Shield into the sockets of the Arduino Uno.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
/*
RC Car to Robot Conversion
by Randy Sarafan
Used to convert an RC car into a robot that uses a PING sensor to avoid obstacles,
and an Arduino motor shield for motor control.
For more information see:
http://www.instructables.com/id/RC-Car-to-Robot/
Built atop Ping example code by Tom Igoe
*/
// this constant won't change.
// of the sensor's output:
const int pingPin = 7;
void setup() {
//establish motor direction toggle pins
pinMode(12, OUTPUT); //drive motor -- HIGH = forwards and LOW = backwards
pinMode(13, OUTPUT); //turn motor -- HIGH = left and LOW = right
//establish motor brake pins
pinMode(9, OUTPUT); //brake (disable) the drive motor
pinMode(8, OUTPUT); //brake (disable) the turn motor
//Turns brake off for drive motor
digitalWrite(9, LOW);
//Turns brake on for turn motor
digitalWrite(8, HIGH);
//Sets initial speed of drive motor
analogWrite(3, 200);
//Sets initial direction of drive motor
digitalWrite(12, HIGH);
}
void loop()
{
// establish variables for duration of the ping,
// and the distance result in inches and centimeters:
long duration, inches, cm;
// The PING))) is triggered by a HIGH pulse of 2 or more microseconds.
// Give a short LOW pulse beforehand to ensure a clean HIGH pulse:
pinMode(pingPin, OUTPUT);
digitalWrite(pingPin, LOW);
delayMicroseconds(2);
digitalWrite(pingPin, HIGH);
delayMicroseconds(5);
digitalWrite(pingPin, LOW);
// The same pin is used to read the signal from the PING))): a HIGH
// pulse whose duration is the time (in microseconds) from the sending
// of the ping to the reception of its echo off of an object.
pinMode(pingPin, INPUT);
duration = pulseIn(pingPin, HIGH);
// convert the time into a distance
inches = microsecondsToInches(duration);
//
//if objects are less than 12 inches away
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
For help getting started with the Arduino, check out the Intro to Arduino Instructable.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
RC_Car_Robot_Conversion.pde (3 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'RC_Car_Robot_Conversion.pde']
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
myRobot - DIY
Robot (video) by
aneophyte
RC truck robot
conversion by
OracsRevenge
Robot 3:
Autonomous
Sensor Platform
'Jimbo' by
jamesthequack
How to convert
(almost) any 27
or 49 MHz RC
Car into a
Robotic car by
dflam
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Make a scary
scarab robot by
djsures
Author:amandaghassaei
amandaghassaei.com
Currently working for instructables!
Parts List:
(4x) Mini SPST 1.5-Amp Momentary Pushbutton Switch (2 packages) Radioshack #275-1556
(8x) 10K Ohm 1/4-Watt Carbon Film Resistor (2 packages) Radioshack #271-1335
(9x) 20K Ohm 1/4-Watt Carbon Film Resistor (2 packages)
(1x) 50K-Ohm Linear-Taper Potentiometer Radioshack #271-1716
(1x) 10K-Omh Audio-Taper Potentiometer Radioshack #271-1721
(1x) 10K-Ohm Audio Control Potentiometer with SPST Switch Radioshack #271-215
(1x) 1/8" Stereo In-Line Audio Jack Radioshack #274-274
(1x) 10.01f 50V Ceramic Disc Capacitor Radioshack # 55047551
(1x) 4.7K Ohm 1/4-Watt Carbon Film Resistor Radioshack #271-1330
(1x) 8 Pin Socket Radioshack #276-1995
(1x) LM386 Low Voltage Audio Power Amplifier Radioshack #276-1731
(2x) 220F 35V 20% Radial-lead Electrolytic Capacitor (or anything between 200 and 300 uF) Radioshack #272-1029
(1x) Arduino Uno REV 3 Radioshack #276-128
(1x) Arduino Proto Shield Radioshack #276-140
(4x) White Super-bright LED Indicator Radioshack #55050633
(4x) 740 ohm 1/4W 5% Carbon Film Resistor (1 package) Radioshack 271-1317
(1x) 300Ohm resistor
Additional Materials:
Heat Shrink Radioshack #278-1611
22 Gauge Wire Radioshack #278-1224
Solder Radioshack #64-013
Drill
Hot Glue
Glue
Black diffusor material (tissue paper, plastic, etc)
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 2: Enclosure
I decided to laser cut a custom enclosure for my project. I designed the enclosure using AutoCAD, Autodesk 123D Make, and Corel Draw, and I've included corel draw
and adobe illustrator 2D files as well as the STL, and DWG files from this process below. If you do not have access to a laser cutter, you can use my 2D files a guide and
drill the necessary holes in a project enclosure of some kind. Figure 4 shows the holes that should be drilled on the front panel:
(3x) 7mm holes for gain, freq, and PWM pots
(3x) 7mm holes for four push buttons- sin, saw, tri, and pulse
(1x) 10mm hole for audio out
I cut out shapes of all four waveforms in the front of the enclosure so that I could backlight them with indicator LEDs, you may choose to just drill four 5mm holes for these
LEDs in the front panel of the enclosure, place one LED under each momentary switch.
Also include a rectangular (11mm tall, 12mm wide) cutout somewhere on the side of the enclosure for the arduino's usb port.
I made my project enclosure out of wood, so I had to glue all the pieces (except the bottom) together with wood glue. I will attach the bottom panel on later in this
instructable.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
enclosure.stl (1 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'enclosure.stl']
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 9: IC socket
It's a good idea to use sockets for your ICs, this way you won't risk burning the IC with your soldering iron and you can easily replace the IC if it breaks. Solder an 8 pin
socket to the protoboard as shown in the image.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. made a mistake here- this should be a 300ohm resistor, not 10kOhm (ignore the
coloring)
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. remove side pin
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
import math
for x in range(0, 20000):
print str(int(127+127*math.sin(2*math.pi*x*0.00005)),)+str(","),
I stored this array in the Arduino's memory called sine20000[] and recalled the values I needed to send to the DAC. This is much faster than calculating the values
individually.
File Downloads
function_generator.ino.zip (3 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'function_generator.ino.zip']
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
Easy Atmel
Xmega Sine
Wave /
Waveform
Generator by
wandererwolf
Atmel Xmega
USB/Serial
Arbitrary
Waveform
Generator by
wandererwolf
Arbitrary
waveform
generator, for
~20$ by
legionlabs
Modified Sine
Wave Signal
Generator. by
Josehf Murchison Arduino Timer
Interrupts by
amandaghassaei
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
PC SOUNDCARD SCOPE
INTERFACE
FACILITATES
DC
RESTORATION
by ajoyraman
Oscilloscope
How To by
amandaghassaei
MiniLab 1008
and LabVIEW by
tnaqvi
Author:randofo
For years I have been telling anyone who listens that I was going to build a robotic drum. Most people kind of shrugged indifferently. Even as I built it, most people kind of
glanced over at it and conveyed doubtfulness. It seemed like no one but myself was convinced of just how awesome it was going to be.
I received a lot of snarky comments about how I was making a strange annoying noise maker. When I finally go it set up for the trial run, I quickly silenced the naysayers.
This robotic drum blew everyone away. I was finally able to convey my vision and explain why someone would ever want to build a robotic drum.
The reason to build a robotic drum is because it is plain super-awesome. It keeps a beat like clockwork. You can slow down and speed up any drum beat with precision
and ease. It can even play things a real human drummer could never do.
I intend to use mine for rocking out. The current plan is to program it with different drum beats and play guitar along with it.
I decided to use linear actuators (car door lock motors to be exact), and Arduinos with motor controller shields simply for ease of use and duplication. I am sure there are
other more elegant ways to interface with the motors, but this is by far the easiest.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
DrumBracketKick2.eps (1 MB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'DrumBracketKick2.eps']
DrumBracketCymbal1.eps (1 MB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'DrumBracketCymbal1.eps']
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
delay(40);
//stop
digitalWrite(8, HIGH); //Engage the Brake for Channel A
digitalWrite(9, HIGH); //Engage the Brake for Channel A
event = 0;
}
}
}
ISR(TIMER2_COMPA_vect) {
do{
if (Serial.available()){
incomingByte = Serial.read();
event = 1;
}//end if serial available
}//end do
while (Serial.available() > 8);
}
Snare Arduino:
/*
This is code for a robotic drum created by Randy Sarafan.
For more information, visit:
http://www.instructables.com/id/Arduino-Controlled-Robotic-Drum/
This example code is in the public domain.
*/
int event = 0;
int strikelegnth = 80;
int incomingByte = 0;
void setup() {
//establish motor direction toggle pins
pinMode(12, OUTPUT); //CH A -- HIGH = forwards and LOW = backwards???
pinMode(13, OUTPUT); //CH B -- HIGH = forwards and LOW = backwards???
//establish motor brake pins
pinMode(9, OUTPUT); //brake (disable) CH A
pinMode(8, OUTPUT); //brake (disable) CH B
digitalWrite(9, LOW); //ENABLE CH A
digitalWrite(8, LOW); //ENABLE CH B
Serial.begin(57600);
cli();//stop interrupts
//set timer2 interrupt every 128us
TCCR2A = 0;// set entire TCCR2A register to 0
TCCR2B = 0;// same for TCCR2B
TCNT2 = 0;//initialize counter value to 0
// set compare match register for 7.8khz increments
OCR2A = 255;// = (16*10^6) / (7812.5*8) - 1 (must be <256)
// turn on CTC mode
TCCR2A |= (1 << WGM21);
// Set CS11 bit for 8 prescaler
TCCR2B |= (1 << CS11);
// enable timer compare interrupt
TIMSK2 |= (1 << OCIE2A);
sei();//allow interrupts
}
void loop() {
if(event == 1){
if (incomingByte == 131) {
//start down
digitalWrite(9, LOW); //Disengage the Brake for Channel A
digitalWrite(12, LOW);
//Sets direction of CH A
analogWrite(3, 255);
//Moves CH A
//strike time
delay(strikelegnth);
//stop
digitalWrite(9, HIGH); //Engage the Brake for Channel A
delay(10);
//go back
digitalWrite(9, LOW); //Disengage the Brake for Channel A
digitalWrite(12, HIGH);
//Sets direction of CH A
analogWrite(3, 255);
//Moves CH A
//recoil time
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
delay(40);
//stop
digitalWrite(9, HIGH); //Engage the Brake for Channel A
event = 0;
}
if (incomingByte == 132) {
//start down
digitalWrite(8, LOW); //Disengage the Brake for Channel A
digitalWrite(13, LOW);
//Sets direction of CH A
analogWrite(11, 255);
//Moves CH A
//strike time
delay(strikelegnth);
//stop
digitalWrite(8, HIGH); //Engage the Brake for Channel A
delay(10);
//go back
digitalWrite(8, LOW); //Disengage the Brake for Channel A
digitalWrite(13, HIGH);
//Sets direction of CH A
analogWrite(11, 255);
//Moves CH A
//recoil time
delay(40);
//stop
digitalWrite(8, HIGH); //Engage the Brake for Channel A
event = 0;
}
if (incomingByte == 160) {
//start down
digitalWrite(9, LOW); //Disengage the Brake for Channel A
digitalWrite(12, LOW);
//Sets direction of CH A
analogWrite(3, 255);
//Moves CH A
digitalWrite(8, LOW); //Disengage the Brake for Channel A
digitalWrite(13, LOW);
//Sets direction of CH A
analogWrite(11, 255);
//Moves CH A
//strike time
delay(strikelegnth);
//stop
digitalWrite(8, HIGH); //Engage the Brake for Channel A
digitalWrite(9, HIGH); //Engage the Brake for Channel A
delay(10);
//go back
digitalWrite(9, LOW); //Disengage the Brake for Channel A
digitalWrite(12, HIGH);
//Sets direction of CH A
analogWrite(3, 255);
//Moves CH A
digitalWrite(8, LOW); //Disengage the Brake for Channel A
digitalWrite(13, HIGH);
//Sets direction of CH A
analogWrite(11, 255);
//Moves CH A
//recoil time
delay(40);
//stop
digitalWrite(8, HIGH); //Engage the Brake for Channel A
digitalWrite(9, HIGH); //Engage the Brake for Channel A
event = 0;
}
}
}
ISR(TIMER2_COMPA_vect) {
do{
if (Serial.available()){
incomingByte = Serial.read();
event = 1;
}//end if serial available
}//end do
while (Serial.available() > 8);
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
int event = 0;
int strikelegnth = 80;
int incomingByte = 0;
void setup() {
//establish motor direction toggle pins
pinMode(12, OUTPUT); //CH A -- HIGH = forwards and LOW = backwards???
pinMode(13, OUTPUT); //CH B -- HIGH = forwards and LOW = backwards???
//establish motor brake pins
pinMode(9, OUTPUT); //brake (disable) CH A
pinMode(8, OUTPUT); //brake (disable) CH B
digitalWrite(9, LOW); //ENABLE CH A
digitalWrite(8, LOW); //ENABLE CH B
Serial.begin(57600);
cli();//stop interrupts
//set timer2 interrupt every 128us
TCCR2A = 0;// set entire TCCR2A register to 0
TCCR2B = 0;// same for TCCR2B
TCNT2 = 0;//initialize counter value to 0
// set compare match register for 7.8khz increments
OCR2A = 255;// = (16*10^6) / (7812.5*8) - 1 (must be <256)
// turn on CTC mode
TCCR2A |= (1 << WGM21);
// Set CS11 bit for 8 prescaler
TCCR2B |= (1 << CS11);
// enable timer compare interrupt
TIMSK2 |= (1 << OCIE2A);
sei();//allow interrupts
}
void loop() {
if(event == 1){
if (incomingByte == 133) {
//start down
digitalWrite(9, LOW); //Disengage the Brake for Channel A
digitalWrite(12, LOW);
//Sets direction of CH A
analogWrite(3, 255);
//Moves CH A
//strike time
delay(strikelegnth);
//stop
digitalWrite(9, HIGH); //Engage the Brake for Channel A
delay(10);
//go back
digitalWrite(9, LOW); //Disengage the Brake for Channel A
digitalWrite(12, HIGH);
//Sets direction of CH A
analogWrite(3, 255);
//Moves CH A
//recoil time
delay(40);
//stop
digitalWrite(9, HIGH); //Engage the Brake for Channel A
event = 0;
}
if (incomingByte == 134) {
//start down
digitalWrite(8, LOW); //Disengage the Brake for Channel A
digitalWrite(13, LOW);
//Sets direction of CH A
analogWrite(11, 255);
//Moves CH A
//strike time
delay(strikelegnth);
//stop
digitalWrite(8, HIGH); //Engage the Brake for Channel A
delay(10);
//go back
digitalWrite(8, LOW); //Disengage the Brake for Channel A
digitalWrite(13, HIGH);
//Sets direction of CH A
analogWrite(11, 255);
//Moves CH A
//recoil time
delay(40);
//stop
digitalWrite(8, HIGH); //Engage the Brake for Channel A
event = 0;
}
if (incomingByte == 176) {
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
//start down
digitalWrite(9, LOW); //Disengage the Brake for Channel A
digitalWrite(12, LOW);
//Sets direction of CH A
analogWrite(3, 255);
//Moves CH A
digitalWrite(8, LOW); //Disengage the Brake for Channel A
digitalWrite(13, LOW);
//Sets direction of CH A
analogWrite(11, 255);
//Moves CH A
//strike time
delay(strikelegnth);
//stop
digitalWrite(8, HIGH); //Engage the Brake for Channel A
digitalWrite(9, HIGH); //Engage the Brake for Channel A
delay(10);
//go back
digitalWrite(9, LOW); //Disengage the Brake for Channel A
digitalWrite(12, HIGH);
//Sets direction of CH A
analogWrite(3, 255);
//Moves CH A
digitalWrite(8, LOW); //Disengage the Brake for Channel A
digitalWrite(13, HIGH);
//Sets direction of CH A
analogWrite(11, 255);
//Moves CH A
//recoil time
delay(40);
//stop
digitalWrite(8, HIGH); //Engage the Brake for Channel A
digitalWrite(9, HIGH); //Engage the Brake for Channel A
event = 0;
}
}
}
ISR(TIMER2_COMPA_vect) {
do{
if (Serial.available()){
incomingByte = Serial.read();
event = 1;
}//end if serial available
}//end do
while (Serial.available() > 8);
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
sei();//allow interrupts
}
void loop() {
if(event == 1){
if (incomingByte == 135) {
//start down
digitalWrite(9, LOW); //Disengage the Brake for Channel A
digitalWrite(12, LOW);
//Sets direction of CH A
analogWrite(3, 255);
//Moves CH A
//strike time
delay(strikelegnth);
//stop
digitalWrite(9, HIGH); //Engage the Brake for Channel A
delay(10);
//go back
digitalWrite(9, LOW); //Disengage the Brake for Channel A
digitalWrite(12, HIGH);
//Sets direction of CH A
analogWrite(3, 255);
//Moves CH A
//recoil time
delay(40);
//stop
digitalWrite(9, HIGH); //Engage the Brake for Channel A
event = 0;
}
if (incomingByte == 136) {
//start down
digitalWrite(8, LOW); //Disengage the Brake for Channel A
digitalWrite(13, LOW);
//Sets direction of CH A
analogWrite(11, 255);
//Moves CH A
//strike time
delay(strikelegnth);
//stop
digitalWrite(8, HIGH); //Engage the Brake for Channel A
delay(10);
//go back
digitalWrite(8, LOW); //Disengage the Brake for Channel A
digitalWrite(13, HIGH);
//Sets direction of CH A
analogWrite(11, 255);
//Moves CH A
//recoil time
delay(40);
//stop
digitalWrite(8, HIGH); //Engage the Brake for Channel A
event = 0;
}
if (incomingByte == 192) {
//start down
digitalWrite(9, LOW); //Disengage the Brake for Channel A
digitalWrite(12, LOW);
//Sets direction of CH A
analogWrite(3, 255);
//Moves CH A
digitalWrite(8, LOW); //Disengage the Brake for Channel A
digitalWrite(13, LOW);
//Sets direction of CH A
analogWrite(11, 255);
//Moves CH A
//strike time
delay(strikelegnth);
//stop
digitalWrite(8, HIGH); //Engage the Brake for Channel A
digitalWrite(9, HIGH); //Engage the Brake for Channel A
delay(10);
//go back
digitalWrite(9, LOW); //Disengage the Brake for Channel A
digitalWrite(12, HIGH);
//Sets direction of CH A
analogWrite(3, 255);
//Moves CH A
digitalWrite(8, LOW); //Disengage the Brake for Channel A
digitalWrite(13, HIGH);
//Sets direction of CH A
analogWrite(11, 255);
//Moves CH A
//recoil time
delay(40);
//stop
digitalWrite(8, HIGH); //Engage the Brake for Channel A
digitalWrite(9, HIGH); //Engage the Brake for Channel A
event = 0;
}
}
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
ISR(TIMER2_COMPA_vect) {
do{
if (Serial.available()){
incomingByte = Serial.read();
event = 1;
}//end if serial available
}//end do
while (Serial.available() > 8);
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
ISR(TIMER2_COMPA_vect) {
do{
if (Serial.available()){
incomingByte = Serial.read();
event = 1;
}//end if serial available
}//end do
while (Serial.available() > 8);
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
//stop
digitalWrite(8, HIGH); //Engage the Brake for Channel A
digitalWrite(9, HIGH); //Engage the Brake for Channel A
delay(10);
//go back
digitalWrite(9, LOW); //Disengage the Brake for Channel A
digitalWrite(12, HIGH);
//Sets direction of CH A
analogWrite(3, 255);
//Moves CH A
digitalWrite(8, LOW); //Disengage the Brake for Channel A
digitalWrite(13, HIGH);
//Sets direction of CH A
analogWrite(11, 255);
//Moves CH A
//recoil time
delay(40);
//stop
digitalWrite(8, HIGH); //Engage the Brake for Channel A
digitalWrite(9, HIGH); //Engage the Brake for Channel A
event = 0;
}
}
}
ISR(TIMER2_COMPA_vect) {
do{
if (Serial.available()){
incomingByte = Serial.read();
event = 1;
}//end if serial available
}//end do
while (Serial.available() > 8);
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
Related Instructables
How to use
Automator by
benthekahn
RoboBrrd by
RobotGrrl
How To Enter
Instructables
and
RoboGames
Robot Contest
by Contest Robot
mindstorms,
Robo hand!
(Photos) by
randomdude2
Reinventing
your free
Innoventions
'Fantastic
Plastics Works'
robot to glow by
remainseated
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Cleaning a 1st
or 2nd
Generation
Roomba by
trebuchet03
Plexi Bot:
Wireless
Robotic Arm by
Mangokid
Strawberry
Picking Robots
Leasing Agency
(video) by
strawber
Author:amandaghassaei
amandaghassaei.com
Currently working for instructables!
PARTS LIST
(1x) Arduino Uno REV 3 Radioshack 276-128
(7x) 10K Ohm 1/4-Watt Carbon Film Resistor (2 packages) Radioshack #271-1335
(9x) 20K Ohm 1/4-Watt Carbon Film Resistor (2 packages)
(1x) 1K Ohm 1/4-Watt Carbon Film Resistor Radioshack 271-1321
(1x) 50K-Ohm Linear-Taper Potentiometer Radioshack #271-1716
(1x) 10KOhm Audio Control Potentiometer with SPST Switch Radioshack #271-215 (this will be used to control volume and turn the device on/off)
(5x) 0.25" Knurled Knob Radioshack 274-424
(2x) 9V Alkaline Battery Radioshack #23-866
(2x) Heavy-Duty 9V Snap Connectors Radioshack #270-324
(1x) PC Board with Copper Radioshack #276-147
(1x) SPST PC-Mountable Submini Toggle Switch Radioshack #275-645
(2x) Male Header Pins Jameco 103393
(3x) 8 pin socket Radioshack 276-1995
(1x) TL082 Wide Dual JFET Input Op Amp Radioshack 276-1715
(3x) 100K Ohm 1/4-Watt Carbon Film Resistor (1 package) Radioshack 271-1347
(1x) 10uF electrolytic capacitor
(1x) 47nF capacitor
(3x) 0.1uf capacitor Radioshack 55047557
(2x) 1M-Ohm Linear Taper Potentiometer Radioshack 271-211
(1x) 1MOhm logarithmic potentiometer
(1x) male header pins Jameco 103393
(1x) 10K-Ohm Linear-Taper Potentiometer Radioshack 271-1715
(1x) DPDT Flatted Metal Lever Toggle Switch Radioshack 275-636
(2x) 1/4" stereo jack Radioshack 274-141 or Radioshack 274-312
(2x) 5mm High-Brightness White LED (1 package) Radioshack 276-017
(2x) 100 ohm 1/4W 5% Carbon Film Resistor Radioshack 271-1311
(2x) TS922IN Dual Op Amp Digikey 497-3049-5-ND (one TS924 would also work, but they are not available on digikey at the moment)
Additional Materials:
22 Gauge Wire Radioshack #278-1224
Solder Radioshack #64-013
sand paper
plywood
wood glue
hot glue
screws
Download Arduino IDE
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 1: Schematic
I've broken the schematic into three parts so it is easier to understand.
The first schematic shows the audio out circuit. This project outputs audio through an 8 bit R2R digital to analog converter through Arduino digital pins 0-7. This signal is
sent through an amplifier, a low pass filter, and a volume control pot before being sent out to speakers.
The second schematic shows the mic input circuit. The line in the from the mic is sent through an amplifier and a DC offset circuit before being sent into the Arduino via
analog input pin A0.
The third schematic shows how all the controls of the effects box are connected to the Arduino. There are two LED indicators in this project: one clipping indicator and
one output indicator. Three pots on the device control grain size, pitch, and wet/dry mix and a switch controls the direction of sample playback (forward or reverse).
Image Notes
1. signal out
2. I've omitted a voltage divider in this schematic, if you want to drive headphones
directly you should add a voltage divider here. see step 10 for more info.
3. 8 bit R2R DAC
Image Notes
1. unused op amp in dual op amp package
2. microphone mono input
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. pots
2. reverse switch
3. clipping indicator
4. output indicator
Image Notes
1. pins to digital pins 8-13 were bent for better fit
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Some info about the code- basically what I've done here is set up a timer interrupt that increments the variable t at a frequency of 40kHz. Once t reaches 627 it resets
back to zero (this happens with a frequency of 40,000/628 = 63Hz). Meanwhile, in the main loop the Arduino sends a value between 0 (00000000 in binary) and 255
(11111111 in binary) to digital pins 0 through 7 (PORTD ). It calculates this value with the following equation:
PORTD=byte(127+127*sin(2*t/100));
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
So as t increments from 0 to 627 the sine function moves through one complete cycle. The value sent to PORTD is a sine wave with frequency 63Hz and amplitude 127,
oscillating around 127. The DAC translates this to a voltage between 0 and 5V, where a 0 sent to PORTD equals 0V and a 255 sent to PORTD equals 5V.
Image Notes
1. volts/div = 2
time/div = 5ms
Image Notes
1. signal out
2. I've omitted a voltage divider in this schematic, if you want to drive headphones
directly you should add a voltage divider here. see step 10 for more info.
3. 8 bit R2R DAC
Image Notes
1. pin 3- from DAC
2. pin 4- ground
3. pin8- 5V
Image Notes
1. connect pins 1 and 2
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. connect middle pin from pot to pin 5
2. connect red lead from pot to pin 1
3. connect ground from pot to ground/pin4
Image Notes
1. connects pins 6 and 7
Image Notes
1. connection to pot
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. connect ground to pin 4
2. connect 5V to pin 8
Image Notes
1. 10kOhm resistor connects to pin 7 of first TS922IN
2. Connect a 2kOhm resistor to 10kOhm
3. connect 2kOhm resistor to ground
Image Notes
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
1. signal out
2. I've omitted a voltage divider in this schematic, if you want to drive headphones
directly you should add a voltage divider here. see step 10 for more info.
3. 8 bit R2R DAC
Image Notes
1. 1kOhm resistor connected to voltage divider junction
2. 0.01uF capacitor connected to ground
3. filtered signal out
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. wire connecting two non-inverting inputs of the dual op amp.
2. wire connecting the two outputs from both op amps.
Image Notes
1. solder inverting input to output
2. solder inverting input to output
Image Notes
1. from end of 100uF capacitor to audio jack
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. ground
2. signal out
Image Notes
1. signal out
2. I've omitted a voltage divider in this schematic, if you want to drive headphones
directly you should add a voltage divider here. see step 10 for more info.
3. 8 bit R2R DAC
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. unused op amp in dual op amp package
2. microphone mono input
Image Notes
1. amplified signal oscillates between -2.5 and 2.5 V
Image Notes
1. signal directly from microphone has a relatively small amplitude
Image Notes
1. DC offset moves midpoint of signal to 2.5V
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. switch #1
2. switch #2
Image Notes
1. wire red ends to one side of each switch
Image Notes
1. solder red leads to middle lead on each switch
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. center tap
Image Notes
1. center tap
Image Notes
1. from arduino ground
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. unclip this lead- it is not necessary for a mono microphone
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. ground wire from 1/4" jack
2. green wire from 1/4" jack
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. pot wired as a variable resistor, with resistance between 0 and 10kOhms
2. B signifies linear taper
3. 10kOhm resistance
Image Notes
1. one side of pot to ground
2. other side to pin 6
Image Notes
1. lead to pin 7 of socket
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. connect 47nf capacitor to ground (I connected to the grounded portion of my
DAC)
2. DAC
Image Notes
1. two 100kOhm resistors
Image Notes
1. voltage divider connects to junction between two capacitors
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. output from dac shown in yellow
Image Notes
1. each grid division represents 250us gjkhkjhkjhk jkjkljk jkljkljkj jkljkjkj jkljkjlkj j jklkj
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. amplified mic signal and dac signal compared side by side
Image Notes
1. dac signal has a lag of about 125us
Image Notes
1. no signal from mic outputs a steady 2.5V from dac
Image Notes
1. my best sine wave impression
Step 27:
In the code below I bypassed the function analogRead() in order to increase my sampling rate. I manually set the ADC counter to 500kHz and read an 8 bit value from
analog input 0 from the ADCH directly. I set the ADC counter to 500kHz because the ADC takes 13 clock cycles to read a new analog value. 500/13 = 38.5kHz which
gets me pretty close to 40kHz (standard audio sampling rate) without introducing extra noise.
//Audio out with 38.5kHz sampling rate
//by Amanda Ghassaei
//http://www.instructables.com/id/Arduino-Vocal-Effects-Box/
//July 2012
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
*/
void setup(){
DDRD=0xFF;//set port d (digital pin s0-7) as outputs
DDRC=0x00;//set all analog pins as inputs
//set up continuous sampling of analog pin 0
//clear ADCSRA and ADCSRB registers
ADCSRA = 0;
ADCSRB = 0;
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
|=
|=
|=
|=
(1
(1
(1
(1
<<
<<
<<
<<
}
void loop(){
PORTD = ADCH;//send 8 bit value from analog pin 0 to DAC
}
In the code below I triggered the output to the DAC via the ADC interrupt. This interrupt is similar to other Arduino timer interrupts , but it only executed when a new ADC
value has been reached (in this case at a rate of ~38.5kHz, or every 26us). The output of the code below is exactly the same as the code above, but it will be more
convenient to use the interrupt code moving forward.
//Audio out with 38.5kHz sampling rate and interrupts
//by Amanda Ghassaei
//http://www.instructables.com/id/Arduino-Vocal-Effects-Box/
//July 2012
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
*/
void setup(){
DDRD=0xFF;//set port d (digital pin s0-7) as outputs
DDRC=0x00;//set all analog pins as inputs
cli();//diable interrupts
//set up continuous sampling of analog pin 0
//clear ADCSRA and ADCSRB registers
ADCSRA = 0;
ADCSRB = 0;
ADMUX |= (1 << REFS0); //set reference voltage
ADMUX |= (1 << ADLAR); //left align the ADC value- so we can read highest 8 bits from ADCH register only
ADCSRA
ADCSRA
ADCSRA
ADCSRA
ADCSRA
|=
|=
|=
|=
|=
(1
(1
(1
(1
(1
<<
<<
<<
<<
<<
sei();//enable interrupts
}
ISR(ADC_vect) {//when new ADC value ready
PORTD = ADCH;//send 8 bit value from analog pin 0 to DAC
}
void loop(){
}
Image Notes
1. ~26us per sample at 38.5kHz
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. set 32 prescaler for 16Mhz/32 = 500kHz ADC counter
|=
|=
|=
|=
|=
(1
(1
(1
(1
(1
<<
<<
<<
<<
<<
sei();//enable interrupts
}
ISR(ADC_vect) {//when new ADC value ready
incomingAudio = ADCH;
if (rec){
if (toggle){
buffer1[i] = incomingAudio;//store incoming
PORTD = buffer2[iscale];//send out DAC
}
else{
buffer2[i] = incomingAudio;//store incoming
PORTD = buffer1[iscale];//send out DAC
}
}
else{
if (toggle){
PORTD = buffer2[iscale];//send out DAC
}
else{
PORTD = buffer1[iscale];//send out DAC
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
}
i += 1;
iscale = i/scale;
if (i==limit){
rec = 0;//stop recording
}
if (i == (limit*scale)){
i = 0;
iscale = 0;
toggle^=1;
rec = 1;
}
}
void loop(){
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. to 5V
2. to ground
3. to arduino input pin
Image Notes
1. 100ohm current limiting resistor
Image Notes
1. cover anode with shrinkwrap
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. 100ohm current limiting resistor
Image Notes
1. cover anode with shrinkwrap
Image Notes
1. predrill backers to screw back panel to
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
|=
|=
|=
|=
|=
(1
(1
(1
(1
(1
<<
<<
<<
<<
<<
sei();//enable interrupts
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
grainPot++;
}
if (grainPot < 1){
grainPot = 1;
}
else if (grainPot > 20){
grainPot = 20;
}
newGrain = grainPot*25;
}
void checkWetDry(){
PORTB & 239;//set pin 12 low
wetDryPot = 0;
while(digitalRead(12)){
wetDryPot++;//from 0 to ~185
}
if (wetDryPot < 10){
wetDryPot = 0;
}
else if (wetDryPot > 160){
wetDryPot = 160;
}
newWetDry = wetDryPot/10;//scale down to 16
}
void checkRev(){//check reverse switch
if (digitalRead(9)){
newForward = 1;
}
else{
newForward = 0;
}
}
void loop(){
if (clipping){//if currently clipping
if (clippingCounter<=0){//if enough time has passed since clipping
clipping = 0;//not currently clipping
PORTB & 223;//turn off clipping led indicator (pin 13)
}
}
DDRB=0xFD;//set pins 10-12 as outputs
PORTB |= 28;//set pins 10-12 high
delay(1);//wait for capacitor to discharge
checkRev();//check reverse switch
DDRB= 0xE1;//set pins 10-12 as inputs
checkScale();
checkGrainSize();
checkWetDry();
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
Portable Mini
Vocal Booth by
humanworkshop
Possessed
Little Monster
by jimmmm
The Lightning
Simulator/Breathalyzer/Graphic
Equalizer Arduino
Making
Powered by
Professional
alinke
Voice Overs
using Garage
Band and
IMovie (video) by
howtomac
Remove The
Lyrics From
MOST Songs by
DancerBoi
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Making a "SoftVocal"
Instrumental in
Audacity by
Hoboman
SquawkBox - an
algorithmic beat
box using a toy
voice recorder
by darwingrosse
Designing
Awesome
Videogame
Audio by helava
Author:amandaghassaei
amandaghassaei.com
Currently working for instructables!
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 1: Schematic
The schematic above shows how simple this project is. A 9V battery and switch are connected in series to the Vin and ground pins of the Arduino- this is the power
supply for the project. The Arduino supplies power to two pins of the compass module (see note in the image above) and analog pins A4 and A5 are used to receive data
from the compass module. the piezo buzzer is controlled by Arduino digital pin 7.
Image Notes
1. pins to compass module
2. piezo buzzer
3. power switch
4. 9V battery
Image Notes
1. header pins
2. header pins
// Power up delay
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Wire.write(byte(0x02));
Wire.write(byte(0x00));
Wire.endTransmission();
}
void loop() {
int x, y, z;
// Initiate communications with compass
Wire.beginTransmission(Addr);
Wire.write(byte(0x03));
// Send request to X MSB register
Wire.endTransmission();
Wire.requestFrom(Addr, 6);
// Request 6 bytes; 2 bytes per axis
if(Wire.available() <=6) {
// If 6 bytes available
x = Wire.read() << 8 | Wire.read();
z = Wire.read() << 8 | Wire.read();
y = Wire.read() << 8 | Wire.read();
}
// Print raw values
Serial.print("X=");
Serial.print(x);
Serial.print(", Y=");
Serial.print(y);
Serial.print(", Z=");
Serial.println(z);
delay(500);
}
Image Notes
1. follow these pin labels
2. direction indicators
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 6: Firmware
Here is the final firmware. I chose the values of xVal, yVal, and zVal based on the output I saw from the code from step 3 when I had the +x direction pointed vertically up,
and the -y direction pointed towards north and parallel to the ground. You might find that different values work better for you. When the incoming directional values from
the compass module equal the values of xVal, yVal, and zVal, the Arduino turns the piezo buzzer on. The variable "tolerance" sets the sensitivity of the device, you may
want to increase or decrease this depending on what you like.
The piezo buzzer automatically buzzes at ~1Hz. You can upload the code below if you want to hear the full buzzing potential of the buzzer.
#include <Wire.h>
#define Addr 0x1E
boolean buzzer = 0;
//storage variable for direction
int x;
int y;
int z;
//calibrate these
int xVal = -185;
int yVal = 300;
int zVal = -115;
int tolerance = 90;//adjust to change sensitivity
void setup() {
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Wire.begin();
Serial.begin(9600);
// Set operating mode to continuous
Wire.beginTransmission(Addr);
Wire.write(byte(0x02));
Wire.write(byte(0x00));
Wire.endTransmission();
pinMode(7,OUTPUT);
}
void loop() {
Serial.print("X=");
Serial.print(x);
Serial.print(", Y=");
Serial.print(y);
Serial.print(", Z=");
Serial.println(z);
// Initiate communications with compass
Wire.beginTransmission(Addr);
Wire.write(byte(0x03));
// Send request to X MSB register
Wire.endTransmission();
Wire.requestFrom(Addr, 6);
// Request 6 bytes; 2 bytes per axis
if(Wire.available() <=6) {
// If 6 bytes available
x = Wire.read() << 8 | Wire.read();
z = Wire.read() << 8 | Wire.read();
y = Wire.read() << 8 | Wire.read();
}
if (abs(xVal-x)<tolerance){//
if (abs(yVal-y)<tolerance){
if (abs(zVal-z)<tolerance){
buzzer = 1;
}
else{
buzzer = 0;
}
}
else{
buzzer = 0;
}
}
else{
buzzer = 0;
}
if (buzzer){
digitalWrite(7,HIGH);
}
else{
digitalWrite(7,LOW);
}
delay(500);
}
I found this buzzing to be a bit much so I pulsed power on and off to the buzzer to quiet it a bit. See the code below:
#include <Wire.h>
#define Addr 0x1E
boolean buzzer = 0;
//storage variable for direction
int x;
int y;
int z;
//calibrate these
int xVal = -185;
int yVal = 300;
int zVal = -115;
int tolerance = 90;//adjust to change sensitivity
void setup() {
Wire.begin();
Serial.begin(9600);
// Set operating mode to continuous
Wire.beginTransmission(Addr);
Wire.write(byte(0x02));
Wire.write(byte(0x00));
Wire.endTransmission();
pinMode(7,OUTPUT);
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
void loop() {
Serial.print("X=");
Serial.print(x);
Serial.print(", Y=");
Serial.print(y);
Serial.print(", Z=");
Serial.println(z);
// Initiate communications with compass
Wire.beginTransmission(Addr);
Wire.write(byte(0x03));
// Send request to X MSB register
Wire.endTransmission();
Wire.requestFrom(Addr, 6);
// Request 6 bytes; 2 bytes per axis
if(Wire.available() <=6) {
// If 6 bytes available
x = Wire.read() << 8 | Wire.read();
z = Wire.read() << 8 | Wire.read();
y = Wire.read() << 8 | Wire.read();
}
if (abs(xVal-x)<tolerance){
if (abs(yVal-y)<tolerance){
if (abs(zVal-z)<tolerance){
buzzer = 1;
}
else{
buzzer = 0;
}
}
else{
buzzer = 0;
}
}
else{
buzzer = 0;
}
if (buzzer){
digitalWrite(7,HIGH);
delay(100);
digitalWrite(7,LOW);
}
delay(500);
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. fasten the arduino down with 4 nuts and bolts
Image Notes
1. the x axis of the parallax chip should be parallel to the long edge of the
project enclosure
Image Notes
1. Attach the 9V battery holder securely to the bottom of the project enclosure
with a 4-40 x 3/8" nut and bolt.
Image Notes
1. use two nuts and bolts to fasten the piezo buzzer to the enclosure lid
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 9:
Secure the lid of the enclosure with 4 screws.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
Arduino Bike
Speedometer by
amandaghassaei
Steampunk
Geocaching by
r10n
ServerBot - for
serving food
and drinks by
JoeCreate
Wiring and
programming
the Parallax
RFID Serial
Card Reader for
the Arduino by
Kev_MacD
How to Navigate
with a Map and
Compass by
zwild1
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Portable Sun
Tracking Solar
Panel With A
Windup Clock
Drive by
shastalore
AlleyCats:
Treasure Hunts
On Your
Bicycle. by
Gareth0123
Author:audreyobscura audreyObscura.com
i work at instructables! i make things with technology, eat pho, and play electric ukulele.
As a an avid photographer, I carry two things on me constantly - my phone and my camera. Once I discovered there was a way for me to use my iPhone as a camera
remote with the DSLRbot app, I knew I could easily build my own remote trigger for my DSLR with Radio Shack parts.
Step 1: Materials
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
Remote Canon
DSLR Video
Trigger by herx
See Infrared
LED Light with
an iPhone 4... by
TechShopJim
Long-Range
Canon DSLR
Video Trigger
(V2, greatly
simplified) by
herx
Increase The
Sensitivity of IR
Remote Control
by bustatech
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Nightlight IR
Detector Hack
(Photos) by
yardleydobon
IR
Detector by
comodore
Wired Remote
Control for
Sony NEX 5n
Camera by
JacePriester
Earthquake Detector
by audreyobscura on July 18, 2012
Author:audreyobscura audreyObscura.com
i work at instructables! i make things with technology, eat pho, and play electric ukulele.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
earthquakeforweb.eps (8 MB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'earthquakeforweb.eps']
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. 9V
2. 9V3. GND rail
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. to positive lead of the LED
2. to positive lead of buzzer
Step 12: Assemble the enclosure & Sink the magnet to the relay coil into the tube.
I built out the bottom of the enclosure, and then set in the lid with components attached to the bottom. I then ripped off all of the paper that was protecting the enclosure
from oils and scratches
I punched a small hole in the lid of the acrylic tube with a nail, and then ran the lamp chain with a magnet hot-glued to it so that the magnet just hovered over the relay
coil. You want to hang the magnet so that it almost touches, you can see that it wants to stick to the relay, but it doesn't actually magnetize to the component.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
Build a
Pendulum
Seismometer
for under $15 by
bikeframe
Arduino
Seismic Activity
Monitor Ethernet Shield
by veedo
Acoustic Guitar
Diy Piezo
Pickups by
rbneville
Bicycle North
Indicator by
amandaghassaei
cheap, supersensitive
digitizing probe
for cnc...
harkman's
probe (Photos)
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Laser Beam
Alarm System
by norbizzle12
A magnetic field
strenght audible
indicator by
5Volt
Insect
Eavesdropper:
Creating a HighGain Parabolic
Microphone by
nevdull
by harkman
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/