18 More Instructables
18 More Instructables
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Disclaimer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Step 3: Solder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Step 4: Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Step 5: Drill . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Arduino Xylophone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Step 3: Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 18: Firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
Step 9: Wire your circuit to the LEDs on the plate, connect your switches. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 19: Hind legs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177
Step 15: Solder in the resistors for photo resistor, tactile switch, and SPDT switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 26: Last Few Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .261
Step 9: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .359
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 6: Solder the 741 op Amps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375
Step 12: Assemble the enclosure & Sink the magnet to the relay coil into the tube. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .378
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Author and Copyright Notices
Instructable: Arduino Guitar Pedal
Author: randofo
License: Attribution-NonCommercial-ShareAlike (by-nc-sa)
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/
Arduino Guitar Pedal
by randofo on February 29, 2012
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/
(x1) Enercell Alkaline 9 Volt Battery (Radioshack #25-853 )
(x1) Box 'BB' Size Orange Powder Coat (Small Bear #0301G )
(x1) DPDT Stomp switch (Small Bear #0203 )
(x1) 1/8" x 6" x 6" rubber mat
(x1) 1/8" x 12" x 12" cork mat
An easy way to do this is to insert the end of the strip into each of the Arduino sockets and then snap off the excess pins. You will end up with 4 strips of proper size.
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.
(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.
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/
Step 6: Wire the pots
Attach three 6" wires to each of the potentiometers.
For simplicity's sake, you should attach a black ground wire to the pin on the left, a green signal wire to the pin in the middle, and a red power wire to the pin on the right.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 7: Wire the Rotary Switch
Attach a 6" black wire to one of the inner pins.
Next, attach 6" red wires to the 3 outer pins both to the immediate left and right of the black inner pin.
To be sure you did this right, you may consider testing the connections with a multimeter.
For now, while building the circuit, do not worry about the potentiometers, rotary switch, bypass switch, and input jacks.
To better understand what you are doing, this circuit consists of a few different parts:
Preamp
The preamp uses one of the two op amps packaged in the TL082. The preamp is both boosting the guitar signal to line level and inverting the signal. When it comes out
of the op amp the signal is split between the Arduino input and the "clean" volume knob for the mixer.
Arduino Input
The input for the Arduino was copied from Kyle's input circuit . It is basically taking the audio signal from the guitar and constraining it to roughly 1.2V, because the aref
voltage within the Arduino has been configured to look for an audio signal in this range. The signal is then being sent to analog pin 0 on the Arduino. From here, the
Arduino is then converting this to a digital signal using its built in ADC. This is a processor intensive activity and where most of the Arduino's resources are being
allocated.
You can get a faster conversion rate and do more multiprocessing of the audio signal using timer interrupts. To learn more about that, check out this page on Arduino
Real-Time Audio Processing .
Arduino
The Arduino is where all of the fancy-shmancy digital signal processing is happening. I'll explain a bit more about the code later. For now, in relation to the hardware,
what you need to know is that there is both a 100k potentiometer connected to analog pin 3 and a 6-position rotary switch connected to analog pin 2.
The 6-position rotary switch is functioning in a similar way to a potentiometer, but rather than sweeping through a resistance range, each pin has a discrete resistance
associated with it. As you select different pins, voltage dividers of different values are created.
Since the analog reference voltage had to be remapped to handle the incoming audio signal, it is important to use aref as the voltage source, as opposed to the standard
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
5V for both the rotary switch and the potentiometer.
Arduino Output
The Arduino output is only loosely based on Kyle's circuit. The part I kept was the weighted pin approach to get the Arduino to output 10-bit audio using only 2 pins. I
stuck with his suggested weighted resistor ratings of 1.5K as the 8-bit value and 390K as the added 2-bit value (which is basically 1.5K x 256). From there I scrapped the
rest. His output stage components were unnecessary because the audio was not going to an output, but rather to the new audio mixer stage.
Mixer Output
The effects output from the Arduino goes to a 100K pot connected to the audio mixer op amp. This pot is then used in conjunction with the clean signal coming from the
other 100K potentiometer to mix the volume of the two signals together in the op amp.
The second op amp on the TL082 is both mixing the audio signals together, and inverting the signal once again to get it back in phase with the original guitar signal. From
here the signal goes through a 1uF DC blocking capacitor and finally to the output jack.
Bypass Switch
The bypass switch toggles between the effects circuit and the output jack. In other words, it either routes the incoming audio to the TL082 and the Arduino, or skips all of
this entirely and sends the input straight to the output jack without any altering. In essence, it bypasses the effects (and hence, is a bypass switch).
I have included the Fritzing file for this circuit if you want to look at it closer. The breadboard view and schematic view should be relatively accurate. However, the PCB
view has not been touched and probably will not work at all. This file does not include the input and output jacks.
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 9: Cut Brackets
Cut out two brackets using the template file attached to this step. They both should be cut out of non-conductive material.
I cut out the larger base bracket out of a thin cork mat and the smaller potentiometer bracket out of 1/8" rubber.
Insert the potentiometers up through the rubber bracket and the 9/32" holes in the case and lock them firmly in place with nuts.
Install the rotary switch in the same fashion in the larger 5/16" hole.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 11: Trim
If you use long shaft potentiometers or rotary switches, trim them down such that the shafts are 3/8" long.
I used a Dremel with a metal cutting wheel, but a hacksaw will do the job too.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 12: Switch
Insert the foot switch into the larger 1/2" hole and lock it in place with its mounting nut.
The way this works is that when mono plugs are inserted into each of the jacks, it connects the batteries ground connection (which is connected to the stereo tab) with the
ground connection on the barrel. So, only when both jacks are inserted can ground flow from the battery to the Arduino and completed the circuit.
To make this work, first connect together the ground tabs on each jack with a short piece of wire.
Next, connect the black wire from the battery snap to one of the stereo audio tabs. This is the smaller tab that touches the jack about halfway up the plug.
Connect a 6" black wire to the other stereo tab on the other jack.
Lastly, connect a 6" red wire to the mono tabs on each of the jacks. This is the large tab that touches the tip of the male mono plug.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 14: Insert jacks
Insert the two audio jacks into the two holes in the side of the case and lock them in place with their mounting nuts.
Once installed, check that none of the metal tabs on the jack are touching the body of the potentiometers. Make adjustments as necessary.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 15: Wire the switch
Wire one of the outer pairs of the DPDT stomp switch together.
Wire one of the jacks to one of the center pins on the switch. Wire the other jack to the other center pin.
Connect a 6" wire to each of the remaining outer pins on the switch.
The wire that is in line with the jack on the right should be the input. The wire that is in line with the switch on the left should be the output.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 18: Program
The code that this pedal is largely built upon ArduinoDSP which was written by Kyle McDonald. He did some fancy things like mess around with the registers to optimize
the PWM pins and change the analog reference voltage. To learn more about how his code is working, check out his Instructable .
One of my favorite effects on this pedal is a slight audio (distortion) delay. I was inspired to try creating a delay line after seeing this really simple code posted on Little
Scale blog.
The Arduino was not designed for real-time audio signal processing and this code is both memory and processor intensive. The code that is based on the audio delay is
especially memory intensive. I suspect the addition of a stand-alone ADC chip and external RAM will greatly improve the ability for this pedal to do awesome things.
There are 6 spots for different effects in my code, but I have only included 5. I have left a blank spot in the code for you to design and enter your own effect. That said,
you can replace any slot with any code that you wish. However, keep in mind that trying to do anything too fancy will overwhelm the chip and keep anything from
happening.
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/
Step 19: Attach
Attach the Arduino to the shield inside the case.
Carefully situate the battery snugly between the DPDT switch and the Arduino.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 21: Case closed
Put the lid on and screw it shut.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 23: Plug and play
Plug in your guitar to the input, connect an amp to the output, and rock out.
Related Instructables
Distortion Pedal
Helicopter - With Stutter Plush Fuzz The Fuzz of Scanner Pedal Multi-Switch
Auto Stutter Effect by Pedal by randofo 1000 Faces by Board by raxel Foot Pedal
Stompbox randofo DIY Guitar Pedal (Photos) by nsnip FET Distortion
Harrymatic Board (Effects Pedal by Cookie
(Photos) by
jakebaldwin Pedal Briefcase) Monster!
by SyllogismRXS
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
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.
Tools:
laser cutter
scissors
cotton swabs
small flat head screw driver
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 2: Free the Piezos, then solder longer leads.
For this project, I used piezo elements to detect when each note is struck on the xylophone. These piezos detect vibration, or a knock. Often the elements come in a
housing, to protect the disc from being bent or smashed - but for this project I needed to remove them from their plastic.
By gently pressing around the edges with my fingers, you could hear the glue crack apart from the plastic, I loosened the bottom of the casing. Carefully, I insterted a
precision flat-head screw driver, and popped the bottom of the case off.
The piezo element could then be removed from the outside of the housing.
Because I am using an Arduino Mega Board, I could have up to 16 Analog inputs, or 16 Piezos. I decided to just include an octave & a half, 12 notes, so I used 12
piezos.
After they were free from their case, I soldered longer wires to each piezo element, to prepare them to be inserted into the xylophone. When I was done soldering longer
leads on to each piezo, I wrapped my solder points with heat shrink or electrical tape.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 3: The Bars and Housing.
I used CorelDraw to draft vector files that would guide the laser cutter for the housing and bars of the xylophone.
The acrylic bars were each 10x2 inches. Each bar has two holes in them that will guide a machine screw through the bar, and mount to the top panel of the wooden
housing.
The wooden housing I designed is 10.5x30x3 inches. It forms a shallow box that supports the electronics embedded within it. I used woodglue and a cotton swab to
secure all of the corners, and allowed 24 hours to cure before I sanded down all of the edges.
The CorelDraw file for the base housing is attached to this step.
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/
Step 5: Attach the Bars to the top Panel.
I used 1 1/2" machine screws and nuts to secure the bars to the wooden paneling.
To prevent excessive shake or vibration on each bar, I decided to use vinyl tubing as a shock absorber on each machine screw. With 12 bars, I used 24 machine screws
and nuts, and 24 3/4" lengths of vinyl tubing. Thread the machine screw through the bar, then the vinyl, and slip it into the paneling. When the screw was through the
panel, I was able to twist on the nut to fully secure it to the panel.
All of these should only be finger-tight, to avoid stress on the paneling, or on the bar.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 6: Build the circuit.
Before connecting the piezos to the Arduino, I connected a 1-megohm resistor in parallel to the Piezo element to limit the voltage and current produced by the piezo, and
to protect the analog input ports on the Arduino. On the PCB, I marked with a permanent marker which piezo goes to each analog input port on the Arduino. I also made
the same markings on the back of the top wooden panel.
After I soldered the resistors into place, I ran a small jumper wire from one end of the resistor, to the longest rail on the PCB, and designated it my ground rail. Next, I
soldered all of the piezos' ground wires into place, in line wtih the same end of each grounded resistor. The positive lead from the piezos is soldered in to the same rail as
the other end of each resistor.
I cut 12 lengths of green wire to be my "signal wire" to the Arduino. Each signal wire is soldered into the same positive resisted rail of the piezo.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 7: Connecting to the Arduino
I took all of the signal wires, and the ground wire running from the PCB and marked each one with blue masking tape, writing which port each wire was designated to. I
then fed all of the marked single core wire into the corresponding ports of the Arduino.
All remaining Analog ports must be grounded! Otherwise it will affect your serial output from the arduino. I used 4 black wires, running from the ground rail of the PCB
directly to the open analog ports of the Mega board. (A12, A13, A14, and A15)
When you have completed your circuit, you can load the xylophone program, or sketch, onto the Arduino board from the Arduino Developing Environment .
//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
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/
Step 8: Power and communication.
The Arduino can be powered via USB, which doubles as a communication port. I ran a USB cable through the housing of the xylophone. By drilling a small hole, that was
big enough for the ends of the cable, I could hide most of the USB cord in the housing.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 9: Serial to Midi
To get the xylophone coupled with my comptuer I used software called Hairless . It converts the serial out signal from the Arduino into a MIDI signal that programs like
GarageBand, Logic, and Ableton can read and record. Be sure that the bridge is running before you try and import MIDI data from the xylophone.
Note: Disable the bridge while trying to update the sketch on the Arduino board. You cannot have the bridge running while trying to communicate to the board from the
Arduino software.
Related Instructables
Arduino playing
What is MIDI? Musical MIDI Acoustic Guitar "Puff the Magic
Arduino/Ableton Controlling Diy Piezo SNF Drumming Converting a
by Shoes by Color Organ; Cubase with MIDI Glove Dragon" on a rescued toy into
amandaghassaei thobson Pickups by piezo (video) by
MIDI controlled Arduino based using Arduino a MIDI controller
rbneville and light earthshine
(video) by _Aias MIDI by pstretz by zen.webb
sensors
(Photos) by
Bruno Ratnieks
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Persistence of Vision Wand
by amandaghassaei on March 14, 2012
Author:amandaghassaei amandaghassaei.com
Currently working for instructables!
Parts list:
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/
Step 2: Add resistors
Thread the leads of all 20 resistors through their holes on the wand mount.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 3: Solder resistors
Each resistor is connected to an LED on one side and ground on the other. Bend one of the leads of each resistor so that they are touching each other and solder them
all together in a row. Clip the excess metal from the leads. Leave the last lead unclipped so that it can be attached to a wire later.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 4: Add header pins to protoboard
Solder header pins to the pins connections on the arduino protoboard. Make sure you are soldering them on the correct side! For best results I recommend soldering the
first and last pins first (as in figure 3), then check to see if the pins are straight and flat on the board (figure 4). If they need to be adjusted it will be much easier with only
two pins soldered down. Once everything is lined up, solder the middle pins (figure 5).
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes Image Notes
1. only first and last pins soldered 1. check alignment
Image Notes
1. all pins soldered
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 6: Attach battery connections
Solder the red lead of the battery connector to the middle pin of the switch. Solder the black lead of the battery connector to the ground pin of the protoshield.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 8: Connect LEDs to arduino shield
Strip the ends of each of the LED wires and connect to the pins of the arduino proto-shield. Be sure to follow the pin connections below correctly, I've also attached the
breadboard diagram from fritzing (figure 3), the left-most LED is the top of the wand and the right is the bottom. In the schematic (figure 4) the left most LED is the bottom
and and right most is the top. You can find the fritzing file below.
Pin connections:
Top of wand
1 Digital Pin 13
2 Digital Pin 12
3 Digital Pin 11
4 Digital Pin 10
5 Digital Pin 9
6 Digital Pin 8
7 Digital Pin 7
8 Digital Pin 6
9 Digital Pin 5
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/
Step 10: Upload firmware
Download the POV wand firmware below and upload it onto your arduino board. If you have trouble uploading be sure that nothing is connected to digital pins 0 and 1
and that you have selected the correct board and serial port under the Arduino/Tools menu.
This code stores a set of binary arrays onto the arduino that generate each letter in the alphabet. When the arduino reads the message you would like to display it
compares each letter to one of its stored letters and then outputs the stored array column by column. You will insert your own message into the arduino firmware in a later
step.//POV Wand Arduino code //by Amanda Ghassaei //instructables.com/amandaghassaei //April 2012 //for use with arduino uno or duemilanove with atmel328 /* * 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. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY;
without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ //in
most of this code I have used the arduino portpin assignments to send data to pins, you can read more about how that works here:
http://www.arduino.cc/en/Reference/PortManipulation //I've also included (and commented) the standard arduino library commands that perform the same functions and
the port commands in case you are interested #include <avr/pgmspace.h>//need to store letter arrays in flash memory- or else we run out of space, more info here:
http://arduino.cc/en/Reference/PROGMEM /******************************************************************************* THIS NEXT SECTION IS WHAT YOU'LL WANT TO
EDIT TO CREATE YOUR OWN MESSAGES *******************************************************************************/ // setup String povtext = "POV";//PUT YOUR
MESSAGE HERE!!- must be in all caps, spaces are fine, no punctuation byte refreshrate = 1;//delay time for pixels to refresh in milliseconds- experiment with different
values //get length of string povtext int dimtext = povtext.length(); //letterArray to make sure firmare is loaded correctly- each led should light up in order upon turning on
boolean load[]= { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 1, }; //incoming data storage byte data1 = 0;//for portB byte data2 = 0;//for portC byte data3 = 0;//for portD //variables byte n; //variable for loops byte t; //variable
for loops byte l; //variable for loops //The letters of the alphabet- edit the look of these if you want, just make sure the letters m and w are 15 pixels wide and the rest are
12 pixels boolean letterA[] PROGMEM = { 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1,
1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 0,
0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 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, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 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, 0, 0, 0, 0, 0, 0, 1, 1, 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/
Step 12: Create your own messages
Figure one shows the line of text you will need to edit to create your own messages. Replace the worlds HELLO WORLD with any message in all caps with no
punctuation. You can create your own characters and images by generating matrices of 1s and 0s, follow the example given in figure 2, the letter J.
Related Instructables
Arduino
Persistence of Magic POV
Vision Display Wand (yet LilyPad Wrist
POV on Basic Simple POV Arduino Analog GUI Controlled (Photos) by another POV The magic wand
w/Ardweeny - Hard Drive POV Band POV by clock: a
Stamp by LED Matrix by Mr.What toy) by
Persistence of Clock (Photos) quasiben Persistence of
WyoJustin ben_k rleddington
Vision by by davidhend Vision toy ! by
duboisvb 5Volt
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Twitter Controlled Pet Feeder
by amandaghassaei on April 26, 2012
Author:amandaghassaei amandaghassaei.com
Currently working for instructables!
Parts List:
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/
Step 1: Open pet feeder
Unscrew 8 screws from the base of the pet feeder and carefully lift the bottom panel of the feeder open. There are some wires which permanently attach the bottom panel
to the body, be careful not to put too much strain on them.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 2: Unscrew pcb
Remove six small screws from control pcb. One of the screws is hidden under a small pcb on top of the main pcb. Once all the screws are removed, the pcbs should
easily lift off the plastic enclosure.
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/
Step 5: Solder wires to pcb
Solder four wires to the control pcb so each of the four exposed button traces has one wire electrically connected to it.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 6: Screw pcb back onto enclosure
Screw the control pcb back onto the feeder enclosure.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 8: Solder white LEDs and current limiting resistors
Solder two 100ohm resistors to the protoboard. One resistor should be electrically connected to the header pin for arduino digital pin 2 and the other resistor to digital pin
3 (figure 2). Bend the leads of two white LEDs and solder to the copper side of the protoboard as shown in figures 3 and 4. Solder a (red) jumper wire between each of
the 100ohm resistors and the anodes of each of the white LEDs (figures 5 and 6). Solder two (black) jumper wires between the cathodes of both LEDs and the to arduino
ground (figure 7 and 8).
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/
Step 9: Solder resistors and photoresistors to protoboard
Solder one large and one small photoresistor (from the set of five) in series on the protoboard (make sure they are on the same side as the LEDs). Bend the leads of the
photoressitros so that they are pointed directly at one of the LEDs. Solder a 4.7kOhm and 10kOmh resistor in series with these two photoresistors (fig 4).
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/
Step 10: Attach to feeder PCB
Attach the leads from the "set" button to the protoshield so that the four resistors/photoresistors are in series between them (see notes on schematic if this is unclear).
Repeat this for the "volume" button leads.
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/
Step 12: Wire power
Locate the red and black leads on the underside of the feeder battery compartment. Solder a (red) jumper wire from the red lead to the arduino Vin and another (black)
wire from the black lead to arduino ground.
Image Notes
1. Vin and ground
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 13: Attach arduino and arduino ethernet shield
Stack arduino, ethernet shield, and protoboard on top of each other.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 15: Connect USB and ethernet
Plug a usb cable and an ethernet cable to the ports on the arduino and the ethernet shield. Thread cables through the holes you've just drilled in the project enclosure.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 16: Reassemble enclosure
Reattach bottom of enclosure using six screws. Attach food compartment and lid.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 18: Firmware
This firmware will read incoming twitter data so that if you tweet "feed me!" from the username omnomnom the arduino will light up the two LEDs attached to pins 2 and 3
for 1 second, causing the food delivery sequence to start.
I am using Arduino 1.0 for this project, I recommend downloading this version (or later) for this project. If you do not want to use the new version, make sure you have the
following Arduino libraries (they are bundled with v1.0):
- Ethernet (for the Ethernet Shield)
- EthernetDHCP (for self-configuring the IP address is you use DHCP at home)
Turn on the power switch on the bottom of the feeder, the LCD should flash 12:00 and the motors should run through the food delivery sequence once. Refer to the
manual if you would like to set the clock or set additional food timers, this won't be necessary for the project. Press the rec button and record a personalized message for
your pet, this will play at the end of each food delivery sequence.
/*
Twitter Client with Strings
This sketch connects to Twitter using an Ethernet shield. It parses the XML
returned, and looks for <text>this is a tweet</text>
You can use the Arduino Ethernet shield, or the Adafruit Ethernet shield,
either one will work, as long as it's got a Wiznet Ethernet module on board.
This example uses the DHCP routines in the Ethernet library which is part of the
Arduino core from version 1.0 beta 1
This example uses the String library, which is part of the Arduino core from
version 0019.
Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
*/
#include <SPI.h>
#include <Ethernet.h>
void setup() {
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
// 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();
void testing(){
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
delay(1000);
digitalWrite(2, LOW);
digitalWrite(3, 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
Vacation Pet
Terrarium Feeder from
Make your pet Displaying Twitter Arduino Pet Curfew: An Do not
Twitter feed Ethernet Shield Arduino Recycled Enter(Twitter-
dishes tweet! by Monitoring by Twitter
without a PC! by Tutorial by Controlled Pet Materials by updates)
thoughtfix MarioBoehmer controlled
fabrizio.granelli randofo Door by tareker Revolt Lab (Without
Arduino Ethernet Sheild)
Outputs - no PC
- LCD Display + (Photos) by
Sensor data to vishalapr
Twitter by
XenonJohn
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Waterproof Solar Powered Boom Box
by noahw on April 10, 2012
Author:noahw
Editor of the Workshop and Outside channels...I'm back!
The inspiration for this project came from spending long periods of time in the wilderness without any connection to civilization. Having a mobile power station, that can
withstand the elements is incredibly useful when it comes to recharging satellite phone batteries, camera batteries, cell phones, and headlamps. Having it due double
duty as a boom box is an added bonus since after many days in the quiet of the wilderness, being able to play few tunes can really help to remind you that you're a
human and not some kind of Gore-Tex coated bigfoot wandering the rivers of the west, not that there's anything wrong with that...
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 1: Materials and Tools
You will need the following materials:
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
(x1) RadioShack LED with Holder (Orange) (Radioshack # 276-272 )
(x1) Binding Post to Banana Plug (2-Pack) (Radioshack # 274-716 )
(x1) Marine 12V Power Outlet
(x1) RV Waterproof 110V Power Inlet
(x1) 50-Ft. 24-Gauge Clear 2-Conductor Speaker Wire (Radioshack # 278-1301 )
(x1) Red and Black Hookup Wire (18AWG) (Radioshack # 278-1220 )
Cable Clips (Radioshack # 278-1640 )
3/4" Split Cable Tubing (Radioshack # 278-1654 )
Cable Ties (Radioshack # 278-1656 )
Insulated Spade Terminals (Radioshack # 64-3125 )
Insulated Crimp-On Butt Connector (Radioshack # 64-3108 )
Inline Blade-Type Fuse Holder (Radioshack # 270-1234 )
Blade Fuses (Radioshack # 270-1082 )
Maple Wood
Water Resistant Finish
MDF 3/4" panel
Bus Bars
Pipe Hanging Strap
Bicycle Inner Tube
Screws
Epoxy
Sand Paper
100% Silicone Sealant
Rubber Feet
3-Outlet Extension Cord
6ft Bungee Cord
Plastic Toggle
Table Saw
Belt Sander
Jig Saw
Drill Press
Hole Saws or Forstner Bits
Hand Sander
Hand Drill
Wiring Tools
Screwdrivers
Multi Meter
Drum Sander Attachment for Drill
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 2: Mark and Cut Speaker Holes
The first step is to start with the initial construction of the unit, and that means cutting apart the enclosure to fit the speakers.
The speakers come with a nifty template for the cut-out that they will need. Use it to mark out the correctly sized circle on the side of the case, and cut the hole out with a
jig saw outfitted with a fine tooth metal cutting blade. The fine tooth metal cutting blade slices through the plastic case easily.
I located the hole for the tweeter in the area protected by the handle, it fits there quite well.
It was a little painful cutting apart a perfectly good waterproof case, but with a waterproof speakers and a hearty dose of silicone to seal everything up I was able to
preserve a very high level of waterproofing.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 3: Mark and Drill Speaker Mounting Holes
Lay the speaker driver into place and mark the screw holes using a metal punch, a pen also works fine.
Then, drill holes for the screws using an appropriately sized bit for your mounting screws.
The rubber feet help the panel sit inside the waterproof case and make it more stable.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 5: Cut Control Panel
Cut a piece of wood (I'm using maple due to it's density and strength) to fit inside the top of the waterproof case and form the control panel. Exact dimensions will vary.
The walls of the waterproof case are tapered at 5 degrees, so I cut the sides of the panel to match by tilting the blade on the table saw 5 degrees as well. This allows the
panel to wedge in place.
If anything, make the cuts to be a hair long. The panel should fit tightly in position and can always be sanded down later for a perfect fit.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 6: Round Corners
The top of the waterproof case has rounded corners, so the control panel will have to have them too.
I needed a quick way to transfer the shape of the corner of the case to the panel. The easiest way turned out to be using a set of forstner bits to transfer the curve since
they come in a wide variety of sizes. 1 1/4" turned out to be a perfect fit for the rounded corner. Trace that curve onto the corner of the panel.
Then, simply sand the corners down to the traced line on the belt sander.
Sand the rest of the edges as necessary until the panel fits in place perfectly.
The tapered walls of the waterproof case should hold the panel in place for test fitting. I decided to install supportive blocks (step 18) to better secure the panel in place.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 7: Lay Out Control Panel
The control panel houses several different components, switches and lights. Plan everything out ahead of time by measuring the items to be mounted, and then trace the
mounting hole dimensions onto the control panel directly to make sure everything fits.
Just to be safe, I fabricated a second control panel out of MDF and tested my layout on it first before drilling into the maple.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 8: Cut Holes in Control Panel
Round holes for components were made with drill bits and correctly sized forstner bits on the drill press.
Rectangular holes were cut with a jig saw. Use a 1/2" drill bit to create blade holes for the jig saw.
The control panel I created is a little less than 1/2" in thick. Some of the switches and LED's are designed to mount in panels that are significantly thinner than that. Adapt
the control panel by drilling and routing out material from the back so that the area where those components mount is significantly thinner.
See last photo for example of recesses on back of control panel (pictured on the MDF test panel).
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 9: Prepare Wires
There's a whole lot of wiring involved in this project so crimp on, insulated spade connectors are a must, as well as crimp on quick connect terminals for easy connection
to the switch and speaker terminals.
Extend the audio leads on the stereo with speaker wire that runs to the speakers.
Extend the power wires on the stereo, charge controller, and battery chargers with red and black hook-up wire. Solder and heat shrink all of these connections so they
are safe/permanent.
Take a moment to take some quick measurements of how long your components are from each other and make sure to cut all leads to be too long, they will be trimmed
in a later step. I left around 3 feet of slack in any wire that was going to connect from the control panel to the main case so that the panel could be removed for
maintenance.
The Goal Zero solar panel comes with an accessory cigarette lighter jack connected to a female DC power jack. Cut the DC jack off and solder it onto the leads that run
into the solar charge controller. I installed my own panel mount cigarette barrel power supply so we won't be needing the one that came with the solar panel.
Finally, grab an inline blade style fuse holder and a 10 or 15 amp fuse and get set to wire that in front of the whole system between the battery.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 10: Mount Components
Mount the components onto the control panel.
The stereo head unit comes with a mounting sleeve and fold-out tabs which hold it in place.
Other components are screw in place, like the LED's, the solar charge controller cut off switch and the 12V cigarette lighter power barrel. Others still get mounted with
screws, like the AC input receptacle and the solar power charge controller. The banana jacks for 12V power are simply pressure fit in place.
The hardest jack to mount was the solar panel DC input jack. It's a right angle jack on a long wire. I slipped it through a rubber grommet and then epoxied the grommet in
place in the panel.
Take the extension cord, cut the plug off it, and use the exposed wires to connect to the back of the RV power supply jack. That way, when you plug the unit in, AC power
can be delivered to the battery charger and DC power supply inside the unit (coming up in the step 13).
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
These bus bars can get mounted anywhere, but I thought it easiest to mount them to the back of the control panel so they'd be as close as possible to most of the
connections in order to keep the leeds short.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 12: Extend Charging LEDs
The wall brick SLA battery charger will live inside the unit. In order to see it's status lights, a little bit of hacking is necessary.
Defeat the tamper-proof screws by using a small flat had screwdriver instead of the crazy safety screw head and open up the wall charger.
Once inside, carefully pull out the circuit board and desolder the red LED that indicates "charging" status and the green LED that indicates "charged" status.
Connect some hook-up wire to these positions on the circuit board, cut away a small hole for the wire to exit the plastic case, and close the unit back up.
Now the status LED's can be extended to the control panel so you can see the charging status without having to open up the panel to peek in at the charging brick.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 14: Install Power
Drop the AC power into the box and push it off to one side. Drop the SLA battery into position in the remaining space and test fit everything.
When the power components are in the correct position, secure everything down with the perforated aluminum pipe strapping. I call this stuff pipe strap, or plumbers
strap.
As a safety precaution, insulate the pipe strap with an old inner tube from a bicycle so that it doesn't accidentally bridge any power terminals or short anything out.
Slip the inner tube on, and screw the strap tightly into position onto the base board that was made in step 4.
The battery powers the stereo, hook up the yellow constant 12V wire to the positive battery terminal. This keeps the station memory and clock going even when
everything else is disconnected.
The DPDT switch controls the unit between AC and DC modes. While in DC mode, the stereo is powered by the battery and the solar charge controller is hooked up to
the battery so it can charge everything up if the solar panel is attached.
In AC mode, the battery is charged by the wall brick SLA 12V battery charger and the 12V AC to DC power supply powers the stereo directly. This engages the charging
lights on the control panel that were extended, as well the additional light on the DPDT switch itself so that the user knows that the unit is in "AC mode". There is no light
for DC mode, because, why waste the power?
Using a DPDT switch and running the (+) supply wires through it keeps the two legs of the system - the stereo and the chargers, separate.
With that in mind, connect the charge controller to the bus bars, running the positive charging wire through the DPDT switch. Connect the stereo to the bus bars running
the positive wire through the DPDT switch.
Connect the 12V battery charger to the battery terminals running the positive wire through the DPDT switch.
Connect the 12V power supply to the stereo running the positive wire through the DPDT switch.
Connect the accessory power banana jack terminals to the bus bars, as well as the cigarette lighter.
Wire up the RV outlet to the extension cord if you haven't done this already in step 10.
Connect the leads that were extended from the hacked 12V brick style battery charger to an orange and green 12V LEDs thats are mounted on the panel to indicate
charging status.
Connect the speaker wires coming from the stereo to the speakers.
Connect the tweeter speaker to the connections on the mid range speaker.
Solder connections where appropriate. Use spade plugs on switches and speaker contacts. Use electrical tape or heat-shrink tubing (better) on all exposed connections. I
used some simple three way connectors to extend or branch off of wires in areas too far from the bus bar, where I didn't want to run another wire all the way back (shown
on the cigarette lighter barrel plugs in the photos below).
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 16: Install Speakers
Coat the back gasket of the waterproof marine speakers with silicone sealant and install them into the waterproof case with the provided screws and clips.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 17: Wiring (box)
Take the bundle of wires coming from the control panel and connect them to their respective places at the battery terminals, power supply, and wall charger. I used cable
clips, zip ties, and zip tie adhesive mounts to manage all of the cables as best as possible so it wasn't a rats nest inside the case.
A 15A blade fuse was wired in front of the positive terminal of the battery to protect all of the components. Note, the stereo head unit comes with it's own 10A fuse, this is
just an extra precautionary measure.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 18: Epoxy Panel Supports
I wanted to do one better than simply pressure fitting the control panel into place so I cut some small maple supports with that same 5 degree bevel on one side and
epoxied them into position in the case so that the control panel was properly recessed.
I found that roughing the surface of the case with sandpaper before epoxying the supports into position helped greatly with adhesion.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 19: Construct Solar Panel Bungee Cord Holder
The lid of the case conveniently comes with some mounting points for screw eyes. Insert 6 screw eyes into the pre-drilled holes and thread bungee cord between them in
a criss cross pattern. While at the fabric store getting the bungee cord I also picked up a simple toggle to adjust the tension on the cord and used that to join the two ends
together.
The Goal Zero fold up solar panel is retained in place when not in use by simply slipping it behind the bungee cord and tightening the toggle.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 20: Solar/DC Mode Testing
To test the unit in DC solar mode, switch the DPDT switch to the DC setting and plug in the solar panel. Find some sun.
Switch the SPST solar charger cut off switch to on. This connects the solar charge controller to the battery. The battery voltage should appear on charge controller
screen.
If the panel is in full sun, you should see the battery voltage rise. If you start playing the stereo, you should see the battery voltage slowly drop. The louder the stereo, the
quicker the battery voltage should fall. In full sun, and under normal playing conditions I found the battery voltage to stay constant over several hours.
To dig in a bit further, I connected a current meter in line with the stereo and tested its power consumption. The current meter read between .5A and 1.5A depending on
stereo volume (moderate to very loud respectively).
At best I was able to get the 13.5W solar panel to output at around .75A. That results in best case scenario play times without solar recharging of around 36 hours to 12
hours depending on stereo volume and accessories are being charged. With solar charging you can extend play time significantly. I'll do more testing in real-world
conditions soon and repost actual numbers of play and charge times as soon as I can.
If the charge controller switch is set to on, you will see the voltage of the battery on the screen.
If the voltage of the battery is low, the orange light should be illuminated which will indicate that high current charging of the battery is occurring. You should see the
battery voltage rise. At a voltage that is determined by the circuit in the charge controller, the wall brick should switch to trickle charge mode, the orange LED light should
turn off, and the green LED light should turn on. At this point the battery is fully charged.
If you leave the unit plugged in, the wall brick charger should continue to trickle charge the battery.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 22: Accessories
The binding posts and cigarette barrel plug make great connections points for accessories. Plug any cigarette lighter style power plug into the barrel plug and get power.
Many different accessories are available, including CFL lights for night time activities, christmas lights for parties, charging for virtually any battery powered item...the list
is long and distinguished.
The binding posts tackel just about anything else that you'd like to run off the SLA battery - bare wires, no problem, just thread them onto the posts and tighten.
The head unit for the stereo even has a USB jack that allows you to connect an iPhone or iPod. The stereo controls now run the audio source and charge it up at the
same time. What can't this thing do?
Related Instructables
Indestructible Tool Box Boom Waterproof, Boom Box Ipod Shelf speakers Waterproof
Speaker Box by W1LL7 Solar BOOMbox Dock / w/ipod dock Firestarting
Instructable by AKA: Post Homemade Make MP3 BOOM "BOX" (Part I - speaker Case by
Attmos Apocalyptic iHome by Player Portable (For Any Ipod or boxes) by mfryer mr2percent
Power Supply GamingRobot Boom Tube by Mp3 Player etc. .
by a rigger joe . ) by rickick
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
DIY Bicycle Turn Signals
by audreyobscura on March 28, 2012
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.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
bike handlebar wrap
zip ties
Tools used:
soldering iron
glue gun
utility knife
angle grinder/palm sander
laser cutter
Please reference the attached fritzing file for the construction of your circuit.
You want to mount the 555 Timer IC so it straddles the center of your proto board. Solder into place.
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 3: Assembling your flash timing circuit. (cont.)
Add a jumper wire that will connect pin 2, to pin 6. Solder that wire into place, and trim your leads.
Next, set your resistors as show in the image into your proto board - solder into place. The 100ohm output is in-line with pin 3, then directed down to a separate rail that is
later connected to the anodes on your LED array.
The 10K resistor is mounted between the positive rail and pin 7. Lastly your 100K resistor is mounted in series with the 10K resistor, and pin 6 on the 555 timer.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 5: Assembling your flash timing circuit. (cont.)
Trim your long wire leads from the back of your circuit.
There are 3 jumper wires that need to be set into place. Connect the negative lead on your capacitor to the ground rail, pin 8 to your positive rail, and pin 1 to the ground
rail. Also, wire in the battery clip to the corresponding ground and positive rail.
Measure the distance from the back of the bike, where the light will sit, all the way to where the buttons to activate the indicators will sit. Add about eight inches to that
measurement, and that is how long your wires for your buttons will be. Cut four wires at this length.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 6: Making and Wiring your back plate
I used a laser cutter and orange acrylic, and designed a plate for my LEDs to sit in. The vector file for the laser cutter is attached to this instructable if you would like to
replicate my design. I knew I wanted to embed my circuit in resin to waterproof the entire thing, so this template was the best method of seating my electronic
components.
In my experience with DIY, I have learned the importance of multiples. It's nice to have extra parts around, so I cut two of these acrylic plates.
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 8: Wire you LEDs to the plate.
You are going to daisy chain your LEDs together, once they are all threaded to the plate. Go through and solder all of your positive leads together in a zig zag shape
working from one end of the plate to the other.
Go through each LED and connect all of your positive leads together, and all over your negative leads together.
You will end up with two leads on each side, negative, and positive, that respectively connect to your circuit board.
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/
Step 10: Securing, and waterproofing your circuit.
Cut your positive wire from your battery clip to the circuit board, and solder in your SPST switch where you cut the wire. This switch is added so that power is not being
run to the 555 timer at all times.
Add a dab of hot glue to the back of your circuit board, and adhere it to your acrylic panel.
Then go through the back of the acrylic panel, and coat all of your LED leads with hot glue as well. This step insulates your wires. If your glue goes anywhere you don't
want it to be, you can clean it up with a razor blade or utility knife.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 11: Encapsulate your circuit in resin.
Knowing that I wanted to trap all of my electronics and lights in resin to waterproof the circuit, I used an easy silicone mold making technique to create a basin for me to
embed my electronics in resin.
Utilizing the extra acrylic plate I laser cut from step 6, I used masking tape to cover up all of holes in the plate, and squished it into the mold, allowing it to sit for a day,
and properly cure.
After the mold had cured, I poured 4 oz of catalyzed resin into the mold, and then pressed my project down into the resin. Set aside, and allow to cure for a day.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 12: Polishing the light.
The best way to polish resin is with sand paper. I worked with an angle grinder - turned on its side, clamped to a work bench, like belt sander - to remove the extra bits of
resin and smooth the light.
With a palm sander, and finer grit sand paper, I went back over the the entire light again, giving it a smooth frosted finish.
Be careful that you don't sand down too much material, and hit your circuit.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. angle grinder clamped to a work bench = DIY belt sander.
After the glue is set, attach the light your bike's frame.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 14: Run switches from your handlebars.
Mount your switches for the right and left signal on the corresponding right and left brake handle. By splaying the leads flush with the surface of the hand brake, I was
able to wrap the wires around the brake, then I used blue painters tape to hold the switches in place.
Using electrical tape, wrap the four wires running from the handle bars to the circuit. Or use heat shrink . I used zip-ties to hold my wires in place along the frame of the
bike.
When you get to the end of your bike frame, separate the wires so that you are wrapping the two wires that lead to the handle bar mounted switches.
There should be enough slack in your wire-lines so that you may still safely turn your bicycle. When you have mounted your switches, begin enclosing them in handlebar
wrap - not too tight though, other wise your switches will always be in the on position.
I used a smaller zip-tie to mount the battery and switch to the frame too.
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/
Step 15: Go for a ride!
Test out those signals, and be the safest cyclist on the streets!
Related Instructables
Blinking Cruiser The Versatile Knight rider Blinking Courier 555 Timer LED Make an LED Bicycle Safety
Bike Light by joe 555 Timer by bike flasher by Bag Light by joe Flasher (Photos) Blaster by Lighting and
Tail Light and blinkyblinky Higgs Boson by finkbuilt Turn Signals
Blinker Setup ThatCaliforniaGuy From (Mostly)
for Motor Recycled Parts
Bicycles by by Amberwolf
Stills00
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Arduino Bike Speedometer
by amandaghassaei on June 18, 2012
Author:amandaghassaei amandaghassaei.com
Currently working for instructables!
Parts List:
Additional Materials:
22 Gauge Wire Radioshack #278-1224
Solder Radioshack #64-013
sand paper
plywood
wood glue
hot glue
screws
zip ties
sugru
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 1: Schematic
The schematic for this project is shown above.
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.
Solder a 10kOhm (current limiting) resistor between A0 and ground on the protoboard. Connect long pieces of stranded wire to A0 and 5V- these wires will wrap around
the bike and attach to the reed switch.
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/
Image Notes
1. I made a mistake here- the black wire should be connected to A0
Use the code below to test your reed switch. When the magnet on the wheel moves past the switch, the arduino should print ~1023, otherwise it will print ~0. Open the
serial monitor (Tools>>Serial Monitor) in Arduino IDE to test for your own setup. If the magnet does not seem to be affecting the reed switch, try repositioning it or even
adding a stronger magnet if you have one.
/*
* 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.
*
*/
//storage variable
int reedVal;
void setup(){
Serial.begin(9600);
}
void loop(){
reedVal = analogRead(reed);//get val of A0
Serial.println(reedVal);
delay(10);
}
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
/*
* 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.
*
*/
//calculations
//tire radius ~ 13.5 inches
//circumference = pi*2*r =~85 inches
//max speed of 35mph =~ 616inches/second
//max rps =~7.25
//storage variables
int reedVal;
long timer;// time between one full rotation (in ms)
float mph;
float radius = 13.5;// tire radius (in inches)
float circumference;
int maxReedCounter = 100;//min time (in ms) of one rotation (for debouncing)
int reedCounter;
void setup(){
reedCounter = maxReedCounter;
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
sei();//allow interrupts
//END TIMER SETUP
Serial.begin(9600);
}
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/
Step 7: Install Parallax LCD Library
Connect Arduino 5V, Ground, and TX (Arduino digital Pin 1) to the LCD socket. Read the labels on the LCD pins to make sure you have everything oriented correctly.
Image Notes
1. Adjust contrast
2. switches must be in this configuration to send messages to LCD
/*
* 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.
*
*/
//this code should print "Hello World" on the LCD and the backlight switch connected to digital pin 2 should work
void setup() {
Serial.begin(9600);
pinMode(1,OUTPUT);//tx
Serial.write(12);//clear
Serial.write("Hello World");
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
void loop() {
}
Connect the red wire to Arduino 5V, the other side of the resistor to ground, and the green wire to D2.
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/
Step 11: Final Speedometer Code
Upload the following code onto the Arduino. Test to make sure the backlight switch works and the speed displays properly. (Again, you may have to unplug the board
after loading the firmware and plug it back in again to get it to work properly.)
Measure the radius of your tire wheel (in inches) and insert it in the line: float radius = ''''';
//bike speedometer
//by Amanda Ghassaei 2012
//http://www.instructables.com/id/Arduino-Bike-Speedometer/
/*
* 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.
*
*/
//calculations
//tire radius ~ 13.5 inches
//circumference = pi*2*r =~85 inches
//max speed of 35mph =~ 616inches/second
//max rps =~7.25
//storage variables
float radius = 13.5;// tire radius (in inches)- CHANGE THIS FOR YOUR OWN BIKE
int reedVal;
long timer = 0;// time between one full rotation (in ms)
float mph = 0.00;
float circumference;
boolean backlight;
int maxReedCounter = 100;//min time (in ms) of one rotation (for debouncing)
int reedCounter;
void setup(){
reedCounter = maxReedCounter;
circumference = 2*3.14*radius;
pinMode(1,OUTPUT);//tx
pinMode(2,OUTPUT);//backlight switch
pinMode(reed, INPUT);
checkBacklight();
Serial.write(12);//clear
// TIMER SETUP- the timer interrupt allows preceise timed measurements of the reed switch
//for mor info about configuration of arduino timers see http://arduino.cc/playground/Code/Timer1
cli();//stop interrupts
sei();//allow interrupts
//END TIMER SETUP
Serial.begin(9600);
}
void checkBacklight(){
backlight = digitalRead(2);
if (backlight){
Serial.write(17);//turn backlight on
}
else{
Serial.write(18);//turn backlight off
}
}
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 .
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 13: Enclosure
I cut my project enclosure from 1/4" ply on an epilog 120Watt laser cutter. The dimensions of the enclosure are 3.5"x4"x2". I modeled the box in AutoCAD and generated
the laser cut files (with finger joints) in Autodesk 123D Make. Then I added two holes for the switches and a rectangular opening for the LCD screen. I also added some
holes on the bottom of the enclosure to make attaching it to the bike easier.
I glued the project enclosure together with wood glue and sanded the edges down. I finished the enclosure with some clear polycrylic.
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/
Step 14: Install Components in Enclosure
Secure the switches onto the enclosure with nuts. Glue or screw the lcd to the underside of the front panel.
Fit the Arduino and Protoboard as well as the battery into the enclosure and secure with velcro or glue.
Screw or fasten the enclosure shut.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 16: Take it Out on the Road
You should be ready to hit the road. Don't let the awesomeness of your new bike speedometer distract you from road hazards!
Related Instructables
Digital Tachometer
Wireless Altoids Arduino Anemometer Amp up your Arduino Bicycle Add made from a
Cycle Computer Skateboard (wind meter) by VW Bug Alarm and Cadence/Speed/Odometer
bicycle
by Alexdlp Speedometer by Arduino Timer Speedometer by Lights by to Your Spin speedometer
dan
leonardor Interrupts by kcrichar cheeyah Bike. by (cyclocomputer)
amandaghassaei vatosupreme by josie
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
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:
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/
Step 1: Build enclosure
I used AutoCAD, Autodesk 123D Make, and CorelDRAW to design my project enclosure. I've attached the AutoCAD, STL, and the EPS files for the enclosure I built
below. Then I sent my EPS files to a laser cutter and cut them out of 0.2" plywood. I also cut a front panel out of 3mm acrylic. If you do not have access to a laser cutter,
you can buy a project enclosure or find a spare box and drill holes in it for all your components, be creative!
I wanted to sand off the scorched ends of the laser cut pieces so that the outside of the box had a consistent finish, so I also made a set of eps files with some extra
length on the ends for sanding ("enclosure long").
I glued the pieces together with wood glue and cut a piece of acrylic for the front panel.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
Solder a diode to one side of each switch, be sure that the "-" end (usually indicated with a stripe) is facing away from the switch. Solder a (preferably black) wire to the
other end of the diode and a (preferably red) wire to the other side of the switch. Do this for all nine switches. You may find it necessary to use hot glue, electrical tape, or
heat shrink to reinforce/protect these connections.
Once soldered, mount each button in your project enclosure.
You can find the fritzing files for 2-lead button and 4-lead button multiplexing below.
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/
Step 4: Wire buttons on arduino shield - part 1
Solder three 2kOhm resistors on the proto-shield so that they are five pins from analog pins 0, 1, and 2 (see figure 1) and cut away the excess lead wire. On the
underside of the board, solder the resistor leads farthest from analog pins 0, 1, and 2 together and connect them to 5V using a jumper wire. Use three small jumper wires
(I used the scrap wire from the resistor leads), connect analog pins 0, 1, and 2 to the three nearest soldering points.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 5: Wire buttons on arduino shield - part 2
Solder the red wires (the lead not connected to the diode) from the buttons to the protoboard. Solder the leads from buttons 0, 3, and 6 in line with analog pin 2, buttons
1, 4, and 7 with analog pin 1, and buttons 2, 5, and 8 with analog pin 2. Clip the excess wire from each of these connections and solder all the adjacent points togther on
the underside of the board (see figure 2). Each of the buttons should now be electrically connected to an analog pin and one of the 2k resistors.
Again, I've provided the circuit diagrams and fritzing documents for both 2-lead and 4-lead buttons.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
button schematic 4lead tact.fz (399 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'button schematic 4lead tact.fz']
2-lead and 4-lead diagrams and fritzing are provided here, again.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 8: Mount and wire LEDs
I mounted my indicator LEDs early so I could sand the tops down while finishing the wood in the rest of the enclosure. Sanding down the top of LEDs gives them a frosted
surface which makes them nice and diffuse. I used some super glue to fit the LEDs inside two 5mm holes, I left the top parts sticking out so that it could be sanded flush
with the enclosure surface.
Attach the shorter leads of both LEDs to each other (grounds) and connect to the ground pin of the arduino protoshield. Attach a current limiting resistor to each of the
longer leads of both LEDs. The optimum resistor value can be calculated as follows:
R>=V/I
where:
R is resistance across the resistor measures in ohms
V is forward voltage in volts from LED specs
I is continuous forward current measured in amps from LED specs
For most through hole LEDs the forward voltage will be about 2-3.5V and the current will be 15-25mA. You can check the datasheet of the LEDs you bought to calculate
the lowest possible resistor values for your LEDs. I chose to use resistors that were much higher than I needed, beacuse I didn't want the LEDs to be blindingly bright. I
ended up using a 1k resistor for the amber LED and a 4.7k resistor for the white LED, these values may be different depending on what type of LEDs you use and how
bright you want them, but 1k is a good place to start.
I've attached the fritzing document which includes the LED wiring below.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 9: Tempo pot
Solder three leads onto a 50kOhm linear taper pot. Connect one side to ground (black wire), the other to 5V(red wire) and the middle pin(green wire) to analog pin 5 on
the Arduino shield.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 10: DAC
DAC stands for "digital to analog converter." We need a DAC because the audio data stored in the Arduino is digital, and we must convert it to an analog waveform
before sending it to speakers. A simple way to do this is to use something called an R2R resistor ladder. You can think of it as a multi-leveled voltage divider . It takes
incoming digital bits (+5v and ground from Arduino), weights them, and sums them to produce a voltage level between ground and 5 volts.
The resistor ladder for this project is an 8-bit DAC. As you can see in the schematic, Arduino PORT D (digital pins 0-7) output 8 pieces of data (one from each pin) which
are sent to each junction of the DAC. I soldered these resistors on a piece of copper plated protoboard I cut down to size.
I added two 0.1uF capacitors to the end of the resistor ladder to act as a low pass filter. This type of filter will remove the higher frequencies caused by the low (8khz)
sampling rate of the audio and smooth out the waveform. You may choose to change the values of these capacitors depending on what you like.
There are 10 connections to the DAC, 8 digital input pins from the arduino, ground, and audio out. The green wire in figure 6 is audio out, this wire will connect to the
amplifier in the next step. You can find the fritzing file below.
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/
Step 11: Amplifier
I cut another piece of protoboard to create the amplifier circuit. Many suggested wiring diagrams of the LM386 can be found on the datasheet ; the simplest diagram is
reproduced in figure 2. I used a variant of this circuit which does not include the 0.05uf cap and 10ohm resistor. Also, instead of a 10k potentiometer, I sent a fixed voltage
to pin 3 of the LM386 using two resistors in a voltage divider configuration. I only had a 220uf capacitor when I was putting my project together, so I used it instead of the
250uf. Additionally, our audio out will be sent to another pot for volume control before being sent to speakers.
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
Also connect a wire to the bottom and left leads on the back of the pot (figure 2). This is the switch that will be used to connect to power later.
Image Notes
1. ground
2. from amp
3. to headphone jack
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 13: Switches
Solder a 2kOhm resistor and two wires to each switch as shown in figure 1. Connect the red wire to +5V and the rightmost black wire to ground on the arduino proto-
shield. The middle wire of the record switch connects to pin A3 and the middle wire of the mute switch connects to pin A4.
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/
Step 15: Headphone jack
Remove the plastic casing from the headphone jack. Solder the audio out from the gain pot (middle lead) to both stereo channels of the headphone jack. Solder ground to
the jack. You may want to use some hot glue to reinforce these connections and make sure that they do not short out.
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/
Step 17: Screw on back
If necessary, screw back panel on.
These two functions require two separate pieces of firmware which are described in more detail in the next two steps (download them below). This means if you would
like to use it as a MIDI instrument you need to load the MIDI firmware, then if you would like to switch over to audio you should load the audio firmware.
File Downloads
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
glitchboxMIDIfirmware.pde (11 KB)
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'glitchboxMIDIfirmware.pde']
Step 19: Audio firmware
The audio firmware is the most simple to set up. Download the Arduino sketch provided below and load it onto your board. Once the firmware is loaded, unplug the usb
connection and turn off the device (turn the gain pot until it clicks off). Turn the device on, after a moment you should see the white LED turn on. Plug in your headphones
and slowly turn up the gain pot while pressing one of the front panel buttons repeatedly until the volume is where you like (be careful not to turn up the volume too high!).
I've loaded 9 default sounds in the firmware, try out all the buttons and make sure you can hear all of them.
Once all of your audio is working correctly, flip the record switch, the white LED should turn off and the orange should turn on. Play a short sequence with the buttons and
flip the white switch again when you want to start looping the audio you've just played. The white LED should start start blinking on the beat and you should hear your
sequence looping.
Flip the mute switch to mute what you've recorded, flip it again to bring it back.
Flip the record switch to record additional audio on top of your recorded sequence, this time you will see the orange LED blinking with the beat.
File Downloads
Read the instructions on the last step to find out how all the controls should work.
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']
/*********************************************
IMPORTANT COMMENTS
*********************************************/
these comments will let you know how to make some simple changes such as:
-where to insert new stored audio data
-how to change the resolution of the sequencer (16 step, 32 step...)
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Insert in Arduino Firmware:
-paste the data into one of the sample# storage spaces (figure 4), it should be in the following form:
Enjoy!
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
File Downloads
Related Instructables
Linux
Recording
Ripping Drum What is MIDI? Converting a Studio Software Portable MIDI
Tracks from by Electronic rescued toy into Drum Beats in Components by Tone Generator
MIDI files by amandaghassaei Drums Lingo by a MIDI controller Audacity by Arduino MIDI reteo On-the-Cheap
jdlink doggyd69b by zen.webb Rockband
instructables_user_4783 by lewisb42
Drumset (video)
by roycetaft
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Simple Walker Robot
by randofo on February 22, 2012
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 straight-
forward. 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.
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.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 6: Mark and drill
Place the turnbuckle on edge. Measure 3" across one of the turnbuckles. Make a mark at this point. Repeat on the second turnbuckle.
Place the servo horn at the 3" center point on the turnbuckle.
Position the horn such that it is making a "V" perpendicular to the length of the turnbuckle. This should, by default, position two more "V" shapes pointing to each side of
the turnbuckle. Make marks in the valley of each of these "V" shapes.
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.
Rotate the servo 180 degrees and repeat on the opposite side.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 11: Drill again
Drill each of the mounting marks that you have just made with an 1/8" drill bit.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 12: Zip tie
Zip tie the servos to the ruler using the mounting holes you just drilled.
Put the first servo horn back on such that all of the "V" shapes are parallel to each of the edges.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 14: Mark and drill a bit more
Between one of the far edges of the ruler and the servo, place the PCB and make marks on the ruler through each of its mounting holes.
On the other side of the same servo, place the Arduino board and make marks in each of its mounting hole. Try to fit the whole thing to one side of the ruler's bend.
On the opposite side of the ruler's bend, place the battery mount and make a mark.
Drill all of the marks that you have just made with a 1/8" drill bit.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 15: Insert
Insert two zip ties into each of the holes drilled in the turnbuckles from the inside out.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 16: Attach
Place a turnbuckle centered atop a servo horn, and perpendicular to the ruler. Zip tie the turnbuckle firmly in place, and then trim away any excess zip ties.
Make multiple marks on the spatula's handle on all sides of the turnbuckle to indicate drill holes for zip tying it to the turnbuckle.
Drill the marks that you have just made with a 1/8" drill bit.
Flip the spatula upside down, and place the other spatula on top of it right-side-up. Align them so they are of matching height.
Use the first set of drill holes as guides to drill another set of holes in the other spatula. This should end up as a mirror image of the first (i.e. inverted, but otherwise
identical).
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 18: Front legs
Using the holes you have just drilled, zip tie the spatulas to the turnbuckle closest to the holes that were drilled to mount the PCB.
For the best results, make sure they roughly mirror each other in position and height.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 19: Hind legs
Repeat the process for the front legs to make rear legs.
Note that the rear legs of this bot were slightly shorter than the front legs. However, this is not a hard rule. Experiment and see what works for you.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 20: Spacers
Take apart a ball point pen.
Cut the pen's tube into 1/4" sections using a razor blade.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 21: Trim
Using a paper cutter or pair of scissors, trim the prototyping board down to about 1".
Solder the red wire to the central terminal and the black wire to the plug's outer terminal.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 23: Sensor board
Place the ground lead of the Ping sensor into one of the long conductive rails that travels the length of the board, and place the power lead in the other. The signal lead
should be in one of the smaller conductive rails that spans 3 holes.
Solder the Ping sensor in place at a slight angle such that if you hold the board parallel to the ground, it would appear to be rotated about 45 degrees clockwise. This
should counter-balance the fact that the PCB will get mounted to the board at about a 45 degree angle.
One the opposite side of the PCB that the Ping was soldered to, nstall two 3-pin male headers such that each one has a pin that is soldered to the ground rail, and a pin
the is soldered to the power rail.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 24: Wires
Solder a 6" red wire to the power rail.
Solder a 6" green wire to the terminal that the Ping's signal pin is connected to.
Solder a 6" green wire to each of the remaining header pins that are not connected to a power or ground connection. These two wires will correspond to the signal pins
for each of the servos.
This code could definitely be more robust, but I will leave it up to you to expand upon it.
/*
Simple Walker Robot
by Randy Sarafan
This code is for controlling a simple quadruped robot and having it respond to obstacles that approach.
#include <Servo.h>
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
int pos = 80; // variable to store the servo position for rear legs
//changing this value changes the default position of the rear legs
int pos1 = 70; // variable to store the servo position for front legs
//changing this value changes the default position of the front legs
void setup()
{
myservo.attach(9); // attaches the servo on pin 9 to the servo object
myservo1.attach(10); // attaches the servo on pin 10 to the servo object
void loop() {
// 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);
delay(rate);
delay(rate);
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']
Step 26: Sensor
Place a spacer between each of the PCB mounting holes and the PCB.
If the sensor is not level to the ground, gently bend its pins until it is.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 27: Arduino
Place a spacer between the Arduino and each of its mounting holes on the ruler.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 28: Attach
Attach the 9V battery holder to its mounting hole using the a 4-40 nut and bolt.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 29: Plug
Plug the servo female socket into the male header pins on the PCB, making certain that black is lined up with ground, red with power, and white with the green signal
wire.
Plug the black wire from the PCB into the Arduino Ground socket.
Plug the green wire from the Ping sensor into the socket for digital pin 7.
Plug the green wire from the front servo into the socket for digital pin 9.
Plug the green wire from the rear servo into the socket for digital pin 10.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
Build a Mini-
Walking Bot by
How to freeform
Mrdon219 How to modify a How to build the the bicore ( Simple Bots: How to Build a Large Dancing
servo motor for one motor BEAM robotics ) Walker by Robot - The Robot by
continuous walker! by by robomaniac The BallBot1 randofo BeetleBot by leevonk
rotation ( One Robot Project ...
robomaniac robomaniac
motor walker by
robot ) by SolidWorksMagi
robomaniac
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
The Arduino Synthesizer
by audreyobscura on March 19, 2012
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.
The grain consists of two triangular waves of adjustable frequency, and adjustable decay rate.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 2: Materials and Tools
To make this project, you will need the following things.
Parts:
(5X) 5K potentiometer- (Radioshack #271-1714)
(5X) Potentiometer knobs - (Radioshack #274-416)
(3X) LEDs - (Radioshack #276-307)
(1X) SPDT switch - (Radioshack #275-1549)
(1X) Light Dependent Photo Resistor - (Radioshack #276-1657)
(1X) Arduino - (Radioshack #276-128)
(1X) Arduino Protoboard - (Radioshack #276-140)
(1X) Tactile Switch - (Radioshack #275-002)
(1X) Project enclosure - (Radioshack #270-1807)
(1X) 1/8" Audio Jack- (Radioshack #274-251)
(1X) a whole lot of solid core wire - (Radioshack #278-1222)
(1X) heat shrink - (Radioshack #278-1627)
(1X) breadboard - (Radioshack #276-002)
(1X) jumper wire - (Radioshack #276-173)
(3X) 10K ohm resistors - (Radioshack #2271-1335)
(3X) 220 resistors - (Radioshack #271-1313)
(1X) 9V battery - (Radioshack #23-866)
(1X) 9V battery clip - (Radioshack #270-324)
(1X) size M coaxial DC power plug - (Radioshack #274-1569)
Tools:
soldering iron
solder
flux
glue
multimeter
drill
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 3: Code, Circuit Diagram, and Power.
I have attached the code for the Arduino to this Instructable. You will need a USB 2.0 to upload it to your board. After you have uploaded the code from your computer,
go ahead and attach the Proto Shield to your Arduino.
You have many options when it comes to power. The Arduino is capable of running on a 9v wall wart power supply, or you may use a 9V battery with a battery clip to a
size M coaxial DC power plug . You may also power via your USB cable.
The circuit diagram was made with Fritzing , it has also been attached to this step.
File Downloads
Then, connect the signal wires from the potentiometers to Analog Input 0-4 on the Arduino. The right and left side leads will get connected to the ground rail, and positive
rail of the breadboard.
Connecting the potentiometers will control the grain, frequency, and decay of the synthesizer.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 5: Wire your Audio Jack.
Solder wires to the your 1/8" mono audio jack, make your leads fairly long. Connect your positive lead to PWM~ 3 on the Arduino. You will need a 10K ohm resistor
between the arduino board and the positive lead of your audio jack. Connect the negative lead of your jack to ground rail of the breadboard.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 6: Connect your photoresistor.
One lead of your photoresistor is wired directly to your 5V positive rail on the breadboard, as well as Analog Input 5 on the Arduino. The other lead of the photoresistor is
connected to a 10K ohm resisted ground rail.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 8: Wire the tactile switch.
The tactile switch has four leads. Allow the switch to straddle the bridge of the breadboard. Connect one of the two parallel pins to your 5V positive rail on the bread
board, and the other to a 10K ohm resisted ground pin. The last connection of your tactile switch connects a signal wire between the switch and Digital Pin 6 on the
Arduino.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 10: Test it!
This is the completed breadboarded circuit. Test with a pair of headphones, or connect to a small speaker. If you are using headphones, this is a mono output, and it will
be loud. Do not put your headphones directly near your ear when firing up this synth.
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 Image Notes
1. tactile switch 1. audio jack.
2. LEDs
3. photoresistor
4. SPDT switch
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 14: Wire the audio jack to the Protoboard.
The next few steps outline how to move the circuit from the breadboard to the Protoboard. Because all of your components are secured to the enclosure, it will be simple
to run wires from your components to the board.
Solder lead wires to all of the components within the the enclosure, using red and black wires respectively to denote which leads are positive and negative.
On the Protoboard, connect one wire to digital pin 3, and solder into place, run a jumper wire to the center of the board so that you may break the line with the same 10K
ohm resistor from the breadboard.
When you solder these into place, make sure you drop enough solder on to the board to connect the wire to the resistor.
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.
Daisy chain the ground wires for the LEDs, then run a single grounding wire back to the ground rail on the Protoboard.
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
Wire the signal wires of the potentiometers to Analog 0-4, I kept the grain and frequency knobs on the first row of knobs, and the sync knobs below them.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 18: Attach your knobs to your potentiometers.
Zero all of your potentiometers out, then align the line on the knob with the zero position on the potentiometer shaft.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 20: Play with it!
All of the switches and potentiometers are completely interchangeable! instead of using all those potentiometers try replacing each of them with photo resistors, or
combinations of the two.
References:
http://blog.lewissykes.info/daves-auduino/
http://code.google.com/p/rogue-code/wiki/ToneLibraryDocumentation
http://arduino.cc/en/Tutorial/Tone
http://itp.nyu.edu/physcomp/Labs/ToneOutput
http://code.google.com/p/tinkerit/wiki/Auduino
Related Instructables
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Self-Watering Plant
by randofo on June 22, 2012
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/
Step 2: Trim the pump
Trim away any unnecessary plastic mounting brackets from the front of the pump that may prevent it from being flush with the case (nozzles and corresponding hardware
not included).
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.
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.
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/
Step 9: Start the PCB
Solder the 5V relay to the board.
Attach an 18" section of 12 AWG wire to an unused part of the PCB. Solder a 6" section of red 22 AWG wire to this joint.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 11: Split the wires
Pass the cut power cord into the box through the 1/4" hole closest to the water pump.
Split the power cord such that each conductor is its own separate insulated strand for about 6".
Repeat this process for the cord going into the water pump.
They need to be separated because each cable is being wired to a different spot.
Connect one of the strands from the power cord to the common pin on the relay.
In this way, when the relay is powered up, AC power will be connected.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 14: Wire nut
Attach the two free power cables from the pump and power cord together using a wire nut.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 15: Prep the cords
Kink the power cable on the inside of the box and cinch it in place with a zip tie to prevent it from being pulled back through.
Tie a knot in the two 12 AWG wires such that when they are passed through the remaining 1/4" hole there would only be tension on the knot (and not the circuit board)
when you tug on them.
Pass a bolt through each and fasten them in place firmly with the corresponding nuts.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 17: Wire the power
Solder the red wire from the 9V battery connector to one terminal of the SPST switch. Solder a 5" red wire to the other terminal of the SPST switch.
Unscrew the cover from the M-type plug and slide the cover onto the end of the remaining red and black wires.
Solder the black wire to the outer ground connection on the plug. Solder the red wire to the inner power connection.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 18: Install the switch
Drill a 1/4" hole in the 8" x 6" hole opposite the water pump.
Mount the switch into the hole using the mounting hardware.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 19: Program
Plug in your Arduino and upload the following code:
/*
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.
// if the readings from the soil sensor drop below this number, then turn on the pump
int dryValue = 700
void setup() {
pinMode(12, OUTPUT);
void loop() {
// read the analog in value:
sensorValue = analogRead(analogInPin);
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/
Step 20: Install
Fasten the Arduino to the base of the project enclosure with nuts and bolts.
If the Arduino lights up when you plugged in the battery, toggle the switch on the outside of the case to turn it off.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 23: Wire it up
Now is time to plug everything into the Arduino.
Plug the black wire from the circuit board to the ground socket on the Arduino.
Plug the red wire from the relay coil into digital pin 12 socket on the Arduino.
Plug the red wire connected to the 10K resistor to analog pin 1 socket.
Plug the red wire connected to the soil probe into the +5V socket.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 24: Case closed
Put the lid on top of the project enclosure and use the hardware that came with it to fasten it shut.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 26: Tubing
Cut the tubing in half.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 29: Insert tube
Fill your water container and insert the tube into the hole that you have previously drilled in the top.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
RC Car to Robot
by randofo on February 9, 2012
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/
Step 1: Go Get Stuff
You will need:
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/
Step 4: Remove the Controller
Remove the screws holding the controller board to the RC car and pull it free.
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.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 6: Mark and Drill
Place the Arduino atop the bed of the cargo RC car.
Make marks where the mounting holes are in such a way that it will later be easy to zip tie the Arduino down.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 7: More Marking and Drilling
Place the 9V battery on the underside of the cargo bed. Make two marks on each side of the battery and drill them with a 1/8" drill bit.
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.
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/
Step 10: Attach
Now that the Motor Shield is attached zip tie the Arduino to the back side of the RC Car.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 11: Trim
Using scissors or a paper cutter, trim the PC Board until is skinny enough that it slides neatly between the RC car's front grill.
Once made skinnier, shorten it such that it is just long enough to stick out the front.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 12: Solder
Solder the PING sensor centered on the front of the trimmed PC Board.
Connect 8" of green wire to the Signal pin, 8" of red wire to the 5V pin, and 8" of black wire to the Ground pin.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 13: Insert
Slide the circuit board into the front grill of the car and make sure the sensor is sitting level.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 15: Extend
Trim away the connector for one of the motors. Connect an 8" red wire to one and an 8" black wire to the other.
Finally, slide heat shrink tubing over each of the four exposed solder connections and shrink them into place with a heat gun.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 16: Clean Up
Zip tie each set of wires together to keep everything tidy.
You may even want to consider zip tying the sets together into a single bundle for the length of wire that passes over the body of the RC car.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 18: Program
Program the car with the following Arduino code:
/*
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.
void setup() {
void loop()
{
// establish variables for duration of the ping,
// and the distance result in inches and centimeters:
long duration, inches, cm;
// 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);
//
//if objects are less than 12 inches away
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
//the robot reverses and turns to the right
//for 2 seconds
//
//
//setting turn motor
//
//
//setting drive motor
//
//
//stopping
//
//
//when nothing is within 12"
//the robot simply drives forwards
//
else{
//
//Setting drive motor
//
delay(100);
}
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']
Step 19: Wire it up
The ping sensor:
Connect the green wire from the Ping sensor to digital pin 7.
Connect the black wire from the Ping sensor to ground.
Connect the red wire to the power input screw socket on the motor shield.
Connect the red wire from the front motor to+ port on channel B of the motor shield.
Connect the black wire from the front motor to - port on channel B of the motor shield.
Connect the red wire from the rear motor to the + port on channel A of the motor shield.
Connect the black wire from the rear motor to - port on channel A of the motor shield.
Connect the 5V socket to the power input power screw socket on the motor shield (in addition to the Ping power wire already connected).
Connect the ground socket on the shield to the input ground screw socket on the motor shield.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 20: Go!
Insert the 9V plug into the power socket on the Arduino to power up your robot.
Note: If you decide that you want to reprogram your Arduino, before you plug in the USB cable, disconnect both the 9V battery and the power connection
between the Arduino power socket and the motor shield.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
myRobot - DIY
Robot (video) by RC truck robot Ard-e: The robot How to convert robot movement DIY Mod an Make a scary
aneophyte conversion by with an Arduino Robot 3: (almost) any 27 distance control Omnibot 80's scarab robot by
OracsRevenge as a brain by Autonomous or 49 MHz RC by buenos Robot with djsures
imadami Sensor Platform Car into a Voice, Camera,
'Jimbo' by Robotic car by Servos,
jamesthequack dflam Bluetooth by
djsures
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Arduino Waveform Generator
by amandaghassaei on April 16, 2012
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:
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 1: Prepare Arduino Proto Shield
The Arduino Proto Shields are a convenient way to attach circuits to an Arduino, but I like to trim them down a little bit first so they do not take up so much room in the
project enclosure. Start by trimming the pins down with a pair of wire cutters. Next, cut off the six pin socket. Finally, cut the sockets from the top of the board.
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:
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/
Step 3: Solder Button Leads
Solder a 10kOhm resistor to one lead of each of the four push buttons. As shown in the second image, solder a green wire to the junction between the button and the
resistor and a red wire to the other end of the resistor. Solder a black wire the the second lead of the push button. It's a good idea to cover these connections with a bit of
heat shrink to prevent short circuits (fig 2).
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 4: Install Audio Jack
Unscrew the plastic casing from the audio jack. Solder a red wire to the two stereo out pins and solder a black wire to the ground pin (fig 3). I used hot glue to prevent
short circuiting the jack and to give the soldering joints some extra support. Finally, mount the audio jack in the enclosure with super glue.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 5: Install Buttons
Snap the top of the button off and fit them into the wooden enclosure. Secure with hot glue. Once dried, snap the black button tops back on.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 7: R2R DAC on Arduino Shield: Part 1
Solder 7 10kOhm resistors to the protoboard so that they bridge the leads of the 8 20kPhm resistors you have just soldered.
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.
Here's how I calculated the value of the components in my low pass filter:
According to Nyquist's Theorum, signals cannot contain frequencies higher than half their sampling rate. If I used a sampling rate of 100kHz, then the highest frequency I
can produce is 50kHz.
50000 = 1/(6.28*300*C)
C = 1.06*10^-8 F
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
round this to:
C = 0.01uF
Connect one end of the the 300Ohm resistor to the 10kOhm resistor connected to digital pin 7. Connect the capacitor to the other end of the 300Ohm resistor. The other
side of the cap should connect to ground.
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/
Step 12: Amplifier: Part 2
Connect ground to pin 4 of the IC socket.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 14: Amplifier: Part 4
Connect pin 6 of the IC socket to Vin, pin 2 to ground, and snap the IC into the socket.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 15: Wire Gain Pot
Volume or gain of the audio signal will be controlled with the 10k audio taper pot with switch. Connect the audio out from the amplifier and ground to either side of the
potentiometer as indicated in the picture. The middle is audio out, it will be hooked up directly to the audio jack.
Also connect a wire to the bottom and left leads on the back of the pot (figure 2). This is the switch that will be used to connect to power in the next step.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 16: Connect to Battery
Connect the black wire from the battery clip to ground on the Arduino Shield. Connect one lead from the gain pot switch to the red wire from the battery clip and connect
the other gain pot lead to Vin on the Arduino Shield.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 17: Connect Output to Headphone Jack
Connect the output from the amplifier (the negative lead of the cap connected to the IC at pin 5) to the red wire we attached to the audio jack in an earlier step. Connect
the black wire from the audio jack to ground on the Arduino Shield.
analog 0 = pulse
analog 1 = triangle
analog 2 = saw
analog 3 = sine
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 19: Wire Frequency and PWM Pots
Connect a red, black, and green wire to the 10kOhm and 50kOhm potentiometers as shown in the images. Connect the red lead to 5V and the black leads to ground on
the arduino shield. Connect the center green wires to analog pins 4 (PWM) and 5 (frequency).
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 20: Install Pots
Remove the side tab on all of the pots before installing in the enclosure, this will allow them to sit flush against the wood. Remove washer and nut from each of the pots,
place pot through hole in enclosure, and secure with nut. Install all three pots in the enclosure.
Image Notes
1. remove side pin
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 21: Wire LEDs: Part 1
Attach a 470Ohm resistor to the cathode of each of the four LEDs. Solder a black wire to the other end of the resisotr and a red wire to the anode of the LED. Cover these
connections with shrink wrap to prevent short circuiting.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 23: Black Diffuser
Glue a light diffusing material behind the wave cutouts in the front panel. I used a piece of a black plastic garbage bag.
digital 8 = pulse
digital 9 = triangle
digital 10 = saw
digital 11 = sine
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 25: Firmware
Upload the code at the bottom of this step onto the Arduino. The code uses a timer interrupt at a frequency of 100kHz to send new data out to the DAC. The rest of the
code monitors the state of the buttons and knobs and adjusts variables accordingly. Since the interrupts occur at such a high frequency, I had to keep the interrupt
routine, the piece of code encapsulated in the ISR(TIMER1_COMPA_vect){} as short as possible. Time intensive operations like mathematical operations with floats and
using the sin() function take too much time to complete. I used several work around to get by this:
For triangle and saw I created the variables sawByte, triByte, sawInc, and triInc. Every time the frequency changed I calculated the amount that the triangle and saw
function would have to increment at a sampling rate of 100kHz:
triInc = 511/period;
if (triInc==0){
triInc = 1;
}
sawInc = 255/period;
if (sawInc==0){
sawInc = 1;
}
then all the needed to be done in the interrupt routine was some simple math:
case 1://triangle
if((period-t) > t);
if (t == 0){
triByte = 0;
}
else{
triByte += triInc;
}
}
else{
triByte -= triInc;
}
if (triByte>255){
triByte = 255;
}
else if (triByte<0){
triByte = 0;
}
wave = triByte;
break;
case 2://saw
if (t=0){
sawByte=0;
}
else{
sawByte+=sawInc;
}
wave = sawByte;
break;
For the sine function, I wrote a simple python script which outputs 20000 values of 127+127sin(x) for one complete cycle:
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
import math
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']
Step 26: Last Few Connections
Plug the Arduino into your shield. Connect a 9V battery to the battery clip. Secure these items inside the enclosure. Make sure that the Arduino's usb port is accessible
from the outside of the enclosure. Upon startup you should see the sine wave LED light up.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 27: Screw Back Panel
Drill four holes in the back panel and secure with screws.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 29: Test
Turn up the gain knob to turn on the function generator. Plug an eighth inch jack into the output and hook up the function generator to an oscilloscope . Test out each of
the waveforms and adjust the frequency and gain to make sure they are working properly. Switch the output to pulse and check if the pulse width modulation knob works
(figs 4-6).
You will notice that the pulse wave is the only wave which truly ranges from 1Hz to 50kHz. Since the sampling rate is 100kHz, the sine, triangle, and saw waves start to
become somewhat unrecognizable at about 25kHz (they are only comprised of 4 samples per cycle- 100kHz/25kHz). The saw and triangle waves only go down to about
100Hz, this is because the values of triInc and sawInc get so low that they are rounded to zero below this frequency. The sine wave reaches all the way to 1 HZ but the
resolution stays the same for anything under 5Hz, since the Arduino only has enough memory to store about 20 thousand samples.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Arduino-Controlled Robotic Drum
by randofo on July 30, 2012
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.
You will also need to download the attached files and laser cut (or cut the old fashioned way) the following:
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']
Step 2: Attach the motor
Take two of the pieces of the standard drum bracket (without Arduino mounting holes) and sandwich a motor in-between. Fasten it through the center mounting holes
using 6-32 nuts and bolts.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 3: Make another
Pass 4-40 bolts through the Arduino mounting holes on one of the drum brackets and loosely hold them in place with bolts.
Once the bolts are passed through, make another motor bracket "sandwich" like you did in the last step.
Thread a nut all the way down one of the bolts to hold it in place, and then repeat for all of the other bolts
Slide a spacer over each of the bolts and then thread more nuts on to hold them all in place.
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 5: Drill a hole
Tape two drumsticks together and then fasten them securely into a vise in preparation for drilling.
Drill down through all of these marks with a 3/16" drill bit, to leave an identical pair of holes in each stick
Repeat this process 5 more times, to make 6 sets of drilled drum sticks.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 6: Attach drum sticks
Grab the complete drum stick assembly.
Pass a binding post from the outside of the assembly through the corner pivot hole, through the hole in the drumstick closer to the tip, and then through the inner pivot
hole.
Zip tie the drum sticks to the motor assembly using the other drilled hole.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 7: Build more
After you build your first complete drum stick assembly, build three more.
To attach this wood piece, simply lay down a little bit of wood glue, align the pre-drilled 1/8" pilot holes, and then once aligned, clamp them in place.
Don't forget to make certain that one of the pieces you are gluing the wood piece to has holes for mounting the Arduino.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 9: Motor brackets
Take your brackets and make two more motor "sandwiches," such that when they are ultimately assembled, the pieces with the extra wood piece glued on will be facing
outwards.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 10: Assemble
Put together the motor assembly like previous motor assemblies, will paying special attention that the pieces with the extra wood piece glued on are facing outwards.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 11: Build the mount
Start with a T-bracket and thread a 3" section of threaded pipe on each end.
Thread a 2" section of threaded pipe onto the end of each L-bracket.
Thread a 1" section of threaded pipe onto the end of each L-bracket.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 12: Attach
Slide the flange over the extra bit of wood on the drumstick assembly until they are aligned.
Rotate the flanges as necessary so that the pilot holes are aligned with the flange's mounting holes.
Fasten the drumstick assembly to the mounting bracket place with wood screws.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 14: Connect drum sticks
Using the binding posts, mount the drum sticks like you did for the previous drum stick assemblies.
Again, zip tie the drum sticks to the linear motor assembly.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 15: Clamp and glue again
Again you will need to attach an extra wood piece to the wooden bracket sfor the cymbal assembly mount. However, because the cymbal only uses one stick, you only
have two brackets and will need to glue the wood to each.
Make sure that when you do this, the extra piece of wood will be on the outside when you make your motor "sandwich."
Simply lay down a little bit of wood glue, align the pre-drilled 1/8" pilot holes, and then once aligned, clamp them in place.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 16: Assemble
The cymbal drumstick assembly only has one motor "sandwich."
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 17: Build another mount
Start with a T-bracket and thread a 2-1/2" section of threaded pipe on each end.
Thread a 2-1/2" section of threaded pipe onto the end of each L-bracket.
Thread a 2" section of threaded pipe onto the end of each L-bracket.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 18: Fasten
Connect the drum stick assembly to the pipe mount exactly like you did for the hi hat assembly.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 20: Connect the drum stick
Once more, mount the drum sticks like you did for the previous drum stick assemblies, and then zip tie the drum sticks to the linear motor assembly.
Remove the spring that is keeping tension on the pedal's rotational assembly.
Using the mounting holes in the wooden bracket as a guide, drill 1/4" holes on both sides of the pedal. This should result in 2 holes on each side of the pedal.
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 22: Attach
Attach the wooden brackets with 1/4 nuts and bolts to the kick drum pedal assembly using the holes that you have just drilled.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 23: Spacers
Dissemble two pens so you are left only with the pen tube.
Insert 5" x 1/4 bolts through the bracket's structural mounting holes, using the pens as spacers in-between the two.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 24: Attach motor
Line up the shaft of the linear motor assembly with the rotational pivot of the kick drum pedal assembly that the spring used to be attached to.
Attach the motor to the wooden bracket using 6-32 nuts and bolts.
Zip tie the motor shaft to the rotational pivot of the kick drum pedal.
If the motor does not have red or black wires, designate one of the colors to be ground and the other to be power. In this case, the green wire will be ground.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 26: Jack
Take apart the 1/4" plug, and go grab about 5' of speaker wire.
Solder the marked edge of the speaker wire to the ground terminal.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 27: Snare
Attach one of the drumstick brackets to the snare drum by passing the steel hanger strap through the thin vertical mounting slots in the brackets and wrapping it around
the drum. Fasten it tightly in place with 6-32 nuts, and bolts.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 28: Toms
Attach a drum stick assembly to the toms like you did the snare drum.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 31: Kick drum
Attach the motor-controlled kick drum pedal to the drum.
However, before you go and do this, bend the shields Vin pin so that it will not plug in to the Arduino. This is done to prevent the Arduino from getting directly connected
to the voltage input on the motor controller, which is rather high and runs the risk of spiking.
Alternately, if you don't want to preserve this functionality on the shield, cut the pin away entirely.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 33: Program the Arduinos
Upload each respective Arduino with the code below.
Hi Hat Arduino:
/*
This is code for a robotic drum created by Randy Sarafan.
int event = 0;
int incomingByte = 0;
void setup() {
Serial.begin(57600);
cli();//stop interrupts
sei();//allow interrupts
void loop() {
if(event == 1){
if (incomingByte == 129) {
//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 == 130) {
//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 == 144) {
//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(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
//recoil time
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.
int event = 0;
int incomingByte = 0;
void setup() {
Serial.begin(57600);
cli();//stop interrupts
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
//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
//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);
}
/*
This is code for a robotic drum created by Randy Sarafan.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
int event = 0;
int incomingByte = 0;
void setup() {
Serial.begin(57600);
cli();//stop interrupts
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
//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
//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);
}
/*
This is code for a robotic drum created by Randy Sarafan.
int event = 0;
int incomingByte = 0;
void setup() {
Serial.begin(57600);
cli();//stop interrupts
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
//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
//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);
}
/*
This is code for a robotic drum created by Randy Sarafan.
int event = 0;
int incomingByte = 0;
void setup() {
Serial.begin(57600);
cli();//stop interrupts
sei();//allow interrupts
void loop() {
if(event == 1){
if (incomingByte == 137) {
//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 == 138) {
//start down
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
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 == 208) {
//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(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
//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);
}
/*
This is code for a robotic drum created by Randy Sarafan.
int event = 0;
int incomingByte = 0;
void setup() {
Serial.begin(57600);
cli();//stop interrupts
sei();//allow interrupts
void loop() {
if(event == 1){
if (incomingByte == 139) {
//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 == 140) {
//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 == 224) {
//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);
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
//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);
}
Remove the nuts from the Arduino mounting bolts that were inserted earlier.
Finally, mount the Arduino using these bolts and fasten them firmly in place with nuts.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 35: Extend
If necessary, extend all of the motor wires so that they are long enough to plug into the motor shield.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 36: Plug
Plug the wires from each motor into either Channel A or Channel B on the motor shield.
For the most part, it is not really important which is which, so long as it is a single motor to a single channel.
The one exception to this rule is the Arduino that controls the kick drum and the cymbal, but we will touch more on this in a moment.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 38: Jacks
Wire each of the jacks such that the positive red wire is connected to the center terminal and the black wire is connected to the outer terminal.
Mount the jacks into three of the holes side-by-side on one side of the case.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 39: Wire it up
Connect the wires from each of the jacks into the European terminal strip.
Wire them up such that it is alternating power and ground, and each jack is supplying power to two pairs on the strip. In other words, each jack should be supplying power
and ground twice.
Connect the speaker wire to the first pair so that the marked edge of the wire is going to ground and the unmarked edge is going to power. Repeat this for all subsequent
pairs.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 40: Case closed
Pass the wires in pairs of two through each of the three respective holes in the case.
Make sure the terminals strip is nicely situated inside the box.
Put the lid onto the power box and fasten it shut.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 41: Set up
Install the toms above the kick drum as you normally would for any other drum kit.
The snare and floor tom (not pictured) can just stand on the floor in their typical places.
These cymbals and strikers can then be positioned in their normal drum kit location.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 43: Plug some stuff in
Take a speaker wire from the power supply box, and plug the marked edge of the speaker wire into the ground input socket on one of the motor shields. Next, plug the
unmarked edge into the power socket on the shield. Repeat this process five times, for all of the motor shields.
Plug the marked edge of the 1/4" plug cable into the "Motor A" minus terminal on the cymbal assembly's motor shield. Plug the unmarked edge into the plus terminal of
the cymbal assembly's motor shield. Insert the 1/4" plug into the 1/4" jack on the kick drum.
Plug the three 9V power adapters into the power strip, and insert their barrel plugs into the M-type jacks on the power supply box.
Plug a USB wire into each of the Arduinos and then plug them all into the USB hub.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 44: Sequence
To use the drum kit, first connect the USB hub to your computer and make sure the power strip is powered on.
Next, visit the Max MSP site and download Max5 Runtime (Mac / Windows ).
Download the attached zip file with the "robo drums sequencer57600" Max patch.
This Max patch was created by the amazing Amanda Ghassaei - Max MSP Ninja and loosely certified Instructables Genius. This project would have taken
much longer, and probably have not been quite as awesome, without her world class Max MSP skills.
File Downloads
Related Instructables
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Arduino Vocal Effects Box
by amandaghassaei on July 10, 2012
Author:amandaghassaei amandaghassaei.com
Currently working for instructables!
PARTS LIST
Additional Materials:
22 Gauge Wire Radioshack #278-1224
Solder Radioshack #64-013
sand paper
plywood
wood glue
hot glue
screws
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).
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/
Step 3: DAC: Part 1
Solder eight 20kOhm resistors to arduino pins D0-D7 as shown in the images above.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 5: DAC: Part 3
Connect the other end of the 20kOhm reisistor to arduino ground
/*
* 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() {
//set port/pin mode. see http://www.arduino.cc/en/Reference/PortManipulation for more info
DDRD = 0xFF;//port d (digital pins 0-7) all outputs
cli();//stop interrupts
sei();//allow interrupts
}
ISR(TIMER2_COMPA_vect) {
//increment t
t+=1;
if (t==628){//40kHz/628 =~ 63Hz
t=0;
}
}
void loop(){
//sine wave of frequency ~63Hz
//send sine values to PORTD between 0 and 255
PORTD=byte(127+127*sin(t/100));
}
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.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes Image Notes
1. connect middle pin from pot to pin 5 1. connects pins 6 and 7
2. connect red lead from pot to pin 1
3. connect ground from pot to ground/pin4
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
If you are planning to send the output out as line level into another effects module or amplifier, then do not add this voltage divider.
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
20000=1/(2*3.14*1000*C)
C =~ 8nF
Since 8nF capacitors are hard to come by I rounded up to 0.01uF. This gives a cutoff frequency of about 16kHz. You can mess around with different values and see what
you like best, I tend to like heavier filtering bc it removes more unwanted noise.
Solder a 1kOhm resistor to the junction from the voltage divider from the last step (if you did not include the voltage divider, solder straight to pin 7). Solder a 0.01uF
capacitor in series with this resistor to ground. Solder a wire from the junction between the capacitor and resistor to pin 5 of the second socket.
Image Notes
1. 1kOhm resistor connected to voltage divider junction
2. 0.01uF capacitor connected to ground
3. filtered signal out
Solder a wire between the two non-inveting inputs of the op amps (pins 5 and 3 of the second socket). Solder another wire between the two outputs (pins 1 and 7 of the
second socket). On the underside of the board solder the inverting inputs to their outputs (fig 2).
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes Image Notes
1. wire connecting two non-inverting inputs of the dual op amp. 1. solder inverting input to output
2. wire connecting the two outputs from both op amps. 2. solder inverting input to output
Solder the - end of a 100uF (or higher) capacitor to the output of the second op amp. The signal coming from the + end of the capacitor will be DC offset to oscillated
around 0V.
Use hot glue to add some structural support to these connections and prevent short circuits. Solder the green wire to the + end of the 100uF capacitor and solder the
black wire to ground.
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/
Step 15: Microphone Circuit
Fig 2 shows the signal coming straight out of the microphone on an oscilloscope . The signal is relatively weak, with an amplitude of only 200mV. Notice how the signal
oscillates around 0 volts- this is typical of audio signals. Ideally, you want to have a signal with a max amplitude of 2.5V oscillating around 2.5V. This way the signal is
completely contained within 0-5V; the Arduino will be able to measure it with maximum resolution and no clipping. In order to do this, the signal will need to be DC offset
and amplified. DC offset means changing the level that the wave oscillated around (the midpoint of the wave). Amplification means increasing the amplitude (distance
between the center point and max or min) of a signal. Amplification also buffers the microphone element from any loads that you may put on it later in the circuit, which is
a good thing because it prevents distortion.
Fig 3 shows the same microphone signal after amplification, you can see how the height of the peaks has increased so that the wave oscillates between -2.5 and 2.5 V
(amplitude of 2.5V). Fig 4 shows the signal after it has been DC offset; it still has an amplitude of 2.5V, but the center point is 2.5V instead of 0V, so the wave never drops
down below 0V. (Note- the slight change in shape between the signals in figure 3 and 4 is dues to changes in my voice between the two pics, it has nothing to do with the
circuit). The signal in fig 4 is ready to go to an Arduino analog input pin.
Image Notes
1. unused op amp in dual op amp package
2. microphone mono input Image Notes
1. signal directly from microphone has a relatively small amplitude
Image Notes
1. amplified signal oscillates between -2.5 and 2.5 V 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/
Step 17: Amplifier socket and power
Solder an 8 pin socket onto the protoboard (fig 1). As shown in the pin diagram for the TL082, +V connects to pin 8 and -V connects to pin 4. Connect on of the red wires
from the middle lead of the DPDT switch to pin 8. Let's call the battery snap that is attached to this red lead snap #1. Solder the black lead from snap #2 to pin 4 of the
socket (figs 2 and 3). Solder the black lead from snap #1 and the remaining red lead from the center pin of switch #2 together on the protoboard (figs 3 and 4), this is the
center tap (0v) between the +9/-9V supply. Solder this connection to arduino ground (fig 8).
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes Image Notes
1. center tap 1. center tap
Image Notes
1. from arduino ground
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 18: Microphone input
Unscrew the plastic case from the 1/4" jack. If you have a mono microphone, unclip the right lead (fig 2). I also trimmed some of the metal from the larger lead- the
ground lead (figs 5 and 6). Solder a black wire to the ground lead and a green wire to the other lead. Cover the leads of the jack with hot glue to prevent short circuiting or
breakage.
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/
Step 19: Non-inverting amplifier: part 1
Solder the wires from the 1/4" jack to the protoboard. Solder the black wire to arduino ground and the green wire to pin 5 of the 8 pin socket.
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/
Step 21: Non-inverting amplifier: part 2
Solder two leads onto a potentiomer (shown in fig 1) so that it acts as a variable resistor. Solder one side (doesn't matter which) to ground and the other side to pin 6 of
the socket. This pot will control the amplitude of the incoming microphone signal.
Image Notes
1. lead to pin 7 of socket
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 23: DC offset: part 2
Solder a 47nF capacitor to the - end of the 10uF capacitor. Connect the other side of the 47nF cap to ground.
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/
Step 25: Connect to analog input
Connect analog input 0 to the junction between the two capacitors in the DC offset circuit.
/*
* 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.
*
*/
int incomingAudio;
void setup(){
for (byte i=0;i<8;i++){
pinMode(i,OUTPUT);//set digital pins 0-7 as outputs
}
pinMode(A0,INPUT);
}
void loop(){
incomingAudio = analogRead(A0);//read input from A0
incomingAudio = incomingAudio/4;//scale from 10 bit to 8 bit
PORTD = incomingAudio;//send out DAC
}
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.
/*
* 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
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
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 |= (1 << ADPS2) | (1 << ADPS0); //set ADC clock with 32 prescaler- 16mHz/32=500kHz
ADCSRA |= (1 << ADATE); //enabble auto trigger
ADCSRA |= (1 << ADEN); //enable ADC
ADCSRA |= (1 << ADSC); //start ADC measurements
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.
/*
* 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
ADCSRA |= (1 << ADPS2) | (1 << ADPS0); //set ADC clock with 32 prescaler- 16mHz/32=500kHz
ADCSRA |= (1 << ADATE); //enabble auto trigger
ADCSRA |= (1 << ADIE); //enable interrupts when measurement complete
ADCSRA |= (1 << ADEN); //enable ADC
ADCSRA |= (1 << ADSC); //start ADC measurements
sei();//enable interrupts
}
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
/*
* 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.
*
*/
//audio storage
byte buffer1[1000];
byte buffer2[1000];
void setup(){
DDRD=0xFF;//set port d (digital pin s0-7) as outputs
DDRC=0x00;//set all analog pins as inputs
cli();//diable interrupts
ADCSRA |= (1 << ADPS2) | (1 << ADPS0); //set ADC clock with 32 prescaler- 16mHz/32=500kHz
ADCSRA |= (1 << ADATE); //enabble auto trigger
ADCSRA |= (1 << ADIE); //enable interrupts when measurement complete
ADCSRA |= (1 << ADEN); //enable ADC
ADCSRA |= (1 << ADSC); //start ADC measurements
sei();//enable interrupts
}
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(){
}
Solder a row to header pins to digital pins 9-13. Solder a 10kOhm resistor and 0.1uF capacitor in series to pins 10-12. Solder the free end of the 0.1uF capacitors
together and connect to Arduino +5V. Connect the outside pin of two 1mOhm linear taper pots to the junction between the resistor and capacitor attached to digital pins
11 and 12. Connect the outside pin of a 1mOhm logarithmic taper pot to the junction between the resistor and capacitor attached to digital pin 10. Solder the middle pins
of each pot to ground.
I you'd like you can increase the resolution of any of these controls by increasing the capacitance of the 0.1uF cap to 1uF or 10uF. This change will have to be accounted
for in the final firmware as well.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 30: Switch
This switch allows reverse playback of recorded samples. Solder a 10kOhm resistor to one of the leads from the switch. Solder a red wire to the other end of the resistor
and connect to ground. Solder a wire to the junction between the resistor and the switch and connect to Arduino digital pin 9. solder a black wire to the remaining pin from
the switch and connect to ground.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes
1. to 5V
2. to ground
3. to arduino input pin
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Image Notes Image Notes
1. 100ohm current limiting resistor 1. cover anode with shrinkwrap
I coated the plywood in three coats of polycrylic and glued the sides together with wood glue. I glued three small triangular pieces into the corners of the enclosure so that
I could screw the back panel on with wood screws (fig 3).
Attach the Arduino to the header pins on the protoboard and begin installing the components in the enclosure. I started by attaching the pots and switches to the front
panel and then added the jacks, LED indicators, and pots to the sides. Finally I pushed the arduino's usb port through the square hole on the bottom of the enclosure. My
arduino sat firmly in place, you could screw it to the back panel for an extra secure fit.
I've attaches the corel file for the enclosure that I built.
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/
Step 36: Final firmware
Here is the final code for the project. I've already explained the basic ideas behind most of the audio processing in previous steps. The only changes I've made here is to
add some code which allows the pots and switches on the device to change the value of a few variables: "scale," "grain," "forward," and "wet" and "dry."
/*
* 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.
*
*/
/*
pots:
wet/dry
grain size
pitch shift
*/
//audio storage
byte buffer1[500];
byte buffer2[500];
void setup(){
DDRD=0xFE;//set digital pins 0-7 as outputs
DDRB=0xFD;//set digital pins 10-13 as outputs, 9 as input
DDRC=0x00;//set all analog pins as inputs
cli();//diable interrupts
ADCSRA |= (1 << ADPS2) | (1 << ADPS0); //set ADC clock with 32 prescaler- 16mHz/32=500kHz
ADCSRA |= (1 << ADATE); //enabble auto trigger
ADCSRA |= (1 << ADIE); //enable interrupts when measurement complete
ADCSRA |= (1 << ADEN); //enable ADC
ADCSRA |= (1 << ADSC); //start ADC measurements
sei();//enable interrupts
}
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
PORTD = (wet*int(buffer2[iscale])+dry*int(ADCH))>>4;//send out DAC
}
else{//reverse
PORTD = (wet*int(buffer2[iscalerev])+dry*int(ADCH))>>4;//send out DAC
}
}
else{
buffer2[i] = ADCH;//store incoming
if (ADCH == 0 || ADCH == 1023){//if clipping
PORTB |= 32;//set pin 13 high
clippingCounter = 5000;//reset clipping counter
clipping = 1;//currently clipping
}
if (forward){
PORTD = (wet*int(buffer1[iscale])+dry*int(ADCH))>>4;//send out DAC
}
else{
PORTD = (wet*int(buffer1[iscalerev])+dry*int(ADCH))>>4;//send out DAC
}
}
}
else{
if (toggle){
if (forward){
PORTD = (wet*int(buffer2[iscale])+dry*int(ADCH))>>4;//send out DAC
}
else{
PORTD = (wet*int(buffer2[iscalerev])+dry*int(ADCH))>>4;//send out DAC
}
}
else{
if (forward){
PORTD = (wet*int(buffer1[iscale])+dry*int(ADCH))>>4;//send out DAC
}
else{
PORTD = (wet*int(buffer1[iscalerev])+dry*int(ADCH))>>4;//send out DAC
}
}
}
i++;//increment i
iscale = i*10/scale-grain*multiplier;
iscalerev = grain-iscale-1;
if (i==grain){
rec = 0;//stop recording
}
if (i>=(grain*scale/10)){
if (scale<10){
if (i==grain){
i = 0;
iscale = 0;
iscalerev = grain-1;
forward = newForward;//update direction
scale = newScale;//update scale
grain = newGrain;//update grain
dry = newWetDry;//update wet dry
wet = 16-dry;
toggle ^= 1;//try removing this
rec = 1;
multiplier = 0;
}
else if (iscale>=grain){
iscale = 0;
iscalerev = grain-1;
multiplier++;
}
}
else{
i = 0;
iscale = 0;
iscalerev = grain-1;
forward = newForward;//update direction
scale = newScale;//update scale
grain = newGrain;//update grain
dry = newWetDry;//update wet dry
wet = 16-dry;
toggle ^= 1;//try removing this
rec = 1;
multiplier = 0;
}
}
if (clipping){
clippingCounter--;//decrement clipping counter
}
}
void checkScale(){
PORTB & 251;//set pin 10 low
scalePot = 0;
while(digitalRead(10)){
scalePot++;
}
newScale = scalePot+2;
}
void checkGrainSize(){
PORTB & 247;//set pin 11 low
grainPot = 0;
while(digitalRead(11)){
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 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
Making a "Soft-
The Lightning Vocal"
Simulator/Breathalyzer/Graphic Remove The Instrumental in Designing
Possessed Audacity by Awesome
Little Monster Equalizer - Lyrics From
Arduino Hoboman Videogame
Portable Mini by jimmmm Making MOST Songs by SquawkBox - an
Powered by Professional algorithmic beat Audio by helava
Vocal Booth by DancerBoi
humanworkshop alinke Voice Overs box using a toy
using Garage voice recorder
Band and by darwingrosse
IMovie (video) by
howtomac
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Bicycle North Indicator
by amandaghassaei on July 23, 2012
Author:amandaghassaei amandaghassaei.com
Currently working for instructables!
Magnetoception is the ability of some animals to detect magnetic fields as a means of orienting themselves. Although humans do not seem to posses the same biological
mechanisms that allow other animals to sense magnetic fields, there are still many ways that we can improve our sense of spatial orientation.
This project is an attachment to your bicycle that beeps to let you know that you are moving in the direction of magnetic north. It uses a parallax digital compass module,
an Arduino, and a piezo buzzer to give you directional feedback as you bike. The basic idea here is that by providing a constant source of stimuli in a certain direction,
you might find yourself becoming more aware of other visual or sensory cues in your commute that indicate your orientation: geographical landmarks, air currents,
inclines, or the position of the sun, moon, and stars.
Additional Materials:
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
Upload the following code onto the Arduino. It will print the raw x, y, and z data from the compass chip (the directions are indicated on the chip in figure 4). If you have
wired everything correctly you should see the raw data printed on your serial monitor (control/command+shift+m) in the Arduino IDE. I found this code on the parallax
website .
#include <Wire.h>
void setup() {
Serial.begin(9600);
delay(100); // Power up delay
Wire.begin();
void loop() {
int x, y, 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 4: Piezo buzzer
The piezo buzzer says that it should run off a 9-16V supply, but if you hook it up to 5V it will still run, just somewhat quieter. I didn't necessarily want it to buzz at
maximum loudness so it worked out well to hook it directly to one of the Arduino's digital pins for this project. If you really want to run the buzzer at 9V, you can wire it up
with a transistor to the battery supply and use a transistor to switch it on and off.
Solder the red lead from the piezo buzzer to digital pin 7. Solder the black wire to Arduino ground.
Solder the red lead from the battery snap to one of the outside pins on the switch. Solder a red wire between the middle pin of the switch and the Vin pin on the Arduino.
Solder the black lead from the battery snap to Arduino ground.
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>
boolean buzzer = 0;
//calibrate these
int xVal = -185;
int yVal = 300;
int zVal = -115;
void setup() {
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Wire.begin();
Serial.begin(9600);
pinMode(7,OUTPUT);
}
void loop() {
Serial.print("X=");
Serial.print(x);
Serial.print(", Y=");
Serial.print(y);
Serial.print(", Z=");
Serial.println(z);
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>
boolean buzzer = 0;
//calibrate these
int xVal = -185;
int yVal = 300;
int zVal = -115;
void setup() {
Wire.begin();
Serial.begin(9600);
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);
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/
Step 7: Secure arduino, buzzer, and battery clip to enclosure
Lay out the arduino, piezo buzzer, and battery clip onto the lid of the project enclosure and mark out the position of the mounting holes. Drill these holes fasten the
components down with nuts and bolts as shown in the images above.
Make sure to orient the arduino so that the x axis of the parallax chip is parallel to the long edge of the project enclosure (fig 3).
Image Notes
1. fasten the arduino down with 4 nuts and bolts
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 8: Install switch
Drill a hole in the bottom of the project enclosure and mount the power switch by securing it with a nut.
Step 9:
Secure the lid of the enclosure with 4 screws.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 10: Attach to bike
Use zip ties to secure the project to your bike. Line up the project enclosure so that the front of the bike points in the same direction as -Y on the parallax chip. Don't
forget to turn off the project when you are not using it or you will drain the battery quickly!
Related Instructables
Arduino Bike
Steampunk
Speedometer by Poor Mans GPS
Geocaching by
amandaghassaei ServerBot - for Wiring and How to Navigate Portable Sun by CpHarding AlleyCats:
r10n Tracking Solar Treasure Hunts
serving food programming with a Map and
and drinks by the Parallax Compass by Panel With A On Your
RFID Serial Windup Clock Bicycle. by
JoeCreate zwild1
Card Reader for Drive by Gareth0123
the Arduino by shastalore
Kev_MacD
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
iPhone Camera Remote
by audreyobscura on July 19, 2012
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/
Step 2: File Down the LEDs
To get the LEDs to be flush with each other, I filed down one of the sides one each one. Holding the LED so that the positive lead was to the right, I ground down about
an eighth inch of material from the LED using a metal file.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 3: Glue the LEDs together
I used a quick-setting two-part epoxy to glue the two filed down sides together. You just need a little bit, it goes a long way.
To mix the epoxy, gently squeeze out of the tube on to a piece of wood or cardbord. Then, snip the end of a popsicle stick or coffee stir to thoroughly mix both parts of the
epoxy together.
Gently apply a small amount of epoxy to the LEDs' filed down edges, and allow to sit for 30 minutes.
REMEMBER:
The LED's leads are wired in reverse parallel, so you need to file down the same side on each LED. The long positive lead from one LED must be wired to the short
negative lead of the other LED, and vice versa. Please see the schematic attached to this step.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 4: Prepare the headphone jack
Take the sleeve off of the headphone jack by unscrewing it, and then snip the end off where the cord comes out of. Using the metal file again, I ground down the end I
just snipped off to make it even again. Lastly, I took a box-cutter, and split it in half to accommodate for the LEDs I would be putting in there.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 5: Solder LEDs to eachother, and to the headphone jack.
After the epoxy had set, I bent the leads of each LED towards each other, then solder them together at a very high spot close to the plastic dome of the LED. After I
soldered them to each other I trimmed a lead from each end, so I effectively had two leads for two LEDs (instead of four leads). I then threaded the leads through the
holes of the stereo jack, and soldered them into place.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 6: Re-Sleeve the headphone plug with heat shrink.
I took the cut plastic casing for the plug and re-sleeved the stereo connector with it. After the metal components had the original plastic on it, there was still a gap. I cut a
small piece of 1" heat shrink, and slid it around the original plastic. There are many ways to seal heat-shrink, I personally like doing it with the barrel of a soldering iron.
Others will tell you to do it with a heat-gun, and I have even seen it done with butane lighters.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 7: Get the app and take pictures.
There is an app available for iPhone called DSLRbot. With this app you are able to turn your iPhone into an intervolometer, a wireless remote, and even a shutter release
for bulb modes on Canon and Nikon cameras. As long as your camera has an infrared module long on the front of it, and you can be line-of-sight to the camera from your
iPhone, this app is extremely handy.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Related Instructables
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
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.
Tools:
Solder
Soldering Iron
Wire Snips
Hot Glue Gun
I used a laser cutter to make my own personal enclosure, but one could easily modify a pre-made project enclosure to suit the needs of this project.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 2: Modify the 9V relay
The only part needed from the 9v Relay is the magnet coil, the rest of the pins are not needed.
I trimmed all of the leads off of the relay except the ones that attach to both ends of the coil. I then soldered wires from each of the leads from the coil.
The purpose of the magnet coil in this circuit is to detect when the hanging magnet from the cylinder passes over it. The magnet sways when the earth moves, triggering
the piezo buzzer to sound, and the LED to illuminate.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 3: Create a home for the 9V relay.
One of the many perks of using a laser cutter is being able to make precision housing for your project. Because I knew I was using a 3" acrylic tube to hang my magnet
in, I knew that I could make a 2.95" circle with a relay-sized rectangle cut out of it to perfectly house my relay in the middle of the tube.
Using CorelDraw, I generated a series of files for the enclosure, and then used .3" thick acrylic sheets to make the housing.
The file has 6 sides, with holes for the piezo buzzer, LED, and the acrylic tube. It is attached to this step of the instructable.
After I had my laser-cut parts, I glued my relay into it's home in the round, that will later be inserted into the tube.
I placed the relay into it's nook, then hot-glued it into place. After it was in place, I soldered a wire from each of the leads.
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/
Step 4: The Circuit
Here is the circuit diagram I used for this project. There is also a fritzing file attached.
I designated one ground rail, one 9v + rail, and another 9V - rail. I soldered the red positive wire from one battery clip to the top rail of the PCB, and took the black
negative wire of the same clip and soldered it to the lower part of column 47. I soldered the other battery clip in by connecting the red positive wire next to the negative
wire of the other clip, and the black wire to the clip of the bottom rail.
Image Notes
1. 9V
2. 9V-
3. GND rail
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 7: Pin 4 and 7
On each of the OpAmps, pin 4 goes to the -9V rail, and pin 7 goes to the +9V rail. I used jumper wires to connect the span between the pins and rails.
This is essentially reading the shifting output of the magnetic coil inside the relay, and comparing it to a normalized value.
Pin 3 on the left opAmp IC gets connected to the grounded rail that was established in column 47 of the PCB.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 10: Potentiometer
I wired the left pin of the potentiometer to 9V+, the right pin to 9V-, and the middle pin to pin 2 of the riht OpAmp IC.
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
Step 11: Wire Buzzer and LED
I was able to sink the LED and Piezo buzzer into the enclosure the same way I sunk the 9V relay into the housing. I made sure it was flush with the outward-facing side,
and then hot-glued it into place.
I ran a 470 Ohm resistor from the 9V+ rail, and connected that resistor to the positive lead of the LED. Both the LED and Piezo buzzer's negative lead run to the output
pin (6) of the right IC.
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/
Step 13: Implementation
A good way to test this circuit is by jumping on the ground, and adjusting the sensitivity potentiometer that way. You may have noticed that there is no power switch
integrated into this design - this is so the device is always on, and so that one can always know when an earthquake is happening, even if you cannot feel it. (It will also
tell you when trains, and big trucks are going by!)
Related Instructables
Arduino
Seismic Activity
Build a Monitor - Acoustic Guitar Bicycle North
Pendulum Diy Piezo cheap, super- Laser Beam A magnetic field Insect
Ethernet Shield Indicator by
Seismometer sensitive Alarm System strenght audible Eavesdropper:
by veedo Pickups by amandaghassaei Creating a High-
for under $15 by digitizing probe by norbizzle12 indicator by
rbneville Gain Parabolic
bikeframe for cnc... 5Volt
harkman's Microphone by
probe (Photos) nevdull
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/
by harkman
http://www.instructables.com/id/RadioShack-presents-18-More-Awesome-Projects/