ARDX experimentation kit for arduino Experimenter’s Guide for Arduino (ARDX)
A Few Words ABOUT THIS KIT The overall goal of this kit is fun. Beyond this, the aim is to get you comfortable using a wide range of electronic components through small, simple and easy circuits. The focus is to get each circuit working then giving you the tools to figure out why. If you encounter any problems, want to ask a question, or would like to know more about any part, extra help is only an e-mail away help@oomlout.com. ABOUT OPEN SOURCE HARDWARE All of .:oomlout:.'s projects are open source.
.: WHERE TO FIND EVERYTHING :.
01 ASEM assembling the pieces 02 .: PUTTING IT TOGETHER :. Arduino Holder x1 Breadboard x1 4-40 x 0.5 " x2 4-40 nut x4 .: For an introduction to what an Arduino is, visit :. .: http://ardx.org/INTR :.
.: INSTALLING THE IDE :. 02 INST installing This is the program used to write code for the Arduino. It may seem a little daunting at first but once you have it installed and start playing around, its secrets will reveal themselves. (software and hardware) Step 1: Download the software Go to http://arduino.cc/en/Main/Software download the software for your operating system Windows XP Mac OSX Step 2: Unzip the Software Step 2: Open The .dmg Unzip -windows.zip (r - version #) arduino-1.
03 PROG programming primer .:A Small Programming Primer:. ARDUINO PROGRAMMING IN BRIEF The Arduino is programmed in the C language. This is a quick little primer targeted at people who have a little bit of programing experience and just need a briefing on the idiosyncracies of C and the Arduino IDE. If you find the concepts a bit daunting, don't worry, you can start going through the circuits and pick up most of it along the way. For a more in-depth intro, the Arduino.cc website is a great resource.
.:For a full programming reference visit:. http://ardx.org/PROG 03 PROG programming primer MATHS OPERATORS Operators used for manipulating numbers. (they work like simple maths). = (assignment) makes something equal to something else (eg. x = 10 * 2 (x now equals 20)) % (modulo) gives the remainder when one number is divided by another (ex. 12 % 10 (gives 2)) + (addition) (subtraction) * (multiplication) / (division) COMPARISON OPERATORS Operators used for logical comparison.
04 ELEC electronics primer .:A Small Electronics Primer:. ELECTRONICS IN BRIEF No previous electronic experience is required to have fun with this kit. Here are a few details about each component to make identifying, and perhaps understanding them, a bit easier. If at any point you are worried about how a component is used or why it's not working the internet offers a treasure trove of advice, or we can be contacted at help@oomlout.
04 ELEC electronics primer COMPONENT DETAILS (CONT.) Piezo Element What it Does: A pulse of current will cause it to click. A stream of pulses will cause it to emit a tone. Identifying: In this kit it comes in a little black barrel, but sometimes they are just a gold disc. No. of Leads: 2 Things to watch out for: - Difficult to misuse. More Details: http://ardx.org/PIEZ IC (Integrated Circuit) What it Does: Packages any range of complicated electronics inside an easy to use package.
CIRC-01 .:Getting Started:. .:(Blinking LED):. WHAT WE’RE DOING: LEDs (light emitting diodes) are used in all sorts of clever things which is why we have included them in this kit. We will start off with something very simple, turning one on and off, repeatedly, producing a pleasant blinking effect. To get started, grab the parts listed below, pin the layout sheet to your breadboard and then plug everything in. Once the circuit is assembled you'll need to upload the program.
CODE CIRC-01 (no need to type everything in just click) File > Examples > 1.Basic > Blink (example from the great arduino.cc site, check it out for other ideas) /* Blink * Turns on an LED on for one second, then off for one second, * repeatedly. * Created 1 June 2005 By David Cuartielles * http://arduino.cc/en/Tutorial/Blink * based on an orginal by H.
CIRC-02 .:8 LED Fun:. .:Multiple LEDs:. WHAT WE’RE DOING: We have caused one LED to blink, now it's time to up the stakes. Lets connect eight. We'll also have an opportunity to stretch the Arduino a bit by creating various lighting sequences. This circuit is also a nice setup to experiment with writing your own programs and getting a feel for how the Arduino works. Along with controlling the LEDs we start looking into a few simple programming methods to keep your programs small.
CODE CIRC-02 (no need to type everything in just click) Download the Code from ( http://ardx.org/CODE02 ) (and then copy the text and paste it into an empty Arduino Sketch) //LED Pin Variables int ledPins[] = {2,3,4,5,6,7,8,9}; //An array to hold the //pin each LED is connected to //i.e.
CIRC-03 .:Spin Motor Spin:. .:Transistor & Motor:. WHAT WE’RE DOING: The Arduino's pins are great for directly controlling small electric items like LEDs. However, when dealing with larger items (like a toy motor or washing machine), an external transistor is required. A transistor is incredibly useful. It switches a lot of current using a much smaller current. A transistor has 3 pins. For a negative type (NPN) transistor, you connect your load to collector and the emitter to ground.
CODE CIRC-03 (no need to type everything in just click) Download the Code from ( http://ardx.
CIRC-04 .:A Single Servo:. .:Servos:. WHAT WE’RE DOING: Spinning a motor is good fun but when it comes to projects where motion control is required they tend to leave us wanting more. The answer? Hobby servos. They are mass produced, widely available and cost anything from a couple of dollars to hundreds. Inside is a small gearbox (to make the movement more powerful) and some electronics (to make it easier to control). A standard servo is positionable from 0 to 180 degrees.
CODE CIRC-04 (no need to type everything in just click) File > Examples > Servo > Sweep (example from the great arduino.cc site, check it out for other great ideas) // Sweep // by BARRAGAN #include Servo myservo; // create servo object to control a servo int pos = 0; // variable to store the servo position void setup() { myservo.attach(9); } // attaches the servo on pin 9 to the servo object void loop() { for(pos = 0; pos < 180; pos += { myservo.
.:8 More LEDs:. CIRC-05 .:74HC595 Shift Register:. WHAT WE’RE DOING: Time to start playing with chips, or integrated circuits (ICs) as they like to be called. The external packaging of a chip can be very deceptive. For example, the chip on the Arduino board (a microcontroller) and the one we will use in this circuit (a shift register) look very similar but are in fact rather different. The price of the ATMega chip on the Arduino board is a few dollars while the 74HC595 is a couple dozen cents.
CODE CIRC-05 (no need to type everything in just click) Download the Code from ( http://ardx.
CIRC-06 .:Music:. .:Piezo Elements:. WHAT WE’RE DOING: To this point we have controlled light, motion, and electrons. Let's tackle sound next. But sound is an analog phenomena, how will our digital Arduino cope? We will once again rely on its incredible speed which will let it mimic analog behavior. To do this, we will attach a piezo element to one of the Arduino's digital pins. A piezo element makes a clicking sound each time it is pulsed with current.
CODE CIRC-06 (no need to type everything in just click) Download the Code from ( http://ardx.org/CODE06 ) (copy the text and paste it into an empty Arduino Sketch) /* Melody * (cleft) 2005 D. Cuartielles for K3 * * This example uses a piezo speaker to play melodies. It sends * a square wave of the appropriate frequency to the piezo, * generating the corresponding tone.
.:Button Pressing:. CIRC-07 .:Pushbuttons:. WHAT WE’RE DOING: Up to this point we have focused entirely on outputs, time to get our Arduino to listen, watch and feel. We'll start with a simple pushbutton. Wiring up the pushbutton is simple. There is one component, the pull up resistor, that might seem out of place. This is included because an Arduino doesn't sense the same way we do (ie button pressed, button unpressed). Instead it looks at the voltage on the pin and decides whether it is HIGH or LOW.
CODE CIRC-07 (no need to type everything in just click) File > Examples > 2.Digital > Button (example from the great arduino.cc site, check it out for other great ideas) /* * Button * by DojoDave * * Turns on and off a light emitting diode(LED) connected to digital * pin 13, when pressing a pushbutton attached to pin 7. * http://www.arduino.
.:Twisting:. CIRC-08 .:Potentiometers:. WHAT WE’RE DOING: Along with the digital pins, the Arduino also has 6 pins which can be used for analog input. These inputs take a voltage (from 0 to 5 volts) and convert it to a digital number between 0 (0 volts) and 1023 (5 volts) (10 bits of resolution). A very useful device that exploits these inputs is a potentiometer (also called a variable resistor).
CODE (no need to type everything in just click) File > Examples > 3.Analog > AnalogInput CIRC-08 (example from the great arduino.cc site, check it out for other great ideas) /* Analog Input * Demonstrates analog input by reading an analog sensor on analog * pin 0 and turning on and off a light emitting diode(LED) connected to digital pin 13. * The amount of time the LED will be on and off depends on the value obtained by * analogRead().
CIRC-09 .:Light:. .:Photo Resistors:. WHAT WE’RE DOING: Whilst getting input from a potentiometer can be useful for human controlled experiments, what do we use when we want an environmentally controlled experiment? We use exactly the same principles but instead of a potentiometer (twist based resistance) we use a photo resistor (light based resistance). The Arduino cannot directly sense resistance (it senses voltage) so we set up a voltage divider (http://ardx.org/VODI).
CODE CIRC-09 (no need to type everything in just click) Download the Code from ( http://ardx.org/CODE09 ) (copy the text and paste it into an empty Arduino Sketch) /* * A simple programme that will change the * intensity of an LED based on the amount of * light incident on the photo resistor.
.:Temperature:. CIRC-10 .:TMP36 Precision Temperature Sensor:. WHAT WE’RE DOING: What's the next phenomena we will measure with our Arduino? Temperature. To do this we'll use a rather complicated IC (integrated circuit) hidden in a package identical to our P2N2222AG transistors. It has three pin's, ground, signal and +5 volts, and is easy to use. It outputs 10 millivolts per degree centigrade on the signal pin (to allow measuring temperatures below freezing there is a 500 mV offset eg.
CODE CIRC-10 (no need to type everything in just click) Download the Code from ( http://ardx.org/CODE10 ) (copy the text and paste it into an empty Arduino Sketch) /* * * * * * * * --------------------------------------------| Arduino Experimentation Kit Example Code | | CIRC-10 .: Temperature :.
CIRC-11 .:Larger Loads:. .:Relays:. WHAT WE’RE DOING: This next circuit is a bit of a test. We combine what we learned about using transistors in CIRC03 to control a relay. A relay is an electrically controlled mechanical switch. Inside the little plastic box is an electromagnet that, when energized, causes a switch to trip (often with a very satisfying clicking sound).
CODE CIRC-11 (no need to type everything in just click) File > Examples > 1.Basic > Blink (example from the great arduino.cc site, check it out for other great ideas) /* * Blink * * The basic Arduino example. Turns on an LED on for one second, * then off for one second, and so on... We use pin 13 because, * depending on your Arduino board, it has either a built-in LED * or a built-in resistor so that you need only an LED. * * http://www.arduino.
.:Colorful Light:. CIRC-12 .:RGB LEDs:. WHAT WE’RE DOING: We've blinked an LED and controlled eight in sequence now it's time to control color. Using an RGB LED (actual 3 LEDs in a single housing) we can generate any color our heart desires.
CODE (no need to type everything in just click) Download the Code from (http://ardx.
.:Squeezing:. CIRC-13 .:Force Sensitive Resistors:. WHAT WE’RE DOING: An FSR is a great sensor, which is easy to implement. It is very similar to a potentiometer (CIRC-08), except rather than varying its resistance in relation to shaft position its resistance varies with pressure. The resistance is high (infinite) when there is no pressure and low when the pressure is high (~250 Ohm with ~10 kg force). Beyond that the implementation is pretty simple.
CODE CIRC-13 (no need to type everything in just click) Download the Code from (http://ardx.org/CODE13A) (copy the text and paste it into an empty Arduino Sketch) /* * Force Sensitive Resistor Test Code * * The intensity of the LED will vary with the amount of pressure on the sensor */ int sensePin = 2; int ledPin = 9; // the pin the FSR is attached to // the pin the LED is attached to (use one capable of PWM) void setup() { Serial.
(ARDX) experimentation kit for arduino www.oomlout.com This work is licenced under the Creative Commons Attribution-Share Alike 3.0 Unported License. To view a copy of this licence, visit http://creativecommons.org/licenses/bysa/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California 94105, USA.