Arduino Projects
Arduino Projects
Arduino Projects
The Arduino micrcontroller has a nearly limitless array of innovative applications for everything from robotics and lighting to games and gardening! It's a fun way to automate everything, enabling you to control simple devices or manage complex Halloween displays. The Instructables editors have chosen some of our best do-it-yourself Arduino technology projects to educate and inspire you to make great things with easily-available tools. Instructables is the most popular project-sharing community on the Internet. Since August 2005, Instructables has provided easy publishing tools to enable passionate, creative people to share their most innovative projects, recipes, skills, and ideas. Instructables has over 40,000 projects covering all subjects, including crafts, art, electronics, kids, home improvement, pets, outdoors, reuse, bikes, cars, robotics, food, decorating, woodworking, costuming, games, and life in general.
http://www.instructables.com/id/Arduino-Projects/
Author and Copyright Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Disclaimer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Arduino animatronics- make your awesome costumes more awesome! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Intro: Arduino animatronics- make your awesome costumes more awesome! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Step 1: First you need an Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Step 2: Building the controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Step 3: Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Step 4: Making connections- motors, LEDs and transistors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Step 5: Now let's have some fun! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Step 6: Using buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Step 7: Adding a servo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Step 8: Sound effects and bend sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Step 9: Controlling servos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Step 10: Nunchuck control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Step 11: Predator cannon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Step 12: War Machine cannon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Step 13: Going wireless with XBee . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 Step 14: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Step 15: FAQs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 How to have fun with Arduino (and become a Geek in the process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Intro: How to have fun with Arduino (and become a Geek in the process) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Step 1: Get yourself an Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Step 2: Where does the cable go? Here is the A side and its home . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Step 3: And here is the B side of the cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Step 4: Powering your board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Step 5: External power using a wall wart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Step 6: You can add the optional prototype board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Step 7: Protoshield & prototype board on top of your Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Step 8: What to do with a prototype board? Look at this. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Step 9: There are pins & connectors on your Arduino too. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Step 10: Next lets talk about the software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Step 11: So what is Physical Computing? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Step 12: Whats Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 Arduino R/C Lawnmower (painted) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
http://www.instructables.com/id/Arduino-Projects/
Intro: Arduino R/C Lawnmower (painted) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Step 1: Setting up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Step 2: The Motor Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Step 3: The Wheels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Step 4: The Frame part A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Step 5: The Frame part B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Step 6: Mounting the motors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Step 7: Mounting the mower deck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Step 8: Select and Install the batteries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Step 9: Mount the electronics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 Step 10: The Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Step 11: More Videos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 The Word Clock - Arduino version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Intro: The Word Clock - Arduino version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 THE BACKGROUND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 POWER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 REUSE YOUR ARDUINO FOR ANOTHER PROJECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Step 1: The new hardware - Controller board schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 BETTER DRIVERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 A NEW PCB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 IS THIS JUST A NEW SHIELD? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Step 2: The hardware - Make the controller board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 TONER TRANSFER IS EASY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 BE SAFE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 CLEAN UP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 DRILL HOLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104 Step 3: The hardware - Populate the controller board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104 POPULATE THE PARTS IN ORDER OF SIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104 Step 4: The display board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 THINK FIRST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 MOUNTING THE LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 MAKING IT (Hey thats a great name for a magazine :-) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 DRILL HOLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 MOUNTING LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 SOLDERING IT TOGETHER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 DO I *REALLY* USE 360R AND 36R RESISTORS? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107 ADD A RIBBON CABLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108
http://www.instructables.com/id/Arduino-Projects/
File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112 Step 5: Make the time changing buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .112 Step 6: Program the Arduino and test the displays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114 Step 7: Make the word stencil and baffles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117 Step 8: Making a simple enclosure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117 Step 9: Bill of Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119 Bill Of Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119 Controller board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119 Display board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119 Button board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120 Stencil board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120 Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120 Step 10: Next Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120 Step 11: Whats been hapening these last few months.... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .120 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .121 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122 Light for life: Glowing button cycling jacket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123 Intro: Light for life: Glowing button cycling jacket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123 Step 1: Gather stuff for the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125 Step 2: Start our own sewing project! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126 Step 3: Sewing the jacket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126 Step 4: Exploring with electronics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .127 Step 5: Make your own shining bright buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128 Step 6: Make your own interactive jacket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129 Step 7: Connecting the Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130 Step 8: More on connecting the bits and pieces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131 Step 9: And there was light! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137 A credit card sized Ethernet Arduino compatable controller board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138 Intro: A credit card sized Ethernet Arduino compatable controller board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138 Step 1: Here is the Schematic Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139 Step 2: The PCB Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139 Step 3: Soldering the Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140 Step 4: Programming the Firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141 Step 5: But what does it do???? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142 Step 6: Parts LIst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142 Step 7: KiCad Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143
http://www.instructables.com/id/Arduino-Projects/
File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143 Secret Knock Detecting Door Lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144 Intro: Secret Knock Detecting Door Lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144 Step 1: Tools, Supplies, And Skills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145 (If this all looks too challenging, you might consider signing up to the kit mailing list which, when available, will be much easier and a lot more simple.) Time : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145 Skills : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145 Tools: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145 Materials : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145 Electronics : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145 Case: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146 Step 2: Program The Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147 Step 3: Lay Out And Test The Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .147 Step 4: Prepare The Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149 Step 5: Make The Lock Turning Clamp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .150 Step 6: Make The Knock Detector Spring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151 Step 7: Soldering The Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152 Step 8: Assembling The Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157 Step 9: Mounting, Testing, and Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160 Step 10: Epilog: Changes And Improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160 Did you build this? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160 Masters of Secret Knocks: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161 Wireless Altoids Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162 Intro: Wireless Altoids Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162 Step 1: Components & Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163 Step 2: Prepare the surface... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .164 Step 3: Mark & drill holes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .164 Step 4: Attach the Antenna Socket & Posts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165 Step 5: Insulate! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .166 Step 6: Add Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .167 Step 7: Attaching the LCD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .168 Step 8: Wiring up & adding Xbee Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169 Step 9: Finished Construction... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .170 Step 10: Upload Sketches & Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .170 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172 Step 11: Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173 Temperature Control For Kitchen Appliances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .174 Intro: Temperature Control For Kitchen Appliances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .174
http://www.instructables.com/id/Arduino-Projects/
Step 1: Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .174 Step 2: Sensing Temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176 Step 3: Intercept the Heater Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179 Step 4: The Magic of Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .181 Step 5: Advanced Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 Turn your Arduino into a Magnetic Card Reader! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .184 Intro: Turn your Arduino into a Magnetic Card Reader! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .184 Step 1: The Equipment List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .184 Step 2: Self-clocking Magnetic Card Readers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185 Step 3: Magnetic Card Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186 Magnetic Card Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186 Card Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186 Step 4: Detect When a Card is Swiped . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187 1. Detect when a card has been swiped . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187 Step 5: Read the Stream of Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188 Read the stream of data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188 Step 6: Detect the Card Leaving the Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188 Detect when a card has gone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188 Step 7: Process the Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189 Process the data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189 Step 8: Display the Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189 Display the data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189 Step 9: Code Download and Wrapup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190 Twittering Laser Tripwire with Webcam Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191 Intro: Twittering Laser Tripwire with Webcam Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192 Step 1: Connecting The LDR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192 Step 2: Connecting the Laser Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .195 Step 3: Everything in place . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196 Step 4: Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .197 Step 5: Using open() in processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .198 Step 6: Now run it. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .200 How To Smell Pollutants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .201 Intro: How To Smell Pollutants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .201 Step 1: Gather Your Supplies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .202 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .204 Step 2: Set Up Your Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .204 Step 3: Create Your Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205
http://www.instructables.com/id/Arduino-Projects/
File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205 Step 4: Test Your Newfound Sense of Smell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205 Step 5: Build Away! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206 How to connect Arduino and RFID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .207 Intro: How to connect Arduino and RFID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .207 Step 1: What you gonna need? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .207 Step 2: Plugging all together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .208 Step 3: The code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209 Step 4: Results! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209 Mushroom Environment Control - Arduino Powered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210 Intro: Mushroom Environment Control - Arduino Powered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210 Step 1: Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210 Step 2: Thermistors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211 Step 3: Humidity Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212 Step 4: Co2 Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212 Step 5: Connect the Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212 Step 6: Mains Relays and connection to Powerboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213 Step 7: The Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216 Step 8: House the project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216 Step 9: The Humidifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217 Step 10: Humidity Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .218 Step 11: Temperature Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .218 Step 12: C02 Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .219 Step 13: Test it out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220 Arduino Watch Build Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .221 Intro: Arduino Watch Build Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .221 Step 1: The Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .222 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223 Step 2: The Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223 Step 3: Preparing the materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224 Step 4: Carving the Screen Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224 Step 5: Parts Layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225 Step 6: Cutting the watch band . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225 Step 7: Soldering Connections Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
http://www.instructables.com/id/Arduino-Projects/
File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226 Step 8: Soldering the Trackball . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226 Step 9: Soldering the Display Connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226 Step 10: Soldering the Real-Time Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .227 Step 11: Solder the Extensions Header . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228 Step 12: Steampunking the watch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .229 Step 13: Extensions: Range Finding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230 Step 14: Extensions: Temperature Sensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231 Step 15: Wear and Enjoy! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231 Digital Window Sticker (Arduino Controlled) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .232 Intro: Digital Window Sticker (Arduino Controlled) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .232 Step 1: Parts List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .232 Digital Window Sticker Parts List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .232 Step 2: Assemble the BBB Arduino and USB BUB... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .235 Step 3: Program your Arduino... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .239 Step 4: Assemble the SD-MMC Card Breakout Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .239 Step 5: Build the circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246 Step 6: The Enclosure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246 Step 7: Creating and Displaying Images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .254 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255 Interface a rotary phone dial to an Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .256 Intro: Interface a rotary phone dial to an Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .256 Step 1: Remove the dial from the phone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .256 Step 2: Identify the switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257 Step 3: Make the circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .258 Step 4: Develop the code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .258 Step 5: Check it works! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .259 Step 6: Hook it into something useful! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .259 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .260 Arduino Powered Binary Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .261 Intro: Arduino Powered Binary Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .261 Step 1: Component Shopping List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .261 Step 2: 8421 Binary and 24 Hour Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .262 Step 3: Creating the Arduino Binary Clock PCB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .263 Step 4: Clock Case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .264 Step 5: Arduino Sketch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .267
http://www.instructables.com/id/Arduino-Projects/
Arduino All-in-One Getting Started Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .268 Intro: Arduino All-in-One Getting Started Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .268 Step 1: Testing Your Board / Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .269 Step 2: Wiring the Blinky Lights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .269 Step 3: Wiring the Pushbutton Switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270 Step 4: Programming the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272 Step 5: Where to Go from Here . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .272 The Arduino Weather Station / Thermostat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .273 Intro: The Arduino Weather Station / Thermostat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .273 Step 1: The Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .273 Step 2: The LCD Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .274 Step 3: Temperature & Humidity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .275 Step 4: HVAC Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .276 Step 5: Current code with wiring instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .276 Step 6: Arduino Clock Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .278 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .279 Control a Schlage electronic deadbolt with an arduino! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .280 Intro: Control a Schlage electronic deadbolt with an arduino! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .280 Step 1: Purchase the lock and unpack it . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .280 Step 2: Take the faceplate off of the lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .281 Step 3: Take the intermediary plate off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .281 Step 4: Check out all of the neat stuff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282 Step 5: Wire it up! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .283 Step 6: Reassemble the lock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284 Step 7: Create H bridge circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .285 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .285 Garduino: Gardening + Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286 Intro: Garduino: Gardening + Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286 Step 1: Obtain Your Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .287 Step 2: Sprout Your Plants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .288 Step 3: Build Your Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .288 Step 4: Build Your Moisture Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .289 Step 5: Add temperature and light sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .290 Step 6: Make and Populate Your Soil and Planters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .290 Step 7: Test and Calibrate Your Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291 Step 8: Make Your Sensors Control Your Relays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .292 Step 9: Setup Your Lighting System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .293 Step 10: Create A Self-Watering Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294 Step 11: Give Garduino Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294 Step 12: Reap your harvest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296
http://www.instructables.com/id/Arduino-Projects/
Step 13: Share your results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297 Step 14: Improve away! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298 Garduino Upgrade, Now with more Twitter! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299 Intro: Garduino Upgrade, Now with more Twitter! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299 Step 1: Gather your materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299 Step 2: Build your Garduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300 Step 3: Upgrade #1: Remote Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301 Step 4: Update #2: Relay Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .302 Step 5: Upgrade #3: New Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .303 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304 Step 6: Upgrade #4: Wireless Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304 Step 7: Update #5: Twitter your Garden . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305 Step 8: Useful project notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .306 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307 n: how to make a multi-layered acrylic and LED sculpture with variable lighting levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .308 Intro: N: how to make a multi-layered acrylic and LED sculpture with variable lighting levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .308 Step 1: Gathering parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .308 Step 2: Gathering tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .311 Step 3: Preparing artwork . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .312 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .313 Step 4: Laser cutting preparation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .313 Step 5: Laser cutting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .314 Step 6: Electronics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .316 Step 7: Arduino program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .318 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .319 Step 8: Arduino board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .319 Step 9: Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321 Step 10: Hang on a wall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323 Step 11: Twiddle the knobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .324 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .324 Ardu-pong! the Arduino based pong console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325 Intro: Ardu-pong! the Arduino based pong console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325 Step 1: Get the stuff. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325 Step 2: Hack the enclosure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325 Step 3: Install the rca jack. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326 Step 4: Wire the serial port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326 Step 5: Wire the rca jack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .327 Step 6: Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .327 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .327 Step 7: Congratulations!!! your done (almost). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .327
http://www.instructables.com/id/Arduino-Projects/
Step 8: UPDATE: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .328 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .329 Arduino Laser Tag - Duino Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .330 Intro: Arduino Laser Tag - Duino Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .330 Step 1: Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .331 Step 2: Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .332 Step 3: Modding the light gun . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334 Step 4: Transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .335 Step 5: Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .335 Step 6: Sound Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .337 Step 7: Visual effects / Lighting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338 Step 8: The Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338 Step 9: Optional Extras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .344 Step 10: Design Ideas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .345 Step 11: Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .345 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .345 The 4x4x4 LED cube (Arduino) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346 Intro: The 4x4x4 LED cube (Arduino) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346 Step 1: Get the materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346 Step 2: Assemble the board(the LED cube base) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .347 Step 3: Defuse the LED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .348 Step 4: Construct the cube . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349 Step 5: PROGRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .352 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .353 Step 6: ADD on . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .353 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .353 Arduino and Touchpad Tic Tac Toe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .354 Intro: Arduino and Touchpad Tic Tac Toe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355 Step 1: Wiring up the LED matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356 Step 2: LED matrix layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356 Step 3: Addressing the LED Matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .357 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .357 Step 4: Constructing the touch pad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .357 Step 5: The touch pad - how it works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .358 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .359 Step 6: Putting everything together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .359 Step 7: Programming Tic Tac Toe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .360 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .360 Step 8: Remarks and further improvements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .360 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .361 Make a Web Connected Robot (for about $500) (using an Arduino and Netbook) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .362
http://www.instructables.com/id/Arduino-Projects/
Intro: Make a Web Connected Robot (for about $500) (using an Arduino and Netbook) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .362 Step 1: Parts & Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .363 Step 2: Cutting Pieces & Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .365 Step 3: Software - (Arduino) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .365 Step 4: Software - Robot Laptop (WebServer) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .366 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .367 Step 5: Software - (Webpage) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .367 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369 Step 6: Finished . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370 The Lightning Simulator/Breathalyzer/Graphic Equalizer - Arduino Powered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371 Intro: The Lightning Simulator/Breathalyzer/Graphic Equalizer - Arduino Powered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371 Step 1: The Schematic & Audio Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .372 Step 2: Digging the Trenches & Running the Power & Audio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373 Step 3: Mounting the LED strips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .376 Step 4: Wiring the LED Strips and Sensors to the Arduino Mega . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .377 Step 5: The Outdoor Breathalyzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .380 Step 6: Arduino Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .382 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .383 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .383 Arduino XMAS hitcounter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .384 Intro: Arduino XMAS hitcounter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .384 Step 1: Tools and Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .384 Step 2: Hardware Assembly . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .385 Step 3: Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .387 Step 4: Programming the Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .388 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .389 Step 5: Make it a hitcounter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .389 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .389 Step 6: Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .390 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .390 Arduino magnetic stripe decoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .391 Intro: Arduino magnetic stripe decoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .391 Step 1: Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .391 Step 2: Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .392 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .393 Step 3: Use it! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .393 Step 4: Where do I go from here? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .394 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .394 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .394 Arduino EMF (Electromagnetic Field) Detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .395
http://www.instructables.com/id/Arduino-Projects/
Intro: Arduino EMF (Electromagnetic Field) Detector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .395 Step 1: The Stuff: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .395 Step 2: Wire the 7-Segment LED Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .396 Step 3: Add the Probe/Antenna . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .400 Step 4: The Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .401 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .402 Step 5: Play with it! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .402 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .402 Using a Dot Matrix LED with an Arduino and Shift Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .403 Intro: Using a Dot Matrix LED with an Arduino and Shift Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .403 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .405 Step 1: Get the Goods... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .405 Step 2: Directly Connect to the LED Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .406 The Left Side . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .406 The Right Side . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .406 Step 3: Specifying a Character to be Displayed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .408 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .409 Step 4: Conserve I/O Ports with a Shift Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .409 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .411 Step 5: Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .411 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .411 The 74HC164 Shift Register and your Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .412 Intro: The 74HC164 Shift Register and your Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .413 Step 1: So, what are shift registers? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .413 Step 2: Basic wiring and operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .414 Step 3: Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .415 Step 4: Project 1[pt 1]: '2 Wire' bargraph LED display controller hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .416 Step 5: Project 1[pt 2]: '2 Wire' bargraph LED display controller software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .417 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .418 Step 6: Project 2: '2 Wire' 7 Segment display controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .418 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .419 Step 7: Project 3[pt 1]: '2 Wire' 4x4 led matrix display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .420 Step 8: Project 3[pt 2]: '2 Wire' 4x4 led matrix display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .420 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .422 Step 9: Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .422 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .423 turn signal biking jacket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .424 Intro: Turn signal biking jacket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .424 Step 1: Supplies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .424 Step 2: Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .425 Step 3: Sew your power supply and LilyPad to your jacket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .427 Step 4: Test your stitching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .430
http://www.instructables.com/id/Arduino-Projects/
Step 5: Sew on your turn signal LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .431 Step 6: Sew in your control switches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .433 Step 7: Sew in your indicator LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .436 Step 8: Program your jacket . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .437 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .439 Android G1 Serial To Arduino Robot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .440 Intro: Android G1 Serial To Arduino Robot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .440 Step 1: Items needed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .441 Step 2: Android G1 with serial output enabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .443 Step 3: Install the Android Scripting Environment (ASE) with Python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .444 Step 4: Copy and run the cellbot.py script to launch the Python program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .445 Step 5: Telnet into the G1 and test sending it commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .446 Step 6: Connect a 3.3v to 5v level shifter to the Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .446 Step 7: Load the Cellbots program on the Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .448 Step 8: Run the whole process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .449 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .450 Ard-e: The robot with an Arduino as a brain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .451 Intro: Ard-e: The robot with an Arduino as a brain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .452 Step 1: Build your Bulldozer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .453 Step 2: Assemble the pan and tilt system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .455 Step 3: Testing and making the remote controlled version of Ard-e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .457 Step 4: Ard-e on Auto: Using the Ardunio to drive the DC motors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .458 Step 5: Making Ard-e sense the world with junk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .460 Step 6: Making Ard-e see, or at least go towards the brightest light . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .462 Step 7: Ard-e's sense of hearing and smell: interfacing an old speaker and a VOC sensor with an Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .463 Step 8: Ard-e's robot senses: tracking how far his wheels turn and seeing IR light . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .465 Step 9: The Future of Ard-e: What comes next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .467 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .467 Build Your Own BARBOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .468 Intro: Build Your Own BARBOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .468 Step 1: From Concept to Reality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .468 Step 2: Building the Supporting Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .469 Step 3: Working with Polycarbonate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .470 Step 4: The Tray Arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .470 Step 5: Liquor Containment Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .472 Step 6: Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .473 Step 7: Interfacing with the Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .474 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .474 Step 8: Putting it all Together . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .474 Step 9: Afterthoughts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .475 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .475
http://www.instructables.com/id/Arduino-Projects/
Control a RepStrap with Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .476 Intro: Control a RepStrap with Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .476 Step 1: The Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .477 Step 2: Build a pen holder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .478 Step 3: Arduino Wiring: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .479 Step 4: Arduino Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .480 Step 5: Processing Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .482 Step 6: Run the Processing Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .483 Step 7: Draw! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .484 Step 8: Make changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .484 Step 9: Making it a little better . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .485 Step 10: Doing it with Firmata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .487 Step 11: Correction to firmata.... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .489 Step 12: Corrected and commented . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .490 Step 13: Follow the Bouncing Ball with Firmata! (this works good) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .492 Step 14: Working towards a 3D print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .494 Step 15: Working towards a 3D print .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .497 Step 16: Pinch Wheel Extruder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .500 Step 17: Extruder temp control and code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .501 Step 18: Second round of extruder code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .504 Step 19: Third Round of Extruder Code! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .506 Step 20: 3D Bouncing Ball - Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .508 Step 21: 3D - Follow the Bouncing Ball (this includes Firmata) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .510 Step 22: Doing to things at once . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .513 Step 23: Better mesh (in progress) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .514 Step 24: Continous mesh rotating 90deg each layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .515 Step 25: Prints using reprap Gcode interpreter and Host software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .516 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .517 A fully automatic coffee bean roaster (Arduino) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .518 Intro: A fully automatic coffee bean roaster (Arduino) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .518 Step 1: Materials used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .519 Step 2: Adjusting the popcorn machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .520 Step 3: Connecting the Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .522 Step 4: The Arduino program code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .524 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .524 Step 5: Testing..... and roasting your coffee beans . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .525 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .525 Ghostbusters Proton Pack with Arduino and LASERS! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .526 Intro: Ghostbusters Proton Pack with Arduino and LASERS! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .526 Step 1: Make a Ghostbusters costume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .527 Step 2: Wire the pack for Arduino control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .527 Step 3: Program the Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .528
http://www.instructables.com/id/Arduino-Projects/
File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .529 Step 4: Install the lasers! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .529 Step 5: Make more junk you'll have to lug around with you! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .530 Step 6: Marvel at your own awesomeness! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .530 Step 7: Final thoughts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .531 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .531 Arduino controlled Silly String shooter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .532 Intro: Arduino controlled Silly String shooter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .532 Step 1: Materials Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .533 Step 2: Mark, Measure, and Cut . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .533 Step 3: Bendy / Twisty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .533 Step 4: Mount Servo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .534 Step 5: Example Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .535 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .535 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .535 Arduino True Battery Capacity Tester (Li-Ion/NiMH/NiCD/Pb) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .536 Intro: Arduino True Battery Capacity Tester (Li-Ion/NiMH/NiCD/Pb) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .536 Step 1: This is what you can get at the end...(just to get you interested) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .536 Step 2: Lets start at the begining - Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .537 Step 3: Bread board Arduino . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .537 Step 4: FET with 2.2Ohm load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .538 Step 5: The SW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .538 Step 6: Auto Detect Battery tyoe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .539 Step 7: Discharging... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .539 Step 8: Discharge Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .539 Step 9: My SW (free for anyone to use) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .540 Step 10: The schematics ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .542 Step 11: Please support my work by voting for me ! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .542 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .542 Wii Nunchuck Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .543 Intro: Wii Nunchuck Adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .543 Step 1: Supplies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .543 Step 2: Printing our transfers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .544 Step 3: Preping the transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .546 Step 4: Cutting and preping the PCB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .547 Step 5: Transfering the design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .547 Step 6: Etching the PCB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .549 Step 7: Drilling holes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .551 Step 8: Soldering on the header pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .551 Step 9: Testing The adapter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .552 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .554 Addressable Milk Bottles (LED Lighting + Arduino) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .555
http://www.instructables.com/id/Arduino-Projects/
Intro: Addressable Milk Bottles (LED Lighting + Arduino) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .555 Step 1: Tools and Materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .556 Step 2: Cut and Drill Perspex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .560 Step 3: Mount LEDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .561 Step 4: Solder Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .563 Step 5: Switches and Housings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .564 Step 6: Microcontrol, Components, Scavenging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .567 Step 7: Transistor Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .570 Step 8: Communication Cables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .573 Step 9: Voltage Regulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .574 Step 10: Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .576 Step 11: Cabling and Switchbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .577 Step 12: Sequenced Light . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .582 File Downloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .583 Related Instructables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .583
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Author: liseman License: Attribution-ShareAlike (by-sa) Instructable: Garduino Upgrade, Now with more Twitter! Author: natantus License: Attribution-ShareAlike (by-sa) Instructable: N: how to make a multi-layered acrylic and LED sculpture with variable lighting levels Author: slight License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Ardu-pong! the Arduino based pong console Author: kyle brinkerhoff License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Arduino Laser Tag - Duino Tag Author: j44 License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: The 4x4x4 LED cube (Arduino) Author: forte1994 License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Arduino and Touchpad Tic Tac Toe Author: origamiwolf License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Make a Web Connected Robot (for about $500) (using an Arduino and Netbook) Author: oomlout License: Attribution-ShareAlike (by-sa) Instructable: The Lightning Simulator/Breathalyzer/Graphic Equalizer - Arduino Powered Author: alinke License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Arduino XMAS hitcounter Author: alex_weber License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Arduino magnetic stripe decoder Author: powerpants License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Arduino EMF (Electromagnetic Field) Detector Author: computergeek License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Using a Dot Matrix LED with an Arduino and Shift Register Author: nevdull License: Attribution-ShareAlike (by-sa) Instructable: The 74HC164 Shift Register and your Arduino Author: osgeld License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Turn signal biking jacket Author: leahbuechley License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Android G1 Serial To Arduino Robot Author: mranalytical License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Ard-e: The robot with an Arduino as a brain Author: imadami License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Build Your Own BARBOT Author: techball License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Control a RepStrap with Processing Author: marc.cryan License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: A fully automatic coffee bean roaster (Arduino) Author: nightlife31 License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Ghostbusters Proton Pack with Arduino and LASERS! Author: depotdevoid License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Arduino controlled Silly String shooter Author: erickingston License: Attribution-NonCommercial-ShareAlike (by-nc-sa)
http://www.instructables.com/id/Arduino-Projects/
Instructable: Arduino True Battery Capacity Tester (Li-Ion/NiMH/NiCD/Pb) Author: moris_zen License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Wii Nunchuck Adapter Author: dany32412 License: Attribution-NonCommercial-ShareAlike (by-nc-sa) Instructable: Addressable Milk Bottles (LED Lighting + Arduino) Author: Nachimir License: Attribution-NonCommercial-ShareAlike (by-nc-sa)
http://www.instructables.com/id/Arduino-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/Arduino-Projects/
Author:Honus Multi-Bot
I'm a former bicycle industry designer turned professional jeweler.
Here's an Iron Man hand repulsor with servo to open the forearm missile compartment. Follow along and find out how to make your awesome costumes more awesome...
Note- While this instructable is written for the beginner, this tutorial assumes you know how to use a soldering iron and other assorted tools like wire strippers and wire cutters. Please be sure to take proper safety precautions, wear safety glasses when using cutting tools and have adequate ventilation when soldering. If you aren't yet comfortable soldering small surface mount components don't fret- I've posted links in the reference section that will help you become a soldering champ in no time.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. 900mAh 3.7V LiPo battery 2. Adafruit XBee wireless radio adapter
Image Notes 1. JST LiPo battery connector 2. USB mini-B connector for charging battery 3. servo connectors/digital out pins 4. digital out pins- I use these to connect the small transistor board These pins were labeled backwards- oops! They should read right to left 10, 11,12,13 5. analog input pins 6. Adafruit XBee radio adapter socket 7. Programming header for FTDI USB to serial adapter
http://www.instructables.com/id/Arduino-Projects/
I'm providing all the necessary EAGLE files so people can modify the design to suit their own needs. EAGLE can be downloaded here- http://www.cadsoftusa.com/
File Downloads
ServoBoard.zip (28 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'ServoBoard.zip']
http://www.instructables.com/id/Arduino-Projects/
http://us.element-14.com/vcc-visual-communications-company/vaol-s12rp4/led-2x1-5mm-red-133mcd-624nm/dp/27R0088 JST connector- 1 ea http://www.sparkfun.com/products/8612 MAX1555 IC- 1 ea http://www.sparkfun.com/products/674 http://us.element-14.com/maxim-integrated-products/max1555ezk-t/ic-battery-charger-li-ion-340ma/dp/59J2761?Ntt=MAX1555 Straight break away header pins - 2ea 40 pin row These come in really handy so it's always good to get extras to have on hand http://www.sparkfun.com/products/116 Female break away header pins- 2 ea 40 hole row These also are super handy to have around http://www.sparkfun.com/products/115 Single cell LiPo battery- 1ea (you can use any capacity you like.) http://www.sparkfun.com/products/339 USB mini-B cable- 1 ea Odds are you've already got one but if you don't here you gohttp://www.sparkfun.com/products/598 Assembling the servo board The first thing to do is build the charging circuit. I usually start with the smallest components first. I've found the easiest way to solder SMD parts is to get a tiny bit of solder on your soldering tip and touch it to one of the component pads on the PCB. Then hold the component in place using tweezers and heat up the pad and component pin- this allows you to get the part attached to the board so you can check its alignment for the rest of the pads. Then simply solder each of the remaining pads. There is a great series of SMD soldering tutorials here- http://www.sparkfun.com/tutorials/36 Begin by soldering on the MAX1555 IC (labeled U1) -this can only go on one way. Next comes the LED- make sure to check the polarity as it is labeled on the PCB (the LED cathode is connected to one end of R1.) Then solder resistor R1 followed by the capacitors C1 and C2. These can be soldered on either direction. Next comes the mini USB connector- this one is a bit tricky as the pins are positioned nearly underneath the connector. Now solder on the JST connector. Make sure to double check your soldering job for these connectors as they receive a fair bit of mechanical stress. Now test your charging circuit. Plug in a USB cable and check the voltage at the JST battery connector. It should read about 4.2-4.3V. Now connect the LiPo battery. If everything is OK the small LED should turn on, indicating the battery is charging. Disconnect the battery. Now solder on the pins to connect the Pro Mini board. This is done by soldering on the break away straight header pins. First insert the long pin ends into the PCB, flip the board over and solder them in place. Double check your solder joints. Now flip the board over and place the Pro Mini board in place on top of the exposed pins and solder all the pins in place. Next solder the remaining straight pins into place in the digital out positions and the 3.3v port along the bottom of the board. To finish the board solder all the female headers in place. The best way I've found to cut the female headers is to remove a pin where you want to make a cut- just yank the pin out the bottom using a pair of pliers. Then take wire cutters and cut through the opening left by the pin. Now take a file (or sandpaper) and smooth out the cut edge. Make sure your board is getting power by plugging a USB cable into the mini USB port on the controller board. The red LED on the Arduino Pro Mini should light up. That's it- your controller is ready to go!
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
This tells the USB to serial adapter which serial port you are going to use. The one to select is labeled beginning /dev/tty.usbserial so from the top menu go to Tools>Serial Port>/dev/tty.usbserial-(insert port name here) 5. Select boardThis tells the Arduino program which version board you are using. From the top menu go to Tools>Board>Arduino Pro or Pro Mini (3.3V, 8Mhz) w/ ATmega328 if you are using the Pro Mini servo board or choose the correct model Arduino. 6. Upload codeHit the upload button to send the code to your Arduino. That's it!
http://www.instructables.com/id/Arduino-Projects/
http://www.sparkfun.com/products/9190 Here's the smaller versionhttp://www.sparkfun.com/products/97 All of the sensors we'll use are connected to the Arduino input pins. A potentiometer is a device commonly used in an application like a stereo volume knob- it's a type of variable resistor. If you supply the potentiometer with 3.3V when you turn the knob the output voltage will range from 0 to 3.3V. A joystick is simply two potentiometers in a common housing- one for the X axis and one for the Y axis. Sparkfun has a 10K potentiometerhttp://www.sparkfun.com/products/9939 They also have a couple of small joystickshttp://www.sparkfun.com/products/9032 http://www.sparkfun.com/products/9426 A bend sensor is a resistor that changes its resistance value according to how much you bend it. By adding another resistor and creating a voltage divider, we can change the output voltage of the bend sensor to match the degree of bend. The only real drawback to bend sensors is that they don't have the wide range that a potentiometer has. Sparkfun sells a bend sensor herehttp://www.sparkfun.com/products/8606 Accelerometers work by sensing a change in acceleration and then they alter their output relative to the change in acceleration. When you tilt an accelerometer it measures acceleration due to gravity- the more you tilt it the greater the change in output. Accelerometers are commonly used in video game controllers and cell phones. A Wii nunchuck has a 3 axis accelerometer, joystick and two pushbuttons for $20. Motors Servos Hobby servos are small geared motors that have a circuit board and potentiometer to control their rotation. This allows them to be able to move to an exact position relative to your input sensor signal. Most servos can move nearly 180 degrees and some can even do multiple rotations as well as continuous rotation. Servos have three wires- ground, power and signal. The signal wire (usually yellow or white) is connected to the Arduino output pin. The power and ground wires are connected to a separate power source, usually ranging anywhere from 4.8V to 6V. The reason for connecting servos to their own power supply is that motors generate a fair bit of electrical noise, which can cause glitches or a stuttering effect in their movement. If you have an input sensor that generates an input voltage from 0-3.3V the Arduino takes that analog voltage and assigns it a value from 0-1023 using an analog to digital converter (ADC.) The code on the Arduino then tells the servo how far to move based upon the converted value. So if your sensor outputs 1.65V then you would get a reading of 511 and your servo would move half of its rotation. Many Arduino boards operate on 5V so the same sensor at the same position would read 2.5V and the servo would still rotate half way. A continuous rotation servo would rotate in one direction, stop as the sensor gave a 1.65V reading and then reverse direction as you caused to sensor to raise the input voltage. Controlling a servo is done by PWM. You send a send a pulse to the servo on the servo signal line every 20 milliseconds. The pulsewidth tells the servo what position to move to. Most servos operate within a 1 to 2 millisecond pulse range so a 1 millisecond pulse tells the servo to move to the 0 degree position and a 2 millisecond pulse tells the servo to move to the 180 degree position. Any pulse between 1 and 2 milliseconds tells the servo to move to a position that is proportionate between 0 and 180 degrees. I get all my servos herehttp://www.servocity.com DC motors Unlike most servo motors DC motors are best used when you need continuous rotation, especially when you want high RPM. Since DC motors can draw a fair amount of power they are connected to the Arduino output pin using a transistor or a PWM speed controller. Pololu sells a large variety of small DC motorshttp://www.pololu.com/catalog/category/22 Stepper motors I don't usually use stepper motors in my animatronic projects (at least not yet!) but I felt they are worth mentioning. Stepper motors allow for precise positioning as well as continuous rotation and speed control. The drawback to them is that they require a fair bit of electrical power and they're usually significantly larger and heavier than a servo of equal torque rating. Small stepper motors can be salvaged from old printers and scanners. Unlike DC motors stepper motors have multiple individual coils inside that must be activated in a proper sequence in order to get the motor to move. The Arduino controller is able to drive stepper motors using a specific driver chip or transistor array that is capable of energizing each individual coil in the motor. For more information about steppers have a look in the reference section. LEDs Small LEDs are pretty simple to connect to the Arduino- just remember to use a resistor between the Arduino output pin and the resistor cathode to limit the current flow. You can put a resistor on either the anode or cathode of the LED- either way will work. Most of the small 3.3v LEDs will have a forward current of around 20mA so a resistor value around 100 Ohms works pretty well. For accurate resistor value calculations have a look herehttp://led.linear1.org/1led.wiz For my Iron Man repulsor I made a small 2" diameter LED board that has 24 PLCC-2 LEDs. You can get the bare PCB herehttp://www.batchpcb.com/index.php/Products/41872 The board uses 24 1206 package SMD 100 Ohm resistorshttp://us.element-14.com/vishay-dale/crcw1206100rjnea/resistor-thick-film-100ohm-250mw/dp/59M6948 I frequently buy PLCC-2 super bright LEDs on eBay at good priceshttp://stores.ebay.com/bestshop2008hk
High power Luxeon LEDs have a much higher current rating and will work best using some type of constant current source to drive them (there are several instructables
http://www.instructables.com/id/Arduino-Projects/
on this.) A 1 Watt Luxeon LED will have a forward current of 350mA so you cannot connect it directly to an Arduino output pin. Much like a DC motor you will need to connect it to the output pin using a transistor. Sparkfun sells Luxeon LEDs and a constant current driverhttp://www.sparkfun.com/search/results?term=Luxeon&what=products http://www.sparkfun.com/products/9642 Transistors A transistor is basically just an electronic switch. Each Arduino output pin is limited to 40mA output current so we'll use a particular type of transistor known as an NPN Darlington transistor to turn on high current devices. These transistors have three pins- the collector, emitter and base. The base pin is connected to the Arduino output pin using a 1K Ohm resistor. The collector pin is attached to the high power device and the emitter pin is connected to ground. When the Arduino output pin is set HIGH the transistor turns on and allows electricity to complete a circuit. For applications that do not have power requirements over 1 Amp I designed a small transistor board that connects to digital out pins 10-13 using ribbon cable and two eight pin IDC connectors. This uses four SOT-23 package SMD transistors and four 1206 package 1k Ohm SMD resistors. The board is really easy to solder. Transistor board PCBhttp://batchpcb.com/index.php/Products/41936 SOT-23 NPN Darlington transistors 4 eahttp://us.element-14.com/fairchild-semiconductor/mmbt6427/bipolar-transistor-npn-40v/dp/58K1891 1206 SMD 1K Ohm resistors 4 eahttp://us.element-14.com/yageo/rc1206jr-071kl/resistor-thick-film-1kohm-250mw/dp/68R0298 2x4 pin IDC connector 2eahttp://www.surplusgizmos.com/8-Pin-2x4-IDC-Ribbon-Cable-COnnector_p_1879.html For loads up to 5A I use a TIP 120 transistor in the TO-220 package. These are great for small DC motors and servos. Use a 1K Ohm resistor to connect the transistor base pin to the Arduino output pin. I usually buy TIP 120 transistors from my local Radio Shack. They're very easy to get online as well. Power supply To power the Arduino servo board and servos you need two separate power sources- one single cell LiPo battery for the controller and a small 4.8V- 6V battery pack (4AA batteries work just fine) to power servos. The servo board has an additional socket that provides power from the LiPo cell to power low voltage devices like LEDs.
Image Notes 1. straight pins 2. 1206 SMD 1K Ohm resistors 3. SOT-23 SMD Darlington transistors
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
File Downloads
TransistorBoard.zip (12 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'TransistorBoard.zip']
int ledPin1 = 13; // control pin for LED int ledPin2 = 12; int ledPin3 = 11;
void setup() { pinMode(ledPin1, OUTPUT); // sets the LED pin as output pinMode(ledPin2, OUTPUT); digitalWrite(ledPin1, LOW); // sets the LED pin LOW (turns it off) digitalWrite(ledPin2, LOW); } void loop() { digitalWrite(ledPin1, HIGH); // sets the LED pin HIGH (turns it on) delay(500); // waits 500 milliseconds digitalWrite(ledPin2, HIGH); delay(500); digitalWrite(ledPin1, LOW); // sets the LED pin LOW (turns it off) delay(500); digitalWrite(ledPin2, LOW); delay(500);
// fade in from min to max in increments of 5 points: for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) { // sets the value (range from 0 to 255): analogWrite(ledPin3, fadeValue); // wait for 30 milliseconds to see the dimming effect delay(40);
http://www.instructables.com/id/Arduino-Projects/
} // fade out from max to min in increments of 5 points: for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) { // sets the value (range from 0 to 255): analogWrite(ledPin3, fadeValue); // wait for 30 milliseconds to see the dimming effect delay(40); } delay (2000); // wait two seconds }
http://www.instructables.com/id/Arduino-Projects/
delay(500);
// fade in from min to max in increments of 5 points: for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) { // sets the value (range from 0 to 255): analogWrite(ledPin3, fadeValue); // wait for 30 milliseconds to see the dimming effect delay(40); } // fade out from max to min in increments of 5 points: for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) { // sets the value (range from 0 to 255): analogWrite(ledPin3, fadeValue); // wait for 30 milliseconds to see the dimming effect delay(40); } } else { // the button is -not- pressed... Serial.println("button released"); digitalWrite(ledPin1, LOW); // turn the LED off digitalWrite(ledPin2, LOW); } } buttonState = val; // save the new state in our variable }
http://www.instructables.com/id/Arduino-Projects/
pinMode(buttonPin1, INPUT); // set the button pin as input pinMode(buttonPin2, INPUT); buttonState1 = digitalRead(buttonPin1); // read the initial state buttonState2 = digitalRead(buttonPin2); // read the initial state pinMode(ledPin1, OUTPUT); // sets the LED pin as output pinMode(ledPin2, OUTPUT); } void loop(){ servo1.write(20); val1 = digitalRead(buttonPin1); // read input value and store it in val if (val1 != buttonState1) { // the button state has changed! if (val1 == LOW) { // check if the button is pressed Serial.println("button just pressed"); digitalWrite(ledPin1, HIGH); // sets the LED pin HIGH (turns it on) delay(500); // wait 500 milliseconds digitalWrite(ledPin2, HIGH); delay(500); digitalWrite(ledPin1, LOW); // sets the LED pin LOW (turns it off) delay(500); digitalWrite(ledPin2, LOW); delay(500);
// fade in from min to max in increments of 5 points: for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) { // sets the value (range from 0 to 255): analogWrite(ledPin3, fadeValue); // wait for 30 milliseconds to see the dimming effect delay(40); } // fade out from max to min in increments of 5 points: for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) { // sets the value (range from 0 to 255): analogWrite(ledPin3, fadeValue); // wait for 30 milliseconds to see the dimming effect delay(40); } } else { // the button is -not- pressed... digitalWrite(ledPin1, LOW); // turn off the LED digitalWrite(ledPin2, LOW); } } val2 = digitalRead(buttonPin2); if (val2 != buttonState2) { if (val2 == LOW) { // read input value and store it in val 2
servo1.write(160); // rotate the servo to 160 degrees delay(3000); // wait 3 seconds servo1.write(20); // rotate to 20 degrees } else { servo1.write(20); } } buttonState1 = val1; buttonState2 = val2; } // save the new state in our variable // the button is -not- pressed...
http://www.instructables.com/id/Arduino-Projects/
For more Iron Man costuming fun check out the SIWDAT sitehttp://www.siwdat.com/index.html Copy and paste this sketch into your Arduino window/* * Example 4 * Bend Sensor/Wave shield * This example uses a bend sensor as a trigger to fade a LED with sound effect * using a Wave shield and then activate a servo * Honus 2010 * Modified from Knock Sensor code created 25 Mar 2007 by David Cuartielles * and modified 4 Sep 2010 by Tom Igoe */ #include "Servo.h" // include the servo library Servo servo1; // creates an instance of the servo object to control a servo // these constants won't change: const int servoPin1 = 9; // control pin for servo const int triggerSensor = 1; // the sensor is connected to analog pin 1 const int threshold = 400; // threshold value to decide when the sensor input triggers
http://www.instructables.com/id/Arduino-Projects/
const int ledPin = 11; int soundPin1 = 10; // control pin for sound board // these variables will change: int sensorReading = 0; // variable to store the value read from the sensor pin int ledState = LOW; // variable used to store the last LED status, to toggle the light void setup() { Serial.begin(9600); // use the serial port servo1.attach(servoPin1); // attaches the servo on pin 9 to the servo object pinMode(soundPin1, OUTPUT); // sets the sound pin as output digitalWrite(soundPin1, LOW); } void loop() { servo1.write(20); // move the servo to 20 degree position // read the sensor and store it in the variable sensorReading: sensorReading = analogRead(triggerSensor); // if the sensor reading is greater than the threshold: if (sensorReading >= threshold) { digitalWrite(soundPin1, HIGH); // turn the sound on delay(10); // wait ten milliseconds digitalWrite(soundPin1, LOW); // turn the sound off // fade in from min to max in increments of 5 points: for(int fadeValue = 0 ; fadeValue <= 255; fadeValue +=5) { // sets the value (range from 0 to 255): analogWrite(ledPin, fadeValue); // wait for 30 milliseconds to see the dimming effect delay(40); } // fade out from max to min in increments of 5 points: for(int fadeValue = 255 ; fadeValue >= 0; fadeValue -=5) { // sets the value (range from 0 to 255): analogWrite(ledPin, fadeValue); // wait for 30 milliseconds to see the dimming effect delay(40); // send the string "trigger!" back to the computer, followed by newline Serial.println("trigger!"); } servo1.write(160); // move the servo to 160 degree position delay(3000); // wait 3 seconds servo1.write(20); // move the servo to 20 degree position } delay (3000); // three second delay to avoid overloading the serial port buffer }
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Adafruit Wave Shield- This is THE device to have to add sound to any Arduino project
Image Notes 1. 24 ea PLCC-2 white LEDs 2. 24 ea 1206 SMD 100 Ohm resistors
File Downloads
HandRepulsorSound.wav (689 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'HandRepulsorSound.wav']
int analogPin = 0; // the analog pin that the sensor is on int analogValue = 0; // the value returned from the analog sensor int servoPin = 4; // Control pin for servo motor void setup() { servo1.attach(servoPin); // attaches the servo on pin 9 to the servo object } void loop() { analogValue = analogRead(analogPin); // read the analog input (value between 0 and 1023) analogValue = map(analogValue, 0, 1023, 0, 179); // map the analog value (0 - 1023) to the angle of the servo (0 - 179) servo1.write(analogValue); // write the new mapped analog value to set the position of the servo delay(15); // waits for the servo to get there } Example 5a- Controlling 6 servos using multiple inputs /* * Example 5a
http://www.instructables.com/id/Arduino-Projects/
* Servo Control6 * This example uses 6 servos and analog inputs to move the servos according to the sensor input values * Honus 2010 */ #include // include the servo library // creates an instance of the servo object to control a servo
Servo servoMotor1; Servo servoMotor2; Servo servoMotor3; Servo servoMotor4; Servo servoMotor5; Servo servoMotor6; int analogPin1 = 0; int analogPin2 = 1; int analogPin3 = 2; int analogPin4 = 3; int analogPin5 = 4; int analogPin6 = 5; int analogValue1 = 0; int analogValue2 = 0; int analogValue3 = 0; int analogValue4 = 0; int analogValue5 = 0; int analogValue6 = 0; int servoPin1 = 4; int servoPin2 = 5; int servoPin3 = 6; int servoPin4 = 7; int servoPin5 = 8; int servoPin6 = 9;
// attaches the servo on pin 4 to the servo object // attaches the servo on pin 5 to the servo object // attaches the servo on pin 6 to the servo object // attaches the servo on pin 7 to the servo object // attaches the servo on pin 8 to the servo object // attaches the servo on pin 9 to the servo object
void loop() { analogValue1 = analogRead(analogPin1); // read the analog input (value between 0 and 1023) analogValue1 = map(analogValue1, 0, 1023, 0, 179); // map the analog value (0 - 1023) to the angle of the servo (0 - 179) servoMotor1.write(analogValue1); // write the new mapped analog value to set the position of the servo analogValue2 = analogRead(analogPin2); analogValue2 = map(analogValue2, 0, 1023, 0, 179); servoMotor2.write(analogValue2); analogValue3 = analogRead(analogPin3); analogValue3 = map(analogValue3, 0, 1023, 0, 179); servoMotor3.write(analogValue3); analogValue4 = analogRead(analogPin4); analogValue4 = map(analogValue4, 0, 1023, 0, 179); servoMotor4.write(analogValue4); analogValue5 = analogRead(analogPin5); analogValue5 = map(analogValue5, 0, 1023, 0, 179); servoMotor5.write(analogValue5); analogValue6 = analogRead(analogPin6); analogValue6 = map(analogValue6, 0, 1023, 0, 179); servoMotor6.write(analogValue6); delay(15); } // waits for the servo to get there
http://www.instructables.com/id/Arduino-Projects/
int refreshTime = 20; // the time in millisecs needed in between pulses long lastPulse1; long lastPulse2; long lastPulse3; long lastPulse4; int minPulse = 700; // minimum pulse width int loop_cnt=0; void setup() { Serial.begin(19200); pinMode(servoPin1, OUTPUT); pinMode(servoPin2, OUTPUT); pinMode(servoPin3, OUTPUT); pinMode(servoPin4, OUTPUT); pulseWidth1 = minPulse; pulseWidth2 = minPulse; pulseWidth3 = minPulse; pulseWidth4 = minPulse;
// Set servo pin as an output pin // Set servo pin as an output pin // Set servo pin as an output pin // Set servo pin as an output pin
// Set the motor position to the minimum // Set the motor position to the minimum // Set the motor position to the minimum // Set the motor position to the minimum
http://www.instructables.com/id/Arduino-Projects/
void loop() { checkNunchuck1(); updateServo1(); // update servo 1 position checkNunchuck2(); updateServo2(); // update servo 2 position checkNunchuck3(); updateServo3(); // update servo 3 position checkNunchuck4(); updateServo4(); // update servo 4 position if( nunchuck_zbutton() ) // light the LED if z button is pressed digitalWrite(ledPin1, HIGH); else digitalWrite(ledPin1,LOW); if( nunchuck_cbutton() ) // light the LED if c button is pressed digitalWrite(ledPin2, HIGH); else digitalWrite(ledPin2,LOW); delay(1); } void checkNunchuck1() { if( loop_cnt > 100 ) { // loop()s is every 1msec, this is every 100msec nunchuck_get_data(); nunchuck_print_data(); float tilt = nunchuck_accelx(); // x-axis, in this case ranges from ~70 - ~185 tilt = (tilt - 70) * 1.5; // convert to angle in degrees, roughly pulseWidth1 = (tilt * 9) + minPulse; // convert angle to microseconds loop_cnt = 0; // reset for } loop_cnt++; } // called every loop(). // uses global variables servoPin, pulsewidth, lastPulse, & refreshTime void updateServo1() { // pulse the servo again if rhe refresh time (20 ms) have passed: if (millis() - lastPulse1 >= refreshTime) { digitalWrite(servoPin1, HIGH); // Turn the motor on delayMicroseconds(pulseWidth1); // Length of the pulse sets the motor position digitalWrite(servoPin1, LOW); // Turn the motor off lastPulse1 = millis(); // save the time of the last pulse } } void checkNunchuck2() { if( loop_cnt > 100 ) { // loop()s is every 1msec, this is every 100msec nunchuck_get_data(); nunchuck_print_data(); float tilt = nunchuck_accely(); // y-axis, in this case ranges from ~70 - ~185 tilt = (tilt - 70) * 1.5; // convert to angle in degrees, roughly pulseWidth2 = (tilt * 9) + minPulse; // convert angle to microseconds loop_cnt = 0; // reset for } loop_cnt++; } // called every loop(). // uses global variables servoPin, pulsewidth, lastPulse, & refreshTime void updateServo2() { // pulse the servo again if rhe refresh time (20 ms) have passed: if (millis() - lastPulse2 >= refreshTime) { digitalWrite(servoPin2, HIGH); // Turn the motor on delayMicroseconds(pulseWidth2); // Length of the pulse sets the motor position digitalWrite(servoPin2, LOW); // Turn the motor off lastPulse2 = millis(); // save the time of the last pulse } } // this is here to give a known time per loop
http://www.instructables.com/id/Arduino-Projects/
void checkNunchuck3() { if( loop_cnt > 100 ) { // loop()s is every 1msec, this is every 100msec nunchuck_get_data(); nunchuck_print_data(); float tilt = nunchuck_joyx(); // x-axis, in this case ranges from ~70 - ~185 tilt = (tilt - 70) * 1.5; // convert to angle in degrees, roughly pulseWidth3 = (tilt * 9) + minPulse; // convert angle to microseconds loop_cnt = 0; // reset for } loop_cnt++; } // called every loop(). // uses global variables servoPin, pulsewidth, lastPulse, & refreshTime void updateServo3() { // pulse the servo again if rhe refresh time (20 ms) have passed: if (millis() - lastPulse3 >= refreshTime) { digitalWrite(servoPin3, HIGH); // Turn the motor on delayMicroseconds(pulseWidth3); // Length of the pulse sets the motor position digitalWrite(servoPin3, LOW); // Turn the motor off lastPulse3 = millis(); // save the time of the last pulse } } void checkNunchuck4() { if( loop_cnt > 100 ) { // loop()s is every 1msec, this is every 100msec nunchuck_get_data(); nunchuck_print_data(); float tilt = nunchuck_joyy(); // y-axis, in this case ranges from ~70 - ~185 tilt = (tilt - 70) * 1.5; // convert to angle in degrees, roughly pulseWidth4 = (tilt * 9) + minPulse; // convert angle to microseconds loop_cnt = 0; // reset for } loop_cnt++; } // called every loop(). // uses global variables servoPin, pulsewidth, lastPulse, & refreshTime void updateServo4() { // pulse the servo again if rhe refresh time (20 ms) have passed: if (millis() - lastPulse4 >= refreshTime) { digitalWrite(servoPin4, HIGH); // Turn the motor on delayMicroseconds(pulseWidth4); // Length of the pulse sets the motor position digitalWrite(servoPin4, LOW); // Turn the motor off lastPulse4 = millis(); // save the time of the last pulse } } // // Nunchuck functions // static uint8_t nunchuck_buf[6]; // array to store nunchuck data, // initialize the I2C system, join the I2C bus, // and tell the nunchuck we're talking to it void nunchuck_init() { Wire.begin(); // join i2c bus as master Wire.beginTransmission(0x52); // transmit to device 0x52 Wire.send(0x40); // sends memory address Wire.send(0x00); // sends sent a zero. Wire.endTransmission(); // stop transmitting } // Send a request for data to the nunchuck // was "send_zero()" void nunchuck_send_request() { Wire.beginTransmission(0x52); // transmit to device 0x52 Wire.send(0x00); // sends one byte
http://www.instructables.com/id/Arduino-Projects/
Wire.endTransmission(); }
// stop transmitting
// Receive data back from the nunchuck, // returns 1 on successful read. returns 0 on failure int nunchuck_get_data() { int cnt=0; Wire.requestFrom (0x52, 6); // request data from nunchuck while (Wire.available ()) { // receive byte as an integer nunchuck_buf[cnt] = nunchuk_decode_byte(Wire.receive()); cnt++; } nunchuck_send_request(); // send request for next data payload // If we recieved the 6 bytes, then go print them if (cnt >= 5) { return 1; // success } return 0; //failure } // Print the input data we have recieved // accel data is 10 bits long // so we read 8 bits, then we have to add // on the last 2 bits. That is why I // multiply them by 2 * 2 void nunchuck_print_data() { static int i=0; int joy_x_axis = nunchuck_buf[0]; int joy_y_axis = nunchuck_buf[1]; int accel_x_axis = nunchuck_buf[2]; // * 2 * 2; int accel_y_axis = nunchuck_buf[3]; // * 2 * 2; int accel_z_axis = nunchuck_buf[4]; // * 2 * 2; int z_button = 0; int c_button = 0; // byte nunchuck_buf[5] contains bits for z and c buttons // it also contains the least significant bits for the accelerometer data // so we have to check each bit of byte outbuf[5] if ((nunchuck_buf[5] >> 0) & 1) z_button = 1; if ((nunchuck_buf[5] >> 1) & 1) c_button = 1; if ((nunchuck_buf[5] >> 2) & 1) accel_x_axis += 2; if ((nunchuck_buf[5] >> 3) & 1) accel_x_axis += 1; if ((nunchuck_buf[5] >> 4) & 1) accel_y_axis += 2; if ((nunchuck_buf[5] >> 5) & 1) accel_y_axis += 1; if ((nunchuck_buf[5] >> 6) & 1) accel_z_axis += 2; if ((nunchuck_buf[5] >> 7) & 1) accel_z_axis += 1; Serial.print(i,DEC); Serial.print("\t"); Serial.print("joy:"); Serial.print(joy_x_axis,DEC); Serial.print(","); Serial.print(joy_y_axis, DEC); Serial.print(" \t"); Serial.print("acc:"); Serial.print(accel_x_axis, DEC); Serial.print(","); Serial.print(accel_y_axis, DEC); Serial.print(","); Serial.print(accel_z_axis, DEC); Serial.print("\t"); Serial.print("but:"); Serial.print(z_button, DEC); Serial.print(","); Serial.print(c_button, DEC); Serial.print("\r\n"); // newline
http://www.instructables.com/id/Arduino-Projects/
i++; } // Encode data to format that most wiimote drivers except // only needed if you use one of the regular wiimote drivers char nunchuk_decode_byte (char x) { x = (x ^ 0x17) + 0x17; return x; } // returns zbutton state: 1=pressed, 0=notpressed int nunchuck_zbutton() { return ((nunchuck_buf[5] >> 0) & 1) ? 0 : 1; // voodoo } // returns zbutton state: 1=pressed, 0=notpressed int nunchuck_cbutton() { return ((nunchuck_buf[5] >> 1) & 1) ? 0 : 1; // voodoo } // returns value of x-axis joystick int nunchuck_joyx() { return nunchuck_buf[0]; } // returns value of y-axis joystick int nunchuck_joyy() { return nunchuck_buf[1]; } // returns value of x-axis accelerometer int nunchuck_accelx() { return nunchuck_buf[2]; // FIXME: this leaves out 2-bits of the data } // returns value of y-axis accelerometer int nunchuck_accely() { return nunchuck_buf[3]; // FIXME: this leaves out 2-bits of the data } // returns value of z-axis accelerometer int nunchuck_accelz() { return nunchuck_buf[4]; // FIXME: this leaves out 2-bits of the data }
http://www.instructables.com/id/Arduino-Projects/
For Predator costuming info check out http://www.thehunterslair.com Those individuals interested in obtaining a resin cannon casting should contact my friend Carl here- http://www.accurizedhunterparts.com/ Carl's work is absolutely brilliant- check out the photos below of the Predator backpack clay sculpt that he created for this project. That's a lot of clay! When contacting Carl please be patient as he's extremely busy and he has a large backlog of work. Here's the code/* * Example 7 * Predator Cannon * This uses a modified Wii nunchuck as a head tracking input device to control an animatronic Predator cannon * Adafruit Wave shield is used for sound effects * Honus 2007, updated 2010 * Wii nunchuck reading code modified/extended from nunchuck code by Tod E. Kurt and Windmeadow Labs * 2007 Tod E. Kurt, http://todbot.com/blog/ * The Wii Nunchuck reading code is taken from Windmeadow Labs, http://www.windmeadow.com/node/42 */ #include "Wire.h" // include the Wire library #include "Servo.h" // include the servo library Servo servo3; // creates an instance of the servo object to control a servo int controlPin1 = 6; // Control pin for sound effects board using z button int transistorPin1 = 13; // Control pin for LED using z button int transistorPin2 = 12; // Control pin for laser sight using c button int transistorPin3 = 11; // Control pin for servo 1 using c button int transistorPin4 = 10; // Control pin for servo 2 using c button int servoPin1 = 7; // Control pin for servo 1 using accelerometer x axis int servoPin2 = 8; // Control pin for servo 2 using accelerometer y axis int servoPin3 = 9; // control pin for arm servo int pulseWidth1 = 0; // Amount to pulse the servo 1 int pulseWidth2 = 0; // Amount to pulse the servo 2
http://www.instructables.com/id/Arduino-Projects/
int refreshTime = 20; // the time in millisecs needed in between servo pulses long lastPulse1; long lastPulse2; int minPulse = 700; // minimum servo pulse width int loop_cnt=0; boolean button_down = false; unsigned long start; void setup() { Serial.begin(19200); servo3.attach(servoPin3); // attaches the servo on pin 9 to the servo object pinMode(controlPin1, OUTPUT); // Set control pin 1 as output pinMode(transistorPin1, OUTPUT); // Set transistor pin 1 as output pinMode(transistorPin2, OUTPUT); // Set transistor pin 2 as output pinMode(transistorPin3, OUTPUT); // Set transistor pin 3 as output pinMode(transistorPin4, OUTPUT); // Set transistor pin 4 as output pinMode(servoPin1, OUTPUT); // Set servo pin 1 as output pinMode(servoPin2, OUTPUT); // Set servo pin 2 as output pulseWidth1 = minPulse; // Set the servo position to the minimum pulseWidth2 = minPulse; // Set the servo position to the minimum nunchuck_init(); // send the initilization handshake Serial.print("NunchuckServo ready\n"); } void loop() { checkNunchuck1(); updateServo1(); // update servo 1 position checkNunchuck2(); updateServo2(); // update servo 2 position if( nunchuck_cbutton() ) { digitalWrite(transistorPin2, HIGH); // turn on transistor pin 2 if c button is pressed digitalWrite(transistorPin3, HIGH); // turn on transistor pin 3 if c button is pressed digitalWrite(transistorPin4, HIGH); // turn on transistor pin 4 if c button is pressed servo3.write(180); } else { digitalWrite(transistorPin2, LOW); digitalWrite(transistorPin3, LOW); digitalWrite(transistorPin4, LOW); servo3.write(0); } if ( nunchuck_zbutton() ) { if (!button_down) // if button was just pressed do this { digitalWrite(controlPin1, HIGH); button_down = true; start = millis(); } else if (millis() - start > 1200) // if timer has elapsed do this { digitalWrite(transistorPin1, HIGH); } } else // if button is up do this { button_down = false; digitalWrite(controlPin1, LOW); digitalWrite(transistorPin1, LOW); } delay(1); // this is here to give a known time per loop } void checkNunchuck1() { if( loop_cnt > 100 ) { // loop()s is every 1msec, this is every 100msec nunchuck_get_data(); nunchuck_print_data();
http://www.instructables.com/id/Arduino-Projects/
float tilt = nunchuck_accelx(); // x-axis, in this case ranges from ~70 - ~185 tilt = (tilt - 70) * 1.5; // convert to angle in degrees, roughly pulseWidth1 = (tilt * 9) + minPulse; // convert angle to microseconds loop_cnt = 0; // reset for } loop_cnt++; } // called every loop(). // uses global variables servoPin, pulsewidth, lastPulse, & refreshTime void updateServo1() { // pulse the servo again if rhe refresh time (20 ms) have passed: if (millis() - lastPulse1 >= refreshTime) { digitalWrite(servoPin1, HIGH); // Turn the servo on delayMicroseconds(pulseWidth1); // Length of the pulse sets the servo position digitalWrite(servoPin1, LOW); // Turn the servo off lastPulse1 = millis(); // save the time of the last pulse } } void checkNunchuck2() { if( loop_cnt > 100 ) { // loop()s is every 1msec, this is every 100msec nunchuck_get_data(); nunchuck_print_data(); float tilt = nunchuck_accely(); // y-axis, in this case ranges from ~70 - ~185 tilt = (tilt - 70) * 1.5; // convert to angle in degrees, roughly pulseWidth2 = (tilt * 9) + minPulse; // convert angle to microseconds loop_cnt = 0; // reset for } loop_cnt++; } // called every loop(). // uses global variables servoPin, pulsewidth, lastPulse, & refreshTime void updateServo2() { // pulse the servo again if rhe refresh time (20 ms) have passed: if (millis() - lastPulse2 >= refreshTime) { digitalWrite(servoPin2, HIGH); // Turn the servo on delayMicroseconds(pulseWidth2); // Length of the pulse sets the servo position digitalWrite(servoPin2, LOW); // Turn the servo off lastPulse2 = millis(); // save the time of the last pulse } } // // Nunchuck functions // static uint8_t nunchuck_buf[6]; // array to store nunchuck data, // initialize the I2C system, join the I2C bus, // and tell the nunchuck we're talking to it void nunchuck_init() { Wire.begin(); // join i2c bus as master Wire.beginTransmission(0x52); // transmit to device 0x52 Wire.send(0x40); // sends memory address Wire.send(0x00); // sends sent a zero. Wire.endTransmission(); // stop transmitting } // Send a request for data to the nunchuck // was "send_zero()" void nunchuck_send_request() { Wire.beginTransmission(0x52); // transmit to device 0x52 Wire.send(0x00); // sends one byte Wire.endTransmission(); // stop transmitting } // Receive data back from the nunchuck, // returns 1 on successful read. returns 0 on failure int nunchuck_get_data() { int cnt=0;
http://www.instructables.com/id/Arduino-Projects/
Wire.requestFrom (0x52, 6); // request data from nunchuck while (Wire.available ()) { // receive byte as an integer nunchuck_buf[cnt] = nunchuk_decode_byte(Wire.receive()); cnt++; } nunchuck_send_request(); // send request for next data payload // If we recieved the 6 bytes, then go print them if (cnt >= 5) { return 1; // success } return 0; //failure } // Print the input data we have recieved // accel data is 10 bits long // so we read 8 bits, then we have to add // on the last 2 bits. That is why I // multiply them by 2 * 2 void nunchuck_print_data() { static int i=0; int joy_x_axis = nunchuck_buf[0]; int joy_y_axis = nunchuck_buf[1]; int accel_x_axis = nunchuck_buf[2]; // * 2 * 2; int accel_y_axis = nunchuck_buf[3]; // * 2 * 2; int accel_z_axis = nunchuck_buf[4]; // * 2 * 2; int z_button = 0; int c_button = 0; // byte nunchuck_buf[5] contains bits for z and c buttons // it also contains the least significant bits for the accelerometer data // so we have to check each bit of byte outbuf[5] if ((nunchuck_buf[5] >> 0) & 1) z_button = 1; if ((nunchuck_buf[5] >> 1) & 1) c_button = 1; if ((nunchuck_buf[5] >> 2) & 1) accel_x_axis += 2; if ((nunchuck_buf[5] >> 3) & 1) accel_x_axis += 1; if ((nunchuck_buf[5] >> 4) & 1) accel_y_axis += 2; if ((nunchuck_buf[5] >> 5) & 1) accel_y_axis += 1; if ((nunchuck_buf[5] >> 6) & 1) accel_z_axis += 2; if ((nunchuck_buf[5] >> 7) & 1) accel_z_axis += 1; Serial.print(i,DEC); Serial.print("\t"); Serial.print("joy:"); Serial.print(joy_x_axis,DEC); Serial.print(","); Serial.print(joy_y_axis, DEC); Serial.print(" \t"); Serial.print("acc:"); Serial.print(accel_x_axis, DEC); Serial.print(","); Serial.print(accel_y_axis, DEC); Serial.print(","); Serial.print(accel_z_axis, DEC); Serial.print("\t"); Serial.print("but:"); Serial.print(z_button, DEC); Serial.print(","); Serial.print(c_button, DEC); Serial.print("\r\n"); // newline i++; } // Encode data to format that most wiimote drivers except // only needed if you use one of the regular wiimote drivers char nunchuk_decode_byte (char x) { x = (x ^ 0x17) + 0x17;
http://www.instructables.com/id/Arduino-Projects/
return x; } // returns zbutton state: 1=pressed, 0=notpressed int nunchuck_zbutton() { return ((nunchuck_buf[5] >> 0) & 1) ? 0 : 1; // voodoo } // returns zbutton state: 1=pressed, 0=notpressed int nunchuck_cbutton() { return ((nunchuck_buf[5] >> 1) & 1) ? 0 : 1; // voodoo } // returns value of x-axis joystick int nunchuck_joyx() { return nunchuck_buf[0]; } // returns value of y-axis joystick int nunchuck_joyy() { return nunchuck_buf[1]; } // returns value of x-axis accelerometer int nunchuck_accelx() { return nunchuck_buf[2]; // FIXME: this leaves out 2-bits of the data } // returns value of y-axis accelerometer int nunchuck_accely() { return nunchuck_buf[3]; // FIXME: this leaves out 2-bits of the data } // returns value of z-axis accelerometer int nunchuck_accelz() { return nunchuck_buf[4]; // FIXME: this leaves out 2-bits of the data }
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. rotation servo Hitec HS80 2. Luxeon LED 3. Delrin arm
Image Notes 1. Arm servo geared 4:1 Servo is Hitec HS645MG 2. Servo to control cannon pitch movement Servo is Hitec HS605BB
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Wii nunchuck guts bottom view Image Notes 1. Nunchuck board top with joystick removed This is necessary to get it to fit in the Predator Bio helmet
Image Notes 1. nunchuck finger buttons with extended wires Image Notes 1. Wii nunchuck board bottom with joystick removed The joystick can be a real pain to remove
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Adafruit Wave Shield- This is THE device to have to add sound to any Arduino project
http://www.instructables.com/id/Arduino-Projects/
File Downloads
CannonSound.WAV (199 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'CannonSound.WAV']
http://www.instructables.com/id/Arduino-Projects/
int transistorPin2 = 12; // Control pin for servo 1 using c button int transistorPin3 = 11; // Control pin for servo 2 using c button int transistorPin4 = 10; // Control pin for cannon motor using z button int servoPin1 = 9; // Control pin for servo 1 using accelerometer x axis int servoPin2 = 8; // Control pin for servo 2 using accelerometer y axis int pulseWidth1 = 0; // Amount to pulse the servo 1 int pulseWidth2 = 0; // Amount to pulse the servo 2 int refreshTime = 20; // the time in millisecs needed in between servo pulses long lastPulse1; long lastPulse2; int minPulse = 700; // minimum servo pulse width int loop_cnt=0; boolean button_down = false; unsigned long start; void setup() { Serial.begin(19200); pinMode(controlPin1, OUTPUT); // Set control pin 1 as output pinMode(transistorPin1, OUTPUT); // Set transistor pin 1 as output pinMode(transistorPin2, OUTPUT); // Set transistor pin 2 as output pinMode(transistorPin3, OUTPUT); // Set transistor pin 3 as output pinMode(transistorPin4, OUTPUT); // Set transistor pin 4 as output pinMode(servoPin1, OUTPUT); // Set servo pin 1 as output pinMode(servoPin2, OUTPUT); // Set servo pin 2 as output pulseWidth1 = minPulse; // Set the servo position to the minimum pulseWidth2 = minPulse; // Set the servo position to the minimum nunchuck_init(); // send the initilization handshake Serial.print("NunchuckServo ready\n"); } void loop() { checkNunchuck1(); updateServo1(); // update servo 1 position checkNunchuck2(); updateServo2(); // update servo 2 position if( nunchuck_cbutton() ) { digitalWrite(transistorPin2, HIGH); // turn on transistor pin 2 if c button is pressed digitalWrite(transistorPin3, HIGH); // turn on transistor pin 3 if c button is pressed } else { digitalWrite(transistorPin2, LOW); // turn off transistor pin 2 digitalWrite(transistorPin3, LOW); } if ( nunchuck_zbutton() ) { if (!button_down) // if button was just pressed do this { digitalWrite(controlPin1, HIGH); // turn on sound effect button_down = true; start = millis(); } else if (millis() - start > 1200) // if timer has elapsed do this { digitalWrite(transistorPin1, HIGH); // turn on cannon LED digitalWrite(transistorPin4, HIGH); // turn on cannon motor } } else // if button is up do this { button_down = false; digitalWrite(controlPin1, LOW); // turn off sound effect digitalWrite(transistorPin1, LOW); // turn off cannon LED digitalWrite(transistorPin4, LOW); // turn off cannon motor } delay(1); // this is here to give a known time per loop } void checkNunchuck1() {
http://www.instructables.com/id/Arduino-Projects/
if( loop_cnt > 100 ) { // loop()s is every 1msec, this is every 100msec nunchuck_get_data(); nunchuck_print_data(); float tilt = nunchuck_accelx(); // x-axis, in this case ranges from ~70 - ~185 tilt = (tilt - 70) * 1.5; // convert to angle in degrees, roughly pulseWidth1 = (tilt * 9) + minPulse; // convert angle to microseconds loop_cnt = 0; // reset for } loop_cnt++; } // called every loop(). // uses global variables servoPin, pulsewidth, lastPulse, & refreshTime void updateServo1() { // pulse the servo again if rhe refresh time (20 ms) have passed: if (millis() - lastPulse1 >= refreshTime) { digitalWrite(servoPin1, HIGH); // Turn the servo on delayMicroseconds(pulseWidth1); // Length of the pulse sets the servo position digitalWrite(servoPin1, LOW); // Turn the servo off lastPulse1 = millis(); // save the time of the last pulse } } void checkNunchuck2() { if( loop_cnt > 100 ) { // loop()s is every 1msec, this is every 100msec nunchuck_get_data(); nunchuck_print_data(); float tilt = nunchuck_accely(); // y-axis, in this case ranges from ~70 - ~185 tilt = (tilt - 70) * 1.5; // convert to angle in degrees, roughly pulseWidth2 = (tilt * 9) + minPulse; // convert angle to microseconds loop_cnt = 0; // reset for } loop_cnt++; } // called every loop(). // uses global variables servoPin, pulsewidth, lastPulse, & refreshTime void updateServo2() { // pulse the servo again if rhe refresh time (20 ms) have passed: if (millis() - lastPulse2 >= refreshTime) { digitalWrite(servoPin2, HIGH); // Turn the servo on delayMicroseconds(pulseWidth2); // Length of the pulse sets the servo position digitalWrite(servoPin2, LOW); // Turn the servo off lastPulse2 = millis(); // save the time of the last pulse } } // // Nunchuck functions // static uint8_t nunchuck_buf[6]; // array to store nunchuck data, // initialize the I2C system, join the I2C bus, // and tell the nunchuck we're talking to it void nunchuck_init() { Wire.begin(); // join i2c bus as master Wire.beginTransmission(0x52); // transmit to device 0x52 Wire.send(0x40); // sends memory address Wire.send(0x00); // sends sent a zero. Wire.endTransmission(); // stop transmitting } // Send a request for data to the nunchuck // was "send_zero()" void nunchuck_send_request() { Wire.beginTransmission(0x52); // transmit to device 0x52 Wire.send(0x00); // sends one byte Wire.endTransmission(); // stop transmitting } // Receive data back from the nunchuck, // returns 1 on successful read. returns 0 on failure
http://www.instructables.com/id/Arduino-Projects/
int nunchuck_get_data() { int cnt=0; Wire.requestFrom (0x52, 6); // request data from nunchuck while (Wire.available ()) { // receive byte as an integer nunchuck_buf[cnt] = nunchuk_decode_byte(Wire.receive()); cnt++; } nunchuck_send_request(); // send request for next data payload // If we recieved the 6 bytes, then go print them if (cnt >= 5) { return 1; // success } return 0; //failure } // Print the input data we have recieved // accel data is 10 bits long // so we read 8 bits, then we have to add // on the last 2 bits. That is why I // multiply them by 2 * 2 void nunchuck_print_data() { static int i=0; int joy_x_axis = nunchuck_buf[0]; int joy_y_axis = nunchuck_buf[1]; int accel_x_axis = nunchuck_buf[2]; // * 2 * 2; int accel_y_axis = nunchuck_buf[3]; // * 2 * 2; int accel_z_axis = nunchuck_buf[4]; // * 2 * 2; int z_button = 0; int c_button = 0; // byte nunchuck_buf[5] contains bits for z and c buttons // it also contains the least significant bits for the accelerometer data // so we have to check each bit of byte outbuf[5] if ((nunchuck_buf[5] >> 0) & 1) z_button = 1; if ((nunchuck_buf[5] >> 1) & 1) c_button = 1; if ((nunchuck_buf[5] >> 2) & 1) accel_x_axis += 2; if ((nunchuck_buf[5] >> 3) & 1) accel_x_axis += 1; if ((nunchuck_buf[5] >> 4) & 1) accel_y_axis += 2; if ((nunchuck_buf[5] >> 5) & 1) accel_y_axis += 1; if ((nunchuck_buf[5] >> 6) & 1) accel_z_axis += 2; if ((nunchuck_buf[5] >> 7) & 1) accel_z_axis += 1; Serial.print(i,DEC); Serial.print("\t"); Serial.print("joy:"); Serial.print(joy_x_axis,DEC); Serial.print(","); Serial.print(joy_y_axis, DEC); Serial.print(" \t"); Serial.print("acc:"); Serial.print(accel_x_axis, DEC); Serial.print(","); Serial.print(accel_y_axis, DEC); Serial.print(","); Serial.print(accel_z_axis, DEC); Serial.print("\t"); Serial.print("but:"); Serial.print(z_button, DEC); Serial.print(","); Serial.print(c_button, DEC); Serial.print("\r\n"); // newline i++; } // Encode data to format that most wiimote drivers except // only needed if you use one of the regular wiimote drivers
http://www.instructables.com/id/Arduino-Projects/
char nunchuk_decode_byte (char x) { x = (x ^ 0x17) + 0x17; return x; } // returns zbutton state: 1=pressed, 0=notpressed int nunchuck_zbutton() { return ((nunchuck_buf[5] >> 0) & 1) ? 0 : 1; // voodoo } // returns zbutton state: 1=pressed, 0=notpressed int nunchuck_cbutton() { return ((nunchuck_buf[5] >> 1) & 1) ? 0 : 1; // voodoo } // returns value of x-axis joystick int nunchuck_joyx() { return nunchuck_buf[0]; } // returns value of y-axis joystick int nunchuck_joyy() { return nunchuck_buf[1]; } // returns value of x-axis accelerometer int nunchuck_accelx() { return nunchuck_buf[2]; // FIXME: this leaves out 2-bits of the data } // returns value of y-axis accelerometer int nunchuck_accely() { return nunchuck_buf[3]; // FIXME: this leaves out 2-bits of the data } // returns value of z-axis accelerometer int nunchuck_accelz() { return nunchuck_buf[4]; // FIXME: this leaves out 2-bits of the data }
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
} Here's the code for the receiver/* * Example 9b * Nunchuck XBee receiver * This code receives input from a Wii nunchuck using an XBee radio (w/ Adafruit XBee adapter) * and controls four servos and two digital pins to turn on LEDs * Honus 2010 */ #include "Servo.h" // include the Servo library int joyx,joyy = 135; int accx,accy = 135; int zbut,cbut = 0; int ledPin1 = 13; int ledPin2 = 12; int lightvalue1 = 255; int lightvalue2 = 255; char nunchuckData; int val = 0; int tempval = 0; int servo1Pos; int servo2Pos; int servo3Pos; int servo4Pos; int buttonState1 = 0; int buttonState2 = 0; int lightMode1 = 0; int lightMode2 = 0; Servo servo1; Servo servo2; Servo servo3; Servo servo4; int servoPin1 = 9; int servoPin2 = 8; int servoPin3 = 7; int servoPin4 = 6; void setup() { // Serial.begin(9600); // Serial.print("Nunchuck ready\n"); Serial.begin(9600); servo1.attach(servoPin1); servo2.attach(servoPin2); servo3.attach(servoPin3); servo4.attach(servoPin4); pinMode(ledPin1, OUTPUT); pinMode(ledPin2, OUTPUT); } void loop() { if (accy > 125) { servo1Pos = 90-(accy-125); if (servo2Pos < 45) servo1Pos = 45; servo1.write(servo1Pos); } if (accy < 125) { servo1Pos = 90+(125-accy); if (servo1Pos > 135) servo1Pos = 135; servo1.write(servo1Pos); }
if (accx > 125) { servo2Pos = 90-(accx-125); if (servo2Pos < 45) servo2Pos = 45; servo2.write(servo2Pos); } if (accx < 125) { servo2Pos = 90+(125-accx); if (servo2Pos > 135)
http://www.instructables.com/id/Arduino-Projects/
servo2Pos = 135; servo2.write(servo2Pos); } if (joyy > 125) { servo3Pos = 90-(joyy-125); if (servo3Pos < 45) servo3Pos = 45; servo3.write(servo3Pos); } if (joyy < 125) { servo3Pos = 90+(125-joyy); if (servo3Pos > 135) servo3Pos = 135; servo3.write(servo3Pos); }
if (joyx > 125) { servo4Pos = 90-(joyx-125); if (servo4Pos < 45) servo4Pos = 45; servo4.write(servo4Pos); } if (joyx < 125) { servo4Pos = 90+(125-joyx); if (servo4Pos > 135) servo4Pos = 135; servo4.write(servo4Pos); } if (cbut != buttonState1) { // the button state has changed! if (cbut == 1) { // check if the button is pressed if (lightMode1 == 0) { // light is off lightMode1 = 1; // light is on! digitalWrite(ledPin1, HIGH); } else { lightMode1 = 0; // light is on! digitalWrite(ledPin1, LOW); } } } if (zbut != buttonState2) { // the button state has changed! if (zbut == 1) { // check if the button is pressed if (lightMode2 == 0) { // light is off lightMode2 = 1; // light is on! digitalWrite(ledPin2, HIGH); } else { lightMode2 = 0; // light is on! digitalWrite(ledPin2, LOW); } } } buttonState1 = cbut; // save the new state in our variable buttonState2 = zbut; // save the new state in our variable
while(Serial.available()) { tempval = Serial.read(); if (tempval=='x') { nunchuckData='x'; val=0; } else if (tempval=='y') { nunchuckData='y'; val=0; } else if (tempval=='X') { nunchuckData='X'; val=0; } else if (tempval=='Y') { nunchuckData='Y'; val=0; } else if (tempval=='Z') { nunchuckData='Z'; val=0; } else if (tempval=='C') { nunchuckData='C';
http://www.instructables.com/id/Arduino-Projects/
val=0; } else if (tempval >='0' && tempval <= '9') { val=val * 10; val=val + (tempval - '0'); if (nunchuckData=='x'){ joyx=val; } else if (nunchuckData=='y'){ joyy=val; } else if (nunchuckData=='X'){ accx=val; } else if (nunchuckData=='Y'){ accy=val; } else if (nunchuckData=='Z'){ zbut=val; } else if (nunchuckData=='C'){ cbut=val; } } } //end of input in serial buffer }
Image Notes 1. Adafruit XBee adapter plugs directly into the controller board
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
as they can sit in a chair- not an option for costuming. There are IMUs and digital compasses available now that have on board processing and are programmed to account for drift and tilt so some of the hard work is done for you but you would still have to factor in the difference output of two of them and then generate your necessary servo movement values from that. It can be done but it's pretty darn expensive. Most of the solutions I found were pretty complex in terms of programming requiring sophisticated algorithms and/or extremely expensive on the hardware side. There are also pretty severe space restrictions for fitting sensors inside the Predator Bio helmet as some of the IMUs available are pretty large physically. Then I found that I could modify the sensor board out of a Wii nunchuck controller and interface it with a microcontroller over its IC bus. This provided me with an inexpensive and reliable multi axis accelerometer and two finger pushbuttons with an easy to use interface. I ended up writing code that would allow me to access all of the nunchuck's functions- the accelerometer outputs, the joystick and the two pushbuttons. When it was all said and done the rotation was still a bit of a problem as the accelerometer only really gives you a stable output with respect to gravity so you have to tilt it to get the rotation. What I found was that if I mounted it as level as possible in Predator helmet it really didn't need much tilt at all to get a stable rotation. The beauty of this system is that there are only only two finger buttons to control everything- it's also pretty easy for me to modify the code. I haven't yet taken apart a Wii Motion Plus to combine it with a nunchuck to create an inexpensive IMU but I'll post the results when I do. What I did was to basically fake it by strictly using the accelerometer inputs- when looking sideways you just need to tilt your head to the side like a bird for yaw (rotation) control. The accelerometer reads the tilt and moves everything accordingly- the pitch function is normal. It does take a bit of getting used to but after a while it becomes more natural and it's very convincing. For costuming all you need to do is provide the illusion. When I started the project with a friend three years ago (he's sculpting the Pedator backpack) we wanted something that anyone could build from readily available building blocks to add some cool animatronics to their Predator costume without spending a ton of cash. Whew... I want to power my project and I only want to use one battery to supply different voltages- what do I do? I would use a switching step down voltage regulator like this onehttp://www.pololu.com/catalog/product/2110 It's far more efficient than using a traditional voltage regulator, especially if you need to use something like a 12V battery and drop it down to 5V for servo power. If you need to drop 5V to 3.3V then a traditional voltage regulator is fine. Just don't plug it into the JST connector on the controller board and then plug in a USB cable into the USB mini-B port for the charging circuit- that would be bad.
Related Instructables
How to create simple animatronicspart one: using the MAKE controller by Honus
http://www.instructables.com/id/Arduino-Projects/
How to have fun with Arduino (and become a Geek in the process)
by john otto on June 25, 2007
Author:john otto
Hardworking demonoid engineer, struggling to reconcile my hobbies with a desire to conquer the universe.
Intro: How to have fun with Arduino (and become a Geek in the process)
Do you wish to earn your geek card - pronto? Lets get started! This guide will start you on the path to the dark side using the open source Arduino development and prototyping platform. It will introduce you to microcontrollers, get you started with a platform for physical computing and give you the confidence to create technological marvels. It is open source, inexpensive and a blast to learn.
http://www.instructables.com/id/Arduino-Projects/
Step 2: Where does the cable go? Here is the A side and its home
This is the A side of the cable. You can plug it into any USB port.
Image Notes 1. This is the B connector on the Arduino. It acts as the communication link between your PC and the Arduino. The PC provides 5 volts to the Arduino through this cable. 2. This is the 9 volt power supply connector. Use this instead of the USB power for advanced projects like running motors that take more juice!
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Place the jumper over these two pins if you use the 9 volt connector 2. When the jumper is in this position your board is ready to accept 5 volt power from the usb cable,
Image Notes 1. Wallwart. Note this one has adjustable voltages and is set at 9V.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. This prototyping board is additional and does not come with the kit. Don't worry - its very inexpensive!
Image Notes 1. This dime is not included. 2. the 170 holes are spaced .100" apart. This is an electronics industry standard spacing so most components just plug right in.
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
Make a one chip Arduino Five RAM (random Pin LED Matrix access memory) Dice by simonfrfr by yaly
Ceiling Fan LED Display by UncleBone Arduino Basics: RCtime by randofo TRUCKBOT (Photos) by anottingham
http://www.instructables.com/id/Arduino-Projects/
Author:johndavid400
author's website I have always been one to take things apart to figure out how they work, so most of what I own has been dismantled. If it can't be taken apart or hacked, i'd rather not have it. And I like to do things the cheapest way possible, because I like to do a lot of things and I don't have a lot of money.
. I added some new code to the project that is safer, including a manual kill-switch and a Failsafe switch. To implement the Failsafe, I used another Atmega168 (or an Arduino), to control a normally-open 60amp power relay. The relay disconnects the power to the motorcontroller unless receiving a "good" signal from the 2nd microcontroller. This signal is updated 2 times every second and is either ON or OFF. If the bot gets out of range, it loses power to the motors. If I flip the kill-switch on the Transmitter, it loses power to the motors. This is also a handy way to disable it remotely if anything were to go near it that wasn't supposed to. The updated code for both microcontrollers is on the CODE page. In addition to the failsafe, I changed the way the code reads the PPM signals to make it more reliable. Also, I realized that I was only able to run the bot at 80% speed with the old code, so now it is quite a bit faster and has more power (it can carry me across the yard @ 155lb). Check out this new video of me riding the Lawnbot400, my wife driving it over a bunch of branches, then me making do some wheelies. Don't worry, the mower was turned off this time since the grass didn't need cutting, we were just having fun.
Disclaimer:
http://www.instructables.com/id/Arduino-Projects/
DANGER!!! This is a VERY dangerous piece of equipment if not handled appropriately. Since all the electronics have been home-built and the Arduino code is new, you MUST be very careful while operating anything heavy with this code. I have had 1 or 2 times during testing - and before adding a secondary failsafe - that the main Arduino jammed up and I temporarily lost control of the mower for a few seconds!!!! Though I have added several filters to discard unwanted signals and I rarely have any issues, an un-manned lawnmower IS STILL A POTENTIAL DEATH TRAP and I assume no responsibility for anything that happens as a result of your use of this code or this tutorial. This is meant as a guide for people who not only have the ability to build such a contraption, but the responsibiltity to operate it safely as well. Any suggestions or ideas on how to make this a safer project is always gladly accepted. Having said that, it's also awesome. Background: Most R/C equipment comes packaged for a single specific use, which makes it easy to use but is very limited in what you can do with it. So using the Arduino as an interpreter between the R/C system and the motor driver, I can use any motor controller that I want (depending on the size of the motor and power required), reprogramming the Arduino to supply the required signals. What I ended up with: After successfully hacking a few R/C cars from the thrift store, I got bored driving them around the driveway and I was having a hard time convincing my wife that there was any usefulness in the revived toy car. So I decided it was time to make my biggest chore at home, a whole lot easier and actually put my Arduino to work, and thats how I ended up building an R/C lawnmower. While designing the lawnmower, I thought it would be cool to learn about the electronics that made it move, so I designed and built my own motor speed controller (or Hbridge) to power the lawnmower. I looked around at every H-bridge design I could find before deciding to go with a Mosfet h-bridge that uses both N-channel and Pchannel Mosfets. I built several different motor driver boards for this project, the first two were on Radio-Shack perf-board and the next 4 were designed using EagleCad and etched to a piece of copper-clad PCB, using the toner-transfer method. The most recent board is the one I use to mow the lawn as it has the ability to stay cool even while operating for long periods of time (30-40 mins straight) at 10-20amps and 24vdc. FWIW, I had to burn up a lot of Mosfets to find this out. If you want to see any of my other motor controllers, go to www.rediculouslygoodlooking.com and check out the Mosfet shield. Here is what I bought already assembled: FM R/C transmitter and receiver pair from ebay = $40 Arduino = $30 I already had a used push-mower = $60 Here is what I bought and assembled into the Lawnbot400 (as I call it): (2) electric-wheelchair motors from ebay = $40 ea (2) 12v marine deep cycle batteries - Walmart - $60 ea new (used batteries might work) 36" pieces of 2" angle-iron (2) and 1" square-tubing (2) from Home Depot = $8 ea 36" pieces of 1" angle-iron (2) and 1" flat steel bar (2) from Home Depot = $5 ea (a lot) of nuts, bolts, washers, lock washers 3/8" or 1/2" with drill bit = $20 (2) caster wheels from Harbor Freight Tools = $14 ea (2) drive wheels from Harbor Freight Tools = $8 ea (36") 5/8" threaded rod with several 5/8" nuts and washers from Home Depot = $8 (2) sprockets from Allelectronics = $5 ea #25 roller chain and a few universal links from Allelectronics = $10 for 3' sprockets from Electronics Goldmine = $1.50 ea (24) mosfets from Digikey = $1 ea (there were quite a few small parts for building the H-bridge, they are listed later on)
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. the front left mower deck hanger 2. the rear left mower deck hanger
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. the Triple8 motor controller with 24 mosfets, each set of 3 is bolted together and each mosfet is heatsinked. It has 3x as many Mosfets as it's little brother, but essentially the same circuit. 2. the predecessor to the Triple8, only 8 mosfets total (just enough to complete a dual h-bridge). Though it would run the Lawnbot400 around for about 10 minutes, it would end up getting hot after some use.
Image Notes 1. the 2 neutral indicator LED's (1 red and 1 yellow) hard-wired to digital pins 12 and 13. Anytime I center one of the control sticks on the lawnbot400, one of these lights turns on. 2. the female headers used to plug my R/C receiver directly onto (they use standard .1" spacing like perfboard you can buy at Radio Shack) 3. these are the breakout screw-terminals used to route the R/C receiver signals to the Atmega168. I am only using 2 of the 6 R/C channels right now, so the other 4 can be used for extra servo's or whatever else. 4. digital pins 2 and 3 of the Atmega168, used for the External Interrupts on those pins to capture the R/C signals from the receiver. 5. These are the screw-terminals for the signal wires leading to the H-bridge motor controller. I only need 4 wires to run my motor controller, but there are 3 extra digital pins that are unused by the current code.... Any ideas for their use? 6. all 6 analog pins are unused! I might add some sensors to automate the Lawnbot400 one day. 7. the Atmega168, it's reset button, and a kind-of hidden 16mHz crystal oscillator (together make a bare-bones Arduino). 8. 5-35v power terminal and onboard 5v regulator for powering the Atmega and R/C receiver. Plus a bunch of capacitors and a reverse polarity protection diode.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. this is the 2nd H-bridge, notice that the motor screw-terminals for each motor will be on opposite sides of the board. 2. This is the 1st H-bridge
Step 1: Setting up
1. Get R/C transmitter and receiver (I have tested FM and AM systems and they both work) 2. Upload code to Arduino (it is on the last page) 3. Make sure you are getting a good signal You will need an R/C radio transmitter(Tx) and receiver(Rx) pair, which is the most expensive part of the project, but can be used for every future project you might have involving R/C. I went with a 6-channel FM system, but I have tested a 27mHz AM transmitter/receiver and it works just as well. The beauty of the Arduino is that if you want to adjust the deadband or the motor-speed at turn-on, (unlike commercial ESC's) it is all easy changed in the Arduino IDE. Once you have your radio, all you need to do is upload the code to your Arduino, plug in the 2 channels that you want to use from your radio receiver into Digital pins 2 and 3 of the Arduino (these are the 2 external interrupt pins on the Arduino) and you are ready to control whatever you want. If you don't have a batter pack for the receiver, you can run jumper wires from the Arduino +5v and GND to the R/C receiever for power, you only need to supply a single channel with GND and +5v (it is not necessary to power every channel). Upload the code using the Aruino IDE (I am using version 0016 on Ubuntu). I started by controlling 3 LED's with 1 channel on a breadboard. I wired a red LED to be Forward (digital pin 9), a yellow LED for Reverse(digital pin 5), and a green LED for Neutral (digital pin 12). This allows you to adjust the code to fit the needs of your radio system. You will have smooth 0-100% PWM control of both LED's and the neutral light will turn on when the control stick is centered. If needed, you can widen the deadband for Neutral, but doing so will increase the speed at turn-on (which starts at 0%, so that would likely be desirable). See pictures. ---------------------------------------The code has 4 PWM outputs for motor control: channel 1 Forward = Arduino digital pin 9 channel 1 Reverse = Arduino digital pin 5 channel 2 Forward = Arduino digital pin 10 channel 2 Reverse = Arduino digital pin 6
http://www.instructables.com/id/Arduino-Projects/
2 outputs for Neutral indicator lights: channel 1 = digital pin 12 channel 2 = digital pin 13 The 2 INPUTS from the R/C receiver should go to: channel 1 = digital pin 2 channel 2 = digital pin 3 --------------------------------------If you are interested to see your readings, turn on your Serial Monitor in the Arduino IDE (set to 9600bps) and you can see the actual real-time pulse readings for each channel, they should read: full forward = 2000 (2 milliseconds) center = 1500 (1.5 ms) full reverse = 1000 (1 ms) These readings reflect the number of microseconds that the pulse signal from the R/C receiver stays HIGH (or at 5v). The typical Servo signal that comes from an R/C receiver is a pulse whose length varies from approximately 1 ms to 2 ms with 1.5 ms being Neutral (which should also be the position that the control stick returns to when you let it go). The transmitter reads the position of the control stick and sends that pulse length about once every 20milliseconds. So it is constantly updating for precise control (for more info, look up PPM on wikipedia). If you push the transmitter control stick forward, the reading should go up to 2000, if you push it backward it should go down to 1000. You can also use a voltage meter at this point to see that Digital Pins 5, 6, 9, & 10 will be changing from 0-5v depending on the position of the control sticks on the R/C transmitter. If you care to know, the code uses the Arduino's 2 external interrupts to capture when the Rx signal pin changes states (goes from HIGH to LOW or vice versa), when it does at the beginning of each signal, it calls the interrupt function which reads the digital state of the pin and if HIGH, it records the microseconds value on the Arduino system timer0. It then returns to the loop until the pin goes LOW, at which point it subtracts the previously recorded microsecond value from the new current microsecond value to determine how long the pulse stayed HIGH (which tells us the position of the Transmitter control stick). It then does that over and over really fast. I have the values constrained from 600-2400 in the Arduino code to keep things simple. Once it receives the signal and constrains it, it maps that value to be proportionally between 0 and 511, where 255 will be Neutral. The code then determines when the value changes and uses a function to determine the appropriate 0-255 PWM value in the appropriate direction and each direction has it's own PWM output pin to control the H-bridge. On a side note: To make things easier, I built an Arduino-based breakout board using Radio-Shack perf-board, a 28pin DIP socket, a 16mhz oscillator, and a bit of wire. I also added a set of female-headers in such a way that I can plug my R/C receiver directly onto the breakout board. For secure connections while mowing grass, I added screwterminals on each Output pin and each of the 6 channels from the receiver. It also has a built in 5v regulator to power both the Atmega168 from the Arduino and the R/C receiver (which gets power when you plug it onto the breakout board). So you just route jumper wires from the channels you want to use on the receiver, to the Atmega digital pins 2 and 3. I also added 2 LED lights that are hard wired to the digital pins 12 and 13 for the Neutral lights for each channel so I can easily see when I am in neutral. Since this bot is a Tank steer setup with 1 drive motor on each wheel, the coding is very straightforward where the left stick controls the left motor and the right stick controls the right motor. Both sticks forward means lawnmower goes straight forward, both backward and it goes in reverse. If you push the left forward and the right backward, it does a zero-turn circle. As you can imagine, mowing the grass is really fun now.
Image Notes 1. this is my receiver plugged into a breakout board I made for it using perfboard. 2. the Arduino receiving R/C servo signals and translating them into forward/reverse PWM values. 3. each set of LED's is controlled by it's own channel from the R/C receiver. Forward will turn on the green light, reverse the Red light, and neutral will light up the Yellow light. This is the easiest way to test the setup.
Image Notes 1. this is a typical R/C transmitter with 4 channels, the one I got is a knockoff of this one, but looks very similar. 2. this is a typical R/C receiver. Mine has it's connector pins on the end of the unit instead of the top, enabling me to plug my receiver directly onto the control board. 3. these are typical servo motors. They can be controlled directly by the R/C receiver and are useful for many things.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. the Atmega168 from my Arduino (I bought a few extras to use for projects like this). I remove it when I need to re-program it in the Arduino. 2. my R/C receiver plugged into the control board. Notice the green antenna coming out.
http://www.instructables.com/id/Arduino-Projects/
motor controller, all you need to do is print the .brd file onto some magazine paper using a laser printer, and iron that onto a piece of clean copper-clad. Then etch it with your favorite etchant solution (I use 2 parts Hydrogen Peroxide to 1 part Muriatic Acid and it works perfectly). And remove the toner with Acetone when done etching. For ease of assembly I designed this board to be Single-sided and to use only through-hole components, no surface-mount stuff to mess with! Yay for you. You can get the .brd files for the various h-bridges at www.rediculouslygoodlooking.com
Image Notes 1. this is the 2nd H-bridge, notice that the motor screw-terminals for each motor will be on opposite sides of the board. 2. This is the 1st H-bridge
Image Notes 1. bussed resistor networks 47ohm. They have 1 input and 5 outputs, this board only uses 3 of the outputs. 2. pull up/down resistors 4.7k ohm, these keep the Mosfets turned off when not being used. 3. capacitors, I used (4) 680uF 50v, but you can substitute others that fit. 4. screw terminal connectors for motor terminals and power
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. this is 1 complete h-bridge to control 1 DC motor. The 2 smaller mosfets toward the bottom are used as signal-inverters to control the High-side pchannel mosfets. 2. each h-bridge has it's own set of direction lights to determine the direction of the current.
Image Notes 1. the Triple8 motor controller with 24 mosfets, each set of 3 is bolted together and each mosfet is heatsinked. It has 3x as many Mosfets as it's little brother, but essentially the same circuit. 2. the predecessor to the Triple8, only 8 mosfets total (just enough to complete a dual h-bridge). Though it would run the Lawnbot400 around for about 10 minutes, it would end up getting hot after some use.
Image Notes 1. R/C receiver plugged into Arduino breakout board 2. cooling fan for motor controller (h-bridge)
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Atmega168 microcontroller programmed in the Arduino, then transferred to this home-made breakout board for permanent use. 2. The R/C receiver is plugged directly onto my home-made breakout board which supplies the +5v and GND needed for power as well as a breakout screwterminal for each channel. This receives the signals from the remote-control (R/C transmitter) and sends them into the Atmega168 for processing.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. The bolts coming from around the axle are the 3 bolts that hold the sprocket onto the other side.
Image Notes 1. The drive sprockets are about 6.5" in diameter and had no holes to mount them. I had to drill 3 holes and mount bolts through the sprocket into the wheel. I then added a small bead of weld to keep it centered around the axle.
Image Notes 1. save a bolt on each side by using the same one that you used to bolt the frame riser brace into the frame.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. the front 1" steel square tubing that the front caster wheels attach to.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Motor controller and Arduino 2. push mower 3. (2) 12v batteries (deep cycle marine is the best) 4. electric wheel-chair motors
Image Notes 1. you need 1 nut on the inside of the frame riser bar to, and 1 on the outside to hold it securely to the axle. 2. I bolted the support bar in with the rear lawnmower-deck hangers to save a bolt on each side.
Image Notes 1. the rear bar should be the same width as the center of the rear wheels on your push-mower (must be measured before you remove the wheels). 2. the main frame bars. 3. the support brace
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. one of the main frame bars from step 1, which is 2" angle-iron. 2. the other main frame bar from step 1
Image Notes 1. the front left mower deck hanger 2. the rear left mower deck hanger
Image Notes 1. the rear bar should be the same width as the center of the rear wheels on your push-mower (must be measured before you remove the wheels). 2. the main frame bars. 3. the support brace
Image Notes 1. The drive sprockets are about 6.5" in diameter and had no holes to mount them. I had to drill 3 holes and mount bolts through the sprocket into the wheel. I then added a small bead of weld to keep it centered around the axle.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. The bolts coming from around the axle are the 3 bolts that hold the sprocket onto the other side.
Image Notes 1. one of the main frame bars from step 1, which is 2" angle-iron. 2. the other main frame bar from step 1
Image Notes 1. you need 1 nut on the inside of the frame riser bar to, and 1 on the outside to hold it securely to the axle. 2. I bolted the support bar in with the rear lawnmower-deck hangers to save a bolt on each side.
http://www.instructables.com/id/Arduino-Projects/
The holes drilled in the motor mount plate are just single holes for the bolt to fit through, the holes through the frame were cut with a Dremel tool with a cutoff wheel to make channels for the motor mount bolts to travel forward/backward through. You want the 2" angle-iron motor mount bracket to set as much on top of the main frame rails as possible, the bolts (which you can't see with the motors mounted) that hold the motors to the motor mount plates will keep the motor mount plate from laying flat against the frame bars. Go ahead and mount the motors loosely to the frame using 2 bolts on each. Cutting and connecting the chain: Now get your 10' of #25 chain and wrap it around the main drive sprocket on the wheel. With the motors pushed all the way toward the back of the frame (closest to the drive wheel sprockets), wrap the chain around the motor drive sprocket and mark where they overlap. You need 2 of the universal chain links from to connect the 2 loose ends. Cut the 2 pieces of chain and connect them to each side with the universal links to connect them. Tensioning the chain: Push the motor mounts forward until there is good tension with the chain, and tighten up the bolts that hold the motor mount plates to the main frame. Now you can generate electricity. Connect a voltage meter to 1 set of motor terminals and push the bot around.
Image Notes 1. notice the motor is mounted to this piece of 2" angle-iron and that is mounted to the frame with these bolts. They allow the motor to slide forward/backwards on the frame when loosened.
Image Notes 1. notice the gap between the motor mount plate and the main frame bar. This is caused by the bolts that hold the motor to the motor mount plate. 2. These are 2 unfinished holes for a 3rd mounting hole which I later deemed unnecessary.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. This is how to make the motor mount slide holes. Drill 2 holes where you want the ends of the track to be. Then use a Dremel with a cutoff wheel to cut a straight line between the tops and bottoms of each hole. They should end up looking like the ones above with bolts in them. 2. Tighten up these bolts when you get proper tension with the chain.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. the front left mower deck hanger 2. the rear left mower deck hanger
Image Notes 1. make sure to keep the old wheel shafts from touching the drive tires (leave 1/2" or so)
Image Notes 1. save a bolt on each side by using the same one that you used to bolt the frame riser brace into the frame.
Image Notes 1. adjustable total length (for different model push mowers) 2. caster wheels with 360 degree turning 3. leave a gap or the front wheels will hit the mower deck!!!
Image Notes 1. by mounting the lawn mower deck-hangers to the old wheel shafts, you can still
Image Notes 1. these are the 1" angle-iron lawnmower-deck hangers, they hold the mower-
http://www.instructables.com/id/Arduino-Projects/
adjust the mowing height of the mower deck without taking anything apart.
Image Notes 1. make sure the front caster wheels won't hit the mower deck when they swing around (leave at least 1/2" clearance)
Image Notes 1. I only installed 3 of the 4 bolts on each front caster wheel. 2. these 2 bolts on each side go through the caster wheel mounting plate AND the frame
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Motor controller and Arduino 2. push mower 3. (2) 12v batteries (deep cycle marine is the best) 4. electric wheel-chair motors
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Atmega168 microcontroller programmed in the Arduino, then transferred to this home-made breakout board for permanent use. 2. The R/C receiver is plugged directly onto my home-made breakout board which supplies the +5v and GND needed for power as well as a breakout screw-terminal for each channel. This receives the signals from the remote-control (R/C transmitter) and sends them into the Atmega168 for processing.
Image Notes 1. R/C receiver plugged into Arduino breakout board 2. cooling fan for motor controller (h-bridge)
http://www.instructables.com/id/Arduino-Projects/
File Downloads
Lawnbot400_code.zip (152 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Lawnbot400_code.zip']
#3
http://www.instructables.com/id/Arduino-Projects/
#4
#5
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
remote start system for car truck and suv by Lawn Care Grub control by lonemeno Ace Fix it
Use a PS3 Controller to Solar Lawn control an Mower! by Marsh Arduino NXT Bot by nahamancygig
http://www.instructables.com/id/Arduino-Projects/
Author:drj113
I have a background in digital electronics, and am very interested in computers. I love things that blink, and am in awe of the physics associated with making blue LEDs.
THE BACKGROUND
The original project that I created used a Microchip PIC microcontroller (16F877), because that's what I had in the garage. Since I published it (http://www.instructables.com/id/A-Word-Clock/), quite a few people, including my next door neighbor (Thanks Mikal) have asked me why I didn't use an Arduino. Having never used one, my automatic reaction to Mikal was 'Whats a one of those??" So, I did some research and found out what an Arduino was. Wow - they are so cool - so simple to develop for, and the barrier to entry is so low!. I ordered one from eBay, and re-designed the clock to use the Arduino Duemilanove as the controller. I have to admit right from the start that the Arduino is a beautifully engineered piece of work - While I am used to the PICs, because I have been playing with them for years, I do admit that there is a certain level of 'unreachability' for the beginner because of the requirement that specialised programmers be purchased or built. The Arduino is equally powerful, comes on it's own little self contained board, and best of all is self programmable using a USB cable.
POWER
I have also listened to people who have constructed the original clock, and done away with the need to run off AC power. This clock simply uses a DC supply of 12 Volts, so you can run it off a wall wart, or off a set of batteries. If you are using batteries, may I suggest 'D' cells, as they run forever, or a couple of 6V 'Lantern' batteries.
Image Notes 1. Final clock - YAY The exposure shows way more bleed through than I see with my eyes. But it works!
http://www.instructables.com/id/Arduino-Projects/
BETTER DRIVERS
My original clock used discrete transistors to drive the array of LEDs. I have realised that while that approach works fine for a project that I have built for myself, it makes it more complex for others to build, so this new clock uses ULN2003A Driver ICs. The ULN2003A contains a set of darlington transistors in a convenient DIP package, so there is MUCH less soldering to do.
A NEW PCB
I have also re-designed the PCB to make construction much simpler - The Arduino controller simply plugs into the new PCB. If you want, once you have constructed the clock, you can recover your Arduino board by purchasing an ATMega168 with a boot loader, and populate the PCB with just the new Microcontroller and a crystal.
File Downloads
WordClock-Arduino-Schematic-V1.0.pdf ((595x842) 64 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'WordClock-Arduino-Schematic-V1.0.pdf']
http://www.instructables.com/id/Arduino-Projects/
BE SAFE
When you etch ANYTHING - make sure you are wearing safety goggles, and old clothing.
CLEAN UP
When the etch process is complete, everything was rinsed very well under running water to remove all traces of etchant. Just before I rinsed everything, the etchant was collected for use with the next project.
DRILL HOLES
Once the board had been rinsed and dried, I used a Dremmel to drill the holes, and removed the Press-n-Peel film using some steel wool, detergent anf good old elbow grease. This time, I took buckets of photos of the process - It is very pretty! I personally really enjoy making printed circuit boards, and I am sure that you can make them yourself. However, if you would like your own controller PCB, I am able to supply blank, or pre-assembled boards. Have a look at the last step for further information.
Image Notes 1. The finished controller PCB - Just follow the steps on this page to make this yourself! 2. In this version of the clock controller, I wired the resistors incorrectly - The attached PDF has the correct layout
Image Notes 1. We start with the printed page. I print my circuits on my inkjet printer
Image Notes 1. A piece of PCB stock. This one is the correct sixe, but it needs a GOOD clean before we can use it.
Image Notes 1. Then I take the printout to a real photocopier. I stick a cut piece of Press-nPeel (Blue) to a sheet of paper, and photocopy the image onto the film. I use
http://www.instructables.com/id/Arduino-Projects/
Laserjet labels to attach the film to the a4 paper, so it will feed through the photocopier mechanism.
Image Notes 1. The same piece of copper after I have scrubbed the daylights out of it with an abrasive cleaner, and steel wool - It is very shiny, and has lots of micro scratches to help the Press-n-Peel blue film adhere.
Image Notes 1. I place the Press-n-Peel film onto the clean PBC, and feed it into my laminator.
Image Notes 1. This laminator was a $10 find at the local recycling centre - the rollers don't touch any more - which is how I like it for my 1/16" PCB material! I have found the 4 passes at 170 degrees C creates great adhesion.
Image Notes 1. After 4 passes, I quench the board under running water to assist in seperating the film from the backing plastic.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Once cool - I peel the film gently - and presto - the traces I want stay on the PCB!
Image Notes 1. Sometimes I don't make the PCB clean enough - in this case, the blotches left behind do not affect any traces.
Image Notes 1. The board - with the film attached beautifully - just need to etch now!
Image Notes 1. A plastic bowl to etch the board in 2. I piece of old board trimmings - for testing the etchant 3. Plastic tools to move the board around the etchant 4. My re-used etchant mic - this is so cool - it is so re-usable! It is also VERY poisonous, and etches stainless steel, so don't spill any of it....
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. I start by dunking the test stick in the etchant for a minute - this verifies that the etchant is operating fine.
Image Notes 1. Yes, massive amount of copper etched off (Not all - just testing) - So I can etch the board. If I discover that the etchant isn't very reactive, I can add more Hydrochloric Acid or Hydrogen Peroxide to refresh it.
Image Notes 1. The board is sitting inthe etchant now - bubbles are forming onthe surface of the resist. and the exposed copper is changing color as it is being etched.
Image Notes 1. Lifting the board up - I see two things. Firstly, the exposed copper is a uniform pink-red color - thats normal , and secondly, the very edge of the PCB is starting to be etched - Whoot!
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. The entire usable area of the PCB is etched now - remove it from the bath, and rinse it.
Image Notes 1. The etching process is moving along well - I use an old toothbrush to agitate the surface of the board in areas that are being slow - that speeds things up. Did I mention the I have safety goggles on to protect me from small splashes. 2. This area is well etched. - almost finished!
Image Notes 1. Saved etchant - for next time 2. Everything else (including the PCB) being rinsed.
Image Notes 1. This blotchyness is normal. 2. PCB ready for drilling. 3. Trusty arlec supertool - 20 years old - and still running fine!
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Finished drilling - Note that I had a blunt drill, that removed a couple of pads from areas that were not connected. This is not a problem. 2. Note that the board is a bit bigger than I need - we will fix that next Image Notes 1. Drilling holes 2. My old piece of 'drilling wood' NOT THE KITCHEN BENCH!!
Image Notes 1. An old Vice 2. Place the board into an old vice, along the lint that you want to shear, and GENTLY lean.
Image Notes 1. A scribing tool 2. A deep scribe line where I want to shear the board
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Shear along the other half of the line - Gentle pressure.
Image Notes 1. File the edges of the board nice and clean and straight
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Foaming - kitchen degreaser 2. Stainless Steel Wool Pad 3. This resist comes off when you apply the 2 materials mentioned here - with ELBOY GREASE!
Image Notes 1. See - it does come off..... Just keep scrubbing. When you are finised - the PCB will look like the board inthe start of this page!
File Downloads
WordClock-Arduino-PCB-V1.0.pdf ((595x842) 37 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'WordClock-Arduino-PCB-V1.0.pdf']
Image Notes 1. ULN2003A Drivers x4 2. You have to guess what this part is ;-) 3. Power Connector 4. Time Set Buttons Connector
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. These are the jumpers poking through the board ready to solder.
Image Notes 1. Jumpers added to top side of PCB 2. These are actually jumpers as well in the final board version
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. 16 Pin Machine Pin IC Sockets Dont use the cheap sockets, they will cause trouble in years to come
Image Notes 1. Header pins for Arduino Module 2. This header is not mounted - there are no connections to it anyway. It was placed on the board for potential future expansion. 3. 26 way header to Display
Image Notes 1. Resistors - all 1K0 2. These resistors are mounted just below the jumpers that are in these spots in the final board version.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Off Board Connectors - Green is DC Power and Blue is to the time setting buttons. They are diferent colors because thats what was in the garage. 2. This is where the ATMega168 Chip goes if you are not using a module. Remember to program the chip in an Arduino board before you try to use it in this project. 3. 16Mhz Crystal if you are not using a module 4. 20pF Cap if not using a module 5. 20pF Cap if not using a module 6. 7805 if not using a module 7. 100uF Cap if not using a module 8. 100uF Cap if not using a module 9. 10K resistor if not using a module 10. 1k Resistor if not using a module
THINK FIRST
Before you do anything, have a think about the size you would like the project to be. In this version, I used high intensity LEDs. they have a beamwidth of about 10 degrees, which means that I had to mount the stencil about 30mm from the LEDs to get an even illumination. If you purchase 'Flat Top' LEDs, then you can make the clock much thinner.
DRILL HOLES
Then I measured the LEDs, and they were indeed 5mm diameter, so I drilled LOTS of 5mm holes.....Before I started drilling, I was aware that there was going to be a very big mess. There was board material everywhere. I did the drilling outside, and made sure I wore a dust mask. So many little holes....
MOUNTING LEDs
Once that was done, I slid each led into a hole, being careful to make sure that they were all oriented the same way. A drizzle of hot melt glue was useful in holding the leds in place. When assembling, I mounted every second row on the board, and gently folded the leads down as time came to mount the final sets of rows.
SOLDERING IT TOGETHER
Then I trimmed the leads, and soldered in the current limiting resistors, and soldered the LEDs together, following the layout diagram exactly. When you are following the diagram, remember that you are working on the BACK of the board, so you need to mentally reverse the layout. Also - don't forget to use 36R resitors (see below) when you are connected to a set of 3 LEDs and 360R (see below) resistors when you are connecting to a set of 2 - It alters the current flow to make the LEDs a uniform brightness.
http://www.instructables.com/id/Arduino-Projects/
original design, with 2 LEDs, the voltage drop across the LEDs was 6.6v, meaning that 3.9v was being dropped across the resistor (11-6.6). With a 360R resistor, this limited the current to 10.8mA, and with 3 LEDs, the voltage drop across the LEDs was 9.9v, meaning that 0.6v was being dropped across the resistor (11-6.6). With a 36R resistor, this limited the current to 16mA. What I have subsequently discovered is that with supply voltages of 12V, the current through the leds ends up being way too high (15 & 58mA), which is a problem. In my most recent versions, I have setled on 680R for the 2 Leds and 360R for the 3 Leds, providing 7.9 and 7.8 mA respectively. Much lower current, and still ample illumination.
Image Notes 1. Rows and Rows of LEDs 2. For some reason, there was a little bit of wandering (Probable as I measured, given its uniformity). That should not affect the final project, as it is behind the stencil.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Drilling pilot holes Image Notes 1. Wow - The LEDs are actually 5mm diameter
Image Notes 1. Fiberglass dust from the drilling process. I did this work outside, so it didn't go everywhere
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Start with a row of LEDs, mounted into the board.
Image Notes 1. Hot Melt Glue holds the LEDS in place 2. I brought a pack of 500 LEDS from eBay - This is an example of why they were so inexpensive.
Image Notes 1. I had to lie down every second row to get access into the final rows for glueing
Image Notes 1. I found that bending the pins down made it easier to cut them ready for soldering. Look at the next couple of photos before you start to get the idea.
Image Notes 1. Define the top of the board as the side where all of the ANODEs point. Mark it using a marker pen - that way you wont get confused. 2. Each anode is pointing towards the next cathode - ready for soldering. DONT solder them all together, as not all of them ae linked. Have a look at the next
http://www.instructables.com/id/Arduino-Projects/
photo.
Image Notes 1. The top row completed... 8 more to go. Note that the anodes are connected to the resistors. Notealso the cathodes linked to the next anode. Just follow the schematic. Remember to be patient, and test your work as you go with a 9V battery. Image Notes 1. Resistors from Anodes to common+ 2. Cathode linked to the next Anode 3. Cathodes of the pair linked. this will be connected to the ribon cable line calles 'ITIS'
Image Notes 1. Hopefully this cluseup photo will help you to see the technique used to wire up the board. 2. Cathode link, waiting to be connected to a ribon cable connection 3. Individual Cathode, waiting for a ribbon cable connection 4. Common + Waiting for the ribbon cable connection Image Notes 1. This wire links all of the common + links of each row 2. All wiring to the LEDS Completed. YAY!
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. The 26 way ribon cable, ends separated, Just need to strip the ends, tin them, and they will be ready for connecting to the Display board 2. Grumble, grumble--- Drilling all of those holes put holes into my piece of wood..... Have to get another one... This one had done so many projects :-)
File Downloads
WordClock-Arduino-LED-WIRING.pdf ((595x842) 34 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'WordClock-Arduino-LED-WIRING.pdf']
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Black wire - black button 2. Red Wire - Red Button 3. Grey Wire - Common Image Notes 1. The button board connected to the Controller
http://www.instructables.com/id/Arduino-Projects/
File Downloads
WordClock-v1.0.pde (12 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'WordClock-v1.0.pde']
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. A sheet of PCB material about to be cut into 30mm strips
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Just prior to etching. An irrating feature of the Transfer method is that large areas sometimes end up with pinholes in them. I use Permanent marker to cover the holes up prior to etching. 2. Missed this hole.....
Image Notes 1. The first strip hot melt glued into place between lines.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. 2 strips. They are not very stable at the moment - that will improve when we have some word spacers in place
Image Notes 1. A small vertical baffle for use between words. I make these by cutting up some line baffles into small lengths
Image Notes 1. The first couple of word baffles in place - things are starting to get stronger
Image Notes 1. Another view - hopefully you can see how it is constructed.
Image Notes 1. A final view. Should be clear now! 2. A 2 line LCD display for another project
File Downloads
Wordclock-Arduino-Stencil.pdf ((595x842) 23 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Wordclock-Arduino-Stencil.pdf']
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Grooves for the stencil and display boards to sit in. 2. stencil and baffle board 3. display PCB 4. bottom of case.
Image Notes 1. checking the fit of the top and bottom. Looking good!
Image Notes 1. Back cut from thin ply - also fits fine
Image Notes 1. display PCB in place 2. supports added to hold the plywood back
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Controller PCB added. Make sure you use washers or some sort of spacer when you mount the board to prevent pressure being applied to the solder connections under the PCB.
Image Notes 1. Button board is mounted on rear - hole is there for the cable 2. My wallwart just plugs into the arduino
Image Notes 1. Final clock - YAY The exposure shows way more bleed through than I see with my eyes. But it works!
Bill Of Materials
Controller board
Arduino Duemilanove module ULN2003A Driver IC * 4 4094 Shift Register * 3 5mm red Led * 2 1K Resistor * 4 1N4004 Diode 2 Pin PCB Mount Screw Connector 3 Pin PCB Mount Screw Connector 26 way header 8 way header * 2 6 way Header * 2 16 Pin IC Socket * 7 Controller PCB
Display board
5mm blue LED * 117 360R resistor * 25 (can be 680R - see step 4) 36R resistor * 25 (can be 270R - see step 4)
http://www.instructables.com/id/Arduino-Projects/
26 way ribbon cable * 30cm 26 way IDC Connector 150mmx150mm fiberglass / perspex mounting board - or Display PCB
Button board
Red Pushbutton Black Pushbutton Veroboard - 3cm x 2 cm wire (3 strand) - 30cm
Stencil board
150mm x 150mm single sided fiberglass PCB material 150mm x 30mm fiberglass PCB strip horizontal baffle * 10 14mm x 30mm fiberglass PCB strip - vertical baffle * 10 Hot Melt Glue
Power Supply
12V DC, 500mA Wall Wart Plug Pack.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. v2 controller - No space for an Arduino board any more - I just use the AtMega168 chip directly!
Image Notes 1. Arduino Compatable v3 controller 2. DS1302 RTC 3. AtMega168 CPU 4. Programming header for the FTDI USB-232 cable 5. Extra minute LED connections 6. 26 way cable to the LED array - Supports 24 seperate outputs 7. Battery Backup - 3V 8. Time setting button connections 9. 12V DC - 400mA Power input
File Downloads
Arduino-Controller-Assembly Manual-email.pdf ((595x842) 695 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Arduino-Controller-Assembly Manual-email.pdf']
Wordclock-Arduino-V2-Overlay.pdf ((595x842) 24 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Wordclock-Arduino-V2-Overlay.pdf']
Wordclock-Arduino-V2-PCB.pdf ((595x842) 61 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Wordclock-Arduino-V2-PCB.pdf']
Wordclock-Arduino-V2-Jumpers.pdf ((595x842) 20 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Wordclock-Arduino-V2-Jumpers.pdf']
http://www.instructables.com/id/Arduino-Projects/
Wordclock-reduced-brightness.ZIP (10 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Wordclock-reduced-brightness.ZIP']
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
int DAY = 0; int NIGHT = 1; int d; void setup() // run once, when the sketch starts { d = 100; pinMode(BL1, OUTPUT); pinMode(BL2, OUTPUT); pinMode(BL3, OUTPUT); pinMode(TL1, OUTPUT); pinMode(TL2, OUTPUT); pinMode(TL3, OUTPUT); pinMode(leftSwitch, INPUT); digitalWrite(leftSwitch, HIGH); pinMode(rightSwitch, INPUT); digitalWrite(rightSwitch, HIGH); pinMode(TR1, OUTPUT); pinMode(TR2, OUTPUT); pinMode(TR3, OUTPUT); pinMode(BR1, OUTPUT); pinMode(BR2, OUTPUT); pinMode(BR3, OUTPUT); } void loop() // run over and over again { checkLeft(); checkRight(); if (mode == NIGHT) night(); else day(); } void checkLeft() { if (digitalRead(leftSwitch) == LOW) { while (digitalRead(leftSwitch) == LOW) { if (digitalRead(rightSwitch) == LOW) { while (digitalRead(rightSwitch) == LOW | digitalRead(leftSwitch) == LOW); mode = 1-mode; return; } } leftTurn(); } } void checkRight() { if (digitalRead(rightSwitch) == LOW) { while (digitalRead(rightSwitch) == LOW) { if (digitalRead(leftSwitch) == LOW) { while (digitalRead(leftSwitch) == LOW | digitalRead(rightSwitch) == LOW); mode = 1-mode; return; } } rightTurn(); } } void leftTurn() { for (x=0;x<10;x++) { digitalWrite(TL1, HIGH); digitalWrite(BL1, LOW); for(y=0;y<10;y++)
http://www.instructables.com/id/Arduino-Projects/
{ delay(30); if (digitalRead(leftSwitch) == LOW) { while (digitalRead(leftSwitch) == LOW); digitalWrite(TL1, LOW); digitalWrite(BL1, LOW); return; } } digitalWrite(TL1, LOW); digitalWrite(BL1, HIGH); for(y=0;y<10;y++) { delay(30); if (digitalRead(leftSwitch) == LOW) { while (digitalRead(leftSwitch) == LOW); digitalWrite(TL1, LOW); digitalWrite(BL1, LOW); return; } } digitalWrite(BL1, LOW); } } void rightTurn() { for (x=0;x<10;x++) { digitalWrite(TR1, HIGH); delay(d); digitalWrite(TR2, HIGH); delay(d); digitalWrite(TR3, HIGH); delay(d); digitalWrite(BR1, LOW); delay(50); digitalWrite(BR2, LOW); delay(50); digitalWrite(BR3, LOW); delay(50); digitalWrite(TL1, LOW); digitalWrite(BL1, LOW); for(y=0;y<10;y++) { delay(30); if (digitalRead(rightSwitch) == LOW) { while (digitalRead(rightSwitch) == LOW); digitalWrite(TR1, LOW); delay(d); digitalWrite(TR2, LOW); delay(d); digitalWrite(TR3, LOW); delay(d); digitalWrite(BR1, LOW); delay(d); digitalWrite(BR2, LOW); delay(d); digitalWrite(BR3, LOW); delay(d); return; } } digitalWrite(TR1, LOW); delay(d); digitalWrite(TR2, LOW); delay(d); digitalWrite(TR3, LOW); delay(d); digitalWrite(BR1, HIGH); delay(d); digitalWrite(BR2, HIGH); delay(d); digitalWrite(BR3, HIGH); delay(d); for(y=0;y<10;y++) { delay(30); if (digitalRead(rightSwitch) == LOW) {
http://www.instructables.com/id/Arduino-Projects/
while (digitalRead(rightSwitch) == LOW); digitalWrite(TR1, LOW); delay(d); digitalWrite(TR2, LOW); delay(d); digitalWrite(TR3, LOW); delay(d); digitalWrite(BR1, LOW); delay(d); digitalWrite(BR2, LOW); delay(d); digitalWrite(BR3, LOW); delay(d); return; } } //digitalWrite(BR1, LOW); digitalWrite(TR1, LOW); digitalWrite(TR2, LOW); digitalWrite(TR3, LOW); digitalWrite(BR1, LOW); digitalWrite(BR2, LOW); digitalWrite(BR3, LOW); } } void night() { digitalWrite(TR1, HIGH); digitalWrite(TR2, HIGH); digitalWrite(TR3, HIGH); digitalWrite(BR1, HIGH); digitalWrite(BR2, HIGH); digitalWrite(BR3, HIGH); digitalWrite(TL1, HIGH); digitalWrite(TL2, HIGH); digitalWrite(TL3, HIGH); digitalWrite(BL1, HIGH); digitalWrite(BL2, HIGH); digitalWrite(BL3, HIGH); } void day() { digitalWrite(TL1, HIGH); digitalWrite(TR1, HIGH); digitalWrite(BR1, HIGH); digitalWrite(BL1, HIGH); }
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
Transform a frumpy, old denim jacket into a cute NOSEW Bolero by brittanymarie
http://www.instructables.com/id/Arduino-Projects/
Author:drj113
I have a background in digital electronics, and am very interested in computers. I love things that blink, and am in awe of the physics associated with making blue LEDs.
http://www.instructables.com/id/Arduino-Projects/
File Downloads
Arduino-Ethernet-schematic.pdf ((595x842) 59 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Arduino-Ethernet-schematic.pdf']
File Downloads
Arduino-Ethernet.pdf ((595x842) 47 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Arduino-Ethernet.pdf']
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. If you short some pins don't panic - just use a little bit of solderwick, and it will be better!
Image Notes 1. Pins gently soldered in place 2. Don't worry about these extra pads in this photo - this board is actually a full surface mount version of the controller that I am working on....
File Downloads
etherShield_web_temperature.pde (9 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'etherShield_web_temperature.pde']
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Arduino Ethernet Board 2. Hygrometer 3. An old Microsoft DVD - Good as an extra 12mm of shelf padding!
http://www.instructables.com/id/Arduino-Projects/
File Downloads
ArduinoEthernetController-1.zip (678 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'ArduinoEthernetController-1.zip']
Related Instructables
A Remotely Programable Relay Controller (Christmas Lights or Home Automation Controller) by drj113
Arduino HVAC Displaying Servo Twitter feed Thermostat/Controller without a PC! by by tikka308 fabrizio.granelli
Make your own programmable thermostat for $66 with Arduino by dustinandrews
http://www.instructables.com/id/Arduino-Projects/
Author:Grathio
Grathio Labs Creative swashbuckler. Writer for MAKE Magazine, presenter of inventions on TV, radio, magazines and newspapers. Professional problem solver. Annoyingly curious. Hacker of all things from computers to clothes to cuisine.
Important Notes:
(I hate to even have to say this, but since someone's going to say it, I'll say it first:)
1) This is for entertainment purposes only. Really. This decreases the security of your door by adding another way to unlock it, and it makes your unlock code known to anyone who can hear. If you put this on your door, be sure to carry your key too. The batteries might die, the suction cups might fail or you might forget your knock. Don't complain to me if someone imitates your knock and steals all your stuff, you've been warned. For obvious improvements to safety, security and whatever, see the final page of the Instructable. 2) This is not a project for a beginner! Read through it carefully and be sure you understand it before you start! I will not take time to answer questions that are already in the instructions or from people who have gotten in over their head.
(If you think this project is too complex you might go here and sign up for the kit mailing list. The kits will be much more simple than this.) Sorry about that. Now that that's out of the way, lets get to work.
http://www.instructables.com/id/Arduino-Projects/
Skills:
To complete this project you should be able to do the following: These are important! If you're not sure if you have these skills, read through the entire Instructable and make sure you understand it before starting anything! Basic soldering. Read a basic schematic. Basic knowledge of microcontrollers (I'll be using the Arduino.) This means you know what one is, how to upload data to it, and how to make minor changes to code. Improvisation. There are many ways to do this project, and you will have to make changes based on how your door and lock works.
Tools:
Drill (ideally a drill press) and an assortment of drill bits. Saw capable of cutting PVC pipe. (ie: Pretty mcuh any saw.) Soldering iron and solder. Pliers. Screw drivers. Heat-shrink tubing and/or electrical tape. Wire stripper. Vice. Safety glasses. Gloves. Other things you might find handy: a ruler/tape measure, a multimeter, a breadboard, some tape, a magic marker, sand paper, files, hot glue. And if you're like me a well stocked first aid kit.
Materials:
(The links are for example only, I don't necessarily recommend or have experience with any of these vendors. Feel free to suggest other sources in the comments.)
Electronics:
1 Arduino Duemilanove (Or compatible. Or really any microcontroller with at least 1 analog input and 3 digital outputs.) Buy from here, here, or here. And other places. 1 5v Gear reduction motor. The higher torque the better. Here's a good one. (14-16mm diameter is ideal because it fits inside of 1/2" PVC pipe.) I recommend one with at least 15oz/in (11 N-cm) of torque at 5v to turn a basic lock. 1 1 Piezo speaker. (30mm) similar to this. You can use larger or smaller ones, smaller will be less sensitive. 1 SPST momentary pushbutton. (normally "off") 1 Red LED 1 Green LED 1 NPN Transistor P2N2222A like these or these (or similar). 1 Rectifier Diode (1N4001 or similar) this or this will do. 1 2.2k ohm resistor (1/4 watt) 1 10k ohm resistor (1/4 watt) 1 1M ohm resistor (1/4 watt) 2 560 ohm resistor (Or whatever will run your red and green LED's at 5v. How to tell.) 1 small piece of perf board. 5x15 holes or longer. (example) 1 9 volt battery clip and 9v battery. (Or any other way you can think of to get 7-12v to the Arduino. A wall adapter like this is a great option so you don't have to worry about batteries running out. 6 AA's would be another option for longer lasting power, but it will bring down the suction cups.) Connector wire. 20 gauge or narrower flexible wire in a number of colors for connecting the electronics together. It's also a good idea to have a breadboard for setting up and testing the circuit before you solder it. We'll be doing this in step 3.
http://www.instructables.com/id/Arduino-Projects/
Case:
(These items are to make the project as pictured. Feel free to build a completely different and more functional case.) 20" PVC Pipe 1/2". 3 right angle 1/2" PVC connectors. 1 5-way 1/2" PVC connector. (example) 2 1/2" PVC end plug. 3 1 1/2" suction cups. (Available at hardware stores and craft centers.) NOTE: If your door is unsuitable for suction cups then replace these with three end caps and you can use adhesive strips or screws to mount the lock. 6" of 1/2" wide by 1/64" thick metal strip (steel, tin, copper, etc.) (available at hardware, craft, and art supply stores.) 4.5" of 1" wide metal sheet, 1/32" thick (steel, tin, copper, etc.) (available at hardware, craft, and art supply stores.) 2 3/32" x 3/8" screws with nuts. (1/8" will work too if you can't find the smaller ones.) 2 1.6M (metric) 16mm screws. Ideally with countersunk heads if you can find them. (For securing the motor. Check your motor specs to see what screws it needs. One motor I tried used 1.6M, the other 2M. You'll probably have to buy long ones and cut them to length.)
1
If you have a torque meter or a torque wrench, apply it to your door lock to get an idea of what torque it will take to open your lock. Use a online conversion tool to convert between foot/pounds, N/m, etc.
Image Notes 1. Arduino microcontroller. 2. Momentary pushbutton 3. 10K ohm resistor (brown, black, orange) 4. Green LED 5. Red LED 6. 560 ohm resistors. (Green Blue Brown) 7. Gear motor 8. 2.2K ohm resistor (red red red) 9. 2n2222 Transistor (NPN type) 10. Rectifier diode (1N4001) 11. Perf board 5x15 holes. 12. 1M ohm resistor (brown, black, green) 13. Piezo speaker 14. Some wire, 20-22 gauge. The more colors the better. 15. 9v battery connector 16. 9v battery. You can also run this project from the appropriate wall plug.
Image Notes 1. 20 inches of PVC, 1/2" 2. 1 1/2" diameter suction cups. 3. 5-way PVC connector. (Can be a little tricky to find.) 4. PVC end plugs 5. PVC right angle (90 degree) connectors 6. 1/2" wide metal strip used for a spring to press the detector to the door. 7. This metal strip will be made into the widget that connects our motor to the lock. 8. Screws and matching nuts. (Turns out you only need 2 pairs, not 4.)
http://www.instructables.com/id/Arduino-Projects/
This is the sensitivity of the knock detector. If you get a lot of noise, raise this (up to 1023), if you're having a hard time hearing knocks you can lower it (as low as 1).
about Line 29: const int rejectValue = 25; about Line 30: const int averageRejectValue = 15;
Both of these are used to determine how accurately someone has to knock. They are percentages and should be in the range of 0-100. Lowering these means someone must have more precise timing, higher is more forgiving. averageRejectValue should always be lower than rejectValue. Settings of about 10 and 7 make it hard for two people to knock the same knock even if they know the rhythm. But it also increases the number of false negatives. (ie: You knock correctly and it still doesn't open.)
about Line 31: const int knockFadeTime = 150;
This is a crude debounce timer for the knock sensor. After it hears a knock it stops listening for this many milliseconds so it doesn't count the same knock more than once. If you get a single knock counted as two then increase this timer. If it doesn't register two rapid knocks then decrease it.
about Line 32: const int lockTurnTime = 650;
This is now many milliseconds we run the motor to unlock the door. How long this should be depends on the design of your motor and your lock. It's okay if it runs a little bit long since I've designed a simple slip clutch into the design, but it's better for all the parts if it doesn't run too much.
about Line 34: const int maximumKnocks = 20;
How many knocks we record. 20 is a lot. You can increase this if your secret hideout is protected by devious drummers with good memories. Increase it too much and you'll run out of memory.
about Line 35: const int knockComplete = 1200;
Also known as the maximum number of milliseconds it will wait for a knock. If it doesn't hear a knock for this long it will assume it's done and check to see if the knock is any good. Increase this if you're a slow knocker. Decrease it if you're a fast knocker and are impatient to wait 1.2 seconds for your door to unlock.
about Line 39: int secretCode[maximumKnocks] = {50, 25, 25, 50, 100, 5.....
This is the default knock that it recognizes when you turn it on. This is weird rhythmic notation since every value is a percentage of the longest knock. If you're having a hard time getting it to recognize "shave and a hair cut" change this to {100,100,100,0,0,0... and a simple sequence of 3 knocks will open it. Debugging:
about Line 51: Serial.begin(9600); about Line 52: Serial.println("Program start.");
Uncomment these lines to see some debug info on the serial port. There are a few other lines of debugging code set throughout the rest of code that you can uncomment to see what's going on internally. Be sure to set your serial port to the right speed. The rest of the code is commented so you can see how it works but you probably won't need to change it if you aren't changing the design.
File Downloads
secret_knock_detector.pde (9 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'secret_knock_detector.pde']
Once you have it working the way you want it you can comment out (or delete) the lines that start with Serial... We shouldn't need them any more. #2: Wire up the LEDs Lets wire up some LEDs so we don't have to use a serial cable to see what's going on. Connect the red LED to digital pin 4 and green LED to digital pin 5 with their corresponding 560* ohm resistors in line. Test: If you power the circuit the green LED should light. If not, check your connections and make sure the LED is the right way around. Every time you tap the green led should dim. After tapping the correct sequence the green led should blink a few times. Tapping the wrong sequence should blink the red one.
http://www.instructables.com/id/Arduino-Projects/
If none of this happens, check the polarity on your LEDs and all of your connections. * Your LEDs might require different resistance. #3: Wire the programming button Solder 8" leads to the button. Connect one side of the button to +5v. The other pin on the button connect to digital pin 2 and, with a 10K resistor to the Ground. Test: Apply power. When you press the button the red light should come on. Hold down the button and tap a simple sequence. When tapping while programming both LEDs should blink. When you're done the pattern you just tapped should repeat on both lights. After playback is complete, the new knock code is saved and the lights wil alternate red and green to tell you so. #4: Wire in the motor Solder 8" of leads to the motor and follow the design/schematic. Be sure to get the diode going the right way and you might want to check the pins on the transistor to be sure they match the diagram. (Some transistors might have the pins in different order.) Test: Power the circuit. Tap the default "Shave and a Haircut" knock. The motor should run for about half a second. If not, check your connections as well as the polarity of the diode. Extra Troubleshooting tips: 1) If the motor turns very weakly the diode might be reversed. 2) If you need more power on your motor make the following circuit change: Move the wire that goes from the motor to +5v to the Vin pin on the Arduino. This will supply the motor with 9v (or whatever voltage you're supplying to it.) Tip: Check which way the motor turns. It should turn the same way as you turn your deadbolt lock to unlock it. If not, switch the motor's leads which should reverse the motor. Congratulations! You have a working secret knock detector! Now we have to put it into something more permanent that we can stick on our door.
http://www.instructables.com/id/Arduino-Projects/
Important!
We're just testing for fit here. Don't glue or fasten anything yet! #1: The Button mount Take one of the PVC end caps and drill a hole through the center appropriate for your push button. For my button that was 3/8". Secure the button in the hole. Plug this into one of the 4 radial holes in the 5-way connector. (ie: not the one that points down.) #2: The Motor mount Take the other PVC end cap and drill a hole big enough for the shaft of your motor to pass through. You might also need to make it even bigger if your motor has a bearing that sticks out. Depending on the design of your motor you may want to sand down the thickness of the plug so that you have more of the motor shaft to work with. Test the fit by placing the motor through the back of the plug. If it's too tight you might have to sand/file/grind the inside of the plug so it will fit. Use a paper template to place the holes for the fastening screws, drill the holes and attach the motor to the plug. (In my case using the two 2M screws.) Countersink the screws if possible. Plug this into the "down" facing hole on the 5-way connector. #3: The 'arms' Cut one piece of PVC pipe 5 inches long. We're going to call this the "long arm". Put a right angle connector on one end. Plug the other end into the 5-way connector opposite the button. Cut two pieces of PVC pipe two inches long. We'll call these the "short arms". Half way along their length drill a 1/4" hole through one side. Put right angle connectors on one end of each arm. Plug these into the two remaining holes on the 5-way connector. You should really start to see it take shape. #3b: A Few Extra Holes with a pencil or marker draw a line down the center of the top and the bottom of the long arm. On the top side, make marks for two holes, one 3/4" from the 5-way, and another 1 1/2" from the 5-way. Drill a 3/16 (5mm) hole at each of these places. This is where our LEDs are going. Also make a line along the bottom where the long arm connects to the 5-way. Using a saw, cut a short way through the pipe, from the bottom up, until there is about a 1/2" hole into the pipe. (this is where the spring for our detector will attach. Also on the bottom, drill a 1/8" hole 1/4" further along the pipe (Away from the 5-way). We will thread the sensor's wires through here. #4: The 'legs' These are the parts that attach to the door. You may not want to cut these yet, The length depends on the design of your door lock, the length of the shaft on your motor and the final design of the Lock Turning Clamp in the next step. All three of mine were 2 5/16" long, but you're better off cutting them long and trimming them down to size later If they're too long the motor won't reach the lock to turn it. If they're too short the suction cups won't reach the door. When you do cut these, hot glue the suction cups in one end and stick the other ends in the right angle connectors on the ends of our legs.
Image Notes 1. Button mount. End plug with hole drilled for the panel mount button. 2. 5-way connector. The motor goes in the center of this. 3. This is an exploded view with all of the parts laid out how they attach (though the angles are wrong on some parts. 4. Top arm. Hole drilled to let wires through. 5. The "Board Arm" This is the arm we're putting the circuit board into. Hole drilled to allow wires through. 6. Motor mount. Will go in the bottom hole on the 5-way. 7. Ignore this hole. Not sure what I was thinking.
Image Notes 1. Two sample motor mounts for two different motors. The one on the left is smaller but actually more powerful. The one on the right has a larger hole to allow clearance for the bearing. The facing surface on both of these have been ground down so more of the shaft can stick out.
http://www.instructables.com/id/Arduino-Projects/
8. holes for LEDs. 9. The "Long Arm". (It's longer because it provides more holding power against the torque of the turning lock.)
Image Notes 1. A few markings will help keep them straight when you put them back together. 2. Two pieces taped together so we get the holes lined up.
Image Notes 1. It's not a bad idea to file down the sharp corners.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. In position over the lock. 2. 1/2 of the thickness of the lock handle. This is how much we "zig" each flange. 3. Tighten the screws so they clamp down on the D-shaft. 4. Having a little bit of space is fine and will make it easier to put on. Image Notes 1. Edge view. Your lock will slot in here.
Image Notes 1. Hot glue (or otherwise attach) the sensor to the end of the metal strip. Make
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. The bottom side of the Long Arm with the 1/2" slot for the metal strip and a hole for the wire. 2. 4-6" flexible metal strip. 3. Piezo sensor with about a foot of wire attached.
sure the "open" end is facing out. 2. Wrap some of the remaining wire around the strap to keep it out of the way.
Image Notes 1. Thread the wire through the round hole and slide the free end of the metal strip into the slot. 2. The free end of our wires. 3. Bend the strip more or less like this. 4. This area is where the door will be, Try to bend it so the sensor lies more or less flat against the door.
http://www.instructables.com/id/Arduino-Projects/
#7: The knock sensor. Solder the speaker's 1M ohm resistor in place on the board. Make sure you have the speaker mounted firmly at the end of the spring and the wire is wound a few times around it to keep it out of the way. Thread the wire through the long leg, through the 5-way and into the short arm that we're keeping the circuit board. Solder one end of these leads to each side of the 1M resistor. Then solder a 8" lead from the ungrounded end of the resistor. This will go to Analog pin 0. #6: The button. Solder the 10K ohm resistor in place as shown. Fasten the button through the hole on the end plug, then put the plug on the 5-way connector and thread both wires through to the 'board arm' hole. Solder one lead from the switch to the resistor. The other end to the +5v wire. Solder a length of wire from the resistor according to the diagram and label it "Digital 2". #8: The motor. Nearly done. Solder the diode, transistor and resistor in place. (Make sure you get the direction right on the diode. And the transistor for that matter.) To the free end of the 2.2k ohm resistor solder a 8" lead that will go to digital pin 3. Put the motor in place in the bottom hole of the 5-way connector, thread the leads trough and solder them in place on either side of the diode, making sure you've got the motor wires in the right order so when it runs it will turn to unlock. #9: The Arduino pins Connect the labeled wires to their appropriate places on the Arduino. Test: Wait, you don't need to do this, right? You've been testing as we go, haven't you? Plug some power into the Arduino and make everything works. Especially make sure that the motor spins in the right direction to unlock your lock.
Image Notes 1. Check the pin order on your transistor. Some times they're reversed.
Image Notes 1. Tape labels are a good idea for this project if you're making the PVC pipe case. Misrouting wires is a real possibility. 2. The ground wire. We'll tack other components to this as we add them to the board. 3. The +5v wire. We'll tack other wires to this as we add them to the board. 4. In the soldering diagram this hole is hole #1,1 5. On the soldering diagram this hole is #5,15. 6. This is the bottom of the board, compared to the soldering diagram.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. #5: The solder the resistors in place to the ground line, and the short leads of the LEDs to the resistors. Pass the leads through the Board Arm hole of the 5way. 2. While we're threading wires we have threaded both the Piezo sensor wires through for the next step. 3. The + leads for the LEDs come out up here. And we mark them with tape so we don't confuse them later.
Image Notes 1. The1M resistor soldered in with the piezo sensor attached either side. 2. A lead attached that will go to Analog 0. (We don't need to thread this anywhere for right now.
Image Notes 1. Closer look at the resistors and their connections. This is what it should look like after #7, above.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. The button in place with the wires fed through the 5-way. 2. The resistor and button connections.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. The motor in place. 2. The final circuit with the wires fed through. 3. All the connections that will go to the Digital side of the Arduino we thread through to the Short Arm side.
Image Notes 1. Close up of the completed board. 2. Embarrassing note: the motor connection (the green connection on the left) is not in the same hole as the diagram. It's connected the same, just in the wrong hole.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Here's the back of the board so you can see the bridged connections. And a lot of messy soldering.
http://www.instructables.com/id/Arduino-Projects/
#8: The Arduino and battery Yes, this is ugly as sin. I works, but... yeah. If you come up with anything better, you're welcome to it. Stick the Arduino onto the top of the frame. I used lengths of insulated wire. It worked... Attach the battery in a similar way somewhere where it can power the Arduino. Again, I used insulated solid core wires. At one point I used rubber bands which also worked just fine. Tape? Yes, that would work too. Plug in the wires in where they labels say they should go. Might as well test again it since it's all hooked up. Whew! Now we're ready to attach it to the door!
Image Notes 1. The digital pin wires threaded through the Short Arm
Image Notes 1. Circuit board getting ready to be crammed into the Board Arm. 2. The wires for Analog 0, Ground and +5v threaded through the hole in the Board Arm.
Image Notes 1. Short Arm plugged in. 2. Board Arm plugged in. 3. Button plugged in. 4. Once again, ignore this hole.
Image Notes 1. The circuit board has been pushed into the Board Arm. Having a little sticking out the far side is fine, it'll be hidden in the right angle adapter.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Side view. We haven't attached the lock clamp yet. Image Notes 1. Legs and suction cups in place. at the end of the arms.
Image Notes 1. The knock sensor is arranged so it will press flatly against the door. 2. Battery attached. 3. Arduino attached and wires plugged. 4. Here is where a neat person would shorten the leads.
Image Notes 1. Side view. We've attached the lock clamp. Now we're ready to test it on the door! 2. Shortening the wires and removing the labels would make it look nicer, but you'll have to do that on your own time. I have an Instructable to finish!
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Post a picture (or video!) of your secret knock detector in comments and get this fancy Master of Secret Knocks patch
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
3. Arduino Duemilanove 4. 2x16 LCD HD47780 5. Sheet Insulation e.g. Card/Foam 6. XBeePro 60mW U.FL 7. Female/Male Jumper wires 8. U.FL to RP-SMA 9. USB type A to type B 10. USB serial FTDI 11. Xbee Adapter Kit from Adafruit Industries 12. 4x Hex Posts 13. Matching Screws for posts
3. Drill bits 3mm & 6.5mm needed 4. Fine grade sandpaper 5. Desktop clamp 6. Wire strippers
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Step 5: Insulate!
Now, you don't want to short out any of your Arduino + Xbee circuits. Make sure the inside of your case is well insulated. I just used some black card and cut it to the outline profile of the Altoids tin. You will need three main insulating panels: 1. Bottom of tin 2. Underside of lid 3. Wrap around panel for Xbee module (see page about adding Xbee)
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Insulate this please! :P 2. Cardboard wrap around insert for Xbee to insulate from other components.
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
As well as the NewSoftSerial library for the Xbee. You can download it here: NewSoftSerial It allows you to connect the Xbees TX/RX to other digital pins on the Arduino. This means that the Arduino's serial pins are kept free for use by the USB when uploading. ---------------------------------------------------------(You can download the pde. files below) Sketch One (InstructablesDisplay.pde) This example will test the display without using wireless communication. The code will print ' Instructables! ' on the top line of the display! // include the library code:
#include <LiquidCrystal.h> // initialize the library with the numbers of the interface pins LiquidCrystal lcd(12, 11, 5, 4, 3, 2); void setup() { // set up the LCD's number of rows and columns: lcd.begin(16, 2); // Print a message to the LCD. lcd.print(" Instructables! "); } void loop() {}
Sketch Two (mySerialDisplay.pde) This sketch displays text on the Altoids LCD via Xbee wireless from the PC serial monitor. The initial startup screen shows 1. 'Instructables, altoids display' 2. (delay of 5 seconds) 3. 'Waiting for serial input...'
/* -----------------------------------------------------------This sketch displays text sent over soft-serial (digital pins) using the NewSoftSerial library. (RX - 14/A0, TX - 15/A1) Modified SerialDisplay example to include soft-serial for Xbee A.dlp 28th July 2010 for Wireless Altoids Display Instructable www.instructables.com ------------------------------------------------------------ */ // include the library code: #include <LiquidCrystal.h> #include <NewSoftSerial.h> // initialize LiquidCrystal // initialize NewSoftSerial the LiquidCrystal library with the numbers of the interface pins lcd(12, 11, 5, 4, 3, 2); the NewSoftSerial library RX-14/A0 TX-15/A1 mySerial(14, 15);
void setup(){ // set up the LCD's number of rows and columns: lcd.begin(16, 2); // initialize the serial communications: mySerial.begin(9600); // print text 1st line lcd.print("Instructables"); // set cursor to 2nd line lcd.setCursor(0, 1); // print text on 2nd line lcd.print("Altoids Display"); // wait 5 seconds till next message delay(5000); // clear the screen lcd.clear(); lcd.print("Waiting for"); lcd.setCursor(0, 1); lcd.print("serial input ..."); } void loop() { // when characters arrive over the serial port... if (mySerial.available()) { // wait a bit for the entire message to arrive delay(100); // clear the screen lcd.clear(); // read all the available characters while (mySerial.available() > 0) { // display each character to the LCD lcd.write(mySerial.read()); } } }
http://www.instructables.com/id/Arduino-Projects/
File Downloads
mySerialDisplay.pde (1 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'mySerialDisplay.pde']
InstructablesDisplay.pde (1 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'InstructablesDisplay.pde']
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
Step 1: Parts
There are just a few parts to add, but for each has options. 1. Arduino or any other *duino. There are a number of choices for Arduino these days. I will use a standard USB version, but any should work. 1a. USB Cable 1b. (optional) power supply for Arduino if you want this to run untethered from your computer. What? You don't want to have a computer permanently attached to your kitchen appliance? You can buy a lone Arduino or a nice starter kit from adafruit . 2. Temperature Sensor There are many options for sensing temperature with your arduino. I'll describe two different techniques, both providing a voltage that correlates to temperature. This voltage is easily read by the analog inputs of the Arduino. Quick answer For this tutorial, I'm going with the pricier but a slightly easier solution of a thermocouple and amplifier. This is because there is no soldering required as most thermocouple come with leads already attached. In practice, I've used the LM34 option the most (see below), as it's cheaper and a more accurate. To follow along exactly, order: 1x AD595CQ Datasheet 1x T-29 See below for more Temperature sensing options. 3. Solid State Relay This part will allow the Arduino's 5v DC output to control the AC power that used in the heaters of your appliance. The world of solid state relays (SSRs) can be pretty overwhelming, and there are many places to go astray. The good news is that digikey just started carrying a line of affordable SSRs. These particular SSRs have a few key features we need. As you can read on their datasheet they take 5V DC input, provide 50 to 250 Volts AC output, have built in heat sinks, screw terminals, and provide an LED light that shows when they are switched on (super helpful). These are also very affordable for SSRs at $12 - $16. The only question you need to ask is about the wattage of our appliance, and your household voltage. In the US, most heaters and appliances are 1500 watts and under, and use 110 volts. From Ohm's Law we know that Watts / Volts = Amperes thus 1500 watts / 110 volts = 13.6 Amps
http://www.instructables.com/id/Arduino-Projects/
A 1500 watt appliance using USA household 110 volt AC power, uses about 13.6 amps. what you need to make sure is that the current used by your appliance is under the rated current of your SSR. From the above calculation, a 15 Amp SSR will suffice. This 15 Amp Optek SSR will do nicely and can be ordered with your temperature sensing parts. If you are in Europe, or anywhere with 220 ac power, you require only half the current as in the US, so 10 or 15 amps will cover all but the beefiest heaters. Here are a couple more amperage options in case you need. 10 Amp 25 Amp 40 Amp 4. Wires and possibly some crimp connectors and breadboard Except for the wires connecting the relay to the appliance, standard 20 or 22 AWG hookup wire is fine. For the higher voltage, you might be able to just use wires from inside the appliance, from an extension cord, or household wire from the hardware store. Probably you don't want to use the tiny map wire on any substantial heating element. Look at what's in the appliance already, and don't go smaller than that. Also, feel the wire (where its insulated!) with our hand and if its getting warm, think about getting a lower gauge wire with more girth. Depending on the types connectors used inside your appliance, some crimp-on connectors can be very helpful, such as eyes or spades. Also, there are simple crimp tubes that splice two wires together. You want to get the right size crimp piece for the wire gauge you have so it makes good contact to the wire when you squeeze it. While soldering heavy wire is possibly, depending on your soldering iron, it can be between frustrating and impossibly. Crimp ends are often total sweetness. If you are using the AD595, you'll need a breadboard to hook it up. More Temperature Sensing Options - (you can safely ignore this if you choose) Option a) LM34 or LM35 This is a single 3 wire part with from National. The LM34 correlates best to Fahrenheit, the LM35 to Celsius. Since we are attaching this to an Arduino, it doesn't really matter as you can do the conversion in software. The LM35 is more expensive for some reason. For either of these, you have yet another choice (there are actually more choices, but probably not worth considering) of the package, metal or plastic. This part will require soldering 3 insulated wires that can handle whatever temperatures they might be exposed to. Not that this sensor cant be submerged, and shouldn't be in direct contact with your food as some thermocouples allow. I've stuck it in boiling water, and it throws off the sensor pretty good. If you were to dip the whole thing or the exposed wires in epoxy or similar, it could possibly get wet. As with any option, if its going to be actually touching something you eat, make sure it's not poisoning you (ie. lots of wire still has lead in it). The parts ending in AH are the metal version, a TO-46 little metal can package. These cost more and provide a larger temperature range. LM34AH - $13.86 from Digikey -50F ~ 300F LM35AH $16.90 from Digikey -55C ~ 150C The parts ending in CAZ are in the plastic TO-92 package. They are cheaper (even can be sampled for free!), but they have a smaller temperature range. They are fine as long the temperature range is okay for your use case, for example the perfect temperature for brewing coffee, or any kind of water bath up to and including boiling point. LM34CAZ $7.14 from Digikey -40 to +230F LM35CAZ $5.50 from Digikey -40 to +110C I will use the LM34AH in this example as I have one already. Other than option b) Thermocouple Thermocouples are a common way to measure temperature. They come in many shapes and types. We will use type K because they are common and have a monster range of 200 C to +1350C. You can buy your thermocouple from Sparkfun ($13.95) or a nice bolt-on variety from Omega (~$8.00) if that works for your application. Thermocouples are nice because they come prewired in a variety of lengths. If you are buying the amplifier (below) from digikey, they have a couple of K -types in stock, including this T-29 bead type. The trick with these thermocouples is that you need a thermocouple amplifier to translate their output into a voltage that is linearly correlated to temperature. This makes it very easy to interface to the Arduino. Enter the AD595. The AD595AQ has a +-3 degree accuracy and is available at Sparkfun ($17.95). The AD494CQ has +- 1 degree accuracy and is available from Digikey . Digikey also has both versions in ROHS (lead free package) versions for 10 - 20 bucks more each if you would like. These are 14 pin DIP (will fit in a breadboard) packages. Even though they are 14 pins, you can breadboard one without a lot of effort. There are many many more types of thermocouples, as well as numerous other techniques for sensing temperature you could use with the strategy presented here.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Solid State Relay 2. T-29 K-Type Thermocouple 3. AD595 thermocouple amplifier on a breadboard 4. Arduino
http://www.instructables.com/id/Arduino-Projects/
float getTemperature() { // read the analog input, convert to degrees C, and covert to F return CtoF(analogInToDegreesC(analogRead(TEMP_SENSOR_PIN))); } // ---- This last function, printFloat isn't necessary to understand unless you want to // ---- feel free to ignore it for now, and treat it as a built-in utility, // ---- it prints out floating point point values // printFloat prints out the float 'value' rounded to 'places' places after the decimal point void printFloat(float value, int places) { // this is used to cast digits int digit; float tens = 0.1; int tenscount = 0; int i; float tempfloat = value; // make sure we round properly. this could use pow from <math.h>, but doesn't seem worth the import // if this rounding step isn't here, the value 54.321 prints as 54.3209 // calculate rounding term d: 0.5/pow(10,places) float d = 0.5; if (value < 0) d *= -1.0; // divide by ten for each decimal place for (i = 0; i < places; i++) d/= 10.0; // this small addition, combined with truncation will round our values properly tempfloat += d; // first get value tens to be the large power of ten less than value // tenscount isn't necessary but it would be useful if you wanted to know after this how many chars the number will take if (value < 0) tempfloat *= -1.0; while ((tens * 10.0) <= tempfloat) { tens *= 10.0; tenscount += 1; } // write out the negative if needed if (value < 0) Serial.print('-'); if (tenscount == 0) Serial.print(0, DEC); for (i=0; i< tenscount; i++) { digit = (int) (tempfloat/tens); Serial.print(digit, DEC); tempfloat = tempfloat - ((float)digit * tens); tens /= 10.0; } // if no places after decimal, stop now and return if (places <= 0) return; // otherwise, write the point and continue on Serial.print('.'); // now write out each decimal place by shifting digits one by one into the ones place and writing the truncated value for (i = 0; i < places; i++) { tempfloat *= 10.0; digit = (int) tempfloat; Serial.print(digit,DEC); // once written, subtract off that digit tempfloat = tempfloat - (float) digit; } }
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. 5v pin 2. Black to GND pin 3. Green to Analog in 0 4. All black are the GND plane 5. 5V power to the amplifier 6. See schematic image 7. White wire connecting to the + side of the thermocouple 8. Yellow wire connecting to the minus side of the thermocouple connector 9. See the next image for a picture of the cut breadboard to fit a standard thermocouple plug.
Image Notes 1. Use an knife to cut the seperations between the inner columns of pins on the breadboard. This will create a place to plug in the thermocouple. You will need to scrape a away a little of the inside edge as well to allow the plug to fit.
Image Notes 1. Don't forget to connect the Chromel (which is marked + on mine) side of the thermocouple to GND 2. This is marked - (minus) on my connector 3. This is where the little notch is the part. 4. Green wires in picture 5. Black wires in picture 6. Red wire in picture
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Power to the heater 2. This wire will be replaced by two long wires with terminal ends. These will attach to the SSR, inserting it at this place in the circuit. 3. Tell tale bare wires heading off to the heater. 4. Main power coming in
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Swap this new wire for the one currently attached to the heater terminal. The other end of this wire will attach to one side of the SSR. 2. Heater terminal that we are switching power to
Image Notes 1. One goes to the heater terminal, the other to the wire that used to connect to the heater terminal.
Image Notes 1. Solid State Relay. Notice the nice clear cover that comes with this SSR (link to digikey in step 1). That is an important safety feature. If you don't have one, wrap those AC terminals in electrical tape!
Image Notes 1. A nice vent hole allowed my long wires to feed out the side of the machine.
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
// if this rounding step isn't here, the value 54.321 prints as 54.3209 // calculate rounding term d: 0.5/pow(10,places) float d = 0.5; if (value < 0) d *= -1.0; // divide by ten for each decimal place for (i = 0; i < places; i++) d/= 10.0; // this small addition, combined with truncation will round our values properly tempfloat += d; // first get value tens to be the large power of ten less than value // tenscount isn't necessary but it would be useful if you wanted to know after this how many chars the number will take if (value < 0) tempfloat *= -1.0; while ((tens * 10.0) <= tempfloat) { tens *= 10.0; tenscount += 1; } // write out the negative if needed if (value < 0) Serial.print('-'); if (tenscount == 0) Serial.print(0, DEC); for (i=0; i< tenscount; i++) { digit = (int) (tempfloat/tens); Serial.print(digit, DEC); tempfloat = tempfloat - ((float)digit * tens); tens /= 10.0; } // if no places after decimal, stop now and return if (places <= 0) return; // otherwise, write the point and continue on Serial.print('.'); // now write out each decimal place by shifting digits one by one into the ones place and writing the truncated value for (i = 0; i < places; i++) { tempfloat *= 10.0; digit = (int) tempfloat; Serial.print(digit,DEC); // once written, subtract off that digit tempfloat = tempfloat - (float) digit; } }
Image Notes 1. Digital Out Pin 2 2. + side of SSR input 3. minus side of SSR input goes to ground plane (black wire) 4. All just as we left it in the last step 5. This thermocouple lead is now going up into the top of the popcorn maker.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. PID feedback hotness in a Processing plotter app connected to a coffee machine. 2. These three values will tune the performance of the PID algorithm.
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
4. /STROBE1 5. /CARD_PRESENT
Card Formats
There are several different formats for magnetic cards. Format A and B are common, with B being the most common I've seen, and which is supported in this code. Formats C through M are reserved by the ISO, I believe, while N through ?? are reserved for institutional custom use. Track 1 For financial cards, the first track is recorded at 210 bits per inch and is the first 0.110" of the card from the top. The data is encoded as "card data" as 7-bits per character. That's 6-bits for the character and a bit for parity. There are ~ 79 alphanumeric characters on track 1. The physical ordering is backwards. That is, data is but it's written backwards on the card (and hence, will be read by your firmware) as . The parity is odd. The card data format looks like this: [SS] [FC] [Primary Account #] [FS] [Name] [FS] [Additional data] [FS][ES][LRC]where: SS Start sentinel FC Format code FS Field separator ES End sentinel LRC Longitudinal Redundancy Check character Track one SS = '%', FC = one of the formats (going to be B a lot of times), FS is often '', ES is '?' and the LRC character is commonly '<' although it's not specified in the standards. Besides being written on the card backward, the data has an odd parity bit and is 0x20 from ASCII. We'll handle this when we process the data. Track 2 Track two is 0.110" wide and starts 0.110 from the top of the card. It's recording density is 75 bits per inch. The data is 5-bits per character and consists of around 40 numeric symbols only. You shouldn't encounter any letters on this track. The card data format should follow this structure: [SS] [primary account #] [FS] [additional data | discretionary data] [ES] [LRC]The SS for track two is the semicolon: ';' and the FS is '=' With this holy knowledge under your belt, continue on to the next steps to see code implementing the procedure outlined above.
http://www.instructables.com/id/Arduino-Projects/
BCLR(EICRA,ISC
In my common.h that I include in all my programs, the definitions of BSET and BCLR can be found. Refer to that file should you have any questions about how to set bits. Now, when the interrupt is triggered, we want to sample the /DATA1 (in my code defined as CARD_DATA) and set a bit in a general purpose IO register. If we're on the 7th bit, save off the register as a character in our global buffer. I use a GPIOR0 register because it's spiffy fast access. The pseudo code is something like this:
Stop 16-bit timer Clear timer If DATA is LOW Set BIT=1 in REGISTER Decrement BIT Set flag so we don't skip any more 0's
else DA
If you are asking yourself why decrement instead of increment, remember that the data is backwards, so instead of recording the bits as we get them from LSB to MSB, we save them from MSB to LSB so we don't have to reverse the bits later when processing the data. If you really wanted, you could also add 0x20 hex here, but since it's about 5us on these strobes, I'm keeping the processing in this interrupt service routine to a minimum.
ISR(INT0_vect){ StopTimer(); ClearTimer(); if ( !BCHK(PIND,CARD_DATA1) ) // inverse low = 1 { BSET(GPIOR0,bit); --bit;
If you're wondering what the timing business is about, that's covered in the step in determining when the card has left the reader.
http://www.instructables.com/id/Arduino-Projects/
which turns out to be around 3900. So, when the timer counter TCNT1 reaches 3900, then I know it's been about 300ms and I can pretty safely conclude that the card has left the reader. Easy.
#define PRESCALER
1024#define CHECK_TIME
( (F_CPU / PRESCALER) / 4 )
You've seen in the ISR where the timer is started, stopped, and cleared on each interrupt. Now, in the main loop we just check to see if the timer counter has reached our target value, and if so, start the data processing.
for (;;){ if( TCNT1 >= CHECK_TIME) { StopTimer(); ClearTimer(); ProcessData(); ReadData(); idx = 0; bit = 6; bDataPresent = 0; memset(&buff,0,MAX_BUFF_SZ1); } }
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
File Downloads
MagCardReader.zip (34 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'MagCardReader.zip']
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
Hardware Requirements Arduino Board Laser pointer/pen Light Dependant Resistor 100Kohm Resistor Optional: Webcam Breadboard Software Requirements Arduino IDE Processing IDE Linux OS (I'm using Arch Linux for this project) Curl Webcam (part of xawtv) Other Stuff: Mirror Solder and Soldering Iron Wire Hot Glue Gun Hacksaw/Knife Straw or Ballpoint Pen
http://www.instructables.com/id/Arduino-Projects/
File Downloads
arduino.pde (359 bytes) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'arduino.pde']
processing.pde (688 bytes) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'processing.pde']
twitter.trip (270 bytes) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'twitter.trip']
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Tape to hold the button in the ON position 2. It's really a pain to solder onto this casing
Image Notes 1. Mirror 2. Protip: I scrapped this for a camera tripod, much better.
Image Notes 1. My black cover fell of at some point and I couldn't find it. 2. Plastic Cassette case
http://www.instructables.com/id/Arduino-Projects/
Step 4: Processing
Load the Processing sketch and leave this line commented out: //open("/home/your_usename/twitter.trip"); Make sure that your laser is pointed at the LDR and run the sketch. The screen area should be green and when you block the laser it should turn red, then after 10 seconds it should turn back to green. The 10 second hold is to ensure that you're not twittering the same message multiple times, you can change this value by modifying the "int threshold=10000" variable. Now that everything is working it's time to get your scripts in place put twitter.trip into: /home/your_username/ Change these to your twitter username and password user="name" pass="password" open up a terminal and type: chmod a+x /home/your_username/twitter.trip then run it ./twitter.trip go to your twitter page and you should see "laser tripped on..." as your last tweet. Now time to get the webcam working, you can skip this step if you don't want to use a webcam or if you know how to grab a frame from a webcam in linux via script. First you want to make sure that the program called "webcam" is installed, it's a part of xawtv. Arch Linux: pacman -S xawtv Fedora: yum install xawtv Debian/Ubuntu: apt-get install xawtv Then configure .webcamrc however you need, mine is below. The best part about webcam is that it has ftp support so that the image can be uploaded to a webserver, if you don;t want FTP comment that part out. .webcamrc in /home/your_username/ [grab] device = /dev/video0 text="%Y-%m-%d %H:%M:%S" #infofile = filename fg_red = 0 fg_green = 0 fg_blue = 0 fg_red = 255 fg_green = 255 fg_blue = 255 width = 320 height = 240 delay = 0 wait = 0 input = pac207 #norm = pal rotate = 0 top = 0 left = 0 bottom = -1 right = -1 quality = 75 trigger = 0 once = 1 archive = /home/action-owl/webcam/%Y-%m-%d--%H:%M:%S.jpg [ftp] host = ftp.yourwebsite.com user = username pass = password dir = public_html/img/webcam file = webcam.jpg tmp = uploading.jpg passive = 1 debug = 1 auto = 0 local = 0 ssh = 0
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
digitalWrite(ledPin, HIGH); } void loop() { ldrVal = analogRead(analogPin); if ( ldrVal > threshold ) { Serial.print("1"); delay(200); } }
Related Instructables
Twitter controlled Arduino Outputs - no PC - LCD Display + Sensor data to Twitter by XenonJohn
http://www.instructables.com/id/Arduino-Projects/
Author:liseman
. And no, I won't put a shirt on:-) I've got kits / finished versions of this and some other projectsfor sale @ my website The closest comparable commercial products I can find are: -a commercial-quality detector: $2500+ -a lab monitor: $295 -a one-off test kit for volatile organic compounds: $234 I learned about this after hearing about some guys who added VOC sensors to toy dogs. Not sure where/if the docs on that project are, but here's the guide that I followed. Links explaining what VOCs are and why you might want to care: -Some symptoms of overexposure to VOCs -an OSHA regulation on formaldehyde levels -information on sick building syndrome: 'A 1984 World Health Organization Committee report suggested that up to 30 percent of new and remodeled buildings worldwide may be the subject of excessive complaints related to indoor air quality (IAQ).' -The Inside Story: A Guide to Indoor Air Quality: "For pollutants other than radon, measurements are most appropriate when there are either health symptoms or signs of poor ventilation and specific sources or pollutants have been identified as possible causes of indoor air quality problems. Testing for many pollutants can be expensive. Before monitoring your home for pollutants besides radon, consult your state or local health department or professionals who have experience in solving indoor air quality problems in non-industrial buildings."
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. 1k potentiometer 2. voc sensor: figaro sensors 2620 3. arduino (from ladyada.net kit)
Image Notes 1. tgs2620 voc sensor. careful w/ these: they're not cheap and don't seem particularly hardy:)
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. 1k potentiometer 2. ground (either one of 2 outer pins) 3. variable resistance 4. incoming resistance (either one of 2 outer pins)
http://www.instructables.com/id/Arduino-Projects/
File Downloads
Price 01_08 USA.pdf ((612x792) 191 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Price 01_08 USA.pdf']
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. pin2: sensor 2. pin3: sensor + 3. protruding metal thing letting you see which pin is which 4. pin4: heater + 5. pin1: heater -
File Downloads
2620pdf.pdf ((612x792) 109 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to '2620pdf.pdf']
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. holding the sensor over the grain alcohol. don't get it wet (or drink this stuff: it's pretty nasty!)
Image Notes 1. readings while over the alcohol: lotsa vocs! 2. don't forget to hit this button to start outputting the readings in the black box below:)
File Downloads
Semitec D Thermistors.pdf ((613x842) 638 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Semitec D Thermistors.pdf']
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Arduino Board 2. RFID sensor board 3. RFID antenna 4. Wires
Image Notes 1. Card that I used to add another tag. 2. The card I used to deny others TAGs 3. Sample TAGs
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
File Downloads
RFID_2_eng.pde (1 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'RFID_2_eng.pde']
Step 4: Results!
There is no LED, sound or LCD for debug or visualization, just through the serial line. The video demonstrate how to use the software. I didn't post any kind of explanation as text on the video. I hope that the images spokes more then words, xD Any doubt or suggestion, feel free to ask, or correct me. Please, if you like it, rate it, thank you
Related Instructables
RFID Reader! RFID pet feeder Identify by landmanr anything with RFID from credit cards to license plates by simonfrfr
http://www.instructables.com/id/Arduino-Projects/
Author:anthony_p1234
I pass the time by involving myself in small projects and watching youtube political discussions. I am a jack of all trades and master of none, and am good up until I have to house a project in a box, I never was able to colour in between the lines.
Step 1: Items
Here is the list of items I used for the project. MAIN: -Arduino. -LCD Keypad shield. - 7-12 volt power supply. - USB cable (socket that connects to USB on Arduino). -Box To house the whole thing. -Veraboard/breadboard. - 4x solid state 5v- 240v relays. - Mains Power board with four sockets. - Wires. - Jiffy box to house inline socket/screws to connect Sensors. SENSORS: -Thermistors 10k x2 -Resistor 10k x2 -HS1100 humidity reader - 555 timer (cmos type) - resistors: 576k, 49.9k, 1k and 909k - Veraboard/breadboard - Jiffy Box - Digital divide by ten Chip -MG811 C02 sensor (I got a breakout board with op-amp amplifier built in. You can make it yourself, it is a high precision op amp set up as non-inverting with gain around 10). - Jiffy Box ENVIRONMENTAL CONTROLLERS - 2 x heating pads - Sonic Humidifier - Aquarium Tubing - Air Pump (aquarium) - Plastic lunchbox (airtight) - HEPA Filter for Vacuum cleaner. - Plastic tub - Aquarium Air pump - Aquarium Tubing - Plastic Lunchbox (airtight) - HEPA Filter for Vacuum cleaner
http://www.instructables.com/id/Arduino-Projects/
EXTRAS: - Hot Glue gun - Soldering Iron - Screwdrivers - Multimeter - Drill - Home brew larger.
Step 2: Thermistors
Solder two wires to each thermistor. On a breadboard solder on a 10k ohm resistor, one end will connect to the Arduino ground, the other to Analog input 1 and to one of the thermistor wires. The other end of the thermistor wire connects to +5v from the Arduino. Do this for another Thermistor and connect it to Analog input 2 instead. Basically it is a voltage divider with the thermistor defining the Voltage going to the Arduino analog input. One analog divider for each thermistor. I added the circuitry in a separate jiffy box where the thermistor leads could be screwed into inline screws protruding from the box. To test this sensor, use a multimeter to look at the voltage change as you put your finger on the Thermistor.
http://www.instructables.com/id/Arduino-Projects/
2. Remember to listen to some tunes while you work... and you can use the speaker to test if the sensor is working correctly
File Downloads
HS1101-HS1100.pdf ((595x841) 518 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'HS1101-HS1100.pdf']
Image Notes 1. MG811 sensor, it heats up a little. 2. Board that came with the sensor, has an op-amp non-inverting amplifier, also a comparator but I just wanted the amp output so I bypassed it (the orange wire). 3. Hot Hot Hot glue
Image Notes 1. Gain = 1+ R2/R1 2. Op amp should be high quality. An input offset voltage of 1mv is good.
File Downloads
MG811Datasheet.pdf ((595x842) 146 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'MG811Datasheet.pdf']
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Humidity reader 2. Thermistor, temperature reader 3. Arduino with keypad shield 4. Extra board for Voltage divider circuit. I also used this as a go between for the inline screws/sockets and the arduino 5. Inline screws, later to be put in a jiffy box so I can add/remove sensors to this with ease. 6. Bubble wrap for stress release
Image Notes 1. Humidity digital input 2. +5 and ground from the arduino 3. A1 and A2 for temperature A3 for the Co2 reading 4. These wires are going to power the Arduino
Image Notes 1. Normally this copper strip would extend the length of the board connecting all the Actives. I cut them into separate pieces and soldered wires to each
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Each of these wires will go to a separate load connection on one of the four relays
Image Notes 1. To active on powerboard, plug 1 2. To active on powerboard plug2 3. To active on powerboard plug 3 4. To active on powerboard plug 4 5. Active from AC power plug 6. To Digital 3 of Arduino 7. To digital 11 of Arduino 8. To digital 12 of Arduino 9. To digital 13 of Arduino 10. To Arduino ground
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. I connected each load 1 to a separate active on the powerboard. 2. Load 2 was connected to the active from the mains power. 3. To Arduino Digital out (3, 11, 12 or 13) 4. To Arduino Ground
http://www.instructables.com/id/Arduino-Projects/
File Downloads
enviro_w_display_v10_with_serial_upload.pde (16 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'enviro_w_display_v10_with_serial_upload.pde']
Image Notes 1. Drilled holes for the buttons 2. Dynamic display of temperature, humidity and Co2 ppm 3. Asterixes show if relays are on. Top left = Temperature 1 Top right = Temperature 2 Bottom Left = Humidity Bottom right = Co2
Image Notes 1. Inline screws for easy connection to the sensors 2. 5 volt reference from Arduino for the Thermistors 3. ground and six volts (really 7 volts) for the Humidifier and C02 sensor
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Air from the air pump is pumped in 2. Like an 80's rock show. 3. There was a grommit on the humidifier cable which fitted nicely. 4. In normal operation the lid is closed
Image Notes 1. An aquarium air pump is housed inside here. There is a hole cut out on the top and a HEPA filter has been glued. 2. You cant see it, but the tubing goes in through a hole at the front of the airtight tub and attaches to the aquarium pump.
Image Notes 1. Sonic Humidifier, just add water 2. The plug to plug up the hole in the tub
Image Notes 1. Aquarium air pump 2. Tubing from air pump that will go to the humidifier 3. HEPA filter from a vacuum 4. Technics turntables to play the choons while you work :)
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Wet salt (still solid but wet to touch like wet sand) 2. Electrical tape because I'm that paranoid about airflow! 3. Humidity reader
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Thermistor next to Multimeter heat sensor 2. Thermistor reading 3. Pretty close!
Image Notes 1. Wonderful sunny Melbourne! :) 2. Co2 sensor 3. I know it's at 1000ppm, give it a few seconds, the Co2 sensor needs to heat up
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
Open Source Server Room Monitor by inventgeek seeedstudio Office Gnome by seeedstudio
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
File Downloads
Arduino Watch BOM.xls (15 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Arduino Watch BOM.xls']
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
File Downloads
Watch Pin Allocations R57.xls (12 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Watch Pin Allocations R57.xls']
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
2x 1x 1x 1x
1x 1x 1x 1x 1x 1x 1x 8x 1x
1x
LM3940 3.3v Regulator .47uF Tantalum Capacitor 33uF Tantalum Capacitor * 33uF Electrolytic Capacitor * 1x20 Female .100" header receptacle See Header Receptacle note below. 2x8 Shrouded Box Header Breakout Board for SD-MMC Card See SD-MMC Card note below. 4-40 3/4" machine screws with 2 nuts each Low Capacity SD Card (e.g. 512 MB) 9-volt power source Solder and 22-gauge wire of various colors
The BBB Kit is an Arduino clone produced by moderndevice.com. At $15.00 for a complete Arduino kit, it is one of the least expensive options. I could have cut a few dollars off of the cost by using an alternate Arduino board and a separate supply list for each Arduino component, but the convenience of a single supplier for the Arduino portion of this project was worth the $3 to $5 I may have saved. You should be able to make this project with any Arduino. It can be prototyped on a breadboard as shown below, with a Boarduino, a Bare Bones Board, or other breadboard adaptable Arduino clones. You can also purchase the BBB fully assembled for an additional $10. The owner of moderndevice.com is very helpful and will work with you if you run into problems. Download the BBB assembly instructions and follow them carefully. MAKE SURE to request the LM7805 voltage regulator for the board, or purchase one separately and use it in place of the smaller regulator that he ships by default. The USB BUB Board plugs into the BBB (Arduino). It has the FTDI USB to serial converter needed to program your BBB Arduino. If you have already have an ICSP programmer, or an Arduino with a ZIF socket for programming the Atmega 328p, it is not necessary to purchase the USB BUB, though it is useful if debugging the microcontroller code, through the Arduino IDE's Serial Port Monitor. IMPORTANT NOTE regarding the 2416 Dot Matrix Displays. As you view my construction photos you will notice that my 2416 Dot Matrix Display boards don't match. One has white (when not powered) L.E.D.s, the other has transparent ones. The transparent set is slightly dimmer than the diffused set. When I contacted Sure Electronics about the problem they agreed to send a replacement board. It arrived just in time to complete this article, and the final photos and introduction video show the matching set. Unfortunately, the new board they sent me uses the dimmer, transparent L.E.D.s. Be sure to let Sure Electronics know that you need a matching set! You may want to order 3 boards just to be safe. Also, the green boards came out recently. I don't have experience with them, but had they been available when I made my purchase I would have used the green. Finally, remember that Sure Electronics is based in China. Plan on waiting a while for your product to arrive, and arrange for someone to sign for the package. The folks there are easy to work with. PCBs: If you wish to follow the step-by-step instructions I am providing you will need the Radio Shack printed circuit board, and you will need to trim the ends of it to fit properly in the enclosure. This also means you need a right-angle connector on the 2x8 Shrouded Box Header (that the ribbon cable from the displays plugs into). The right-angle connector is required so that the pins can be bent to bridge the breadboard gap on the Radio Shack PCB. If I were to start from scratch, I'd try using one of the following prototype PCBs, which would also allow you to wire-up a straight 2x8 shrouded box header: Prototype PCB with 3-holes per pad, pads spaced .1" 103RAW Wireless Prototype PCB with copper traces to each pad which then can be cut, preventing the need for (as many) wires Create a custom printed circuit board If there is enough interest, I will design a circuit board and have them manufactured.Enclosure: The project enclosure is an almost perfect fit. You'll see in the steps and photos that follow, that my strength is not in cutting plastic enclosures. You will hopefully do much better and provide feedback on better methods. Mine works great, but isn't great looking. As you will see, the enclosure was something of an after-thought for me. I had an entirely different enclosure planned, but this worked out much better. (More information in following steps.) Jameco*: Each of the items listed above with an asterisk(*) can be purchased from Jameco, but require a minimum order of 10, so if calculating the cost keep this in mind. (It is always good to have extra parts!) Header Receptacle: The BBB has 18-pins for the power-supply and Arduino pins to plug into a breadboard. Use the 20-pin header receptacle to plug the BBB into your printed circuit board as shown in the following instructions, with the following variations: I did not have a 20-pin header receptacle, but I did have 2 8-pin receptacles. This will work fine. It is a tight fight to get them to align properly, but it works. Just make sure to follow the pictures provided. You'll notice that 2 of the BBB pins are left unconnected. If you use the 20-pin header receptacle, 2-pins will remain unconnected. Mark your board so that when you plug-in the BBB you know where it goes. You could also forgo the breadboard pins on the BBB, and the socket on the secondary PCB, and simply run wires directly to the needed locations. This may provide some flexibility with enclosures. The 2x8 Shrouded header box is for plugging in the ribbon cable from the display matrices. As mentioned above under PCBs, the right-angle version is needed if you have a gap like that on the Radio Shack PCB. You could possible use the same board and cut copper traces to make a straight header box work properly. I purchased my header box from a local supplier (M.C. Howards Electronics in Austin, TX), but they only had a few and I've not seen any more in subsequent trips. The link provided above was the first one I found that had a matching part, but I don't have experience with the company. SD-MMC Card: Wow, this is an over-priced component if there ever was one. It works great! In fact, don't bother with any of the Arduino SD card Shields. They all seem to use a resistor network to drop the signal voltage to the 3.3 volts required by the SD card. This will not work with all SD cards. In fact, my card worked for only a few minutes this way, and when I put it back in the PC I had to format it, and then it never worked again with the Arduino until I used the 74HC4050 for the signal level conversion. I had other cards that didn't work at all without this as well. If you decide to use a different circuit board, and could plan out the fitting in the enclosure better, I would try to solder a much less expensive SD card socket to the board directly, instead of using the costly breakout board. Incidentally, NKC Electronics has the same breakout board listed for much less, but it was unavailable when I last checked. I don't remember if the breakout board includes header pins. You will need 11. A spare
http://www.instructables.com/id/Arduino-Projects/
set can be ordered from Jameco: http://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=53532, for $0.75. SD Card Addendum: I've commented at length in the comments (below) about alternatives to the relatively expensive SD Card breakout board. In short, the photos below show experiments I've done with spare parts on a breadboard, using the alternatives for the SD Card socket. Please read the comments and related Instructables for more information. As for the SD card itself, smaller is better! The Arduino code provided works only with a FAT16 filesystem, and only reads files from the root directory. That means you have a limit of 512 image files on the card, and the files are only 100 bytes. A very small card will work fine, and a card larger than 2GB probably will not work at all. There are FAT32 libraries for the ATMega328, but in the time I had, it was more work than it was worth to get it working with the Arduino. (More later.) Finally, use a variety of wires when wiring the PCB. It will make it easier to trace connections. As you will see, I used red, black, green, yellow, and white. I wish I had more colors. Regarding the 9-volt power supply: A 9 volt battery will work, but you will have strange problems when it begins to diminish. Once the battery voltage (when tested on a meter) drops below 7 volts your display may light up fine, but there will be insufficient current to power the Arduino and the behavior is somewhat unpredictable. A 9 volt wall-wart works great, and the LM7805 on the BBB should be able to handle a 12-volt input, like that from an auto-adapter. (Please use caution though if you put this in a moving vehicle! You alone are responsible for what happens if you distract other drivers! You might even want to consider wiring up an accelerometer and disable the displays when the unit is in motion. The circuit is yours as is the responsibility. I recommend it for a home Window or Desktop, or shop Window, not a moving vehicle! I love the idea of it as a bumper sticker, but not at the risk of anyone's life or health! In general however this should be much less distracting than most roadside digital signs, and many printed bumper stickers with hard to read text.) Tools I used the following tools to complete this project: A quality, variable wattage soldering iron Wire cutters Wire strippers A multimeter (helpful for testing) A large solder-less breadboard, for testing - you may not need this A Dremel, with cutting wheels and drill bits (for making openings in the enclosure case) A variable speed drill and various drill bits Software Arduino IDE 0017 My micro controller code (see Step 3) GIMP image editor, or another editor capable of producing .xbm files My xbmtodws code, to create image files for the SD card from .xbm files
Image Notes 1. Sparkfun SD Card breakout board shown here with my early prototype. 2. Notice the two types of 2416 display boards. Ask for a matching set when ordering!
Image Notes 1. This is an alternative SD Card socket. Use care in seating the card. The cable is an old-style IDE cable that has a PCB connector on the cable (they have 2
http://www.instructables.com/id/Arduino-Projects/
actually). I've cut off excess cable and attached a DIP IDC plug. This idea is documented in the following instructable: http://www.instructables.com/id/SDMMC-fits-in-floppy-edge-connector/ 2. These are another type of display Sure electronics sells. I've plugged them in to my other 2416 display, just for testing the SD card options. With small changes to the Arduino code these displays could be used in a similar project. (You'd also have to change xbm to dws code.) 3. My now spare 2416 display board. Sure Electronics sent a replacement that matches the non-diffused version, so now the brighter board is a spare. 4. Note that you could easily cut this connect off the cable, or buy a pre-made 16-pin cable that has a DIP IPC plug on one end. This would work better on the breadboard, and on the breadboard style PCB. (For pre-made cables see page 33 of the digikey interactive catalog http://onlinecatalog.digikey.com/WebProject.asp?BookCode=dik08flx#) 5. Prototyping the 3.3v regulator. The boarduino above has 3.3v output when powered by the USB.
Image Notes 1. SD Card socket (sort of) following instructions in http://www.instructables.com/id/SDMMC-fits-in-floppy-edge-connector/, but adding the DIP IDC plug. This cable cost me $1 at a used computer/junk store. I picked up the 14-pin DIP plug at a surplus electronics store. 16-pins would have been best, but 14 is sufficient if the 2 right-most wires are removed. 2. 2 wires removed so that the 14-pin DIP IDC plug can be used. Pin 1 becomes CS, and pin 7 DO on the SD Card. Pins: 1 = CS 3 = DI 5 = GND 7 = 3.3v 9 = CLK 11 = GND 13 = DO
Image Notes 1. This was the header-pin based SD card socket. It works but was hard to get the pins to make good contact with the card connector. Soldering to an adapter card might be a good option for a mini or micro SD card. Look at the Instructable (not mine) for this for better ideas/suggestions: http://www.instructables.com/id/Cheap-DIY-SD-card-breadboard-socket/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Fully assembled BBB Arduino and USB-BUB (connected to the BBB).
http://www.instructables.com/id/Arduino-Projects/
Prepare for External Power Source: Now that the Arduino is programmed, move the BBB jumper back to the EXT side (not the USB side) so that it will be powered by the external 9 volt source.
Image Notes 1. This Jumper should be moved to the right (towards the connector to the USBBUB) for programming unless an external power source is connected to the DCinput jack. Be sure to move the jumper back to the position shown after programming!
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Sketch has compiled successfully. The only issue may be if you have not properly installed the FAT16 library according to instructions.
Image Notes 1. Select the appropriate COM port. Typically FTDI based ports are numbered higher than 2. In my case, my Deumilanove shows up as COM9, my Boardunio boards as COM12, and my USB-BUB+BBB as COM13.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Re-compile and upload the executable code to the BBB.
File Downloads
Fat16.tar.gz (28 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Fat16.tar.gz']
Fat16.zip (44 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Fat16.zip']
DigitalWindowSticker.tar.gz (3 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'DigitalWindowSticker.tar.gz']
DigitalWindowSticker.zip (5 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'DigitalWindowSticker.zip']
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. This image is displayed by the Digital Window Sticker if the SD Card is not detected. The WP pin on the SD Card breakout board is held low when a card is present. We connect this to Arduino pin 2 in subsequent steps.
Image Notes 1. Solder a set of header-pins (11) to the break-out board. Note that only the following pins are required: CS, DI, VCC, CLK, GND & COM, DO, and for a better experience WP.
http://www.instructables.com/id/Arduino-Projects/
The 16-pin DIP socket for the 74HC4050 The LM3940IT The capacitors need for the 3.3 volt regulator (see next section below) The SD card breakout board The shrouded box header The header pin receptacles for connecting the BBB 3.3 Volt Regulator Capacitors: I elected to keep the capacitors for the 3.3 volt regulator as near as possible to the LM3940. I use two 33F capacitors between the ground pin and the output pin. One is tantalum capacitor, the other is electrolytic. To save cost, the tantalum capacitor does not require a high voltage rating. 6-volts is just under twice what should ever come out of the regulator and should suffice. REMEMBER that both the electrolytic and the tantalum capacitors are polarized! The long pin needs go into a pad connected to the output of the LM3940, and the short pin into a pad connected to the ground (middle pin) of the LM3940. The leads are small enough that you can fit both in a single hole for each pin. A .47F tantalum capacitor goes between the ground pin (middle pin) on the LM3940 and its input pin. This capacitor is also polarized. Be sure the short pin goes into a pad connected to ground and the long pin into a pad connected to the +5v input pin. The voltage regulator part of the circuit is now ready to be tied to power rails. Placing the Wires: Now comes the tedious part: running all of the wires. The more colors of wire you have the easier this will be. Try to keep the wires as direct and short as possible, and flat against the board to avoid clutter and enhance visual traceability. Power rails: Start by wiring all of the power connections. I selected the rail behind the LM3940 for the 3.3-volt power line, and the rail on the other side of the board as ground. Run one wire from the output pin of the LM3940 to the rail behind it. Run another wire from the ground pin (middle pin) to the rail on the opposite side of the board. Next connect the +5v input of the LM3940 to a pad connected to pin 12, 14, or 16 of the box header, and from another pad connected to that line of the box header, run a wire to the +5v line that will come from the BBB Arduino. Pin 16 on the box header is used for +5v in the photos below. This will complete the voltage regulator portion of the circuit. Now connect a black wire from pin 11, 13, or 15 of the box header to the ground rail. Also connect the ground pin from the BBB to the ground rail. Pin 15 of the box header is used for GND in the photos below. This will complete the power connections for the LED displays and the sources from the BBB circuit. Connect pin 15 of the box header to the COM pin on the SD-MMC card breakout board, and then connect the COM pin of the breakout board to pin 8 on the 16-pin DIP socket. Also connect the GND pin of the SD-MMC card breakout board to the COM pin of the breakout board. All connections to ground should now be complete. To complete the power rails, connect pin 1 of the 16-pin DIP for the 74HC4050 to the 3.3 volt power rail. Also connect the Vcc pin of the SD-MMC breakout board to the 3.3 volt power rail. Wire-up the LED Displays to the Arduino: Connect the following box header pins to Arduino (BBB) pins: Pin 2 of the box header (CS2) to Digital Pin 5 on the Arduino BBB receptacle Pin 1 of the box header (CS1) to Digital Pin 4 on the Arduino BBB receptacle Pin 5 of the box header (WR) to Digital Pin 6 on the Arduino BBB receptacle Pin 7 of the box header (DATA) to Digital Pin 7 on the Arduino BBB receptacle The photos below show each connection. Wire-up the SD-MMC card to the 74HC4050 and the Arduino: First the easy one... Connect the DO pin of the SD-MMC breakout board to Digital Pin 12 on the Arduino. Next connect Pin 7 of the 16-pin DIP for the 74HC4050 (3A) to Digital Pin 13 on the Arduino BBB receptacle. Then connect pin 6 of the 74HC4050 (3Y) to the CLK pin on the SD-MMC card. Now connect Pin 9 of the 16-pin DIP for the 74HC4050 (4A) to Digital Pin 11 on the Arduino BBB receptacle. Then connect pin 10 of the 74HC4050 (4Y) to the DI pin on the SD-MMC card. Finally, connect Pin 11 of the 16-pin DIP for the 74HC4050 (5A) to Digital Pin 10 on the Arduino BBB receptacle. Then connect pin 12 of the 74HC4050 (5Y) to the CS pin on the SD-MMC card. Don't forget to insert the 74HC4050 into the DIP socket as shown in the photo below. This completes the wiring needed to read files from the SD Card. Hookup the Card Detect: In order to be able to tell if a card is present in the SD socket, connect the CD pin on the SD-MMC breakout board to Arduino Digital Pin 2. Connect the BBB to the header receptacle: To finish the circuit connect the BBB to the header receptacle. Be sure to align the pins so that they match the labels on our circuit board! After the enclosure is properly prepared we will connect the ribbon cable from the LED displays, completing the circuit!
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Right-angle connector pins on the shrouded box header bent to span the gap on the printed circuit board.
Image Notes 1. Label the pins on the box header! Note that one side has three pins for ground and the other has three pins for +5 volts. On the +5v side, only one other pin CS2 is connected to the Arduino. On the GND side three pins will be connected to the Arduino digital pins. 2. Label the pins for the BBB Arduino connection! Note that I elected to go from pin 13 on the left to the GND line on the right. If you have a 20-pin receptacle (instead of the 2 8-pin receptacles I used) you should label all of the pins! 3. The LM3940IT with the INPUT pin marked in green on the right, and 5v / 3.3 marked over the input and output pins respectively. 4. Socket for the 74HC4050. Pin 8 (GND) is shown, but pin 1 (3.3v Vcc) is not.
Image Notes 1. A close-up of the .47uF tantalum capacitor. The long pin connects to the input pin on the LM3940. The short pin connects to the ground pin (middle pin) of the LM3940.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. The 3.3v regulator circuit showing the 33uF electrolytic (blue) capacitor and the 33uF tantalum capacitor connected between the output pin (right-most) of the LM3940 (long pins on capacitors) and the ground (short pin on capacitors, middle pin of LM3940), as well as the .47uF tantalum capacitor connected to the input pin (left-most) on the LM3940, with it's short pin connected to the ground pin (middle pin) on the LM3940. The black wire connects the middle/ground pin of the LM3940 to the power rail on the far side of the board. The red wire is connected to the input pin on the LM3940 and to the +5v pin on the box header (and thereby the +5v on the BBB).
Image Notes 1. +5v between the box header and the input pin of the LM3940. 2. 3.3v output from the output pin of the LM3940 to the 3.3v rail on the PCB. 3. 3.3v rail 4. Ground rail 5. Ground wire from the ground pin (middle) of the LM3940 to the ground rail. 6. Ground wire from the BBB Arduino to the ground rail. 7. +5v wire from the +5v BBB pin to pin 12, 14, or 16 of the box header. To power the circuit when the ribbon cable is not connected to the displays, make sure the wire is connected to the same pad row where the input wire to the LM3940 is connected. 8. Next connect a ground wire from the ground rail to pin 11, 13, or 15 of the box header.
Image Notes 1. Connect the ground rail to pin 13 of the box header. 2. Connect the COM line on the SD-MMC card breakout board to pin 13 of the box header (GND).
Image Notes 1. Connect pin 8 of the 74HC4050 to GND on the SD-MMC breakout board. 2. Connect the GND pin to the COM pin on the breakout board. This should all lead back to the GND rail.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Connect pin 1 of the 74HC4050 to the 3.3 volt power rail. 2. Connect the VCC pin of the SD-MMC card breakout board to the 3.3 volt power rail.
Image Notes 1. Connect pin 2 (CS2) from the shrouded box header to Arduino Pin 5.
Image Notes 1. Connect pin 7 (DATA) of the box header to Digital Pin 7 on the Arduino. 2. Connect pin 5 (WR) of the box header Digital Pin 6 on the Arduino. 3. Connect pin 2 (CS1) on the box header to Digital Pin 4 on the Arduino. 4. Pin 1 (CS2) of the box header is connected to Digital Pin 5 on the Arduino.
Image Notes 1. Connect the DO pin on the SD card to Digital Pin 12 on the Arduino.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Connect pin 7 (74HC4050 3A) to Digital Pin 13 on the Arduino.
Image Notes 1. Connect pin 6 (74HC4050 3Y) to the CLK pin on the SD card.
Image Notes 1. Connect pin 9 of the 74HC4050 to Digital Pin 11 of the Arduino. 2. Connect pin 10 of the 74HC4050 to the DI pin on the SD-MMC card. 3. Connect pin 12 of the 74HC4050 to the CS pin on the SD-MMC card.
Image Notes 1. Connect pin 11 of the 74HC4050 to Arduino Digital Pin 10. 2. Connect pin 12 of the 74HC4050 to the CS pin on the SD-MMC card. 3. Insert the 74HC4050 into the DIP socket.
Image Notes 1. Completed all connections except for the Card Detect pin on the SD-MMC card to Digital Pin 2 on the Arduino.
Image Notes 1. Connect the CD pin on the SD-MMC card to Digital Pin 2 on the Arduino. 2. This is the completed board.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Attach the BBB to the header receptacle. Make certain the pins align to the proper labels on our printed circuit board!
File Downloads
DigitalWindowSticker.sch (154 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'DigitalWindowSticker.sch']
http://www.instructables.com/id/Arduino-Projects/
DC supply through the BBB's DC jack, you should see a message on the display telling you to insert an SD card. If you don't see the message it is time to pull out your multimeter and verify there are no shorts and that each connection is wired correctly according to the schematic. Congratulations on your new Digital Window Sticker. In the next step you'll see how to place images on the SD card.
Image Notes 1. Remove the excess from the sides of the board. (Both Sides)
Image Notes 1. Set the switch properly. The left board (when viewed from the front) should have CS1 On, and CS2-4 Off. The right board should have CS1 Off, CS2 On, and CS3-4 Off.
Image Notes 1. Create a cardboard cutout the size of the LED matrix. (Not the size of the board, just the LED matrix blocks.)
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Tape the cardboard guide to the inside of the lid. Use a box knife to score the plastic on the top and bottom of the cutout guide.
Image Notes 1. Once the top and bottom are cut through, remove the cardboard guide and use the box knife to cut the side through.
Image Notes 1. The cutout is complete. Some shaving may be necessary to make the displays fit.
Image Notes 1. Use a small 3/64 drill bit to drill through the screw holes, creating pilot holes. Follow this up with a drill bit the same size as the screw holes, after removing the displays, using the pilot holes for positioning.
Image Notes 1. In the top row of screw holes, insert a 4-40 machine screw, and place 2 4-40
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. For the bottom screw holes, insert a 4-40 machine screw and secure it on the inside with a single 4-40 nut.
Image Notes 1. Insert the LED displays and attach a nut on each machine screw.
Image Notes 1. Mark where slots need to be cut for the SD card socket, the USB-BUB pins, and the DC Jack.
Image Notes 1. Cut the slots for the DC Jack, USB-BUB pins, and the SD Card slot. Hopefully do a better job than I did.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Place the board inside and check the clearance of components through the slots. Once satisfied apply a dab of hot glue to the corners of the PCB and stick it in place.
Image Notes 1. Apply a thick line of hot glue to hold the PCB in place and prevent sliding when inserting power jacks or SD cards. 2. Attach the ribbon cable to the PCB and to the display bus.
Image Notes 1. Attach the lid to the enclosure and tighten the screws. (Not too tight, or the plastic will crack.)
Image Notes 1. The working unit, before I received a matching display from Sure Electronics. The video and final photos have matching displays. 2. USB-BUB connected. Not needed normally, and the pins can be covered if there is a risk of a short. 3. Powered by a 9 volt battery. WARNING: I was thrown off for several hours thinking something was wrong with my circuit. It turned out to be a low battery that caused strange results (the unit would cycle through two dozen files and then freeze up.) Be careful about the power supply.
http://www.instructables.com/id/Arduino-Projects/
Image Notes
http://www.instructables.com/id/Arduino-Projects/
1. Digital Window Sticker files are 48 by 16 pixels! 2. Select grayscale, and then use on black and white.
Image Notes 1. Use the Save as Template option to create a template for Digital Window Stickers.
Image Notes 1. Zoom the image at least to 8:1 to simplify editing. Image Notes 1. Now you can select the DigitalWindowSticker template to save some typing.
Image Notes 1. There is a free font available on the Internet called BPdots that works very well at 10 points in Digital Window Stickers.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Use File|Save As... to save the file an .xbm file.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Take the defaults in this window and hit save. The image can now be converted to a .dws file and placed in sequence on the SD card.
Image Notes 1. Command-line to convert test.xbm to test.dws, inverted, with a 650ms. delay. 2. Ignore this unless you want to use for debugging your micro controller code. 3. The new file test.dws needs to be give an numeric name like 0.dws, or 1.dws and placed in the root directory on the SD card.
File Downloads
xbmtodws-1.0.tar.gz (9 MB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'xbmtodws-1.0.tar.gz']
xbmtodws-1.0.zip (9 MB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'xbmtodws-1.0.zip']
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
The BlokClok Concept Arduino driven RGB Abstract Clock (video) by earthshine
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. wires - remember which goes where! 2. the rear of the dial
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. 1. This rotates, and the notches engage in... 2. 2. .... this follower, which bounces in the notches and cause... 3. 3. ... this arm to go backwards and forwards, breaking and making the circuit with.... 4. 4. ... this arm. 5. these terminals connect to the two arms above.
Image Notes 1. 1. This rotates, and the notches engage in... 2. 2. .... this follower, which bounces in the notches and cause... 3. 3. ... this arm to go backwards and forwards, breaking and making the circuit with.... 4. 4. ... this arm. 5. these terminals connect to the two arms above.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. 1. This rotates, and the notches engage in... 2. 2. .... this follower, which bounces in the notches and cause... 3. 3. ... this arm to go backwards and forwards, breaking and making the circuit with.... 4. 4. ... this arm. 5. these terminals connect to the two arms above.
http://www.instructables.com/id/Arduino-Projects/
cleared = 0; } } if (reading != lastState) { lastStateChangeTime = millis(); } if ((millis() - lastStateChangeTime) > debounceDelay) { // debounce - this happens once it's stablized if (reading != trueState) { // this means that the switch has either just gone from closed->open or vice versa. trueState = reading; if (trueState == HIGH) { // increment the count of pulses if it's gone high. count++; needToPrint = 1; // we'll need to print this number (once the dial has finished rotating) } } } lastState = reading; }
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
Cell Phone Penguin Loves You! Thing a Day - Day 1 (Photos) by randofo
Arduino Color Mixer controlled Arduino EMF (Electromagnetic by iPhone by Field) Detector hbjackson by computergeek
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Protoboard #1 contains LED's. 2. Protoboard #2, your Arduino set up. 3. Method #1 using two protoboards 4. Pin connection wire, resistor, led 5. GND
Image Notes 1. Binary clock sketch running. 2. Switches used to program clock time.
http://www.instructables.com/id/Arduino-Projects/
3. 9V wall power into DC Power Jack 4. resistors and connections for switches
Image Notes 1. measure and cut clock face hole into container
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. deep lid, able to hide protoboards and wires in. cover up when finished.
Image Notes 1. interior view 2. enough room to cut a flat piece of balsa wood to hide components. 3. storage.
http://www.instructables.com/id/Arduino-Projects/
second++; } // move forward one minute every 60 seconds if (second >= 60) { minute++; second = 0; // reset seconds to zero } // move forward one hour every 60 minutes if (minute >=60) { hour++; minute = 0; // reset minutes to zero } if (hour >=24) { hour=0; minute = 0; // reset minutes to zero } munit = minute%10; //sets the variable munit and hunit for the unit digits hunit = hour%10; ledstats = digitalRead(0); // read input value, for setting leds off, but keeping count if (ledstats == LOW) { for(i=1;i<=13;i++){ digitalWrite(i, LOW);} } else { //minutes units if(munit == 1 || munit == 3 || munit == 5 || munit == 7 || munit == 9) { digitalWrite(1, HIGH);} else { digitalWrite(1,LOW);} if(munit == 2 || munit == 3 || munit == 6 || munit == 7) {digitalWrite(2, HIGH);} else {digitalWrite(2,LOW);} if(munit == 4 || munit == 5 || munit == 6 || munit == 7) {digitalWrite(3, HIGH);} else {digitalWrite(3,LOW);} if(munit == 8 || munit == 9) {digitalWrite(4, HIGH);} else {digitalWrite(4,LOW);} //minutes if((minute >= 10 && minute < 20) || (minute >= 30 && minute < 40) || (minute >= 50 && minute < 60)) {digitalWrite(5, HIGH);} else {digitalWrite(5,LOW);} if(minute >= 20 && minute < 40) {digitalWrite(6, HIGH);} else {digitalWrite(6,LOW);} if(minute >= 40 && minute < 60) {digitalWrite(7, HIGH);} else {digitalWrite(7,LOW);} //hour units if(hunit == 1 || hunit == 3 || hunit == 5 || hunit == 7 || hunit == 9) {digitalWrite(8, HIGH);} else {digitalWrite(8,LOW);} if(hunit == 2 || hunit == 3 || hunit == 6 || hunit == 7) {digitalWrite(9, HIGH);} else {digitalWrite(9,LOW);} if(hunit == 4 || hunit == 5 || hunit == 6 || hunit == 7) {digitalWrite(10, HIGH);} else {digitalWrite(10,LOW);} if(hunit == 8 || hunit == 9) {digitalWrite(11, HIGH);} else {digitalWrite(11,LOW);} //hour if(hour >= 10 && hour < 20) {digitalWrite(12, HIGH);} else {digitalWrite(12,LOW);} if(hour >= 20 && hour < 24) {digitalWrite(13, HIGH);} else {digitalWrite(13,LOW);} } valm = analogRead(0); if(valm<800) { minute++; second=0; delay(250); } valh = analogRead(5); if(valh<800) { hour++; second=0; delay(250); } } // add one minute when pressed
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
Author:gunnk
author's website One of my first memories is Apollo 11. Guess that set the stage for everything else. I have a degree in physics, researched indoor air pollution for several years, then moved on to IT *before* the dotCom boom and bust. I'm a sysadmin by day and a husband, father and maker 24/7. I also like to run (and have been known to need to apply that skill thanks to the occasional project that yielded -- unexpected -- results).
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
digitalWrite(ledPinYellow, HIGH); } if(currentLED==2) { digitalWrite(ledPinYellow, LOW); digitalWrite(ledPinRed, HIGH); } if(currentLED==3) { digitalWrite(ledPinGreen, HIGH); digitalWrite(ledPinRed, LOW); } currentLED++; // Add one to currentLED if (currentLED==4) { currentLED=1; } } void loop() // This is our "main" loop. Arduino programs don't exit -- nowhere to exit TO! { getButton(); if((buttonIs==1)&&(buttonWas==0)) { currentSpeed++; // Add one to the current delay because the button was pressed. if(currentSpeed==15) { currentSpeed = 1; } // Loop around -- this sets us back to a slow rotation. } if (millis()>=timer+(1000/currentSpeed)) { // Time to change the lights! changeLights(); } }
File Downloads
KevinsArduinoTutorial.cpp (2 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'KevinsArduinoTutorial.cpp']
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
//Green Cathode to Arduino pin 7 //Anode to 270 ohm resistor to 5V #include #include #include LibHumidity humidity = LibHumidity(0); LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2); int backLight = 13; // pin 13 will control the backlight int RedLEDPin = 9; // LED connected to digital pin 9 int BlueLEDPin = 8; // LED connected to digital pin 8 int GreenLEDPin = 7; // LED connected to digital pin 7 void setup() { pinMode(backLight, OUTPUT); digitalWrite(backLight, HIGH); // turn backlight on. Replace 'HIGH' with 'LOW' to turn it off. //I2C pinMode(16, OUTPUT); digitalWrite(16, LOW); //GND pin pinMode(17, OUTPUT); digitalWrite(17, HIGH); //VCC pin //Furnace / AC Indicator pinMode(RedLEDPin, OUTPUT); // sets the digital pin as output pinMode(BlueLEDPin, OUTPUT); // sets the digital pin as output pinMode(GreenLEDPin, OUTPUT); // sets the digital pin as output } void loop() { lcd.begin(20,4); // columns, rows. use 16,2 for a 16x2 LCD, etc. lcd.clear(); // start with a blank screen lcd.setCursor(0,0); // set cursor to column 0, row 0 (the first row) lcd.print("Humidity: "); // change this text to whatever you like. keep it clean. lcd.print(humidity.GetHumidity()); lcd.setCursor(0,1); // set cursor to column 0, row 1 lcd.print("Temp in C: "); lcd.print(humidity.GetTemperatureC()); lcd.setCursor(0,2); // set cursor to column 0, row 2 lcd.print("Temp in F: "); lcd.print(humidity.GetTemperatureF()); { if (humidity.GetTemperatureF() < 60) { digitalWrite(RedLEDPin, LOW); // sets the Red LED on digitalWrite(BlueLEDPin, HIGH); // sets the Blue LED off digitalWrite(GreenLEDPin, LOW); // sets the Green LED off } else if (humidity.GetTemperatureF() >= 75) { digitalWrite(BlueLEDPin, LOW); // sets the Blue LED on digitalWrite(RedLEDPin, HIGH); // sets the Red LED off digitalWrite(GreenLEDPin, HIGH); // sets the Green LED off } else { digitalWrite(GreenLEDPin, LOW); // sets the Green LED on digitalWrite(BlueLEDPin, HIGH); // sets the Blue LED off digitalWrite(RedLEDPin, HIGH); // sets the Red LED off } } delay (20000); } See http://arduinotronics.blogspot.com/2010/09/our-temperature-humidity-monitor-is.html for actual code as instructables breaks our include statements.
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
Arduino-based master clock for USB schools by Indoor/Outdoor MasterClockMaker Thermometer (or, 'My first USB device') by ian
Who Needs a Meteorologist? Measure Humidity the Old-School Way, With a Sling Psychrometer! by nrromsey
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
Author:liseman
Image Notes 1. relays, ac power 2. garduino 3. pump in bucket; water runs up to milk jug and then directly to planters 4. fluorescent grow light
Image Notes 1. to relays 2. nails, to put in the dirt:) 3. to nails 4. photocell 5. thermistor
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes
Image Notes 1. to 120v ac from the wall 2. not used 3. to ac outlet: when digital i/o is high, this is switched on
http://www.instructables.com/id/Arduino-Projects/
1. this will plug into your wall 2. plug in lights or pump here 3. to a digital i/o pin on the arduino 4. to ground on arduino 5. to black wire from end of extension cord into which you plug things:) 6. to black wire from wall end of extension cord (middle pin from left side of relay) 7. not used for this circuit, the top right lead of the relay is normally closed; for our circuit, that means current flows through here when the relay is switched off
Image Notes 1. lights plug into ac outlet 2. normal ac outlet, like on a wall 3. relay, viewed from above (leads down) 4. 120 volts ac: the wall plug in your house 5. ground 6. to digital i/o on arduino 7. diode (remember, the triangle points to the end with the band)
Image Notes 1. 5v on arduino 2. an analog i/o on arduino 3. ground on arduino 4. 10k resistor
Image Notes 1. solder 2. dirt on nails. appropriate, and kinda beautiful imho:)
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. +5v on arduino 2. sensor: circuit is same for light and temperature 3. 10k resistor 4. ground 5. analog i/o on arduino
Image Notes 1. little bit of mold: didn't have enough drainage initially... 2. milk jug cut at most of the way up the handle
Image Notes 1. bricks; the milk jugs rest on these 2. yellowing leaf: soil too moist?
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. sensor in direct light = digital i/o pin 7 low = red light on
Image Notes 1. sensor in finger shade = digital i/o pin 7 high= green light on
Image Notes 1. cord runs to relay/outlet setup 2. light fixture rests on containers
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. pump and water in here 2. pump cord runs to relay-controlled extension cord
Image Notes 1. bike tube connected to pump. i used one of those wires coated with white paper stuff that holds bread bags closed, but a ziptie, hose clamp, or anything else similar would also work 2. power cord for pump
http://www.instructables.com/id/Arduino-Projects/
//open serial port Serial.begin(9600); //set the water, light, and temperature pins as outputs that are turned off pinMode (waterPump, OUTPUT); pinMode (lightSwitch, OUTPUT); pinMode (tempLed, OUTPUT); digitalWrite (waterPump, LOW); digitalWrite (lightSwitch, LOW); digitalWrite (tempLed, LOW); //establish start time start_time = DateTime.now(); seconds_elapsed_total = 0; } void loop() { // read the value from the moisture-sensing probes, print it to screen, and wait a second moisture_val = analogRead(moistureSensor); Serial.print("moisture sensor reads "); Serial.println( moisture_val ); delay(1000); // read the value from the photosensor, print it to screen, and wait a second light_val = analogRead(lightSensor); Serial.print("light sensor reads "); Serial.println( light_val ); delay(1000); // read the value from the temperature sensor, print it to screen, and wait a second temp_val = analogRead(tempSensor); Serial.print("temp sensor reads "); Serial.println( temp_val ); delay(1000); Serial.print("seconds total = "); Serial.println( seconds_elapsed_total ); delay(1000); Serial.print("seconds lit = "); Serial.println( seconds_light); delay(1000); Serial.print("proportion desired = "); Serial.println( proportion_to_light); delay(1000); Serial.print("proportion achieved = "); Serial.println( proportion_lit); delay(1000); //turn water on when soil is dry, and delay until soil is wet if (moisture_val < 850) { digitalWrite(waterPump, HIGH); } while (moisture_val < 850) { delay(10000); //thanks to JoshTW for the following, important correction moisture_val = analogRead(moistureSensor); } digitalWrite(waterPump, LOW); //update time, and increment seconds_light if the lights are on seconds_for_this_cycle = DateTime.now() - seconds_elapsed_total; seconds_elapsed_total = DateTime.now() - start_time; if (light_val > 900) { seconds_light = seconds_light + seconds_for_this_cycle; } //cloudy days that get sunny again: turn lights back off if light_val exceeds 900. this works b/c the supplemental lights aren't as bright as the sun:) if (light_val > 900) { digitalWrite (lightSwitch, LOW); } //turn off lights if proportion_lit>proportion_to_light, and then wait 5 minutes if (proportion_lit > proportion_to_light) { digitalWrite (lightSwitch, LOW); delay (300000); } //figure out what proportion of time lights have been on proportion_lit = seconds_light/seconds_elapsed_total; //turn lights on if light_val is less than 900 and plants have light for less than desired proportion of time, then wait 10 seconds if (light_val < 900 and proportion_lit < proportion_to_light)
http://www.instructables.com/id/Arduino-Projects/
{ digitalWrite(lightSwitch, HIGH); delay(10000); } //turn on temp alarm light if temp_val is less than 850 (approximately 50 degrees Fahrenheit) if (temp_val < 850) { digitalWrite(tempLed, HIGH); } } Note the inclusion of the datetime library, which you can install from here. Place the contents of the file in the libraries directory of the arduino folder and you should be good to go. See the readme in the download if you run into problems. Monitoring needs to be greatly improved, as Garduino should sit there doing nothing most of the time when it's working properly. You should be able to pull the moisture sensors from the soil and have them turn on within a few seconds (air = 0 conductivity between them), but you can't do this with the light sensor: it's just trying to turn on for 16 hours every 24 hours. Currently, connecting your Arduino to your computer and then monitoring the serial port will give you some meaningful feedback. But, this is resetting the time counter to 0, so you don't get any useful historical data unless you leave the Garduino with a computer connected during the period you want to monitor...
Image Notes 1. hit this button to monitor serial port 2. don't forget to download this! 3. i avoided pins 0 and 1 b/c of their weirdness with rx / tx
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. the yield from the better version you're gonna build:)
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Basil plant good for soups 2. Mint good for ... what isn't it good for? 3. Water bucket with pump 4. Foil keeps the light inside 5. Planter with lots of yummy soil 6. SEnsor board 7. Pump relay box 8. Light relay box 9. Arduino running it all 10. Power to all the good stuff here 11. Light for the plant from the "Hydroponics Store" 12. Starter kit for garden drip system
Image Notes 1. Hadn't thought of the foil idea yet 2. Plants! They grow! 3. All the good upgrades for this project 4. Water ... note that it's not on my kitchen floor yet 5. Box of goodies
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Basil plant good for soups 2. Mint good for ... what isn't it good for? 3. Water bucket with pump 4. Foil keeps the light inside 5. Planter with lots of yummy soil 6. SEnsor board 7. Pump relay box 8. Light relay box 9. Arduino running it all 10. Power to all the good stuff here 11. Light for the plant from the "Hydroponics Store" 12. Starter kit for garden drip system
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. All the sesors and lights that tell my arduino what the plant is up to 2. Down here are the nails that act as the moisture sensor 3. Nails act as the moisture sensors for the plant 4. The light was thankfully turned off for this photo
Image Notes 1. A ton of resistors 2. LEDs tell me about the temperature and the pump 3. Temperature sensor 4. light sensor, pretty useless right here 5. Moisture Sensor wires
File Downloads
garden_sensor.brd (10 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'garden_sensor.brd']
http://www.instructables.com/id/Arduino-Projects/
garden_sensor.sch (69 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'garden_sensor.sch']
Image Notes 1. Test and Reset buttons 2. Extension cord wires 3. Nail mount housing hides in the shadows! 4. Control wires
Image Notes 1. Nail mount housing 2. GFCI Outlet 3. Relay circuit completed 4. Hot wire disconnected from the extension cord 5. Extension cord
Image Notes 1. Relay - 240/120V, 30A 2. Load connectors 3. Control connectors to Arduino 4. LED tells you its on or off 5. Diode to protect microcontroller 6. Transistor does all the hard work for no pay!
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Breadboard for circuit 2. Beefy Relay 3. Load connector 4. Control connector 5. Bright red LED 6. Transistor 7. Diode 8. Resistor 9. Resistors, same type
http://www.instructables.com/id/Arduino-Projects/
Instead of including the code in the text here I've decided to include files. You should be able to open these with your Arduino IDE for the arduino code and with IDLE or a text editor for the Python code.
File Downloads
garduino_twitter.py (7 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'garduino_twitter.py']
garduino.pde (4 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'garduino.pde']
twitter.py (45 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'twitter.py']
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Xbee module for computer 2. FTDI cable to computer 3. Arduino Duemilanove 4. 9V power from wall 5. TX/RX lines to Xbee module 6. Xbee module for arduino 7. Electronics to program arduino remotely and hit the reset 8. Power!
Image Notes 1. I like to time tag all of these 2. I think my garden has not put out more tweets than me 3. People are already following my garden! Image Notes 1. Arduino and protoshield 2. Sensor board 3. Xbee module set up temporarily on a protoboard 4. Pump outlet 5. Light outlet 6. Too many wires!
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Basil plant good for soups 2. Mint good for ... what isn't it good for? 3. Water bucket with pump 4. Foil keeps the light inside 5. Planter with lots of yummy soil 6. SEnsor board 7. Pump relay box 8. Light relay box 9. Arduino running it all 10. Power to all the good stuff here 11. Light for the plant from the "Hydroponics Store" 12. Starter kit for garden drip system
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
n: how to make a multi-layered acrylic and LED sculpture with variable lighting levels
by slight on November 14, 2008
Intro: N: how to make a multi-layered acrylic and LED sculpture with variable lighting levels
Here you can find out how to make you very own n as made for the exhibition www.laplandscape.co.uk curated by art/design group Lapland. More images can be seen at flickr This exhibition runs from Wednesday 26 November - Friday 12 December 2008 inclusive, and had a private view on Tuesday 25 November. Each participant has been asked to make a letter each of the 'laplandscape' portion of the web address. On the website each letter will link to related web contributions from each participant. This instructable is our web exhibit for this exhibition. This n is an art work and experimental and these instructions should be treated as such! The n takes the form of 5 layers of laser cut acrylic, 3 of which have LEDs in them. The front panel has the outline of a letter n etched in it. 3 knobs control the LEDs and fade them between the ones inside and outside the outline of the n being on, on each layer. There are no doubt simpler ways if wiring up the LEDs to do the same thing but, as all the exposed components etc are a big part of the aesthetic, we decided to do it this way. Enjoy!
http://www.instructables.com/id/Arduino-Projects/
Power 1 x regulated power supplies 4.5volts 1400ma 1 x regulated power supplies 7.5 volts Consumables solder super glue araldite
http://www.instructables.com/id/Arduino-Projects/
2. USB 3. jumper set to use external power supple, as apposed to USB power. 4. analog inputs 5. 5voly output used for pots 6. PWM pin 3 7. PWM pins 5 and 6 8. PWM pins 9, 10 and 11 9. Ground 10. Ground
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. set to 7.5V for arduino set to 3.5v for LED power
Image Notes 1. steady eddie 2. snips 3. screw driver 4. tape mesure 5. solder sucker 6. soldering iron (temperature controlled is best) 7. strip breaker 8. heat proof work surface; or dining table
http://www.instructables.com/id/Arduino-Projects/
9. damp sponge
http://www.instructables.com/id/Arduino-Projects/
File Downloads
sheets for n.pdf ((1191x1417) 376 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'sheets for n.pdf']
back.eps ((1136x1136) 313 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'back.eps']
sheet 1.eps ((1334x1136) 339 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'sheet 1.eps']
sheet 2.eps ((1334x1136) 366 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'sheet 2.eps']
sheet 3.eps ((1334x1136) 393 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'sheet 3.eps']
http://www.instructables.com/id/Arduino-Projects/
The etching took around 50 minutes to complete. The cut sheets around 8, 10, 13 and 4mins.
Then, handling them using white cotton gloves, we cleaned the sheets with a window cleaning spray to remove finger prints and other marks.
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Step 6: Electronics
The next step, now you have the acrylic sheets, is to make up the LEDs and control circuits. We decided to put 50 LEDs on each layer not the full 100 that we have enough holes for. After testing we decided 50 was enough and liked the way that the LEDs reflected internally within the acrylic to light up the 'empty' holes, but you could do the full 100 on each sheet if you wanted. stripboards First use the "strip cutting tool" to create the breaks on the strip board as needed. Next solder 50 resistors in two groups of 25 at each end. In each block of 25 we did them in smaller blocks of 5 for spacing purposes. Now solder the 2 transistors onto the strip board. Then run a line of solder down the board to join all the strips with resistors to each other and to where the positive supply will come in. You could also do this with wire if you prefer, joining each strip to the next. Next solder the transistors onto the stripboard. After that use a multimeter to make sure that there are no short circuits between strips. Then do a multimeter test to check that all the resistors were soldered correctly by putting one contact on the positive line of solder and the other on the other side of the resistor. Then cut the wires, you will need 100 wires for each 50 LEDs. We used yellow and white to differentiate between positive and negative. We cut the wires for the sheet 3 to 300mm each, for sheet 2 and sheet 1 we cut them to 800mm. The yellow wires should be soldered to the positive side of the circuit, beyond the resistors. The white ones are soldered in a cluster in the area not connected to the positive line of solder. Having attached all the components to the strip board, now solder the LEDs to the ends of the wires. Yellow to the long pin, white to the short pin (and flat edge). We shortened the length of the pins before doing this, making sure to keep the pins different lengths so we knew which side was which. Repeat another two times so that you have three identical boards.
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
/* opening 'n' version 1.2 3 sets of 2 led's fadding from one to other via pot */ int ledPin1a = 11; //led 1 a int ledPin1b = 10; // led 1 b int ledPin2a = 9; //led 2 a int ledPin2b = 6; // led 2 b int ledPin3a = 5; // led 3 a int ledPin3b = 3; //led 3 b int PotPin1 = 1; //set variable to value of analog pin 1 int PotPin2 = 2; //set variable to value of analog pin 2 int PotPin3 = 3; //set variable to value of analog pin 3 int value1 = 0; int value2 = 0; int value3 = 0; int ledValue1a = 0; int ledValue1b = 0; int ledValue2a = 0; int ledValue2b = 0; int ledValue3a = 0; int ledValue3b = 0; void setup() { pinMode(ledPin1a, OUTPUT); pinMode(ledPin1b, OUTPUT); pinMode(ledPin2a, OUTPUT); pinMode(ledPin2b, OUTPUT); pinMode(ledPin3a, OUTPUT); pinMode(ledPin3b, OUTPUT); Serial.begin(9600); value1 = analogRead(1); value2 = analogRead(2); value3 = analogRead(3); } void loop() { value1 = analogRead(PotPin1); //read value of PotPin1
http://www.instructables.com/id/Arduino-Projects/
ledValue1a = value1 /=4; ledValue1b = 255 - ledValue1a; analogWrite(ledPin1a, ledValue1a); analogWrite(ledPin1b, ledValue1b); value2 = analogRead(PotPin2); //read value of PotPin2 ledValue2a = value2 /=4; ledValue2b = 255 - ledValue2a; analogWrite(ledPin2a, ledValue2a); analogWrite(ledPin2b, ledValue2b); value3 = analogRead(PotPin3); //read value of PotPin3 ledValue3a = value3 /=4; ledValue3b = 255 - ledValue3a; analogWrite(ledPin3a, ledValue3a); analogWrite(ledPin3b, ledValue3b); Serial.print(ledValue1a); } //works nice, straight fade, one high other low.
This then needs to be uploaded via USB to the arduino board. Having the serial.print function enabled means that it is possible to see the value being created by pot 1 which is good for testing and debugging. Having completed upload and testing you then unplug the USB and move the jumpers to enable the arduino to use a external power supply rather than the USB.
File Downloads
sketch_n_v1_2.pde (1 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'sketch_n_v1_2.pde']
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. DC power in 2. USB 3. jumper set to use external power supple, as apposed to USB power. 4. analog inputs 5. 5voly output used for pots 6. PWM pin 3 7. PWM pins 5 and 6 8. PWM pins 9, 10 and 11 9. Ground 10. Ground
Image Notes 1. pin strip attached to strip board and put into the arduino inputs and outputs
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. + to LED's 2. Ground from LED's 3. Break in strips 4. Inside of 'n' other side is outside of 'n' 5. transistor
Step 9: Assembly
The LEDs now need to be threaded through the layers. We attached the layers (sheet 1, sheet 2, and sheet 3) together on the stud, leaving plenty of room between the layers, enough to get our hands in between them. Use a nut either side of each layer to keep them from moving around. We wore cotton gloves to handle the sheets, to stop any greasy marks getting them that we wouldn't be able to clean off once they were filled with LEDs. Take a board with LEDs and thread them through the larger holes in sheet 3 and sheet 2 into the smaller ones into sheet 1. The LEDs should stay neatly in the holes as they were measured to fit at the cutting stage, but if they don't then use a small dab of glue to hold them in place. You may need to print out the EPS files so that you can work out which ones you are working with on each layer. Using a marker on the drawings to highlight which dots are the target ones may help. Remember if you are using less than 100 LEDs on each sheet then you will have to choose which of the holes you thread the LEDs through into. Then take the next board with LEDs and thread them through the large holes in sheet 3 and fit them into the small holes on sheet 2. Again they should just hold in place, but use glue if not. With the last board you just need to fit the LEDs into sheet 3, gluing as necessary. This will get a bit fiddly as you do the LED threading, you may need to turn round the whole sculpture to get in at different angles. If you have a friend with small hands enlist their help at this point. Pots need fixing to the three tabs next, fit them through and tighten up making sure the locating pin goes in the slot that was cut. The back layer should go on next, we put small plastic 'feet' onto the backs of the strip boards, to space them from the back layer. Then we glued these feet onto sheet back layer. Thread the power and ground cables back through some of the spare larger holes, or if you don't have spare holes use a small cable tie to bunch them together. The layers can now be spaced more closely together. Measure between the layers to get them level. We had a gap of 6cm between layer front and layer 1, and then 9cm between both layer 1 and layer 2 and layer 2 and layer 3, then 15cm between layer 3 and layer back. This gives a rough dimension of 40cm deep. The knobs need to be attached to the pots, we used a G-clamp and tightened it gradually to push them on gently. Make sure you alighn the mark/dot/line on the knob with the small mark you will find on the pot.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. wires threaded through bigger holes through to next layer 2. LEDs fixed into small holes
Image Notes 1. wires threaded through from one layer to the next
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. 4 screws 2. power cables 3. power cables at top of wall 4. collection of tools on plinth for 'd' 5. David Bellingham 's'
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
Arduino Examples #1 Make An RGB Led Randomly Flash Different Colors by qazwsx755
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
2. little scrap of plex to raise it up so the ports would come out on a existing hole
http://www.instructables.com/id/Arduino-Projects/
Step 6: Software
now we need to download and install the tvout library for the Arduino sdk here and once you have done that i have modded a version of pong for the arduino to take our input from the joystick you can get right from this instructable. btw thanks pete
File Downloads
ardupong.txt (6 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'ardupong.txt']
http://www.instructables.com/id/Arduino-Projects/
Step 8: UPDATE:
hey all, this is the follow up on my original ardupong instructable, as always its about making the hardware better, the software stays pretty much the same. so in this instructible i got the idea at work when I came across these video game console themed candy tins and i saw an atari joystick and thought to myself "hmm i bet i could turn that into the real thing" so i bought the mints and ordered the smallest arduino i could find and waited a week, and this was the result:
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Step 1: Overview
Overview Key parts of a duino tagger: IR Transmitter system What - Transistor amplifier, high power IR LED and a lens to give a well focused IR beam. Why - To give the tagger means of tagging / shooting other players as well as communicating game information. The transmitter amplifies the transmission signal from the arduino and transmits it using an IR LED, lenses are used to make the signal very directional in order to make the guns behave like guns and make long range transmissions possible. Sound What - Peizo Sounder (& mini sound recorder / playback electronics from greetings card) Why - Its nice to have some audio feedback from the system. Sound effects to let you know when the tagger has been shot or run out of ammunition or lives. Receivers What - Standard IR receiver module and power regulation capacitor Why - So the gun knows when it has been shot. This design in this instructable looks at using 3 sensors 1 on the gun as well as front and rear head sensors. Visual Effects and lights What - LEDs and bar graph driver circuits Why - It is nice to get visual feedback on game information, eg lights to let you know when you have been shot.
Cost To make this section internationally friendly; at the time of writing: 1 GBP = $ 1.6 USD = 1.1 EUR Assuming you already own an arduino the basic extra components for this project can be bought for around 10. Now is a great time to try to build a duino tagger as it is easy to get hold of cheap second hand light guns. Light guns are the guns that you can use with computer games, many of them dont work with modern LCD screens and so there are a lot of them going cheap on ebay and else where. I bought two light guns each cost about 4 one off ebay one from a charity shop. Light guns are a great starting point for this project as they provide the optics, switches and case required for the build. You will need: Arduino Light Gun Coloured LEDs (preferably 30mA+) IR sensors At least 2x IR LEDs matched to the IR receiver (preferably 100mA+) Peizo sounder Power transistor /MOSFET A few electronics basics: solder, resistors , capacitors. You may also want Scrap plastic LED bar graph driver chips More LEDs Record your own message greetings card Hats / helmets / headbands to mount sensors on
Image Notes
http://www.instructables.com/id/Arduino-Projects/
1. Arduino Duemilanove 2. 9v battery (pp3) 3. LED's Show ammo level 4. Switches 5. Trigger switch 6. Sound: Piezo Sounder 7. Transmitter IR LED transmitter and two red LEDs for muzzle flare. 8. Transmitter amplifier: Transistor and a few resistors covered in electrical tape. 9. Optics 10. Wire to head sensors 11. Receiver 12. Rumble / Force feedback motor. Not used (battery could not cope).
Step 2: Basics
Basics Page to try to help the electronics noobs. Some basics which are useful at several points in the design of the duino tagger. R = Resistor C = Capacitor V = Voltage I = Current Using LED's LED's must be used with a resistor to limit the current through them. Choose the current the LED will work at R = (V supply - V led) / I Not: You will probably just be able to copy the resistor values I used. Buttons The buttons (triggers etc) in this project are assumed to give a low voltage when pressed. The standard circuit for this is show in the circuit diagram provided. Filters R C (Resistor Capacitor) circuits can come in useful at a few places in duino tagger, either for smoothing out changes in the power supply voltage or to turn PWM signals into analogue levels, not as complicated as it might sound: To use the water analogy for electricity and current the resistor acts like a narrow pipe (imagine a straw) only allowing slow water (current) flow. The capacitor acts like a big water tank / bucket. The low pass filter in the diagram acts like a straw and bucket combo: Even if you suddenly change the flow of water in or out of the bucket the level (voltage) will only change slowly. Cut off frequency for low pass: f = 1/(2pi*R*C)
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Step 4: Transmitter
IR transmitter You will need: IR LED: Look for an LED with a narrow viewing angle (to ensure as much of the IR light makes it through the optics). Higher power the better. Pick LEDs with a wavelength that matches your IR receivers. Get some spare LEDs as they are operated above their rated current so may burn out. You can just attach an IR LED (with a current limiting resistor) to an output pin on the arduino and it will be able transmit, but the range of the duino tagger wont be very impressive. In order to improve the range of the duino tagger amplification is needed. The basic amplifier I made was a simple transistor circuit (circuit diagram provided), you may wish to consider a mosfet instead of the transistor. Current through the LED: I aimed for about 300mA current through the IR LED. This is more than the rated current for the LED, but the LED seems to be able to cope because you are only pulsing the high current for a short time. If you are using the 5V supply from the arduino to power the LED it can only provide about 400/500mA so using 300mA for the IR transmitter Led does not leave too much for the other LEDs and speakers etc, so bare this in mind when designing building your duino tagger, it might be a good idea to add a voltage regulator capable of supplying higher currents. Optics You will need to use a lense to focus the IR beam, you can use the lense that came with the light gun. You can use a red LED to work out where to put the IR led to get a good focused beam. For more details see the miles tag site.
Step 5: Receiver
Receivers The receivers are for detecting when the tagger has been shot and receiving game data. The receivers are standard IR remote control receivers like you would find in a TV remote. There are quite a few different receivers you can choose from I went for the cheapest I could find the main things to consider are: Will you be able to find a matching LED, one that works at the same light wavelength that the sensor is optimised for, If you don't match the LED and receiver the tagger range will be reduced. If you want to be able to use your duino tagger to be compatible with any other duino tag, laser tag or miles tag systems you will need be working at the same modulation frequency and light wavelength. Most of the IR receivers work in a very similar way and you will be able to wire then up the same as the circuit diagrams in the pictures. The output pin of the receiver drops to a low voltage when a signal is being received. The outputs from multiple sensor can be connected and one sensor receiving will still cause the combined output signal voltage to drop. The receivers work on there own and can be connected directly to the arduino, but they are much more reliable when used with capacitors to regulate the power supply and pull up resistors.
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
4. Connect the arduino output to where the positive on the batteries originally powering the circuit would have been and connect the arduino ground to where the battery negative was. You should now find when the arduino output goes high the sound recorded on the card circuit is played. Methods of recording the sound to the card circuit, you could just use the microphone (peizo transducer) that came with it or for slightly better sound quality you could use a potential divider (eg 10k pot) to connect it up to a computer and record directly to the circuit. You may wish to consider adding an audio amplifier to make the sound effects a bit more impressive.
// Digital IO's int triggerPin int trigger2Pin int speakerPin int audioPin
= 3; // Push button for primary fire. Low = pressed = 13; // Push button for secondary fire. Low = pressed = 4; // Direct output to piezo sounder/speaker = 9; // Audio Trigger. Can be used to set off sounds recorded in the kind of electronics you can get in greetings card that play a custom message.
http://www.instructables.com/id/Arduino-Projects/
int lifePin = 6; // An analogue output (PWM) level corresponds to remaining life. Use PWM pin: 3,5,6,9,10 or 11. Can be used to drive LED bar graphs. eg LM3914N int ammoPin = 5; // An analogue output (PWM) level corresponds to remaining ammunition. Use PWM pin: 3,5,6,9,10 or 11. int hitPin = 7; // LED output pin used to indicate when the player has been hit. int IRtransmitPin = 2; // Primary fire mode IR transmitter pin: Use pins 2,4,7,8,12 or 13. DO NOT USE PWM pins!! More info: http://j44industries.blogspot.com/2009/09/arduino-frequency-generation.html#more int IRtransmit2Pin = 8; // Secondary fire mode IR transmitter pin: Use pins 2,4,7,8,12 or 13. DO NOT USE PWM pins!! int IRreceivePin = 12; // The pin that incoming IR signals are read from int IRreceive2Pin = 11; // Allows for checking external sensors are attached as well as distinguishing between sensor locations (eg spotting head shots) // Minimum gun requirements: trigger, receiver, IR led, hit LED. // Player and Game details int myTeamID = 1; // 1-7 (0 = system message) int myPlayerID = 5; // Player ID int myGameID = 0; // Interprited by configureGane subroutine; allows for quick change of game types. int myWeaponID = 0; // Deffined by gameType and configureGame subroutine. int myWeaponHP = 0; // Deffined by gameType and configureGame subroutine. int maxAmmo = 0; // Deffined by gameType and configureGame subroutine. int maxLife = 0; // Deffined by gameType and configureGame subroutine. int automatic = 0; // Deffined by gameType and configureGame subroutine. Automatic fire 0 = Semi Auto, 1 = Fully Auto. int automatic2 = 0; // Deffined by gameType and configureGame subroutine. Secondary fire auto? //Incoming signal Details int received[18]; int check = 0; // Stats int ammo int life // Received data: received[0] = which sensor, received[1] - [17] byte1 byte2 parity (Miles Tag structure) // Variable used in parity checking
// Code Variables int timeOut = 0; // Deffined in frequencyCalculations (IRpulse + 50) int FIRE = 0; // 0 = don't fire, 1 = Primary Fire, 2 = Secondary Fire int TR = 0; // Trigger Reading int LTR = 0; // Last Trigger Reading int T2R = 0; // Trigger 2 Reading (For secondary fire) int LT2R = 0; // Last Trigger 2 Reading (For secondary fire) // Signal Properties int IRpulse = 600; // Basic pulse duration of 600uS MilesTag standard 4*IRpulse for header bit, 2*IRpulse for 1, 1*IRpulse for 0. int IRfrequency = 38; // Frequency in kHz Standard values are: 38kHz, 40kHz. Choose dependant on your receiver characteristics int IRt = 0; // LED on time to give correct transmission frequency, calculated in setup. int IRpulses = 0; // Number of oscillations needed to make a full IRpulse, calculated in setup. int header = 4; // Header lenght in pulses. 4 = Miles tag standard int maxSPS = 10; // Maximum Shots Per Seconds. Not yet used. int TBS = 0; // Time between shots. Not yet used. // Transmission data int byte1[8]; // String for storing byte1 of the data which gets transmitted when the player fires. int byte2[8]; // String for storing byte1 of the data which gets transmitted when the player fires. int myParity = 0; // String for storing parity of the data which gets transmitted when the player fires. // Received data int memory though. int hitNo // Byte1 int player[10]; int team[10]; // Byte2 int weapon[10]; int hp[10]; int parity[10]; = 10; = 0; // Number of signals to be recorded: Allows for the game data to be reviewed after the game, no provision for transmitting / accessing it yet // Hit number // Array must be as large as memory // Array must be as large as memory // Array must be as large as memory // Array must be as large as memory // Array must be as large as memory
void setup() { // Serial coms set up to help with debugging. Serial.begin(9600); Serial.println("Startup..."); // Pin declarations pinMode(triggerPin, INPUT); pinMode(trigger2Pin, INPUT); pinMode(speakerPin, OUTPUT); pinMode(audioPin, OUTPUT); pinMode(lifePin, OUTPUT); pinMode(ammoPin, OUTPUT); pinMode(hitPin, OUTPUT); pinMode(IRtransmitPin, OUTPUT); pinMode(IRtransmit2Pin, OUTPUT); pinMode(IRreceivePin, INPUT); pinMode(IRreceive2Pin, INPUT); frequencyCalculations(); // Calculates pulse lengths etc for desired frequency configureGame(); // Look up and configure game details
http://www.instructables.com/id/Arduino-Projects/
tagCode();
// Based on game details etc works out the data that will be transmitted when a shot is fired
// Not really needed if your circuit has the correct pull up resistors already but doesn't harm // Not really needed if your circuit has the correct pull up resistors already but doesn't harm
for (int i = 1;i < 254;i++) { // Loop plays start up noise analogWrite(ammoPin, i); playTone((3000-9*i), 2); } // Next 4 lines initialise the display LEDs analogWrite(ammoPin, ((int) ammo)); analogWrite(lifePin, ((int) life)); lifeDisplay(); ammoDisplay(); Serial.println("Ready...."); } // Main loop most of the code is in the sub routines void loop(){ receiveIR(); if(FIRE != 0){ shoot(); ammoDisplay(); } triggers(); } // SUB ROUTINES void ammoDisplay() { // Updates Ammo LED output float ammoF; ammoF = (260/maxAmmo) * ammo; if(ammoF <= 0){ammoF = 0;} if(ammoF > 255){ammoF = 255;} analogWrite(ammoPin, ((int) ammoF)); } void lifeDisplay() { // Updates Ammo LED output float lifeF; lifeF = (260/maxLife) * life; if(lifeF <= 0){lifeF = 0;} if(lifeF > 255){lifeF = 255;} analogWrite(lifePin, ((int) lifeF)); } void receiveIR() { // Void checks for an incoming signal and decodes it if it sees one. int error = 0; if(digitalRead(IRreceivePin) == LOW){ // If the receive pin is low a signal is being received. digitalWrite(hitPin,HIGH); if(digitalRead(IRreceive2Pin) == LOW){ // Is the incoming signal being received by the head sensors? received[0] = 1; } else{ received[0] = 0; } while(digitalRead(IRreceivePin) == LOW){ } for(int i = 1; i <= 17; i++) { // Repeats several times to make sure the whole signal has been received received[i] = pulseIn(IRreceivePin, LOW, timeOut); // pulseIn command waits for a pulse and then records its duration in microseconds. } Serial.print("sensor: "); Serial.print(received[0]); Serial.print("..."); // Prints if it was a head shot or not.
for(int i = 1; i <= 17; i++) { // Looks at each one of the received pulses int receivedTemp[18]; receivedTemp[i] = 2; if(received[i] > (IRpulse - 200) && received[i] < (IRpulse + 200)) {receivedTemp[i] = 0;} // Works out from the pulse length if it was a data 1 or 0 that was received writes result to receivedTemp string if(received[i] > (IRpulse + IRpulse - 200) && received[i] < (IRpulse + IRpulse + 200)) {receivedTemp[i] = 1;} // Works out from the pulse length if it was a data 1 or 0 that was received received[i] = 3; // Wipes raw received data received[i] = receivedTemp[i]; // Inputs interpreted data
http://www.instructables.com/id/Arduino-Projects/
// Parity Check. Was the data received a valid signal? check = 0; for(int i = 1; i <= 16; i++) { if(received[i] == 1){check = check + 1;} if(received[i] == 2){error = 1;} } // Serial.println(check); check = check >> 0 & B1; // Serial.println(check); if(check != received[17]){error = 1;} if(error == 0){Serial.println("Valid Signal");} else{Serial.println("ERROR");} if(error == 0){interpritReceived();} digitalWrite(hitPin,LOW); } } void interpritReceived(){ // After a message has been received by the ReceiveIR subroutine this subroutine decidedes how it should react to the data if(hitNo == memory){hitNo = 0;} // hitNo sorts out where the data should be stored if statement means old data gets overwritten if too much is received team[hitNo] = 0; player[hitNo] = 0; weapon[hitNo] = 0; hp[hitNo] = 0; // Next few lines Effectivly converts the binary data into decimal // Im sure there must be a much more efficient way of doing this if(received[1] == 1){team[hitNo] = team[hitNo] + 4;} if(received[2] == 1){team[hitNo] = team[hitNo] + 2;} if(received[3] == 1){team[hitNo] = team[hitNo] + 1;} if(received[4] == 1){player[hitNo] = player[hitNo] + 16;} if(received[5] == 1){player[hitNo] = player[hitNo] + 8;} if(received[6] == 1){player[hitNo] = player[hitNo] + 4;} if(received[7] == 1){player[hitNo] = player[hitNo] + 2;} if(received[8] == 1){player[hitNo] = player[hitNo] + 1;} if(received[9] == 1){weapon[hitNo] = weapon[hitNo] + 4;} if(received[10] == 1){weapon[hitNo] = weapon[hitNo] + 2;} if(received[11] == 1){weapon[hitNo] = weapon[hitNo] + 1;} if(received[12] == 1){hp[hitNo] = hp[hitNo] + 16;} if(received[13] == 1){hp[hitNo] = hp[hitNo] + 8;} if(received[14] == 1){hp[hitNo] = hp[hitNo] + 4;} if(received[15] == 1){hp[hitNo] = hp[hitNo] + 2;} if(received[16] == 1){hp[hitNo] = hp[hitNo] + 1;} parity[hitNo] = received[17]; Serial.print("Hit No: "); Serial.print(hitNo); Serial.print(" Player: "); Serial.print(player[hitNo]); Serial.print(" Team: "); Serial.print(team[hitNo]); Serial.print(" Weapon: "); Serial.print(weapon[hitNo]); Serial.print(" HP: "); Serial.print(hp[hitNo]); Serial.print(" Parity: "); Serial.println(parity[hitNo]);
//This is probably where more code should be added to expand the game capabilities at the moment the code just checks that the received data was not a system message and deducts a life if it wasn't. if (player[hitNo] != 0){hit();} hitNo++ ; } void shoot() { if(FIRE == 1){ // Has the trigger been pressed? Serial.println("FIRE 1"); sendPulse(IRtransmitPin, 4); // Transmit Header pulse, send pulse subroutine deals with the details delayMicroseconds(IRpulse); for(int i = 0; i < 8; i++) { // Transmit Byte1 if(byte1[i] == 1){ sendPulse(IRtransmitPin, 1); //Serial.print("1 ");
http://www.instructables.com/id/Arduino-Projects/
} //else{Serial.print("0 ");} sendPulse(IRtransmitPin, 1); delayMicroseconds(IRpulse); } for(int i = 0; i < 8; i++) { // Transmit Byte2 if(byte2[i] == 1){ sendPulse(IRtransmitPin, 1); // Serial.print("1 "); } //else{Serial.print("0 ");} sendPulse(IRtransmitPin, 1); delayMicroseconds(IRpulse); } if(myParity == 1){ // Parity sendPulse(IRtransmitPin, 1); } sendPulse(IRtransmitPin, 1); delayMicroseconds(IRpulse); Serial.println(""); Serial.println("DONE 1"); } if(FIRE == 2){ // Where a secondary fire mode would be added Serial.println("FIRE 2"); sendPulse(IRtransmitPin, 4); // Header Serial.println("DONE 2"); } FIRE = 0; ammo = ammo - 1; } void sendPulse(int pin, int length){ // importing variables like this allows for secondary fire modes etc. // This void genertates the carrier frequency for the information to be transmitted int i = 0; int o = 0; while( i < length ){ i++; while( o < IRpulses ){ o++; digitalWrite(pin, HIGH); delayMicroseconds(IRt); digitalWrite(pin, LOW); delayMicroseconds(IRt); } } } void triggers() { // Checks to see if the triggers have been presses LTR = TR; // Records previous state. Primary fire LT2R = T2R; // Records previous state. Secondary fire TR = digitalRead(triggerPin); // Looks up current trigger button state T2R = digitalRead(trigger2Pin); // Looks up current trigger button state // Code looks for changes in trigger state to give it a semi automatic shooting behaviour if(TR != LTR && TR == LOW){ FIRE = 1; } if(T2R != LT2R && T2R == LOW){ FIRE = 2; } if(TR == LOW && automatic == 1){ FIRE = 1; } if(T2R == LOW && automatic2 == 1){ FIRE = 2; } if(FIRE == 1 || FIRE == 2){ if(ammo < 1){FIRE = 0; noAmmo();} if(life < 1){FIRE = 0; dead();} // Fire rate code to be added here } } void configureGame() { // Where the game characteristics are stored, allows several game types to be recorded and you only have to change one variable (myGameID) to pick the game. if(myGameID == 0){ myWeaponID = 1; maxAmmo = 30;
http://www.instructables.com/id/Arduino-Projects/
ammo = 30; maxLife = 3; life = 3; myWeaponHP = 1; } if(myGameID == 1){ myWeaponID = 1; maxAmmo = 100; ammo = 100; maxLife = 10; life = 10; myWeaponHP = 2; } } void frequencyCalculations() { // Works out all the timings needed to give the correct carrier frequency for the IR signal IRt = (int) (500/IRfrequency); IRpulses = (int) (IRpulse / (2*IRt)); IRt = IRt - 4; // Why -4 I hear you cry. It allows for the time taken for commands to be executed. // More info: http://j44industries.blogspot.com/2009/09/arduino-frequency-generation.html#more Serial.print("Oscilation time period /2: "); Serial.println(IRt); Serial.print("Pulses: "); Serial.println(IRpulses); timeOut = IRpulse + 50; // Adding 50 to the expected pulse time gives a little margin for error on the pulse read time out value } void tagCode() { // Works out what the players tagger code (the code that is transmitted when they shoot) is byte1[0] = myTeamID >> 2 & B1; byte1[1] = myTeamID >> 1 & B1; byte1[2] = myTeamID >> 0 & B1; byte1[3] = myPlayerID >> 4 & B1; byte1[4] = myPlayerID >> 3 & B1; byte1[5] = myPlayerID >> 2 & B1; byte1[6] = myPlayerID >> 1 & B1; byte1[7] = myPlayerID >> 0 & B1; byte2[0] = myWeaponID >> 2 & B1; byte2[1] = myWeaponID >> 1 & B1; byte2[2] = myWeaponID >> 0 & B1; byte2[3] = myWeaponHP >> 4 & B1; byte2[4] = myWeaponHP >> 3 & B1; byte2[5] = myWeaponHP >> 2 & B1; byte2[6] = myWeaponHP >> 1 & B1; byte2[7] = myWeaponHP >> 0 & B1; myParity = 0; for (int i=0; i<8; i++) { if(byte1[i] == 1){myParity = myParity + 1;} if(byte2[i] == 1){myParity = myParity + 1;} myParity = myParity >> 0 & B1; } // Next few lines print the full tagger code. Serial.print("Byte1: "); Serial.print(byte1[0]); Serial.print(byte1[1]); Serial.print(byte1[2]); Serial.print(byte1[3]); Serial.print(byte1[4]); Serial.print(byte1[5]); Serial.print(byte1[6]); Serial.print(byte1[7]); Serial.println(); Serial.print("Byte2: "); Serial.print(byte2[0]); Serial.print(byte2[1]); Serial.print(byte2[2]); Serial.print(byte2[3]); Serial.print(byte2[4]); Serial.print(byte2[5]); Serial.print(byte2[6]); Serial.print(byte2[7]); Serial.println(); Serial.print("Parity: "); Serial.print(myParity);
http://www.instructables.com/id/Arduino-Projects/
Serial.println(); } void playTone(int tone, int duration) { // A sub routine for playing tones like the standard arduino melody example for (long i = 0; i < duration * 1000L; i += tone * 2) { digitalWrite(speakerPin, HIGH); delayMicroseconds(tone); digitalWrite(speakerPin, LOW); delayMicroseconds(tone); } } void dead() { // void determines what the tagger does when it is out of lives // Makes a few noises and flashes some lights for (int i = 1;i < 254;i++) { analogWrite(ammoPin, i); playTone((1000+9*i), 2); } analogWrite(ammoPin, ((int) ammo)); analogWrite(lifePin, ((int) life)); Serial.println("DEAD"); for (int i=0; i<10; i++) { analogWrite(ammoPin, 255); digitalWrite(hitPin,HIGH); delay (500); analogWrite(ammoPin, 0); digitalWrite(hitPin,LOW); delay (500); } } void noAmmo() { // Make some noise and flash some lights when out of ammo digitalWrite(hitPin,HIGH); playTone(500, 100); playTone(1000, 100); digitalWrite(hitPin,LOW); } void hit() { // Make some noise and flash some lights when you get shot digitalWrite(hitPin,HIGH); life = life - hp[hitNo]; Serial.print("Life: "); Serial.println(life); playTone(500, 500); if(life <= 0){dead();} digitalWrite(hitPin,LOW); lifeDisplay(); }
http://www.instructables.com/id/Arduino-Projects/
Laser tag and Duino tag: Duino Tag Code Tutorials Miles Tag the DIY laser tag system
Related Instructables
Manhunt! by ELMo_0007
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
--Soldering Iron --Solder --thin nose pliers **Color is optional but use this website to find the right resistor for your leds http://led.linear1.org/led.wiz (I got Green so I used 100 ohm resistors)
Image Notes 1. 64 LED your choice in this case its green 2. PCB but I didn't end up using this one because it was too small so I used a bigger one 3. broken off peace off the 32 male pin header 4. Arduino 5. 64-100 ohm resistors 6. 400 G sand paper 7. My keyboard
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. 100 ohm resistor 2. coloms(+) 1 - 8 3. coloms(+) 9 - 14 4. coloms(+) 15 ,16 5. levels(-) 1 - 4 6. defused LED using sand paper
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. with flash you can still see the defused one but not the normal
Image Notes 1. this = lighting up the LED above it 2. this = dispersing light
Image Notes 1. the resistor 2. LED 3. resistor plased in between the (-) bent down and the (+) bent up.
http://www.instructables.com/id/Arduino-Projects/
4. start wraping the resistor around the (+) leed. 5. when done solder and snip off the end of the LED that is after the solder.
Image Notes 1. LAYER(--) 2. COLOMN (+) 3. LED 4. 100 ohm resistor 5. connections to arduino pins (+) 6. conections to arduino (--)
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. resistor rining from the (+) on the LED to the (+) colom 2. (+) colom runing to the arduino 3. the (--) layer conected to the (--) of the LED
Step 5: PROGRAM
Good job on making it too this step now all you need to do is upload this code and you are done. the code did not fit the line so here it is
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. All finished YAY took me about 4 days 2-5 hours a day to finish and program.
File Downloads
LED_cube_4x4x4.zip (2 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'LED_cube_4x4x4.zip']
Step 6: ADD on
so to program the cube all you need to do is change the B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, B1111, 80, code each B1111 corresponds to a line of LEDs in your cube 0 being off and 1 being on. The last number is the time it will display that part in milliseconds. so get programing and enjoy.
Related Instructables
DIY Funky Nightlight: The 4x4x4 LED Cube LED Cube and Arduino Lib by by AnalogueChick gzip
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
What this project requires: Parts and consumables One perf board (or strip board) Nine bicoloured LEDs, common cathode Nine identical resistors, in the 100-220 ohm range Six identical resistors, in the 10kohm - 500kohm range One single pole, double throw switch A bunch of header pins A bunch of electrical wire One small square sheet of transparent acrylic, ~ 1 mm thick, 8 cm on the side Clear sticky tape Heatshrinks (optional) All of the above are quite common items, total cost should not exceed USD$20. Tools One Arduino setup (Arduino Duemilanove, Arduino IDE, computer, USB cable) Usual electrical tools (multimeter, solder solder gun, wire snips, wire cutter) Everything Arduino related can be found at http://www.arduino.cc. On with the build!
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. This is set HIGH. 2. This is set LOW. 3. This LED lights up.
Image Notes 1. strain relief is essential! 2. protection resistors, about ~100 ohms each. 3. bicoloured red/green common cathode LEDs 4. header pins to go into Arduino
http://www.instructables.com/id/Arduino-Projects/
Note that we're filling the matrix backwards - we start with cell 9, then proceed back down to cell 1. Also, the on-off and colour states are stored as an unsigned integer type (word) instead of a signed integer type. That's because in bit shifting, if we're not careful, we might inadvertenly change the sign of the variable. Attached is the code for lighting up the LED matrix.
File Downloads
LED_matrix.pde (1 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'LED_matrix.pde']
Image Notes
http://www.instructables.com/id/Arduino-Projects/
1. transparent acrylic, with the protective sheet peeled off on one side. On the other side, lines have been drawn as a guide. 2. An easy way to get thin wire is to strip the insulation off a length of multistrand wire, and use the individual strands.
Image Notes 1. Bottom protective sheet is peeled off. 2. Don't forget the strain relief! 3. Inline 674k resistors 4. Connectors to Arduino Image Notes 1. When you get old like me, you'll need this to see the finicky little insulation squares at the intersections. 2. Essential tools for placing the tape. 3. Taped up wire grid.
http://www.instructables.com/id/Arduino-Projects/
File Downloads
wiregridsense.pde (1 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'wiregridsense.pde']
Image Notes 1. Arduino Duemilanove 2. LED matrix connections. 3. Switch between ground and pin 12. 4. Wire grid sensor connections. 5. Tic Tac Toe board, with square cutouts over the intersections and LED positions. A small sheet of tracing paper is placed between the LED matrix and wire grid sheet, to act as a diffuser for the LEDs. 6. Switch.
http://www.instructables.com/id/Arduino-Projects/
File Downloads
tictactoe.pde (8 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'tictactoe.pde']
The program shown here is only a minimal, bare bones version. Many other things can be done with this: 1) Lighting up LEDs three at a time The current code displays only one LED at once. However, with the wiring shown here, it's possible to light up all the LEDs connected to one cathode line at the same time. So, instead of cycling through all the nine positions, all you need to do is cycle through the three cathode lines. 2) Use interrupts to display the LEDs Depending on the LED display routine and the amount of processing, the LEDs may show some degree of flickering. By using interrupts, the timing of the LEDs can be controlled precisely and would lead to a smoother display. 3) A smarter computer player The currrent code takes up only a few kb, leaving quite a bit more for the implementation of a smarter computer tic tac toe player. Hope you've enjoyed reading this instructable as much as I had fun working on it!
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
Make a Web Connected Robot (for about $500) (using an Arduino and Netbook)
by oomlout on November 26, 2008
Intro: Make a Web Connected Robot (for about $500) (using an Arduino and Netbook)
This Instructable will show you how to build your own Web Connected Robot (using an Arduino micro-controller and Asus eee pc). Why would you want a Web Connected Robot? To play with of course. Drive your robot from across the room or across the country, using nothing more than Skype and a web browser (nothing to install on the controlling computer). After that? Dig into the software & adapt it however you like, add a GPS so you can watch where you're driving on a map, add temperature sensors to map temperature gradients in your house, or sonar sensors to add controls on what you're web drivers can and cannot run into. Features: Inexpensive - (~$500 if you purchase all parts new and considerably cheaper if you dig around in your parts bin) Once up and running controlling the robot requires only a web browser - (and Skype if you want to see where you're driving) Open Source and Easily Adaptable - (uses an Arduino micro-controller, Processing for the web server & all software can be run on Linux (all the code is also heavily commented to make jumping in and changing things easy)) Modular Design (not a completely integrated system, if you want to use a different video conferencing service no worries, or if you have a Basic stamp rather than an Arduino just right a small piece of code and slot it in) Here's a quick video of my Web Connected Robot being driven out of the kitchen.
Image Notes 1. A Web Connected Robot - (WEBB) Available in kit form from oomlout.com Image Notes 1. Computer running Skype and a web browser 2. Robot running a web server (written in Processing) 3. Camera 1 4. Camera #2
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. -Servo Robot- Dual servo motor robot 2. -Arduino Micro-controller- Listens for serial commands from the laptop on the robot. It translates these into move commands. 3. -Small Laptop- A small laptop (I used an Asus eee pc). Running a webserver (written in Processing), as well as Skype for video calling 4. -Computer- Connected over the internet or a local network. It downloads a web page from the small laptop and delivers move commands through this. Also running Skype to allow driving via video possible
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Arduino Controlled Servo Robot - (SERB) Available at oomlout.com 2. Asus eee PC 3. Laptop Desk
Image Notes 1. An Arduino Controlled Servo Robot - (SERB) with it's laptop desk attached.
http://www.instructables.com/id/Arduino-Projects/
File Downloads
03-WEBB-ScrollSaw Pattern (le...pdf ((612x792) 22 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to '03-WEBB-ScrollSaw Pattern (le...pdf']
03-WEBB-ScrollSaw Pattern (A4...pdf ((595x842) 22 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to '03-WEBB-ScrollSaw Pattern (A4...pdf']
04-WEBB-Assembly Guide.pdf ((595x842) 885 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to '04-WEBB-Assembly Guide.pdf']
http://www.instructables.com/id/Arduino-Projects/
Copy the code from below. Paste into the Arduino development environment. Upload to your Arduino. Appendix: The Arduino Program
/* * Arduino Controlled Web Connected Robot (WEBB) - Serial Host * For more details visit: http://www.oomlout.com/serb *
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. #1. Click on the comm port your Arduino is connected to 2. #2. Test. click one of the directions to move your robot for half a second in any direction 3. #3. Start the webserver, and visit http://127.0.0.1:12345/ControlPage.html 4. My Computer telling me my hard-drive is full
File Downloads
06-WEBB-Processing Webserver (source files).zip (1 MB) [NOTE: When saving, if you see .tmp as the file ext, rename it to '06-WEBB-Processing Webserver (source files).zip']
06-WEBB-Processing Webserver (windows exe).zip (462 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to '06-WEBB-Processing Webserver (windows exe).zip']
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Type the ip address of the Robot Laptop in here 2. The amount of time you'd like your robot to move (in 100 milli-second increments). Or the percent of speed.
File Downloads
07-WEBB-ControlPage.html (2 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to '07-WEBB-ControlPage.html']
http://www.instructables.com/id/Arduino-Projects/
Step 6: Finished
Well that's it. I hope you're having a fun time driving your robot from a far. If you have any issues with the software or hardware feel free to leave a comment and I'll try and help you out. If you would like to check out more neat projects try visiting: oomlout.com
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
*** UPDATE: A portable version of the Talking Breathalyzer is in the works here http://talkingbreathalyzer.com *** The LED strips are mounted on an outdoor trellace which functions as a lightning simulator, outdoor breathalyzer, graphic equalizer synced to music, and a few other effects with sound. Materials: 8 12v RGB Waterproof Flexible LED Strips 10ft long (usledsupply.com) - $800 8 RGB 4A/Ch Amps (usledsupply.com) - $200 8 RGB 4A/Ch Amps with TTL input (usledsupply.com) - $200 RGB Controller 8 Key Touch (Wall Plate) - $25 1 Arduino Mega - $60 1 Arduino Mega ProtoShield - $15 1 AdaFruit WaveShield - $22 1 Electrical panel enclosure to house the Arduino and LED Strip amps - $30 18-4 cable for wiring the LED strips - $30 2 Power Supply 12v 48W 4A 1 5VDC Power Supply Waterproof Butt Connectors Standard CAT5 wire 2 pairs of Audio Baluns Molex connectors and crimping pins Alcohol Sensor Various switches and two 10K potentiometers Other sensors of your choice Speakers Audio Amplifier or Whole House Audio System Electro-Seal by Ducky (waterproof, flexible rubber coating) - Optional
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Start the Breathalyzer 2. Turn to change the mode from Lightning simulator, Breathalyzer, and Graphic Equalizer 3. Change the Breathalyzer Character/voice 4. Small piece of PVC which is removed and then exposes the alcohol sensor
Image Notes 1. usledsupply.com off the shelf RGB LED strip controller
http://www.instructables.com/id/Arduino-Projects/
Step 2: Digging the Trenches & Running the Power & Audio
I had decided at the beginning I didn't want a lot of wires and power cords showing so I housed the power supplies downstairs in my basement and ran the +12VDC power for the LED strips and +5VDC power for the Arduino Mega over standard sprinkler 18/5 wire (70 foot run). Also ran CAT5 for the audio baluns mentioned in step 1.
Image Notes 1. Ran the +12vDC over 18 gauge 5 conductor sprinkler wire, the power adapters are in the basement
http://www.instructables.com/id/Arduino-Projects/
Image Notes
http://www.instructables.com/id/Arduino-Projects/
1. Picked up the orange wire snaking tool at Home Depot, it was absolutely great. Unlike the traditional fishing wire, this was solid and rigid and add 12 ft was long enough for the runs I needed
Image Notes 1. Audio Baluns 2. 70ft CAT5 run to outdoor controller box
Image Notes 1. Grand Concerto Whole House Audio System (in the basement)
Image Notes 1. Grand Concerto keypad, used to select music tracks from a networked iPod
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Laying down the silicone bead along the trellace
Image Notes 1. +12VDC power supply (2 of them) 2. 8 LED strips 3. butt connectors 4. LED amps
Image Notes 1. Secure the LED strip with a staple or painter's tape.
Image Notes 1. The guys at usledsupply.com were nice enough to pre-cut the strips to the length I needed
http://www.instructables.com/id/Arduino-Projects/
Step 4: Wiring the LED Strips and Sensors to the Arduino Mega
Now the hardest and most time consuming part, wiring up the LED strips and various sensors to the Arduino Mega. I soldered the LED strip and sensors to the Arduino Mega Protoshield for permanent connections. There are a few minor tweaks needed to get the AdaFruit WaveShield to work with the Arduino Mega which is well documented in the AdaFruit support forums. The LED Amps from usledsupply.com came with screw terminals connections as opposed to solder points which is nice for moving things around but a little more work for permanent installations. I also used Molex connectors so the controller board can be removed later for future modifications without the need to cut wires. The RGB amps were secured to a piece of wood using RTV silicon and then the wood board was mounted inside the off the shelf electrical panel (spray painted black). I then ran standard CAT5 cable to the knobs and buttons enclosure in the next step. CAT5 wire is great for this purpose as you get 8 wires in one nice clean run and the wires are color coded already.
Image Notes 1. The finished controller mounted in a standard outdoor electrical panel box
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Arduino Mega with AdaFriut WaveShield (for the sound) 2. Audio Balun 3. To the LED Strips, the Molex connector helped keep things organized 4. LED Strip Amps
Image Notes 1. ProtoShield for the Arduino Mega, I soldered connections here for the Sensors and LED strips
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. these wires in between the trellace beams are pretty much hidden from view unless someone knows to look for them
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. CAT5 and +12VDC power over the 18 gauge sprinkler wire
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Start the Breathalyzer 2. Turn to change the mode from Lightning simulator, Breathalyzer, and Graphic Equalizer 3. Change the Breathalyzer Character/voice 4. Small piece of PVC which is removed and then exposes the alcohol sensor
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
File Downloads
trellace_led.pde (57 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'trellace_led.pde']
Related Instructables
The Digital Light Arduino Kitchen Wand! (video) by Timer by TxPilot anonymouse197
Arduino Examples #1 Make An RGB Led Randomly Flash Different Colors by qazwsx755
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Attach the paperclip with the bell to the servo. Fix it with these cable strippers (what are they called?).
Image Notes 1. attach the small paperclip to the servo arm. Image Notes 1. Bent the paperclip in a way, that small shaking rings the bell.
http://www.instructables.com/id/Arduino-Projects/
Step 3: Schematics
There is no real schematic. Just attach the servo motor to the Arduino. The servo has three wires: yellow or orange: signal red: VCC brown: GND The red and the brown one are attached to the according pins on the Arduino (5V and GND). The orange one is wired to pin 2. It will signal the servo in which direction to turn. You may want to solder small connectors to the wires if the wires do not fit directly into the Arduino or the servo.
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
2. upload 3. serial monitor 4. editor for your sketch 5. debug and status messages.
File Downloads
bells.pde (1 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'bells.pde']
File Downloads
counter.py (484 bytes) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'counter.py']
counterphp.txt (202 bytes) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'counterphp.txt']
http://www.instructables.com/id/Arduino-Projects/
Step 6: Conclusion
It is the first time, that I built something, that has moving parts. That is the first step to bridge the gap between the virtual and the real world. And it was really easy, the code is straight forward. Also most of the parts were in my trash bin, except the bell. Putting everything together and waiting for someone to hit my blog was fun. Hope you enjoyed it.
Related Instructables
xmas-box: Arduino/ioBridge Time-Lapse Photography by internet randofo controlled Christmas lights and music show by noelportugal
http://www.instructables.com/id/Arduino-Projects/
Step 1: Hardware
Obviously, you first must obtain a magnetic stripe reader. I'm using an Omron V3A-4K that I ordered from digikey. It cost me $20.00 or so. If you can't find one of these, any standard TTL reader will do. Don't worry about buying one of the fancy harnesses that they sell. There are breakout pads on the circuit board inside of the reader. Once you have received your reader, pop off the side cover, and solder wires to the pads as shown in the picture. Of course, if you have a different reader, the wiring will probably be different. In this case, consult your reader's datasheet to locate the necessary pads. Next, connect the wires to the Arduino's digital pins as follows: DATA - 2 CLK - 3 LOAD - 5 Finally, connect the +5v and GND to their respective terminals on the Arduino board.
http://www.instructables.com/id/Arduino-Projects/
Step 2: Software
This step is easy. Simply load the attached sketch on to your Arduino. Note: I didn't write this code, I found it here. I've just attached it here for convenience.
http://www.instructables.com/id/Arduino-Projects/
File Downloads
Arduino_Magstripe_Reader.pde (4 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Arduino_Magstripe_Reader.pde']
http://www.instructables.com/id/Arduino-Projects/
File Downloads
magstripe.txt (43 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'magstripe.txt']
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. In case you're wondering, This is the same diagram I used in my app, which is in the iTunes app store, 'Electrical Ref'.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Arduino 2. Breadboard 3. Wire 4. 3.3M Resistor 5. Arduino power cable or a usb cable 6. 7-segment Display 7. 470 Ohm Resistor not pictured
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Goes to pin 5 2. Goes to pin 4 3. Goes to pin 2 4. Goes to pin 3 5. Pin 5 6. Pin 3 7. Pin 4 8. Pin 2 9. Pin 8 10. Pin 7 11. Pin 6 12. Goes to pin 6 13. Goes to Ground 14. Goes to pin 7 15. Goes to pin 8
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. 470 Ohm resistor between ground on the breadboard and the cathode on the display
Image Notes 1. Another wire added 2. ground on the arduino to the side rail on the breadboard 3. This is now ground
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. In case you're wondering, This is the same diagram I used in my app, which is in the iTunes app store, 'Electrical Ref'.
http://www.instructables.com/id/Arduino-Projects/
File Downloads
_7_seg_EMF_detector.pde (6 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to '_7_seg_EMF_detector.pde']
7_seg_EMF_detector.txt (6 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to '7_seg_EMF_detector.txt']
Related Instructables
Charlieplexing 7 segment displays by matseng Make a debug display for microcontrollers by andyk75
7-SegmentDisplay by mertaxoy
Make your own programmable thermostat for $66 with Arduino by dustinandrews
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Intro: Using a Dot Matrix LED with an Arduino and Shift Register
The Siemens DLO7135 Dot matrix LED is one amazing piece of optoelectronics. It's billed as a 5x7 Dot Matrix Intelligent Display (r) with Memory/Decoder/Driver. Along with that memory, it's got a 96-character ASCII display set with upper and lower case characters, a built-in character generator and multiplexer, four levels of light intensity, and it all runs on 5V. That's a lot to live up to, and at $16 a pop, it definitely should. While spending half the day at my favorite local electronics shop I found a bin full of these for $1.50 a piece. I left the store with several. This instructable will show you how to connect to these dot matrix LED's and display characters using an AVR-based Arduino. If you've read any of my previous guides, you may get the idea that I'm often in favor of the most parsimonious solution, and you wouldn't be wrong, even if I do fall short of the goal from time to time. Therefore, I'll also go another step in this instructable and show you how you can reduce the number of I/O ports needed to drive these big, honkin' dot matrix LED's.
http://www.instructables.com/id/Arduino-Projects/
File Downloads
DLO7135.pdf ((612x792) 173 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'DLO7135.pdf']
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Left side connected except for BL0 Image Notes 1. Ground 2. 5V 3. Lamp Test 4. BL1
Image Notes 1. BL0 free floating while I get ready to try the different brightness levels.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. I changed wires from previous pictures to a heavier gauge so they'd stay in. Otherwise, same setup.
http://www.instructables.com/id/Arduino-Projects/
File Downloads
dotmatrixled1.zip (6 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'dotmatrixled1.zip']
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
File Downloads
dotmatrixled.c (1 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'dotmatrixled.c']
Makefile (16 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Makefile']
Step 5: Summary
In this instructable, I have presented the DLO7135 dot matrix LED and how to make it work. I've further, discussed how to reduce the number of required I/O ports from eight to only two using a shift register. The DLO7135 dot matrix LED can be strung together to make very eye catching and interesting marquees. I hope you had fun reading this instructable! If there's any improvements you think I could make or suggestions you'd like to give on this or any of my 'ibles, I'm happy to hear them! Happy AVR'ing!
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
earthshine
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. 74HC164 2. bare bones arduino, the first arduino I have ever owned (since October)
Image Notes 1. there is a lot of companies that make 74xx logic series chips, mine happens to be GoldStar, it could have been TI, phillips or anyone
http://www.instructables.com/id/Arduino-Projects/
1 01 001 0001 00001 000001 0000001 00000001 If your talking to other logic devices who are sharing the same clock and not expecting this, it could cause issues. Latched shift registers have an extra set of memory, so once the data is done entering the register you can flip a switch and show the outputs, but it adds another wire, software, and things to keep up with. In the case of this instructable we are controlling LED displays, the scrolling effect happens so fast you cant see it (except when you very first turn on the chip), and once the byte is in the shift register there is no more scrolling We will be controlling bargraph type, 7 segment, and a 16LED 4x4 dot matrix with this chip and software on the arduino using only 2 digital pins (+ power and ground)
Image Notes 1. there is a lot of companies that make 74xx logic series chips, mine happens to be GoldStar, it could have been TI, phillips or anyone
http://www.instructables.com/id/Arduino-Projects/
Step 3: Projects
Okay, enough lecture and theory, lets do some fun stuff with this chip! There are 3 projects to try in this instructable, the first 2 are easy and can be breadboarded out in moments. The third one, the 4x4 led matrix, requires more time and thought to construct, due to the led wiring. List of parts Project 1: '2 Wire' bargraph LED display controller 1 * 74HC164 Shift register 1 * solderless breadboard 1 * arduino, or arduino compatible (5v) 1 * 330 ohm 1/4 watt resistor 8 * normal output red LED's 12 * jumper wires Project 2: '2 Wire' 7 segment display controller 1 * 74HC164 Shift register 1 * solderless breadboard 1 * arduino, or arduino compatible (5v) 1 * 330 ohm 1/4 watt resistor 1 * common cathode seven segment display 9 * jumper wires Project 3: '2 Wire' 4x4 led matrix display 1 * 74HC164 Shift register 1 * arduino, or arduino compatible (5v) 4 * 150 ohm 1 1/4 watt resistor 8 * 1Kohm 1/8 watt resistor (or larger) 8 * NpN transistor (2n3904 or better) 16 * normal output red LED's a means to construct it and regulated 5 volt power that can handle 160+ma (you can turn on all the LED's at once like a brake light)
http://www.instructables.com/id/Arduino-Projects/
Step 4: Project 1[pt 1]: '2 Wire' bargraph LED display controller hardware
Hook up the arduino and shift register according to the schematic, I already have a 10 segment bargraph display ready for breadboard use and that is what you will see in the image, but you can do the same thing with individual led's On the second page I stated that these were not driver devices, that they were logic devices, with tiny amounts of current able to pass through them. In order run 8 LEDs, while keeping the circuit simple, and not cooking the shift register, requires that we limit the current quite a bit. The LED's are wired in parallel and share a common ground (common cathode), before going into the power supply ground they need to pass through a 330 ohm resistor, limiting the total amount of current that all the LED's could possibly use to 10ma (at 5 volts) This leaves the LED's in a sickly looking state but they do light up and thus serve for this example, in order to drive the LED's at their proper current you will need to insert a transistor where the shift register can turn on / off a higher current source (see project 3) The Data pin of the shift register (pin 2) needs to connect to arduino digital pin # 2 The Clock pin of the shift register (pin 8) needs to connect to arduino digital pin # 3
http://www.instructables.com/id/Arduino-Projects/
Step 5: Project 1[pt 2]: '2 Wire' bargraph LED display controller software
Example 1: Open the file " _164_bas_ex.pde" Inside the arduino IDE, Its a simple sketch that just lets you define on or off LED's in the bargraph display The first 2 lines define the pin numbers we will be using for data and clock, I use #define over const integer, I find it easier to remember, and there is no advantage to one or the other once compiled #define data 2 #define clock 3 next is the void setup function, it only runs once, so the arduino turns on, sets the shift register and has nothing else to do. Inside the void setup function we set the clock and data pins as OUTPUT pins, then using the shiftOut function we send the data to the shift register void setup() { pinMode(clock, OUTPUT); // make the clock pin an output pinMode(data , OUTPUT); // make the data pin an output shiftOut(data, clock, LSBFIRST, B10101010); // send this binary value to the shift register } In the shiftOut function you can see its arguments data is the data pin, clock is the clock pin LSBFIRST refers to what order its in, when writing it out in binary notation (Bxxxxxxxx) the 7th element past the B is the Least Signifigant Bit First, this is fed in first so it ends up on the last output once all 8 bits are fed in B10101010 is the Binary value being sent to the shift register, and it will turn on every odd light, try playing with different values to turn on or off different patterns and finally a empty void loop (because you need one even if your not using it) void loop(){} // empty loop for now Example 2: the first 8 lines are the same as the first 8 lines of the first example, in fact they will not change for any of the other projects, so
http://www.instructables.com/id/Arduino-Projects/
#define data 2 #define clock 3 void setup() { pinMode(clock, OUTPUT); // make the clock pin an output pinMode(data , OUTPUT); // make the data pin an output But now in void setup there is an 8 count for loop, its taking an empty byte and shifting 1 bit in at a time starting from the leftmost bit and moving right. This is backwards from the first example where we started from the rightmost bit and worked left, but using MSBFIRST the shift out function sends the data the correct way Also we add a delay in the for loop so it slows down enough to be visible. for(int i = 0; i < 8; ++i) //for 0 - 7 do { shiftOut(data, clock, MSBFIRST, 1 << i); // bit shift a logic high (1) value by i delay(100); // delay 100ms or you would not be able to see it } } void loop(){} // empty loop for now upload the script and you should now see the bargraph light up each light one at a time
Image Notes 1. notice the lights match our binary pattern of B10101010
File Downloads
_164_bas_ex.pde (296 bytes) [NOTE: When saving, if you see .tmp as the file ext, rename it to '_164_bas_ex.pde']
_164_bas_ex_2.pde (411 bytes) [NOTE: When saving, if you see .tmp as the file ext, rename it to '_164_bas_ex_2.pde']
http://www.instructables.com/id/Arduino-Projects/
#define data 2 #define clock 3 Next we set all of the charater patterns in binary, this is pretty easy, look at the drawing below, if you need the middle segment type in a one, next do you need the top segment, if so type in another one, keep doing this until you cover all 8 segments, notice my rightmost bit (bit 8) is always 0, thats becuase i never turn on the decimal point. byte zero = B01111110; byte one = B00000110; byte two = B11011010; byte three = B11010110; byte four = B10100110; byte five = B11110100; byte six = B11111100; byte seven = B01000110; byte eight = B11111110; byte nine = B11110110; next in void setup we set our data and clock pins to outputs void setup() { pinMode(clock, OUTPUT); // make the clock pin an output pinMode(data , OUTPUT); // make the data pin an output3 } then in void loop we use shiftOut to display each pattern (number) wait 1/2 a second and display the next, 0 to 9, since its being done in the void loop function it will count 0-9 and repeat forever. void loop() { shiftOut(data, clock, LSBFIRST, zero); delay(500); shiftOut(data, clock, LSBFIRST, one); delay(500); shiftOut(data, clock, LSBFIRST, two); delay(500); shiftOut(data, clock, LSBFIRST, three); delay(500); shiftOut(data, clock, LSBFIRST, four); delay(500); shiftOut(data, clock, LSBFIRST, five); delay(500); shiftOut(data, clock, LSBFIRST, six); delay(500); shiftOut(data, clock, LSBFIRST, seven); delay(500); shiftOut(data, clock, LSBFIRST, eight); delay(500); shiftOut(data, clock, LSBFIRST, nine); delay(500); }
File Downloads
seven_seg_demo.pde (1 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'seven_seg_demo.pde']
http://www.instructables.com/id/Arduino-Projects/
Step 7: Project 3[pt 1]: '2 Wire' 4x4 led matrix display
The 4x4 LED matrix project is quite a bit more complex, but it is almost all in construction, I choose to make mine soldered on perfboard, but it should be possible to replicate on a breadboard , just a lot more spaced out. The circuitry also differs in that the shift register is not directly driving the led's, instead the shift register outputs are sent through a 1Kohm resistor to the base of a NpN transistor, when the output of the bit is high, it lets enough current and voltage pass into the transistor to switch the connection tween the collector and emitter, the collectors are tied to a "sturdy" regulated 5 volts. The emitters of the transistors are connected to 150 ohm resistors and the resistors are tied to the annodes of 4 led's in a row and limits the row to 20ma, although when drawing images on the display only 1 led is on at a time, and therefore near full brightness (near becuase they switch on and off really fast to make up the whole image) There are 4 rows and 4 columns, each row gets a resistor and a transistor, on each column the LED's cathodes are tied together, ran into the collector of a transistor, whose base is also controlled by the shift register, and finally out to ground. Large version of schematic www.instructables.com/files/orig/F7J/52X0/G1ZGOSRQ/F7J52X0G1ZGOSRQ.jpg
Step 8: Project 3[pt 2]: '2 Wire' 4x4 led matrix display
The shift register controls both the anode and the cathodes of the LED's in a YX format, look at the following bit 1 = column 1 (rightmost) bit 2 = column 2 bit 3 = column 3 bit 4 = column 4 bit 5 = row 1 (topmost) bit 6 = row 2 bit 7 = row 3 bit 8 = row 4 To make an image draw out a 4x4 square on graph paper and fill in which ones you want displayed, next make a YX table. Below you will see a mapping for a simile, well as best one can do on 4x4 "pixels" For each filled in section I write down which column (Y) it is in, then which row it is in (X) Now open up the _4x4.pde file in the arduino IDE you will see our old 2 friends #define data 2 #define clock 3 then a array of integers int img[] = {1,1,4,1,1,3,4,3,2,4,3,4}; If you look its just a list of my written down YX coordinates, it would be a big pain in the butt to convert those values by hand, and we have a computer ... let it do it! Moving on there is void setup where we make our clock and data pins OUTPUTS void setup() { pinMode(clock, OUTPUT); // make the clock pin an output pinMode(data , OUTPUT); // make the data pin an output3 } And a confusing looking void loop, to start things off we need to declare some local variables void loop() { int Y;
http://www.instructables.com/id/Arduino-Projects/
int X; byte out; Then a for loop, this loop needs to be as long as the amount of entries in the img array, for this image I only used 6 pixels, so that makes 12 YX coordinates. I make it skip every other number by using i +=2, because we read 2 coordinates per loop for(int i = 0; i < 12; i += 2) // number of points in the img array, this case 12 { Now we read the Y entery at [i] in the array, and subtract one from its value, because bytes don't start at one, they start at zero, but we counted from 1 // get the first pair of YX cords Y = (img[i] - 1); // subtract one since the bit count starts at 0 Next we read the X entery at [i + 1] in the array, and subtract one from its value, because of the same reason X = (img[i+1] - 1); After we have the YX values of the pixel, we do some bitwise or math and shifting to the left. First we need to read the X value, and whatever its value is shift it that many places + 4 left, so if X is 4 and add 4 it is bit 8 (MSB), looking at the chart again ... bit 1 = column 1 (rightmost) bit 2 = column 2 bit 3 = column 3 bit 4 = column 4 bit 5 = row 1 (topmost) bit 6 = row 2 bit 7 = row 3 bit 8 = row 4 Bit 8 is the last row Next the Y value is also shifted to the left, this time just by its self, nothing added on. Finally the two are or'ed together into 1 byte instead of 2 half bytes (nibbles), using bitwise or (the symbol | ) takes two bytes and basicly adds them together, lets assume X = 10000000 Y = 00000001 -------------------OR =10000001 row 4 column 1 out = 1 << (X + 4) | 1 << Y; And finally shiftOut to display the current picture, and keep doing that until we have no more data in the array ... delay a moment and loop forever, since we were shifting data to the left and we need the MSB to be on the last output pin of the shift register send it out first. shiftOut(data, clock, MSBFIRST, out); // shift the byte out to our register delay(1); // delay it abit so it has a chance to leave a spot of light in your eyes Feel free to make your own images, and effects, There are 3 sample files, the smiley face and a checkerboard (which looks more like stripes), and finally a random sparkle maker
http://www.instructables.com/id/Arduino-Projects/
File Downloads
_4x4.pde (884 bytes) [NOTE: When saving, if you see .tmp as the file ext, rename it to '_4x4.pde']
_4x4_rnd_sparkle.pde (570 bytes) [NOTE: When saving, if you see .tmp as the file ext, rename it to '_4x4_rnd_sparkle.pde']
_4x4_chx.pde (892 bytes) [NOTE: When saving, if you see .tmp as the file ext, rename it to '_4x4_chx.pde']
Step 9: Conclusion
Over all this is a pretty handy little chip, and I am glad I scrapped it off of a old piece of electronics headed to the trash. It can be used for other things besides display systems, but everyone likes lights and the instant feedback of seeing whats going on is extremely helpful for the visual thinkers like I. Also please forgive my code, I have only had the arduino since bout the third week of October, and its been a pretty big crash course. But that's the great thing about the system, if you sit down and work with it, its full of neat features that make controlling the world with an 8 bit microcontroller quite easy to do. As always questions and comments are most welcome, and thanks for reading, I hope you learned a lot
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. 74HC164 2. bare bones arduino, the first arduino I have ever owned (since October)
Image Notes 1. there is a lot of companies that make 74xx logic series chips, mine happens to be GoldStar, it could have been TI, phillips or anyone
Related Instructables
Arduino Target Make a debug Practice by display for Using a Dot microcontrollers Matrix LED with sebtiger an Arduino and by andyk75 Shift Register by nevdull
Decaplexing by jazzzzzz
http://www.instructables.com/id/Arduino-Projects/
Step 1: Supplies
. Get your supplies. You need: -- LilyPad Arduino main board -- FTDI connector -- mini USB cable -- LilyPad power supply -- 16 LilyPad LEDs (note: these aren't available from SparkFun yet, but will be soon) -- 2 push button switches -- a spool of 4-ply conductive thread -- a digital multimeter with a beeping continuity tester. This is the one I have. -- a garment or a piece of fabric to work on -- a needle or two, a fabric marker or piece of chalk, puffy fabric paint, a bottle of fabric glue, and a ruler (Available at your local fabric shop or Joann Stores .) -- a pair of scissors -- double sided tape (optional) -- a sewing machine (optional)
http://www.instructables.com/id/Arduino-Projects/
disclosure: I designed the LilyPad, so I'll make some $ if you buy one.
Image Notes 1. conductive thread and needle 2. chalk for drawing on fabric 3. LilyPad Arduino main board, power supply and USB link 4. LilyPad LEDs 5. switches 6. fabric glue 7. mini USB cable (like the one for your camera)
Step 2: Design
. Plan the aesthetic and electrical layout of your piece. Decide where each component is going to go and figure out how you will sew them together with as few thread crossings as possible. Make a sketch of your design that you can refer to as you work. The photos below show the sketches for my jacket. Stitching for power (+) is shown in red, ground (-) in black, LEDs in green, and switch inputs in purple. Important note about the power supply As you design, plan to keep your power supply and LilyPad main board close to each other. If they are too far apart, you are likely to have problems with your LilyPad resetting or just not working at all. Why? Conductive thread has non-trivial resistance. (The 4-ply silver-coated thread from SparkFun that comes with the LilyPad starter kit has about 14 ohms/foot.) Depending on what modules you're using in your construction, your LilyPad can draw up to 50 milliamps (mA) of current, or .05 Amps. Ohm's law says that the voltage drop across a conductive material--the amount of voltage that you lose as electricity moves through the material--is equal to the resistance of the conductive material times the amount of current that is flowing through it. For example, if your LilyPad is a foot away from the power supply, the total resistance of the conductive material that attaches your LilyPad to your power supply is about 28 ohms. (14 Ohms in the conductive thread that leads from the negative terminal of the power supply to the negative petal on the LilyPad and 14 Ohms in the conductive thread that ties the positive terminals together). This means we can expect a drop of 1.4 Volts (28 Ohms * .05 Amps.) This means that while 5 Volts is coming out of the power supply, the LilyPad will only be getting 3.6 Volts (5 Volts - 1.4 Volts). Once the voltage at the LilyPad drops below about 3.3 Volts, it will reset. The resistance of the traces from + on the power supply to + on the LilyPad and - on the power supply to - on the LilyPad should be at most 10 Ohms. Plan the distance accordingly. If all of this was confusing, don't worry! Just keep the LilyPad and power supply close to each other in your design. Transfer the sketch to your garment. Use chalk or some other non-permanent marker to transfer your design to the garment. If you want, use a ruler to make sure everything is straight and symmetrical. Use double sided tape to temporarily attach LIlyPad pieces to your garment. This will give you a good sense of what your final piece will look like. It will also keep everything in place and, as long as the tape sticks, make your sewing easier.
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. trimming the battery posts off the power supply.
Image Notes 1. sewing on the + petal of the power supply. notice how I'm sewing through the hole from the front instead of the back, which is much harder.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. notice how dense my stitching is here. this is what your stitches should look like.
Image Notes 1. a glued and trimmed knot. knots without glue will come unraveled quickly.
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
digitalWrite(rightSignal, LOW); // turn the right signal off delay(1000); // wait for 1 second } If your layout is the same as mine, you can just copy and paste this program into your Arduino window. If your turn signals don't work, use your multimeter (and the instructions from the last step) to test for shorts or bad connections and make sure that your program matches your physical layout. insulate your turn signal stitches Cover your traces with puffy fabric paint. Remember, you don't want to cover traces until you're sure that everything works ! Use good judgment in when to coat traces.
Image Notes 1. stitching in process, outside view: 3 + petals are sewn together
Image Notes 1. these 2 middle traces are the negative (-) traces for all of my turn signal LEDs. these traces are attached to petal 10 on my LilyPad 2. this is the stitching for the positive (+) leads of my right turn signal LEDs. (Since this is an inside view, everything is reversed.) These traces lead to petal 11 on my LilyPad.
Image Notes 1. my finished right turn signal. notice how my stitching doesn't come through to the outside of the garment.
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. the first trace from my left switch is finished. this is the switch input trace that is tied to petal 6 on the LilyPad. I just have to glue and trim the knot. 2. these are the stitches that lead from the power supply to the LilyPad. 3. these are my left turn signal stitches. I have a knot to glue and trim on these too. 4. you might have noticed that I didn't insulate my traces. you too can leave them uninsulated, but be aware of shorts from folding/bending whenever you're not wearing the jacket! especially when you are programming and troubleshooting.
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
Together, the Android G1 and Arduino board allow you to use inexpensive electronics such as simple servos and sensors, to build powerful devices such as robots, remote telepresence, or fun toys for kids. More information at Cellbots.com . Notice: This project currently requires an Android G1 with root access to use serial output from the phone to the Arduino robot. You can add a $20 BlueTooth module to your Arduino board to have the phone talk to it over serial BlueTooth if you want to use the commercial Android software. Special thanks: We have the Hacker Dojo in Mountain View, CA to thank for putting us in touch, helping with some tricky issues via their mailing list of awesome members, and for having 74LS04 chips in stock. Most of the assembly was done at the Tech Shop in Menlo Park.
Image Notes
http://www.instructables.com/id/Arduino-Projects/
1. Goes to nothing
Image Notes 1. Freeduino SB 2. Breadboard 3. HTC USB and phone off screen in this direction
Image Notes 1. This goes to pin 8 on the HTC USB board 2. Goes to pin 8 ground on HTC USB board 3. 5v power to the Arduino is at the other end of the breadboard and not in this picture 4. 5v Power 5. Jump pins 2 and 3 together 6. Connects to the RX pin 0 on the Arduino 7. Ground 8. Connects to ground on the Arduino at the other end of the breadboard out of this picture
Image Notes 1. These two are not used during this tutorial but I used them when testing serial to USB from the other linked instructable 2. Pins 7 and 8 are used to connect to your breadboard
http://www.instructables.com/id/Arduino-Projects/
- Arduino development environment - (optional) Serial client for your PC (I'm also using PuTTY on Windows for this) - (optional) Android SDK If you can follow instructions you can complete this tutorial with little knowledge of Python , Arduino, Android, or electronics. You'll want to know those things if you want to go beyond a blinking LED but this will get you started.
Image Notes 1. The TX0 pin of the HTC USB board connects here 2. Connect these two togther 3. This does to the RX pin 0 on the Arduino 4. Connect to ground 5. Connect to the 5v power from the Arduino
Image Notes 1. You can scan this with a barcode reader to download the apk file. Or go to the official project site.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Use ddms from the Android SDK to take screen shots from your phone (among other tricks) 2. Use adb shell from the Android SDK to execute commands from the PC instead of typing them into the phone. 3. I used PuTTY on Windows to telnet into the phone.
Image Notes 1. We use the Android Dev Phone 1, also known as the G1 in this tutorial but ADP2 should also work in theory.
http://www.instructables.com/id/Arduino-Projects/
Then you can run the Python script from the Android Scripting edit in the next step and it will have access to send serial output.
Image Notes 1. We use the Android Dev Phone 1, also known as the G1 in this tutorial but ADP2 should also work in theory.
Image Notes 1. If you don't see this the phone does not have serial out enabled.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. You can scan this with a barcode reader to download the apk file. Or go to the official project site.
Step 4: Copy and run the cellbot.py script to launch the Python program
This tutorial uses a Python script to be the "brains" of the robot. Get the latest code from our open source Google Code project . You only need the cellbot.py file but others may help with various things you want to explore. I simply plugged the phone into my PC's USB connection and mounted the drive before copying the file to /sdcard/ase/scripts. The program creates an open socket connection to accept an incoming telnet session. It also prints the received commands to the screen while sending them out the serial port. Put this file on the phone's SD card in the /ase/scripts/ directory. Detailed steps to load and run the scripts: 1. Copy the cellbot.py script to the SD card's /ase/scripts/ directory 2. Be sure to dismount the SD card from your PC if you copied them that way since the phone can't access the files at the same time your PC is. 3. Open the Android Scripting Environment app 4. Click on cellbot.py to launch it You should see a confirmation that the device is ready at this point to accept incoming telnet sessions on port 9002. Tip: Be sure to run the "chmod 777 /dev/ttyMSM2" command from step #3 first. See step #5 for finding the phone's IP address.
Image Notes 1. This is where the received commands get sent out the serial port
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
5. Use a wire to connect pin 2 and 3 of the chip 6. Connect pin 4 of the chip to the Arduino RX point (pin 0 on the Freeduino SB and Arduino Duemilanove) 7. Connect pin 7 (GND) on the chip to the ground for your breadboard (which also connects to the Arduino ground) 8. Connect pin 14 (VCC) to the 5v power on your breadboard (which gets the power from the Arduino 5v output) You should now be ready to plug in the HTC USB break-out board into the bottom of the phone and power on the Arduino. Check for sparks and smells and touch things to make sure they are cool. Note: The current cellbot code turns on LED #13 when the servo motors of the robot should be running. If you don't have a robot yet you can check to see that the LED turns on and off to confirm it is working.
Image Notes 1. This goes to pin 8 on the HTC USB board 2. Goes to pin 8 ground on HTC USB board 3. 5v power to the Arduino is at the other end of the breadboard and not in this picture 4. 5v Power 5. Jump pins 2 and 3 together 6. Connects to the RX pin 0 on the Arduino 7. Ground 8. Connects to ground on the Arduino at the other end of the breadboard out of this picture
Image Notes 1. These two are not used during this tutorial but I used them when testing serial to USB from the other linked instructable 2. Pins 7 and 8 are used to connect to your breadboard
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Freeduino SB 2. Breadboard 3. HTC USB and phone off screen in this direction
Image Notes 1. 5v power 2. Ground 3. Connects to pin 4 on 74LS04 chip 4. Optional - connects to external LED but the onboard LED would suffice for this tutorial. 5. I'm using external 9V power but you could use another voltage in the Arduino's 7-12v range, or use power over USB (but that doesn't demonstrate the coolness of being disconnected from the PC) 6. USB plugged in during this picture but unplugged when fully running.
Image Notes 1. The TX0 pin of the HTC USB board connects here 2. Connect these two togther 3. This does to the RX pin 0 on the Arduino 4. Connect to ground 5. Connect to the 5v power from the Arduino
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. You should be able to control the LED from the Arduino serial monitor without having the phone plugged in. Image Notes 1. Type commands in here to test sending ASCII characters over serial to the Arduino
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Use ddms from the Android SDK to take screen shots from your phone (among other tricks) 2. Use adb shell from the Android SDK to execute commands from the PC instead of typing them into the phone. 3. I used PuTTY on Windows to telnet into the phone.
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Hopefully after reading this instructable you will be able to take your first step into robotics. Ard-e cost about $90 to $130 depending on how much spare electronics you have lying around. The main costs are: Arduino Diecimella- $35 https://www.makershed.com/ProductDetails.asp?ProductCode=MKSP1 Bulldozer kit- $31 http://www.tamiyausa.com/product/item.php?product-id=70104 Servo- $10 I got mine at a local hobby store Worm gear Motor- $12 http://www.tamiyausa.com/product/item.php?product-id=72004 Various other Electronics- around $10 radioshack or digikey.com Sensors- anywhere from 0 dollars to $28 depending on how many you want and how extensive your pile of junk electronics is So with spending around $100 you get a remote control robot with a pan and tilt system that could be used to aim a camera, a hacked airsoft gun ( http://inventgeek.com/Projects/Airsoft_Turret_v2/Overview.aspx ) or you could attach a laser to it because thats what you have lying around. If you wanted to be really cruel you could attach a dvd laser to it and burn whatever you wanted ( http://www.youtube.com/watch?v=CgJ0EpxjZBU ) In addition to making the pan and tilt system that is remote controlled you can also buy about three dollars worth of chips, attach sensors to Ard-e and make him fully autonomous. For around a hundred dollars you can build your own robotics system that has most of the functionality of a roomba or a lego-mindstorms robot: It can sense when it bumps into something be programmed to avoid what it bumps into, it can follow the brightest light, smell pollutants, hear sounds, know precisely how far it has gone, and be controlled by an old recycled remote control. All of this for about half of the price of commercial units.
This is my entry into the RobotGames robot contest so if you like it make sure to vote for it! Note- Originally I was going to enter the remote controlled version only as my entry to the contest but since the deadline was pushed back Im gonna show you how to make Ard-e run himself. So on to how to build Ard-e
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. left wheel sensor 2. right wheel sensor 3. crazy jumble of wires. 4. touch sensors 5. right eye 6. left eye 7. The autonomous version of Ard-e
Image Notes 1. bulldozer kit base 2. Arduino Decimilla 3. pan and tilt system 4. remote control
Image Notes 1. laser power supply 2. tilt servo 3. panning gear box
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. plow parts that i didnt use 2. instructions 3. handy pocket knife 4. the remote control 5. motors, gears, shafts and screws 6. Chassis 7. how its supposed to look 8. wheel parts 9. important plastic pieces that I forgot what they do...
Image Notes 1. The motor you want to control with the DPDT switch 2. poles 3. poles 4. the throw connected to your voltage source
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Attachment jerry rigged to hold the servo 2. panning motor worm gear box 3. screws installed to mount the gear box
Image Notes 1. Tilt servo 2. A very professional duct tape mounting of the servo
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. the AA's that power Ard-e 2. testing the DPDT switches control of the panning motor 3. The DPDT switch is mounted on the cover of the Controller and the wires run out of a hole in the back. 4. orange electrical tape- adding a little style to Ard-e
Image Notes 1. aluminum mounting piece 2. scrap wood add on 3. almost all of the wires that will run to the controller
Image Notes
http://www.instructables.com/id/Arduino-Projects/
1. potentiometer to control servo 2. DPDT switch to control the panning motor 3. DPDT switches to control the driving motors 4. hole cut to run wires out of
Image Notes 1. plug from an old transformer soldered to the clip from an old nine volt battery
Image Notes 1. testing the first controller configuration 2. having different colored wires helps to keep from confusing yourself in the jumble of wires
Image Notes
Image Notes
http://www.instructables.com/id/Arduino-Projects/
1. first configuration that didnt work very well 2. an essential to any project
Image Notes 1. the Arduino mounted on the back of the controller = bad
Image Notes 1. the Arduino duct taped to the side of Ard-e = Good 2. a pretty cool remote control but lets get rid of it...
http://www.instructables.com/id/Arduino-Projects/
digitalWrite(dira2Pin, HIGH); digitalWrite(dirb2Pin, LOW); delay(1000); // stop for a second val=0; analogWrite(enablePin, val); analogWrite(enable2Pin, val); delay(1000); } So to test this out on Ard-e I ended up putting a breadboard onto the addition that had previously held the pan and tilt system. I also moved the Arduino right next to the breadboard for easy prototyping. I also had to add another two AA batteries so the the L293 would have the 6V it needs to power the motors. Heres a quick video of Ard-e running this program. One of the motors spins faster than the other so he veers towards the camera near the end of it. I don't really know why this happens...
So once you write all of the code and rearrange the components to make the Arduino boss around the L293 and get those pesky DC motors under control Ard-e's possible uses increase dramatically. All you need now are some sensors.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. two 3V AA battery packs connected in series to get the 6V needed to power the L293 2. Arduino decimilla 3. crazy jumble of wires 4. L293 on a breadboard for easy prototyping
Image Notes 1. I took this picture to maybe help with the wiring but it probably will just confuse you... just go by the the L293 data sheet. 2. My brothers dog apparently likes to chew on 9V batteries.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. pile of old junk? or Ard-e's new sensors? 2. Frisbees should never be put in a junk pile.
Image Notes 1. IR led emitter and detector 2. IR emitter and detector 3. Three push button switches and an IR emitter/ detector
Image Notes 1. push button switches with leads soldered on... soon to become a touch sensor
Image Notes 1. lovely piece of scrap metal that will be the housing of the switches
Image Notes 1. after alot of cutting folding and some drilling you get this nice looking touch
http://www.instructables.com/id/Arduino-Projects/
sensor
Image Notes 1. bent piece of wire that is the sensors axle 2. the original plans for the touch sensor
Image Notes 1. pushbutton switch mounted onto the scrap metal touch sensor
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. 9V battery separating the light sensors 2. Ard-e's left eye 3. Ard-e's right eye
Step 7: Ard-e's sense of hearing and smell: interfacing an old speaker and a VOC sensor with an Arduino
So to give Ard-e the final two senses that he really needs, hearing and smell, all you need is an old speaker and a Volatile Organic Compound sensor. So to make Ard-e hear the world and react very simply to it all you need is an old headphone. Just as a headphone can turn electrical pulses into sound it can turn sound into electrical pulses. All you need to do is hook one of the leads from the headphone to ground and one of them to an analog input on the Arduino. The program to very simply interface this with the Arduino is to make a threshold that is set very low maybe like 2 or 5 and if the analog input is driven higher than this threshold make Ard-e react. You can implement it like the clapper where clapping makes him turn on or off. I was able to use an old headphone in the very preliminary stages of making Ard-e to act as a clapper but by the time that I got Ard-e up and running by himself the headphone no longer functioned as a microphone so I didn't actually make Ard-e interface with it. The microphone/ headphone was proven to work as an input to the Arduino though. To get finer resolution on Ard-e's ability to hear you might want to use an OPAMP based inverting amplifier with an adjustable gain. I attached a schematic of a circuit that I think would work ideally for this but I didn't test it out so be careful if you choose to attach it to your Arduino. To get Ard-e to smell is a little pricey though. All it takes is a VOC sensor hooked up to an analog input of the Arduino. The sensors run around $22 a piece though. I'm now going to link you to an instructable that my brother wrote about how to use these sensors with the Arduino but be warned... he never wears a shirt and is sorta a tool. Follow the link with caution: http://www.instructables.com/id/How-To-Smell-Pollutants/ Once this sensor is attached to the Arduino its a simple matter to write a program that makes it drive to where the concentration of VOC's is the highest and set off an alarm. To easily make an alarm for the Arduino all that I did was take apart an old broken alarm clock take the piezo-electric buzzer and attach it to one of the digital PWM output pins. A simple call of analogWrite(the pin, and a value from around 10-255) produces a very nice alarm noise. So now Ard-e can see, smell, touch and hear the world around him. He can even produce tones too. These are all really important senses but robots need some other senses that humans don't necessarily need. Lets build Ard-e some sensors so he can have some robot senses.
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. piezo buzzer that is just begging to be used to give Ard-e a voice 2. LED display that would be cool to use 3. Cool looking transformer that I am pretty sure I'm not gonna use on Ard-e at all... 4. Whats the third wire for?
Step 8: Ard-e's robot senses: tracking how far his wheels turn and seeing IR light
Since humans don't have wheels their is really no need for us to be able to track how far our wheels have turned. Ard-e being a wheel based robot however needs to know this. To accomplish this you can employ many different methods. An instructable was just submitted for this contest that takes the data from an accelerometer then extrapolates the distance from that. For Ard-e however all we are going to need is an LED and another light sensor. We just need to shine a led through his tracks and then have a light sensor on the other side count how many times the light changes from high to low. Once you have a count on this number you can measure the distance between holes in the tread and correlate this to a distance. Or you could just set Ard-e to drive for a number of counts of the light switching from high to low then measure the distance that he traveled to get the conversion factor from counts to inches (or centimeters if you like working in SI). Then you can literally program Ard-e to go exactly six feet forward turn right go forward a foot or any other course you want it to take. To actually build the sensor I used my trusty piece of scrap metal and folded a rectangular piece of it into a U shape. I drilled a hole to mount it into the side of Ard-e and then two holes for the led and the light sensor to fit into. I mounted it onto Ard-e so that the led shines right through the center of the holes in the treads onto the light sensor. I put the light sensor on the top part of the U and then put some electrical tape around the sides of the U to block out some of the ambient light that would mess up the readings of the light sensor. I then connected the light sensors just like I connected them for making Ard-e sense where the brightest light is, as a voltage divider to an analog input (using the same input pins and resistors as the "eyes" of Ard-e). The led was soldered to a resistor sized to enable it to run off of 5V and then plugged
http://www.instructables.com/id/Arduino-Projects/
into the power being supplied by the Arduino. Just by moving the wheel manually and watching the values that the Arduino outputs using the Serial.print() command to the serial monitor you can get a 600 point swing on the scale of 0-1023. The low is around 200 and the high is around 800. I attempted to write a program that uses 400 as the cutoff for a low to high value and counted the times it switched from below to above 400 but it was beyond the scope of my programming abilities. I think it was because i was using too slow of a speed on the serial printing and checking of the values of both sensors and the treads were being spun pretty fast. When I tried to use a higher speed it wouldn't print at all. In retrospect I don't even need to have the values printed. I wasn't able to get the Arduino to correctly read the values coming from the sensors as the wheels were spinning but I demonstrated that it was possible to use this sensor to count the number of times that the tread interrupted the light from the LED to the light sensor. And if your a better programmer than I am you could convert this number to a distance and program Ard-e to drive to that distance. Another of Ard-e's robot senses that would be awesome for him to have is being controlled by an old VCR remote. I found a remote in the old pile of electronics junk and found a infrared Radiation sensor at Radio Shack. All that you would need to do is hook the infrared sensor up to the +5V and Ground and then the output to an analog input on the Arduino, just as it says on the back of the box for the sensor. Again if your a much better programmer than I am you could then program the Arduino to recognize the IR signal from the remote and correlate it to making Ard-e move. If the up arrow on the remote is pressed make Ard-e drive forward, if the down arrow on the remote is pressed go backwards, etc. I bought the sensor from radio shack but haven't been able to get the Arduino to interface with it it yet. So now Ard-e's senses are complete! Or at least as complete as I can make them. You on the other hand should get started recycling some old junk to add on as sensors for your own version of Ard-e. Now whats next for Ard-e?
Image Notes 1. left wheel sensor 2. right wheel sensor 3. crazy jumble of wires. 4. touch sensors 5. right eye 6. left eye 7. The autonomous version of Ard-e
Image Notes 1. The holes in the treads limit the accuracy of the distance that you can tell Ard-e to drive to.... if you know how to program better than i do
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. $4 joystick that i might use to make another remote controlled version of Ard-e
Related Instructables
Homemade stretchsensors for robotic apps, made from conducting foam. (video) by renaissanceman
Cheap, Easy Robotics for the NonProgrammer by doctek (w/ Video) Basic Arduino Robot, Light Seeker! by Chowmix12 Paper lamp + touch on/off mechanism with Arduino by celguero Arduino Robot (video) by c0ffeepowder
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. The rough draft. As you can see, its is just the general dimensions. I want to emphasize that the project contains a certain amount of trial and error, but the next step will help you make less mistakes.
Image Notes 1. Exact 1:1 to the initial design, but I did realize that more material could be saved if this middle section is removed.
Image Notes 1. The most important thing here is to have the axis of rotation to be at the center of the circled tray. You can adapt this to a larger tray if needed, just make sure your servo and servo arm could handle the torque and range.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. The shot holder size and location was determined here. You will have to adjust for it accounting to the type of shot glass you want to use.
Image Notes 1. The basic shapes are all there, but there will be some rounding to ensure a clean modern look. 2. Initial this tab was to ensure stability of the stand, but I found it too protruding and removed it. 3. This is where I had to file a lot before sanding to achieve a nice curve.
http://www.instructables.com/id/Arduino-Projects/
(www.allelectronics.com/make-a-store/item/SMS-242/SMALL-SNAP-ACTION-SWITCH-W/-LEVER/1.html) 1 ft of Multi-wired cord (8 strands needed) I got this great 10-strand cable that is useful for situation such as this. (www.allelectronics.com/make-a-store/item/10CS22/10-CONDUCTOR-SHIELDED-CABLE-W/-DRAIN/-/1.html) Most of the mounting screws will be available to you at your local hardware store. I used a few nuts, screws and bolts from the bracket kits.
Image Notes 1. Be sure to set up the switches perfectly or the shot glasses will not sit well in the tray. Hot glue sets in fast and you will have to be right on the spot the first time!
Image Notes 1. Two heavy duty nuts were used. Make sure that the nuts used are slight smaller in diameter than the mounting holes on the bracket. This way you can adjust the horizontal alignment of the tray (to make sure its flat with the ground).
Image Notes 1. Zipties are used to secure the cable to the tray. The colored wired made it easy to know which switch is which.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Each module is hot-glued to the frame with a square piece of polycarbonate in between for height adjustment. 2. Make sure the mouth of the tubing in the container is at the lowest point. 3. When in the "OFF" position, the nozzle must be above the water level in the container.
Image Notes 1. The servo bracket is attached to the container with a screw on the top and one on the bottom. 2. Tubing passes through the bottle cap by a drilled hole. Epoxy was applied to ensure a proper seal. 3. This part of the tubing must be lower than the base of the container to ensure no air bubbles form when the nozzle is up.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. The depth of the eye hooks controls the lateral angle of the tubing to help with the aim into the funnel.
Image Notes 1. I had the Arduino set up so that the knob of the pot points to the indicator LED that is lit. There is also a random function when the knob is turned all the way.
Image Notes 1. It's a bit of a mess. You will not have this if you mount the indicator LEDs on the modules. :P
http://www.instructables.com/id/Arduino-Projects/
File Downloads
BarBot5.pde (4 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'BarBot5.pde']
Image Notes 1. The electronics and batteries are enclosed in another Voss bottle for liquid protection and to make sure the many wires remain well connected.
Image Notes 1. Alignment is key, the position of the funnel is the adjustable control for such alignment.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. You want a tight tolerance on the gap here to prevent spillage.
Image Notes 1. A proper setup will allow the nozzle to be positioned in the middle of the funnel so as to avoid too much contamination between pours.
Image Notes 1. I used screws with break away heads for a cleaner look, but the hot glue in between the joint minimized that effort.
Step 9: Afterthoughts
Well, I did receive first place for the fair so overall I was very pleased with the project. I loved explaining the workings and purpose of the robot and getting their reactions. I think more forethought would have made the build process more smooth, but trial and error helped along the way. It's surprising how much fun building something like this was. I would recommend this type of project to any avid builder that are interested in robotic. Please post comments and pm any questions to me.
Related Instructables
Building Small Robots: Making One Cubic Inch Micro-Sumo Robots and Smaller by mikey77
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
// Arduino code: // Read data from the serial and turn ON or OFF a light depending on the value //and control stepper motor on RepStrap char val; // Data received from the serial port int ledPin = 13; // Set the pin to digital I/O 13 #define XstepPin 10
http://www.instructables.com/id/Arduino-Projects/
#define XdirPin 7 #define YstepPin 2 #define YdirPin 3 void setup() { pinMode(ledPin, OUTPUT); // Set pin as OUTPUT pinMode(XstepPin, OUTPUT); pinMode(XdirPin, OUTPUT); pinMode(YstepPin, OUTPUT); pinMode(YdirPin, OUTPUT); Serial.begin(9600); // Start serial communication at 9600 bps } void loop() { if (Serial.available()) { // If data is available to read, val = Serial.read(); // read it and store it in val } if (val == 'H') { // If H was received digitalWrite(ledPin, HIGH); // turn the LED on digitalWrite(XdirPin,HIGH); digitalWrite(XstepPin,HIGH); delayMicroseconds(2); digitalWrite(XstepPin,LOW); delayMicroseconds(2); } if(val == 'h') { digitalWrite(ledPin, HIGH); // turn the LED on digitalWrite(YdirPin,HIGH); digitalWrite(YstepPin,HIGH); delayMicroseconds(2); digitalWrite(YstepPin,LOW); delayMicroseconds(2); } if (val == 'L'){ digitalWrite(ledPin, LOW); // Otherwise turn it OFF digitalWrite(XdirPin,LOW); digitalWrite(XstepPin,HIGH); delayMicroseconds(2); digitalWrite(XstepPin,LOW); delayMicroseconds(2); } if (val == 'l'){ digitalWrite(ledPin, LOW); // Otherwise turn it OFF digitalWrite(YdirPin,LOW); digitalWrite(YstepPin,HIGH); delayMicroseconds(2); digitalWrite(YstepPin,LOW); delayMicroseconds(2); } delayMicroseconds(1000); // <<<<<< USE TO CHANGE SPEED <<<<<<<< }
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
delay(100); } else { // if the direction is down, the motor goes the other way myPort.write('L'); // send an L otherwise print('L'); delay(100); } if((x>width-radius) || (x < radius)) { directionX = -directionX; } y += speedY * directionY; if (directionY == 1){ //if the direction is up, the motor goes one way myPort.write('h'); print('h'); delay(100); } else { // if the direction is down, the motor goes the other way myPort.write('l'); // send an L otherwise print('l'); delay(100); } if((y>height-radius) || (y < radius)) { directionY = -directionY; } }
http://www.instructables.com/id/Arduino-Projects/
Step 7: Draw!
Draw! Now that the path of the bouncing ball is being sent to the Arduino Board, it is time to set up the paper and pen. - Tape a peice of paper to the X-Y platform. - Clip a pen to the Z-axis frame. -Check that the ball is still bouning and the lights are still blining. -Turn on power to the stepper motors! -Now the X-Y platform will move about following the path of the bouncing ball. Yay!
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
float x= 50.0; float y = 50.0; float speedX = 1.0; float speedY= .4; float radius = 15.0; int directionX = 1; int directionY = 1; int old_directionX = 1; int old_directionY = 1; void setup(){ size(100, 100); smooth(); noStroke(); ellipseMode(RADIUS); String portName = Serial.list()[0]; myPort = new Serial(this, portName, 9600); } void draw(){ fill(0,12); rect(0,0,width, height); fill(255); ellipse(x, y, radius, radius); x += speedX * directionX; if((x>width-radius) || (x < radius)) { //change X direction if the ball hits the side of the box directionX = -directionX; } y += speedY * directionY; if((y>height-radius) || (y < radius)) { //change Y direction if the ball hits the side of the box directionY = -directionY; }
if ((directionX != old_directionX) && (directionX == 1)){ //if X direction changed print H myPort.write('H'); print('H'); delay(100); } if ((directionX != old_directionX) && (directionX == -1)){ //if X direction changed print h myPort.write('h'); print('h'); delay(100); } if ((directionY != old_directionY) && (directionY == 1)){ //if Y direction changed print L myPort.write('L'); print('L'); delay(100); } if ((directionY != old_directionY) && (directionY == -1)){ //if Y direction changed print l myPort.write('l'); print('l'); delay(100); } old_directionX = directionX ; //stores the directions we just used, as the old direction old_directionY= directionY; //delay(100); //uncomment to slow the whole thing down for troubleshooting }
http://www.instructables.com/id/Arduino-Projects/
byte previousPIN[2]; // PIN means PORT for input byte previousPORT[2]; void outputPort(byte portNumber, byte portValue) { // only send the data when it changes, otherwise you get too many messages! if(previousPIN[portNumber] != portValue) { Firmata.sendDigitalPort(portNumber, portValue); previousPIN[portNumber] = portValue; Firmata.sendDigitalPort(portNumber, portValue); } } void setPinModeCallback(byte pin, int mode) { if(pin > 1) { // don't touch RxTx pins (0,1) pinMode(pin, mode); } } void digitalWriteCallback(byte port, int value) { byte i; byte currentPinValue, previousPinValue; if(value != previousPORT[port]) { for(i=0; i<8; i++) { currentPinValue = (byte) value & (1 << i); previousPinValue = previousPORT[port] & (1 << i); if(currentPinValue != previousPinValue) { digitalWrite(i + (port*8), currentPinValue); } } previousPORT[port] = value; } } void setup() { Firmata.setFirmwareVersion(0, 1); Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback); Firmata.attach(SET_PIN_MODE, setPinModeCallback); Firmata.begin(57600); } void loop() { outputPort(0, PIND &~ B00000011); // pins 0-7, ignoring Rx/Tx pins (0/1) outputPort(1, PINB); // pins 8-13 while(Firmata.available()) {
http://www.instructables.com/id/Arduino-Projects/
Firmata.processInput(); } //added stepper sequence to firmata code digitalWrite(XstepPin,HIGH); //take steps delayMicroseconds(2); digitalWrite(XstepPin,LOW); delayMicroseconds(2); delayMicroseconds(1000); // <<<<<< USE TO CHANGE STEPPER SPEED <<<<<<<< } //////////////////////////////////Processing///////////////////////////////// /** * Simple Write. < modified to control stepper direction * * Check if the mouse is over a rectangle and writes the status to the serial port. * This example works with the Wiring / Arduino program that follows below. */ import processing.serial.*; import cc.arduino.*; Arduino arduino; //Serial myPort; // Create object from Serial class // Data received from the serial port int ledPin = 13; // pin for LED int XdirPin = 7; // pin for stepper X direction int XstepPin = 10; //pin for X step void setup() { size(200, 200); // I know that the first port in the serial list on my mac // is always my FTDI adaptor, so I open Serial.list()[0]. // On Windows machines, this generally opens COM1. // Open whatever port is the one you're using. // String portName = Serial.list()[0]; //myPort = new Serial(this, portName, 9600); arduino = new Arduino(this, Arduino.list()[0], 57600); // v1 arduino.pinMode(ledPin, Arduino.OUTPUT); arduino.pinMode(XdirPin, Arduino.OUTPUT); } void draw() { background(255); if (mouseOverRect() == true) { // If mouse is over square, fill(204); // change color and arduino.digitalWrite(ledPin, Arduino.HIGH); // LED on arduino.digitalWrite(XdirPin, Arduino.HIGH); // Stepper direction this way } else { // If mouse is not over square, fill(0); // change color and arduino.digitalWrite(ledPin, Arduino.LOW); // LED off arduino.digitalWrite(XdirPin, Arduino.LOW); //Stepper direction the other way } rect(50, 50, 100, 100); } boolean mouseOverRect() { // Test if mouse is over square return ((mouseX >= 50) && (mouseX <= 150) && (mouseY >= 50) && (mouseY <= 150)); }
// Draw a square
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
/////////////////////////////PROCESSING////////////////////////////////////// /** * Simple Write. * * Check if the mouse is over a rectangle and writes the status to the serial port. * This example works with the Wiring / Arduino program that follows below. */ import processing.serial.*; import cc.arduino.*; Arduino arduino; //Serial myPort; // Create object from Serial class // Data received from the serial port int ledPin = 13; int XstepPin = 10; int XdirPin = 7;
void setup() { size(200, 200); // I know that the first port in the serial list on my mac // is always my FTDI adaptor, so I open Serial.list()[0]. // On Windows machines, this generally opens COM1. // Open whatever port is the one you're using. // String portName = Serial.list()[0]; //myPort = new Serial(this, portName, 9600); arduino = new Arduino(this, Arduino.list()[0], 57600); // v1 arduino.pinMode(ledPin, Arduino.OUTPUT); arduino.pinMode(XstepPin, Arduino.OUTPUT); arduino.pinMode(XdirPin, Arduino.OUTPUT); } void draw() { background(255); if (mouseOverRect() == true) { // If mouse is over square, fill(204); // change color and arduino.digitalWrite(ledPin, Arduino.HIGH); // send an H to indicate mouse is over square arduino.digitalWrite(XdirPin, Arduino.HIGH); //arduino.digitalWrite(XstepPin, Arduino.HIGH); //delay(1); //arduino.digitalWrite(XstepPin, Arduino.LOW); //delay(1); } else { // If mouse is not over square, fill(0); // change color and arduino.digitalWrite(ledPin, Arduino.LOW); // send an L otherwise arduino.digitalWrite(XdirPin, Arduino.LOW); //arduino.digitalWrite(XstepPin, Arduino.HIGH); //delay(1); //arduino.digitalWrite(XstepPin,Arduino.LOW); //delay(1); } rect(50, 50, 100, 100); } boolean mouseOverRect() { // Test if mouse is over square return ((mouseX >= 50) && (mouseX <= 150) && (mouseY >= 50) && (mouseY <= 150)); }
// Draw a square
http://www.instructables.com/id/Arduino-Projects/
byte previousPIN[2]; // PIN means PORT for input byte previousPORT[2]; void outputPort(byte portNumber, byte portValue) { // only send the data when it changes, otherwise you get too many messages! if(previousPIN[portNumber] != portValue) { Firmata.sendDigitalPort(portNumber, portValue); previousPIN[portNumber] = portValue; Firmata.sendDigitalPort(portNumber, portValue); } } void setPinModeCallback(byte pin, int mode) { if(pin > 1) { // don't touch RxTx pins (0,1) pinMode(pin, mode); } } void digitalWriteCallback(byte port, int value) { byte i; byte currentPinValue, previousPinValue; if(value != previousPORT[port]) { for(i=0; i<8; i++) { currentPinValue = (byte) value & (1 << i); previousPinValue = previousPORT[port] & (1 << i); if(currentPinValue != previousPinValue) { digitalWrite(i + (port*8), currentPinValue); } } previousPORT[port] = value; } } void setup() { Firmata.setFirmwareVersion(0, 1); Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback); Firmata.attach(SET_PIN_MODE, setPinModeCallback); Firmata.begin(57600); } void loop() { outputPort(0, PIND &~ B00000011); // pins 0-7, ignoring Rx/Tx pins (0/1) outputPort(1, PINB); // pins 8-13 while(Firmata.available()) { Firmata.processInput(); } //added stepper sequence to firmata code //digitalWrite(XdirPin,HIGH); digitalWrite(XstepPin,HIGH); //take steps delayMicroseconds(2); digitalWrite(XstepPin,LOW); delayMicroseconds(2); delayMicroseconds(1000); // <<<<<< USE TO CHANGE STEPPER SPEED <<<<<<<< }
//////////////////////PROCESSING/////////////////////////////////// // // Simple Write. < modified to control stepper direction // //Check if the mouse is over a rectangle and writes the status to the serial port. //This example works with the Wiring / Arduino program that follows below. // import processing.serial.*; import cc.arduino.*; Arduino arduino; //Serial myPort; // Create object from Serial class // Data received from the serial port int ledPin = 13; // pin for LED int XdirPin = 7; // pin for stepper X direction int XstepPin = 10;
http://www.instructables.com/id/Arduino-Projects/
void setup() { size(200, 200); // I know that the first port in the serial list on my mac // is always my FTDI adaptor, so I open Serial.list()[0]. // On Windows machines, this generally opens COM1. // Open whatever port is the one you're using. // String portName = Serial.list()[0]; //myPort = new Serial(this, portName, 9600); arduino = new Arduino(this, Arduino.list()[0], 57600); // v1 arduino.pinMode(ledPin, Arduino.OUTPUT); arduino.pinMode(XdirPin, Arduino.OUTPUT); } void draw() { background(255); if (mouseOverRect() == true) { // If mouse is over square, fill(204); // change color and arduino.digitalWrite(ledPin, Arduino.HIGH); // LED on arduino.digitalWrite(XdirPin, Arduino.HIGH); // Stepper direction this way } else { // If mouse is not over square, fill(0); // change color and arduino.digitalWrite(ledPin, Arduino.LOW); // LED off arduino.digitalWrite(XdirPin, Arduino.LOW); //Stepper direction the other way } rect(50, 50, 100, 100); } boolean mouseOverRect() { // Test if mouse is over square return ((mouseX >= 50) && (mouseX <= 150) && (mouseY >= 50) && (mouseY <= 150)); }
// Draw a square
Step 13: Follow the Bouncing Ball with Firmata! (this works good)
http://www.youtube.com/watch?v=VYgbStFaQbM Now I've taken the bouncing ball sketch and combined it with the Firmata one. Now the stepper motors smoothly follow the path of the bouncing ball!! Now we are getting somewhere!
//////////////////////////Arduino////////////////////////// // Wiring/Arduino code:// simmple digital firmata //Supports as many digital inputs and outputs as possible. //This example code is in the public domain. #include <Firmata.h> #define XstepPin 10 #define XdirPin 7 #define YstepPin 2 #define YdirPin 3 byte previousPIN[2]; // PIN means PORT for input byte previousPORT[2];
http://www.instructables.com/id/Arduino-Projects/
void outputPort(byte portNumber, byte portValue) { // only send the data when it changes, otherwise you get too many messages! if(previousPIN[portNumber] != portValue) { Firmata.sendDigitalPort(portNumber, portValue); previousPIN[portNumber] = portValue; Firmata.sendDigitalPort(portNumber, portValue); } } void setPinModeCallback(byte pin, int mode) { if(pin > 1) { // don't touch RxTx pins (0,1) pinMode(pin, mode); } } void digitalWriteCallback(byte port, int value) { byte i; byte currentPinValue, previousPinValue; if(value != previousPORT[port]) { for(i=0; i<8; i++) { currentPinValue = (byte) value & (1 << i); previousPinValue = previousPORT[port] & (1 << i); if(currentPinValue != previousPinValue) { digitalWrite(i + (port*8), currentPinValue); } } previousPORT[port] = value; } } void setup() { Firmata.setFirmwareVersion(0, 1); Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback); Firmata.attach(SET_PIN_MODE, setPinModeCallback); Firmata.begin(57600); } void loop() { outputPort(0, PIND &~ B00000011); // pins 0-7, ignoring Rx/Tx pins (0/1) outputPort(1, PINB); // pins 8-13 while(Firmata.available()) { Firmata.processInput(); } //added stepper sequence to firmata code digitalWrite(XstepPin,HIGH); //take steps digitalWrite(YstepPin,HIGH); delayMicroseconds(2); digitalWrite(XstepPin,LOW); digitalWrite(YstepPin,LOW); delayMicroseconds(2); delayMicroseconds(1000); // <<<<<< USE TO CHANGE STEPPER SPEED???? <<<<<<<< } ///////////////////PROCESSING////////////////////////////// /** * Simple Write. * * Check if the mouse is over a rectangle and writes the status to the serial port. * This example works with the Wiring / Arduino program that follows below. */ import processing.serial.*; import cc.arduino.*; Arduino arduino; //Serial myPort; // Create object from Serial class // Data received from the serial port int ledPin = 13; int XstepPin = 10; int XdirPin = 7; int YstepPin = 2; int YdirPin = 3;
http://www.instructables.com/id/Arduino-Projects/
//parameters for the ball float x= 50.0; float y = 50.0; float speedX = 1.0; float speedY= .4; float radius = 15.0; int directionX = 1; int directionY = 1; void setup() { //setup the drawing size(100, 100); smooth(); noStroke(); ellipseMode(RADIUS); //setup communication with Arduino arduino = new Arduino(this, Arduino.list()[0], 57600); // v1 arduino.pinMode(ledPin, Arduino.OUTPUT); arduino.pinMode(XstepPin, Arduino.OUTPUT); arduino.pinMode(XdirPin, Arduino.OUTPUT); arduino.pinMode(YstepPin, Arduino.OUTPUT); arduino.pinMode(YdirPin, Arduino.OUTPUT); } void draw() { fill(0,12); rect(0,0,width, height); fill(255); ellipse(x, y, radius, radius); x += speedX * directionX; if((x>width-radius) || (x < radius)) { //change X direction if the ball hits the side of the box directionX = -directionX; } y += speedY * directionY; if((y>height-radius) || (y < radius)) { //change Y direction if the ball hits the side of the box directionY = -directionY; } if (directionX >= 0){ arduino.digitalWrite(ledPin, Arduino.HIGH); arduino.digitalWrite(XdirPin, Arduino.HIGH); } else{ arduino.digitalWrite(ledPin, Arduino.LOW); arduino.digitalWrite(XdirPin, Arduino.LOW); } if (directionY >= 0){ //arduino.digitalWrite(ledPin, Arduino.HIGH); arduino.digitalWrite(YdirPin, Arduino.HIGH); } else{ //arduino.digitalWrite(ledPin, Arduino.LOW); arduino.digitalWrite(YdirPin, Arduino.LOW); } }
///////////////////Processing///////////// /** *ball traces back and forth across the window */ int size = 10; // Width of the shape float xpos, ypos; // Starting position of shape float xspeed = 3; // Speed of the shape
http://www.instructables.com/id/Arduino-Projects/
float yspeed = 0;// Speed of the shape int xdirection = 1; // Left or Right int ydirection = 1; // Top to Bottom void setup() { size(200, 200); noStroke(); frameRate(30); smooth(); // Set the starting position of the shape xpos = 0; ypos = 0; background(102); } void draw() { //background(102); // Update the position of the shape xpos = xpos + ( xspeed * xdirection ); ypos = ypos + ( yspeed * ydirection ); // change direction when the ball hits the edge - to draw a square //starts at left and moves towards right //move down 10 steps if (xpos > width-size && ypos== 0) { //down ydirection=1; yspeed =2; xspeed=0; } //reverse X direction until it hits the 0X edge if(xpos>width-size && ypos ==20){ xdirection = -1; yspeed = 0; xspeed =2; } //move down 10 steps if (xpos < 0 && ypos ==20) { //down ydirection=1; yspeed =2; xspeed=0; } //reverse X direction until it hiths the 200X edge if(xpos < 0 && ypos ==40){ xdirection = 1; yspeed = 0; xspeed =2; } //move down 10 steps if (xpos > width-size && ypos ==40) { //down ydirection=1; yspeed =2; xspeed=0; } //reverse X direction until it hits the 0X edge if(xpos>width-size && ypos ==60){ xdirection = -1; yspeed = 0; xspeed =2; } //move down 10 steps if (xpos < 0 && ypos ==60) { //down ydirection=1; yspeed =2; xspeed=0; } //reverse X direction until it hits the 200X edge if(xpos < 0 && ypos ==80){ xdirection = 1; yspeed = 0; xspeed =2; }
http://www.instructables.com/id/Arduino-Projects/
//move down 10 steps if (xpos > width-size && ypos ==80) { //down ydirection=1; yspeed =2; xspeed=0; } //reverse X direction until it hits the 0X edge if(xpos>width-size && ypos ==100){ xdirection = -1; yspeed = 0; xspeed =2; } //move down 10 steps if (xpos < 0 && ypos ==100) { //down ydirection=1; yspeed =2; xspeed=0; } //reverse X direction until it hiths the 200X edge if (xpos < 0 && ypos ==120) { //down xdirection=1; yspeed =0; xspeed=2; } //move down 10 steps if (xpos > width-size && ypos ==120) { ydirection=1; yspeed =2; xspeed=0; } //reverse direction until it hits teh 0X edge if (xpos > width-size && ypos ==140) { xdirection=-1; yspeed =0; xspeed=2; } //move down 10 steps if (xpos < 0 && ypos ==140) { //down ydirection=1; yspeed =2; xspeed=0; } //reverse X direction until it hiths the 200X edge if (xpos < 0 && ypos ==160) { //down xdirection=1; yspeed =0; xspeed=2; } //move down 10 steps if (xpos > width-size && ypos ==160) { ydirection=1; yspeed =2; xspeed=0; } //reverse direction until it hits teh 200X edge if (xpos > width-size && ypos ==180) { xdirection=-1; yspeed =0; xspeed=2; } //move down 10 steps if (xpos > 0 && ypos ==180) { ydirection=1; yspeed =2; xspeed=0; } //reverse direction until it hits teh 200x edge if (xpos > 0 && ypos ==200) { xdirection=1; yspeed =0; xspeed=2; }
http://www.instructables.com/id/Arduino-Projects/
void setup() { size(200, 200); noStroke(); frameRate(30); smooth(); // Set the starting position of the shape xpos = 0; ypos = 0; background(102); //setup communication with Arduino arduino = new Arduino(this, Arduino.list()[0], 57600); // v1 arduino.pinMode(XstepPin, Arduino.OUTPUT); arduino.pinMode(XdirPin, Arduino.OUTPUT); arduino.pinMode(YstepPin, Arduino.OUTPUT); arduino.pinMode(YdirPin, Arduino.OUTPUT); arduino.pinMode(EstepPin, Arduino.OUTPUT); arduino.pinMode(EdirPin, Arduino.OUTPUT); arduino.pinMode(EenablePin, Arduino.OUTPUT);
http://www.instructables.com/id/Arduino-Projects/
} void draw() { //background(102); // Update the position of the shape xpos = xpos + ( xspeed * directionX ); ypos = ypos + ( yspeed * directionY ); // change direction when the ball hits the edge - to draw a square //starts at left and moves towards right //move down 10 steps if (xpos > width-size && ypos== 0) { //down directionY=1; yspeed =2; xspeed=0; } //reverse X direction until it hits the 0X edge if(xpos>width-size && ypos ==20){ directionX = -1; yspeed = 0; xspeed =2; } //move down 10 steps if (xpos < 0 && ypos ==20) { //down directionY=1; yspeed =2; xspeed=0; } //reverse X direction until it hiths the 200X edge if(xpos < 0 && ypos ==40){ directionX = 1; yspeed = 0; xspeed =2; } //move down 10 steps if (xpos > width-size && ypos ==40) { //down directionY=1; yspeed =2; xspeed=0; } //reverse X direction until it hits the 0X edge if(xpos>width-size && ypos ==60){ directionX = -1; yspeed = 0; xspeed =2; } //move down 10 steps if (xpos < 0 && ypos ==60) { //down directionY=1; yspeed =2; xspeed=0; } //reverse X direction until it hits the 200X edge if(xpos < 0 && ypos ==80){ directionX = 1; yspeed = 0; xspeed =2; } //move down 10 steps if (xpos > width-size && ypos ==80) { //down directionY=1; yspeed =2; xspeed=0; } //reverse X direction until it hits the 0X edge if(xpos>width-size && ypos ==100){ directionX = -1; yspeed = 0; xspeed =2; } //move down 10 steps if (xpos < 0 && ypos ==100) { //down
http://www.instructables.com/id/Arduino-Projects/
directionY=1; yspeed =2; xspeed=0; } //reverse X direction until it hiths the 200X edge if (xpos < 0 && ypos ==120) { //down directionX=1; yspeed =0; xspeed=2; } //move down 10 steps if (xpos > width-size && ypos ==120) { directionY=1; yspeed =2; xspeed=0; } //reverse direction until it hits teh 0X edge if (xpos > width-size && ypos ==140) { directionX=-1; yspeed =0; xspeed=2; } //move down 10 steps if (xpos < 0 && ypos ==140) { //down directionY=1; yspeed =2; xspeed=0; } //reverse X direction until it hiths the 200X edge if (xpos < 0 && ypos ==160) { //down directionX=1; yspeed =0; xspeed=2; } //move down 10 steps if (xpos > width-size && ypos ==160) { directionY=1; yspeed =2; xspeed=0; } //reverse direction until it hits teh 200X edge if (xpos > width-size && ypos ==180) { directionX=-1; yspeed =0; xspeed=2; } //move down 10 steps if (xpos > 0 && ypos ==180) { directionY=1; yspeed =2; xspeed=0; } //reverse direction until it hits teh 200x edge if (xpos > 0 && ypos ==200) { directionX=1; yspeed =0; xspeed=2; } //TELL ARDUINO WHICH WAY TO SEND MOTORS if (directionX >= 0){ arduino.digitalWrite(ledPin, Arduino.HIGH); arduino.digitalWrite(XdirPin, Arduino.HIGH); } else{ arduino.digitalWrite(ledPin, Arduino.LOW); arduino.digitalWrite(XdirPin, Arduino.LOW); } if (directionY >= 0){ //arduino.digitalWrite(ledPin, Arduino.HIGH); arduino.digitalWrite(YdirPin, Arduino.HIGH); } else{ //arduino.digitalWrite(ledPin, Arduino.LOW); arduino.digitalWrite(YdirPin, Arduino.LOW); } if (xspeed == 0) { arduino.digitalWrite(XenablePin, Arduino.HIGH); }
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
//turn heat to medium if //webpage http://dev.www.reprap.org/bin/view/Main/Temperature_Sensor_1_1 // Thermistor lookup table for RepRap Temperature Sensor Boards (http://make.rrrf.org/ts) // Made with createTemperatureLookup.py (http://svn.reprap.org/trunk/reprap/firmware/Arduino/utilities/createTemperatureLookup.py) // ./createTemperatureLookup.py --r0=100000 --t0=25 --r1=0 --r2=4700 --beta=4066 --max-adc=1023 #define THERMISTOR_PIN 0 #define heatPin 11 //heat level #define EstepPin 5 //set extruder stepper to pin12 #define EdirPin 6 //set step direction to stepper pin11 #define EenablePin 12 // byte lowTemp = 245; // >>> if below lowTemp then extruder is disabled - degF byte minTemp = 245; //>>>> SET MIN TEMP HERE >>>>>> - degF byte maxTemp = 250; //>>>> SET MAX TEMP HERE >>>>>> - degF byte maxRaw = 125; byte minRaw = 130; byte cool = 0; // heater off byte warm = 255; //medium heat byte hot = 255; //heat up pretty high >> max would be 255, but I don't want to burn out the heater // r0: 100000 // t0: 25 // r1: 0 // r2: 4700 // beta: 4066 // max adc: 1023 #define NUMTEMPS 20 short temptable[NUMTEMPS][2] = { {1, 841}, {54, 255}, {107, 209}, {160, 184}, {213, 166}, {266, 153}, {319, 142}, {372, 132}, {425, 124}, {478, 116}, {531, 108}, {584, 101}, {637, 93}, {690, 86}, {743, 78}, {796, 70}, {849, 61}, {902, 50}, {955, 34}, {1008, 3} }; void setup() { Serial.begin(9600); Serial.println("Starting temperature exerciser."); pinMode(heatPin, OUTPUT); pinMode(EstepPin, OUTPUT); pinMode(EdirPin, OUTPUT); pinMode(EenablePin, OUTPUT); } void loop() { int rawvalue = analogRead(THERMISTOR_PIN); int celsius = read_temp(); int fahrenheit = (((celsius * 9) / 5) + 32); Serial.print("Current temp: "); Serial.print(celsius); Serial.print("C / "); Serial.print(fahrenheit); Serial.println("F"); Serial.print("Raw value: "); Serial.println(rawvalue); Serial.println(" "); // //control the extruder heater and stepper motor based on the temperature
http://www.instructables.com/id/Arduino-Projects/
// if (rawvalue >= minRaw){ //if temp too low - turn stepper off analogWrite(heatPin, hot); //if temp too low- turn heat to max digitalWrite(EenablePin,HIGH); //if temp too low - turn off the stepper //??? Stop everything if temp too low ??? } // if((fahrenheit >=lowTemp) && (fahrenheit <=minTemp)){ // if temp below range- LED slow blink // analogWrite(heatPin, hot); //if temp below range - turn extruder up to max // digitalWrite(EenablePin,LOW); //if hot enough then turn on stepper // } // if ((fahrenheit >= minTemp) && (fahrenheit <=maxTemp)){ //if temp in range - LED ON // analogWrite(heatPin, warm); //if temp is in range - keep extruder warm // digitalWrite(EenablePin,LOW); //if hot enough then turn on stepper // } if ((rawvalue <= minRaw)){ //if temp in range - LED ON analogWrite(heatPin, warm); //if temp is in range - keep extruder warm digitalWrite(EenablePin,LOW); //if hot enough then turn on stepper } if(rawvalue <=maxRaw){ //if temp above range -LED fast blink analogWrite(heatPin, cool); //if temp too high - turn heater off digitalWrite(EenablePin,LOW); //if hot enough then turn on stepper } //run extruder stepper motor digitalWrite(EdirPin,LOW); digitalWrite(EstepPin,HIGH); delayMicroseconds(2); digitalWrite(EstepPin,LOW); delay(15); // delay(1000); } int read_temp() { int rawtemp = analogRead(THERMISTOR_PIN); int current_celsius = 0; byte i; for (i=1; i if (temptable[i][0] > rawtemp) { int realtemp = temptable[i-1][1] + (rawtemp - temptable[i-1][0]) * (temptable[i][1] - temptable[i-1][1]) / (temptable[i][0] - temptable[i-1][0]); if (realtemp > 255) realtemp = 255; current_celsius = realtemp; break; } } // Overflow: We just clamp to 0 degrees celsius if (i == NUMTEMPS) current_celsius = 0; return current_celsius;
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
// t0: 25 // r1: 0 // r2: 4700 // beta: 4066 // max adc: 1023 #define NUMTEMPS 20 short temptable[NUMTEMPS][2] = { {1, 841}, {54, 255}, {107, 209}, {160, 184}, {213, 166}, {266, 153}, {319, 142}, {372, 132}, {425, 124}, {478, 116}, {531, 108}, {584, 101}, {637, 93}, {690, 86}, {743, 78}, {796, 70}, {849, 61}, {902, 50}, {955, 34}, {1008, 3} }; void setup() { Serial.begin(9600); Serial.println("Starting temperature exerciser."); pinMode(heatPin, OUTPUT); pinMode(EstepPin, OUTPUT); pinMode(EdirPin, OUTPUT); pinMode(EenablePin, OUTPUT); } void loop() { int rawvalue = analogRead(THERMISTOR_PIN); int celsius = read_temp(); int fahrenheit = (((celsius * 9) / 5) + 32); Serial.print("Current temp: "); Serial.print(celsius); Serial.print("C / "); Serial.print(fahrenheit); Serial.println("F"); Serial.print("Raw value: "); Serial.println(rawvalue); Serial.println(" "); // //control the extruder heater and stepper motor based on the temperature // if (rawvalue >= minRaw){ //if temp too low - turn stepper off analogWrite(heatPin, hot); //if temp too low- turn heat to max digitalWrite(EenablePin,HIGH); //if temp too low - turn off the stepper //??? Stop everything if temp too low ??? } // if((fahrenheit >=lowTemp) && (fahrenheit <=minTemp)){ // if temp below range- LED slow blink // analogWrite(heatPin, hot); //if temp below range - turn extruder up to max // digitalWrite(EenablePin,LOW); //if hot enough then turn on stepper // } // if ((fahrenheit >= minTemp) && (fahrenheit <=maxTemp)){ //if temp in range - LED ON // analogWrite(heatPin, warm); //if temp is in range - keep extruder warm // digitalWrite(EenablePin,LOW); //if hot enough then turn on stepper // } if ((rawvalue <= minRaw)){ //if temp in range - LED ON analogWrite(heatPin, warm); //if temp is in range - keep extruder warm digitalWrite(EenablePin,LOW); //if hot enough then turn on stepper } if(rawvalue<=maxRaw){ //if temp above range -LED fast blink analogWrite(heatPin, cool); //if temp too high - turn heater off digitalWrite(EenablePin,LOW); //if hot enough then turn on stepper } //run extruder stepper motor
http://www.instructables.com/id/Arduino-Projects/
digitalWrite(EdirPin,LOW); digitalWrite(EstepPin,HIGH); delayMicroseconds(2); digitalWrite(EstepPin,LOW); delay(1); // delay(1000); } int read_temp() { int rawtemp = analogRead(THERMISTOR_PIN); int current_celsius = 0; byte i; for (i=1; i <NUMTEMPS; i++) { if (temptable[i][0] > rawtemp) { int realtemp = temptable[i-1][1] + (rawtemp - temptable[i-1][0]) * (temptable[i][1] - temptable[i-1][1]) / (temptable[i][0] - temptable[i-1][0]); if (realtemp > 255) realtemp = 255; current_celsius = realtemp; break; } } // Overflow: We just clamp to 0 degrees celsius if (i == NUMTEMPS) current_celsius = 0; return current_celsius;
http://www.instructables.com/id/Arduino-Projects/
// r0: 100000 // t0: 25 // r1: 0 // r2: 4700 // beta: 4066 // max adc: 1023 #define NUMTEMPS 20 short temptable[NUMTEMPS][2] = { {1, 841}, {54, 255}, {107, 209}, {160, 184}, {213, 166}, {266, 153}, {319, 142}, {372, 132}, {425, 124}, {478, 116}, {531, 108}, {584, 101}, {637, 93}, {690, 86}, {743, 78}, {796, 70}, {849, 61}, {902, 50}, {955, 34}, {1008, 3} }; void setup() { Serial.begin(9600); Serial.println("Starting temperature exerciser."); pinMode(heatPin, OUTPUT); pinMode(EstepPin, OUTPUT); pinMode(EdirPin, OUTPUT); pinMode(EenablePin, OUTPUT); } void loop() { int rawvalue = analogRead(THERMISTOR_PIN); int celsius = read_temp(); int fahrenheit = (((celsius * 9) / 5) + 32); Serial.print("Current temp: "); Serial.print(celsius); Serial.print("C / "); Serial.print(fahrenheit); Serial.println("F"); Serial.print("Raw value: "); Serial.println(rawvalue); Serial.println(" "); // //control the extruder heater and stepper motor based on the temperature // if (celsius <= minTemp){ //if temp too low - turn stepper off analogWrite(heatPin, hot); //if temp too low- turn heat to max digitalWrite(EenablePin,HIGH); //if temp too low - turn off the stepper digitalWrite(LED,HIGH); //??? Stop everything if temp too low ??? } if((celsius >=lowTemp) && (celsius <=minTemp)){ // if temp below range- LED slow blink analogWrite(heatPin, hot); //if temp below range - turn extruder up to max digitalWrite(EenablePin,LOW); //if hot enough then turn on stepper } if ((celsius >= minTemp) && (celsius<=maxTemp)){ //if temp in range - LED ON analogWrite(heatPin, warm); //if temp is in range - keep extruder warm digitalWrite(EenablePin,LOW); //if hot enough then turn on stepper } //run extruder stepper motor digitalWrite(EdirPin,LOW); digitalWrite(EstepPin,HIGH); delayMicroseconds(2); digitalWrite(EstepPin,LOW); delay(1);
http://www.instructables.com/id/Arduino-Projects/
// delay(1000); } int read_temp() { int rawtemp = analogRead(THERMISTOR_PIN); int current_celsius = 0; byte i; for (i=1; i if (temptable[i][0] > rawtemp) { int realtemp = temptable[i-1][1] + (rawtemp - temptable[i-1][0]) * (temptable[i][1] - temptable[i-1][1]) / (temptable[i][0] - temptable[i-1][0]); if (realtemp > 255) realtemp = 255; current_celsius = realtemp; break; } } // Overflow: We just clamp to 0 degrees celsius if (i == NUMTEMPS) current_celsius = 0; return current_celsius;
NOTE: 0,0,0 - top left corner (facing the computer monitor) negative Z axis points 'into' the computer monitor positive Y axis points down positive X axis points to the right */ int size = 40; // Width of the shape float xpos, ypos, zpos; // Starting position of shape float depth; float xspeed = 2.5; // Speed of the shape float yspeed = 2; // Speed of the shape float zspeed = 3; int xdirection = 1; // Left or Right int ydirection = 1; // Top to Bottom int zdirection = 1; //front or back void setup() { size(400, 400, P3D); noStroke(); frameRate(30); smooth(); // Set the starting position of the shape xpos = width/2; ypos = height/2; zpos = -height/2; //note that Zaxis goes 'into' the screen depth = -height;
http://www.instructables.com/id/Arduino-Projects/
} void draw() { background(102); lights(); //glass box //note: line(x1, y1, z1, x2, y2, z2) stroke(255); //back line(0,0,depth, width,0,depth); line(0,height,depth, width,height,depth); line(0,0,depth, 0,height,depth); line(width,0,depth, width,height,depth); //corners line(0,0,0, 0,0,depth); line(0,height,0, 0,height,depth); line(width,0,0, width,0,depth); line(width,height,0, width,height,depth); // Update the position of the shape xpos = xpos + ( xspeed * xdirection ); ypos = ypos + ( yspeed * ydirection ); zpos = zpos + ( zspeed * zdirection ); // Test to see if the shape exceeds the boundaries of the screen // If it does, reverse its direction by multiplying by -1
if (xpos > width-size || xpos < 0) { xdirection *= -1; } if (ypos > height-size || ypos < 0) { ydirection *= -1; } if (zpos < -height-size || zpos > 0) { //note that Zaxis goes 'into' the screen zdirection *= -1; } // Draw the shape lights(); translate(xpos, ypos, zpos); sphere(size); }
http://www.instructables.com/id/Arduino-Projects/
Here is the 3D bouncing ball Processing and Adruino code. This will run X,Y,Z stepper motors. The Arduino code follows, this is the code from Step 13 with the Z axis added. ///////////////////////////////PROCESSING ///////////////////////////// /////////////////// *********PROCESSING with FIRMATA********* /** * Bounce_3D_0 * * When the shape hits a boundry it reverses its direction. There are X,Y, Z bounds Direction is outputed Processsing -> Firmata -> Arduino -> Drivers -> Steppers * *Modified for 3D
NOTE: 0,0,0 - top left corner (facing the computer monitor) negative Z axis points 'into' the computer monitor positive Y axis points down positive X axis points to the right */ import processing.serial.*; import cc.arduino.*; Arduino arduino; //Serial myPort; // Create object from Serial class // Data received from the serial port int ledPin = 13; int XstepPin = 10; int XdirPin = 7; int YstepPin = 2; int YdirPin = 3; int ZstepPin = 19; int ZdirPin = 18; int size = 40; // Width of the shape float xpos, ypos, zpos; // Starting position of shape float depth; float xspeed = 2.5; // Speed of the shape float yspeed = 2; // Speed of the shape float zspeed = 3; int xdirection = 1; // Left or Right int ydirection = 1; // Top to Bottom int zdirection = 1; //front or back void setup() { size(200, 200, P3D); noStroke(); frameRate(30); smooth(); // Set the starting position of the shape xpos = width/2; ypos = height/2;
http://www.instructables.com/id/Arduino-Projects/
zpos = -height/2; //note that Zaxis goes 'into' the screen depth = -height; //setup communication with Arduino arduino = new Arduino(this, Arduino.list()[0], 57600); // v1 arduino.pinMode(ledPin, Arduino.OUTPUT); arduino.pinMode(XstepPin, Arduino.OUTPUT); arduino.pinMode(XdirPin, Arduino.OUTPUT); arduino.pinMode(YstepPin, Arduino.OUTPUT); arduino.pinMode(YdirPin, Arduino.OUTPUT); arduino.pinMode(ZstepPin, Arduino.OUTPUT); arduino.pinMode(ZdirPin, Arduino.OUTPUT); } void draw() { background(102); lights(); //glass box //note: line(x1, y1, z1, x2, y2, z2) stroke(255); //back line(0,0,depth, width,0,depth); line(0,height,depth, width,height,depth); line(0,0,depth, 0,height,depth); line(width,0,depth, width,height,depth); //corners line(0,0,0, 0,0,depth); line(0,height,0, 0,height,depth); line(width,0,0, width,0,depth); line(width,height,0, width,height,depth); // Update the position of the shape xpos = xpos + ( xspeed * xdirection ); ypos = ypos + ( yspeed * ydirection ); zpos = zpos + ( zspeed * zdirection ); // Test to see if the shape exceeds the boundaries of the screen // If it does, reverse its direction by multiplying by -1
if (xpos > width-size || xpos < 0) { xdirection *= -1; } if (ypos > height-size || ypos < 0) { ydirection *= -1; } if (zpos < -height-size || zpos > 0) { //note that Zaxis goes 'into' the screen zdirection *= -1; } // Draw the shape lights(); translate(xpos, ypos, zpos); sphere(size); // CONTROLL THE STEPPER MOTORS // X if (xdirection >= 0){ arduino.digitalWrite(ledPin, Arduino.HIGH); arduino.digitalWrite(XdirPin, Arduino.HIGH); arduino.digitalWrite(ZdirPin, Arduino.HIGH); } else{ arduino.digitalWrite(ledPin, Arduino.LOW); arduino.digitalWrite(XdirPin, Arduino.LOW); arduino.digitalWrite(ZdirPin, Arduino.LOW); } // Y if (ydirection >= 0){ arduino.digitalWrite(YdirPin, Arduino.HIGH); } else{ arduino.digitalWrite(YdirPin, Arduino.LOW); } // Z if (zdirection >= 0){
http://www.instructables.com/id/Arduino-Projects/
/////////////////////////////ARDUINO//////////////////////////////////////// // Wiring/Arduino code:// simmple digital firmata //Supports as many digital inputs and outputs as possible. //This example code is in the public domain. #include #define XstepPin 10 #define XdirPin 7 #define YstepPin 2 #define YdirPin 3 #define ZstepPin 19 #define ZdirPin 18 byte previousPIN[2]; // PIN means PORT for input byte previousPORT[2]; void outputPort(byte portNumber, byte portValue) { // only send the data when it changes, otherwise you get too many messages! if(previousPIN[portNumber] != portValue) { Firmata.sendDigitalPort(portNumber, portValue); previousPIN[portNumber] = portValue; Firmata.sendDigitalPort(portNumber, portValue); } } void setPinModeCallback(byte pin, int mode) { if(pin > 1) { // don't touch RxTx pins (0,1) pinMode(pin, mode); } } void digitalWriteCallback(byte port, int value) { byte i; byte currentPinValue, previousPinValue; if(value != previousPORT[port]) { for(i=0; i<8; i++) { currentPinValue = (byte) value & (1 << i); previousPinValue = previousPORT[port] & (1 << i); if(currentPinValue != previousPinValue) { digitalWrite(i + (port*8), currentPinValue); } } previousPORT[port] = value; } } void setup() { Firmata.setFirmwareVersion(0, 1); Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback); Firmata.attach(SET_PIN_MODE, setPinModeCallback); Firmata.begin(57600); } void loop() { outputPort(0, PIND &~ B00000011); // pins 0-7, ignoring Rx/Tx pins (0/1) outputPort(1, PINB); // pins 8-13 while(Firmata.available()) { Firmata.processInput(); } //added stepper sequence to firmata code digitalWrite(XstepPin,HIGH); //take steps digitalWrite(YstepPin,HIGH); digitalWrite(ZstepPin,HIGH); delayMicroseconds(2); digitalWrite(XstepPin,LOW);
http://www.instructables.com/id/Arduino-Projects/
digitalWrite(YstepPin,LOW); digitalWrite(ZstepPin,LOW); delayMicroseconds(2); delayMicroseconds(1000); // <<<<<< USE TO CHANGE STEPPER SPEED???? <<<<<<<< }
http://www.instructables.com/id/Arduino-Projects/
****uses different variables to indicate that this is in progress (and because I forgot what variables I was using) */ int res = 50; //print resolution
int a = 100; int b = 1; int dir_a = 1; int dir_b = 0; int step_a = 1; int step_b = 0; int old_b = 0; int next_b = res; void setup() { size(640, 200); stroke(255); background(50); } void draw() { a = a + dir_a*step_a; b = b + dir_b*step_b; if ((a < 10 || a > height-10) && b < next_b) { dir_b = 1; step_a = 0; step_b = 1; dir_a = (-1)*dir_a;
http://www.instructables.com/id/Arduino-Projects/
old_b = b; } else { step_a=1; step_b=0; next_b = old_b+res; } point(b, a); // Syntax point(x1, y1) print(b); print(','); println(a); }
****uses different variables to indicate that this is in progress (and because I forgot what variables I was using) */ int res = 50; //print resolution
int a = 10; int b = 10; int dir_a = 1; int dir_b = 1; int step_a = 1; int step_b = 0; int old_step_a = 1; int old_step_b =0; int old_dir_a = 1; int old_dir_b = 0; int dir_switch = 0; int old_dir_switch = 0; int old_a = 0; int old_b = 0; int next_b = res; int next_a = res; void setup() { size(200, 200); stroke(255); background(50); } void draw() { background(50); if ((a < 10 || a > height - 10) && old_step_b ==0){ dir_a = -1 * dir_a; next_b = b+res; dir_switch = 1; } if ((old_dir_switch != dir_switch) && b < next_b){ step_a = 0; step_b = 1; dir_switch = 0;
http://www.instructables.com/id/Arduino-Projects/
} if (b > next_b){ step_a = 1; step_b = 0; next_b = b+res; dir_switch = 0; } if ((b < 10 || b > width - 10) && old_step_a ==0){ dir_b = -1 * dir_b; next_a = a + res; dir_switch = 1; } if ((old_dir_switch != dir_switch) && a < next_a){ step_b = 0; step_a = 1; dir_switch = 0; } if (a > next_a){ step_b = 1; step_a = 0; next_a = a + res; dir_switch = 0; } // calculate postion a = a + dir_a*step_a; b = b + dir_b*step_b; //display point point(b, a); // Syntax point(x1, y1) //store some values as old for comparison old_a = a; old_b = b; old_step_a = step_a; old_step_b = step_b; old_dir_a = dir_a; old_dir_b = dir_b; old_dir_switch = old_dir_switch + dir_switch; print(b); print(','); println(a); }
Step 25: Prints using reprap Gcode interpreter and Host software
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
XY-Plotter by bdeakyne
How to Make a Three Axis CNC Machine (Cheaply and Easily) by oomlout
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. The sensor is kept in place with a tierap and connected to a wire. This set up short circuited after a while when the plastic of the wires melted. In a new set up I placed a piece of silicon between the cup and the plastic wires. The tierap appears to be ok.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. A potmeter to control the minimal fan speed (to low fanspeed will burn the beans) 2. Wires leading to the coffee roaster: ground and temperature sensor. 3. Wires leading to the coffee roaster: Fanspeed controller and relais of heating coil 4. IRF540N controlling the fanspeed 5. Ground and 5V for the LCD module 6. Arduino undernead the protoshield 7. Minibreadboard on top of the protoshield
http://www.instructables.com/id/Arduino-Projects/
File Downloads
http://www.instructables.com/id/Arduino-Projects/
[NOTE: When saving, if you see .tmp as the file ext, rename it to 'Coffee_Roaster_v1_0.pde']
I have thought about an additional controller that would keep an eye on the beans. If they stop dancing then the fan speed should be increased a little bit. Couldn't think of any way to sense this, so if you have any suggestion please let me know.
Image Notes 1. Red is the actual temperature and green is the set point temperature profile. Blue is PID output of the fanspeed controller.
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
***UPDATE 5/4/10: If you make your own ghostbusters proton pack, post some pictures in the comments below, and I'll send you a patch!***
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Two LEDs that alternate on and off 2. Cycling wand LEDs 3. Always on power indicator
Image Notes 1. Alternate on and off 2. Flashes on and off very quickly 3. Full on, then fades to off
Image Notes 1. Flashes on and off very quickly 2. Full on, then fades off
http://www.instructables.com/id/Arduino-Projects/
File Downloads
ProtonPack.pde (10 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'ProtonPack.pde']
http://www.instructables.com/id/Arduino-Projects/
Step 5: Make more junk you'll have to lug around with you!
I also built a trap and a pair of ecto goggles for the costume this year. These are simply boxes cut to size, painted black, and with a bunch of doodads and widgets glued on. The trap has a 1/4" plywood base and a 1/4" plywood mounting plate on the belt. They connect with a wedged shape hunk of sheet metal I cut out with my dremel tool. The handle of the trap is also wood, but nearly everything else is just cardboard. The ecto goggles are made out of a small cardboard box with one side cut out in the shape of my forehead. The straps were harvested from a broken headlamp. Everything on them was simply junk from my stuff drawers or screws from my screw jar.
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
Simple and easy Ecto Goggles (Photos) by aliencatx Ghostbusters Proton Pack by ZombieDUG
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. IR Sensor 2. All other components: - Arduino mini pro - Audio recorder - RF transmitter 3. Silly String shooter as shown in instructable 4. External Components (didn't want to get them dirty!): - RF receiver - Protoshield - Wifi module - Arduino Duemilanove This is only used to send tweets.
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
File Downloads
SillyStringShooter.pde (713 bytes) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'SillyStringShooter.pde']
SillyStringShooter2.pde (1 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'SillyStringShooter2.pde']
Hackolantern_Tweet.pde (2 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'Hackolantern_Tweet.pde']
Related Instructables
http://www.instructables.com/id/Arduino-Projects/
Step 1: This is what you can get at the end...(just to get you interested)
This is the graph you can get from the text file sent to the PC during drain cycle.
Image Notes 1. Total capacity of a new 2000 mAh Bat was 1580mAH! 2. When voltage drops bellow 950mV (for NiCD/NiMH) the load is removed (via the FET) 3. Seconds 4. mV
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. connector to LCD 2. ATMEGA168 3. Max232 4. This led indicates you want to vote for me :-) Does anyone even read all these comments?
Image Notes 1. This FET was removed from a TV set - it has 4mOhm on-resistance.cool! 2. 10W 2.2Ohm Resistor load
Step 5: The SW
So I also connected and LCD (which I took apart from some other junk) and found the data-sheet on the net + a cool driver from the Arduino web page and started coding . Auto detecting battery type by the voltage .
Image Notes 1. Testing voltage to deterim battery type 2. RS232 connector 3. Reset 4. Power On 5. Load is active (discharging) 6. Ventilation holes for the 10W resistor
http://www.instructables.com/id/Arduino-Projects/
Step 7: Discharging...
The discharge can take anywhere from 30-120 minuets depending on batery capacity but at the end you get a true indication of battery capacity / quality . Do you want to use that battery for your air-plain receiver or not ? This is the diagram of the discharge circuit...
Image Notes 1. The discharge just started - the 1Ma will increase as time goes bye..
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
else if (BatVoltage > NmhMinThreshold){ lcd.print("Type:NiMH/Cd Bat "); SelectedMinThreshold = NmhMinThreshold;} else{ lcd.print("Unknown Bat V<1 "); done = true;} lcd.print("V="); lcd.print(sensorValue*4.887); // print voltage value Serial.print("DT[ms]"); Serial.print("\t"); Serial.print("Bat[mV]"); Serial.print("\t"); Serial.print("Fet[mV]"); Serial.println(""); delay(3000); CL2(); PrevMillis = millis(); } void loop() { if (BatVoltage > SelectedMinThreshold && !done) { digitalWrite(ledPin, HIGH); // set the LED on sensorValue = analogRead(sensorPin); // read the value from the sensor: sensor2Value = analogRead(sensor2Pin); // read the value from the FET: FetVoltage = (sensor2Value*4.887); BatVoltage = (sensorValue*4.887); CL2(); lcd.print("V="); lcd.print(BatVoltage); // print voltage value lcd.print("mV"); //lcd.print(FetVoltage); // print voltage value TotalCurrent=TotalCurrent+MillisPassed/1000*(BatVoltage-FetVoltage)/2.2/3.6; lcd.print(" I="); lcd.print(TotalCurrent/1000); lcd.print("mAH "); delay(1000); MillisPassed = millis()- PrevMillis; PrevMillis = millis(); Serial.print(int(MillisPassed)); Serial.print("\t"); // prints a tab Serial.print(BatVoltage); Serial.print("\t"); // prints a tab Serial.print(FetVoltage); Serial.println(""); // prints a tab CL2(); } else { done=true; digitalWrite(ledPin, LOW); // set the LED off - stop loading lcd.setCursor(0, 0);// First line first char lcd.print("Bat Power Tester [DONE] "); // Print a message to the LCD. CL2();//clear line 2 sensorValue = analogRead(sensorPin); // read the value from the sensor: BatVoltage = (sensorValue*4.887); lcd.setCursor(0, 1);// Second line first char lcd.print("V="); lcd.print(BatVoltage); // print voltage value lcd.print("mV I="); lcd.print(TotalCurrent/1000); lcd.print("mAH "); for (int i=0; i<100 ; i++){ digitalWrite(SPKPin, HIGH); delay(1); digitalWrite(SPKPin, LOW); delay(1); } delay(1000); } }
http://www.instructables.com/id/Arduino-Projects/
Related Instructables
SAFE Recharging of Exotic Batteries, NiMH, LiPO and complex battery packs or multiple cells. by erckgillis
http://www.instructables.com/id/Arduino-Projects/
Step 1: Supplies
These are the supplies you will need most can be found at radioshack and at hardware stores. if you cant find any etchant solution i made my own on STEP 6. + iron +scisors +tape +soft gloss photo paper +arduino +wii nunchuck +LED's +brake cleaner +etchant solution (is makeable, see step 6) +double sided PCB .062" thick (you do have a bit of lee way) +solder +hack saw
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. etchant solution found at radioshack Image Notes 1. scisors found any ware 2. tape found any ware 3. an iron i used a ski waxing iron, but any iron will do 4. DOUBLE sided copper clad found at radioshack 5. paper clip any ware 6. CD yAy haha not used was just on my desk 7. and any laser printer. found at staples
Image Notes 1. kodak soft gloss photo paper found at staples MUST BE SOFT GLOSS
Image Notes 1. brake cleaner. found at autozone or any other auto parts store.
http://www.instructables.com/id/Arduino-Projects/
7. Load a piece of photo soft gloss paper into your printer (image 4) 8. now go to file>print> and select your laser printer (image 5) 9. press PRINT. 10. now you should have a nice looking transfer. WOOO HOOOO we are almost there. sorta
Image Notes 1. 1) locate the file where ever you saved it 2. 2) click OOOPPPEEENNN
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. taped side 2. folded side side 3. peice of tape should be about that long and wide
http://www.instructables.com/id/Arduino-Projects/
PS: if you are lost in any of these processes this is a good video showing you how to transfer your PCB design. now we are almost done. WOOO HOOO!!!!!!!
Image Notes 1. slide it in trying not to scratch the toner (very unlikely), this could cause a break in one of your traces.
Image Notes 1. used to aline the board with the design. have to kinda squint to see where it is.
Image Notes 1. yeah thats right. all me. 2. ahhh help meeeeeee!
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. this is not the transfer it just a peice of paper. 2. dont even think about it 3. squish!!! ahhhh help!
Image Notes 1. the toner may or may not be white. the white is just the paper.
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. OUR VICTIM!!!! MWA HA HA HA HA!!! 2. this is the reason for the wood board so that we arnt bending the PCB when ever we go to drill though it.
Image Notes 1. battle wounds 2. battle wounds 3. battle wounds 4. battle wounds 5. battle wounds 6. testing out some paint for my mame machine
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. top solder job should look somewhat like this
Image Notes 1. analog pin 5 2. analog pin 4 3. analog pin 3 4. analog pin 2
http://www.instructables.com/id/Arduino-Projects/
4) Now its time to place our leds into the bread board making sure that the short leg or the flat side on the led is in the ground, and the long leg is in the positive (or the wire going to the arduino digital pins) (image 4) 5) plug in you wii nunchuck 6) power up your arduino 7) and hopfully it will work if now leave a comment and i will try my best to help you. 8) heres a demo video
Image Notes 1. analog pin 5 2. analog pin 4 3. analog pin 3 4. analog pin 2
Image Notes 1. right led here 2. up led here 3. left led here 4. down led here
Image Notes 1. connected to ground pin on arduino 2. i will flip this upside down when i connect it to the arduino so everything is kinda flipped
http://www.instructables.com/id/Arduino-Projects/
4. flat edge 5. long leg 6. long leg 7. long leg 8. long leg
Related Instructables
Mario Bros. costumes with sound effects by Wireless Wii Nunchuck RobHopeless controlled Arduino by XenonJohn
http://www.instructables.com/id/Arduino-Projects/
PPE milk bottles make for a cheap yet aesthetically pleasing way to diffuse LED lighting. Especially if you can find nice round ones :) Modding an object with LED lighting is not only environmentally friendly, but also much more straightforward than building a housing from scratch. Because LEDs are tiny, you can put them almost anywhere, and they don't produce much heat as long as they're spread out and running at the correct voltage. This instructable will deal mainly with physical design and production, and I'm going to assume you have a basic knowledge of creating electronic circuits and LED lighting. Since the exact LEDs and power supply you use will probably vary, I'll only go into the basics of my circuit in terms of specs. I'll also try to point you to useful resources, and explain more about the Arduino microcontroller and code that tells them to work in sequence. The electronics of basic LED lighting are really simple, similar to elementary school electronics, so probably won't take long for you to pick up at all.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Croc clip leads for hooking up and testing circuits easily. 2. Zip ties, okay-ish strain relief for cables in a pinch. 3. Multimeter 4. Screwdrivers, also for general spudging of things.
Image Notes 1. The holes these cut match the inner width of the milk bottle caps quite closely. 2. This kind of hole cutter, with a drill bit in the centre, is perfect for making these lights, as the resulting centre holes can be used to pass wiring through.
http://www.instructables.com/id/Arduino-Projects/
5. Soldering iron. Cordless because of gas power = easy to use. 6. If you plan on salvaging any components from old electrical devices, this desoldering wick will make it a lot easier. 7. Cutters 8. Strippers 9. Junior Hacksaw 10. Assorted drill bits 11. Third hand, vital for soldering. 12. Assorted wire. You'll want copper stranded wire for your actual electronics since it can bend without eventually breaking. You'll want solid core bell wire for prototyping with breadboard though, as copper strands break off in solderless breadboards and ruin them. 13. One of about 4 different drills I used in the course of working on this :)
Image Notes 1. These holes align with discs to allow cable through from the top.
Image Notes 1. You'll need the caps too of course. I don't have any pristine ones left to photograph.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. The first LEDs I used. Ugly, ugly yellowish-green off white light from these. They made me feel slightly nauseous without other light sources on in the room. 2. So I replaced them with these, which have diffused lenses instead of water clear, and give a very mellow, cool bluish white.
Image Notes 1. 3mm clear perspex. Small circles of this will hold the LEDs and wiring together. Not as good as a custom made PCB, but an okay stand in for something this simple.
Image Notes 1. If you don't have a socket to go with yours, you could just clip the plug off and go directly from the wires.
Image Notes 1. Cheap speaker cable, great for hidden wiring and economically covering distances. 2. Two core electrical cable, more aesthetically pleasing thing to hang the lights with.
Image Notes 1. 12.15v, but close enough. 2. More then enough juice. The LEDs only draw 240mA, so I could probably run four times as many plus arduinos to control them from this.
Image Notes 1. Assorted resistors, and I still needed to splice to get the exact values I wanted. 2. This is all the heatshrink I had left when I was done.
http://www.instructables.com/id/Arduino-Projects/
3. Solder 4. Pin header sockets, a very good way to connect your wiring to the arduino.
Image Notes 1. Beautiful. Here's the potentiometer that will control the milk lights.
Image Notes 1. LM317T - voltage regulator, used to produce a lower voltage supply from a
http://www.instructables.com/id/Arduino-Projects/
higher one. The difference is dissipated as heat, so use a heatsink if you're going to be creating a large drop in voltage. 2. NPN transistor, put between the circuit and earth connection to act as a switch. This is what the Arduino will use to control the lights.
Image Notes 1. Wood gives soemthing for the drill to go into, and allows you to feel when it's gone all the way through.
Image Notes 1. The holes these cut match the inner width of the milk bottle caps quite closely. 2. This kind of hole cutter, with a drill bit in the centre, is perfect for making these lights, as the resulting centre holes can be used to pass wiring through.
Image Notes 1. An almost perfect fit. It doesn't matter if they're not absolutely perfect.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. These holes align with discs to allow cable through from the top.
Image Notes 1. Positive 2. Negative 3. Negative 4. Negative 5. Positive 6. Positive 7. +12v 8. GND
Image Notes 1. Cross leads from neighobring LEDs 2. I filed the ends of these clear LEDs down to make them cast diffused light. They were the wrong colour though (had a sickly yeloow/green tinge), so I later swapped them out for some bluer ones.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Twist them around each other gently, trying to flatten against the disc as much as possible without stressing them.
Image Notes 1. Do this with both pairs of neighboring leads that aren't beside the cable holes. 2. Cable holes here; the two straight leads will be soldered to the cables rather than each other, so remain untwisted.
Image Notes 1. One ready for soldering. 2. Current will come through here. 3. To positive lead here 4. Negative lead will earth circuit through this hole.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Thread cables through disc and wrap around leads, carefully making sure of the correct polarity for live and earth.
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Second protoype, made without a perspex disc and all components mounted through the cap. The PPE caps are thin, weak, and melt if you run LEDs hot. There's also very little strain relief for the connections, I found that moving this around broke some of the leads easily, whereas ones made with perspex discs have been hauled around to parties and are still holding together fine at around 12 months old.
Image Notes 1. The first iteration had the lights separated into three strands, controlled by these three switches.
Image Notes 1. Very simple (wiring not done at this point): Power in, splits into three, switches supply three cables (box not drilled for those yet in this image, they exited from the top), all return to common earth.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. These three strands could be powered on and off independently. I found though that that lights were so dim that there wasn't much point in this level of separation. It wasn't particularly pretty or functional.
Image Notes 1. Ping pong balls cut in half to hide joints. They were hole punched to take the cables, and looked pretty dodgy.
Image Notes 1. For this second attempt, I used a hot air gun to bend some plastic pipe into a curve that would go from one side of my room to the main light. Each length of flex is extended with a strand of speaker cable, just the right length to go to the end of the pipe. 2. This iteration ran off a single power cable and one switch (shown in next pictures). I'd put the separate wiring in for each bottle, because I knew this setup was temporary and I wanted to hook them up to a microcontroller as soon as I had the time. 3. Completely unrelated lamp shade. It's a home made mexican IQ light variant, cut from document wallets: http://0pointer.de/blog/iqlamp-stencil.html
Image Notes 1. Simple switch box made from a push fit pipe joint and two endcaps. Toggle switch + rubber cover at this end
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Power in from wall and power back out to lights at this end. 2. Cheap speaker cable
Image Notes 1. Socket and switch both reused from last switch box, and socket reused again for the latest version.
Image Notes 1. Messy, temporary clumps of wires for +12v and GND. 2. Crocodile clips from speaker wire to lights. 3. Yes. I also finally got around to redecorating just before building the new switch box for this.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. LM317T - voltage regulator, used to produce a lower voltage supply from a higher one. The difference is dissipated as heat, so use a heatsink if you're going to be creating a large drop in voltage. 2. NPN transistor, put between the circuit and earth connection to act as a switch. This is what the Arduino will use to control the lights.
Image Notes 1. USB adapter 2. Arduino mini. You need to connect this up through breadboard to talk to it from your computer.
Image Notes 1. Standard Arduino, now one model out of date (Duemilenove is the latest). Cheap and great for prototyping, not so great for squeezing inside smaller projects.
Image Notes 1. These good looking aluminium knobs also have potentiometers behind them. I'm going to use one to control my lights. 2. This amp was sitting at a market stall. It had been rained on and had the cord cut out the back, the stall owner wasn't sure if it worked or not, so sold it for 2. The knobs alone are worth way more than that!
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. These are very large capacitors. Do NOT mess around with these, they can easily hold enough charge to stop your heart. 2. This massive heatsink is a useful source of smaller ones :)
Image Notes 1. Knobs are usually designed to just pull off and push back on.
Image Notes 1. With the fascia removed, you can get at these nuts securing the potentiometers to the front panel.
Image Notes 1. After much disassembly you will get something like this. Desoldering can be
Image Notes 1. You can do it the messy way (if you don't mind damaging the PCB), by pulling
http://www.instructables.com/id/Arduino-Projects/
an awful job, especially if you're out of copper desoldering wick. There are some tips here: http://www.geocities.com/mistertippy/howto/desolder.html
on the component while desoldering all of the leads. It takes a while and only moves a little at a time, but will come eventually. I recommend desoldering braid instead though.
Image Notes 1. Beautiful. Here's the potentiometer that will control the milk lights.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. Bend the legs out ready to solder to. Don't bend too close to where the lead enters the package; they usually have a little oblong on them marking where it's
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/
The wiring, it turned out, was too big to all go back in the pipe, which is unfortunate. It means the LM317 and the arduino both stick out of the top of the pipe because it's so packed with wires and components. Squashing them in any further started to make it behave erratically, so I'm going to leave them outside. Since it will hang from the ceiling, I doubt they'll be particularly noticeable. However, I would have liked to have come up with a solution that stayed good looking while accommodating all of the circuitry. Never mind though, it works how I want it to. The simple analogue control feels pleasingly human. Notice in the code that the numbers at which things get turned on and off don't have uniform differences? That's because the pot I used turned out to be Log rather than Linear, so distributing the thresholds evenly resulted in all the activity being squashed up in one end of the pot's travel.
http://www.instructables.com/id/Arduino-Projects/
Image Notes 1. I was going to use another six pin header socket here to wire the arduino up to a USB socket and a reset switch. However, I realised that wouldn't work without the FTDL chip on the Mini USB adapter. While it would be nice to have a USB socket in the side of the light to program it with, for this iteration I might as well just get a USB to header lead with the chip in instead.
File Downloads
milklightsketch.txt (2 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'milklightsketch.txt']
PWMtest-milklights.txt (1 KB) [NOTE: When saving, if you see .tmp as the file ext, rename it to 'PWMtest-milklights.txt']
Related Instructables
Quick and easy homestead uses Recycled for Plastic Bottles (PET) by Christmas Tree by chaintool velacreations
http://www.instructables.com/id/Arduino-Projects/
http://www.instructables.com/id/Arduino-Projects/