First of all we would like to thank the organization and especially the main sponsor, Capgemini, which made all of this possible.
At the Arduino Jam, during the brainstormsession, we came with the idea to make a classic Buzzwire game, but with some extra features to make it fun and off course to have a good reason for using a Arduino.
I teamed up with Jan Verstreken and continued for a while with brainstorming about possibilities for the "features". We came up with a very good idea, in fact it was such an amazingly cool, futuristic hypermultifunctional environmental changing idea, that we've tought the world might not be ready for something like that yet, so we just discarded it and came up with this:
An Xtremely tuned version of the classic buzzwire game :-). It's made for 2 players with checkpoints and... a ring that shrinks between 2 checkpoints.
Also, if you "Buzz the wire", the other person's ring grows and you will have to go back to the previous checkpoint before you can continue to the next one, where your ring will grow back to the initial diameter.
And off course it has some visual feedback with LED's and a speaker to indicate a "Buzz" and giving start- and victory tunes.
The finished Xtreme BuzzWire-4-2 in action!:
All this, from idea to full working, playable prototype, was done in less than 48 hours during the very first Arduino jam at the Timelab in Ghent, Belgium.
All credits for the construction and craftwork goes to my companion Jan who created the whole thing. I just helped to hold stuff in place, collecting materials, giving ideas and things like that :-)
Most of the programming was done by me, but after writing the basic setup and functions we both worked on it to remove the little bugs and finetune everything.
At the end of the Jam our project got the most votes from the other jammers and visitors! But it's surely worth it to take a look at the other jammers' projects too! (found on the link on top of this intro). They were all pretty awesome projects, made by pretty awesome and clever people.
Before we start with the instruction steps, I want to thank all the people who made this awesome event possible, especially Instructable-member cinezaster who did most of the organisation, and Timelab, and off course the main sponser Capgemini.
And also thanks to all the other jammers and my companion Jan for making this weekend an succesfull and awesome first belgian Arduino Jam (of many more to follow I hope).
Enough blabla, let's go to the instructions ;-)
Step 1: Materials & Used Tools
- ARDUINO. We used a UNO, but any will do, I guess.
- Breadboard and jumpwires
- a computer with arduino software installed.
- Soldering equipment
- wirestripper/cutter, screwdriver, you know... basic tools
- Something to drill small holes like a dremel or something.
- something to cut out your platform (we used a lasercutter, but jou can just be creative)
-something to put stuff together. ...We found out that 2-component-harsh is a SUPER-efficiënt magic material :-) But hot glue might do the trick too.
MATERIALS & other Equipment:
=steel cable (like for bicycle brakes) for the growing/shrinking ring and checkpoints
- Something long and conductive that you can bend for the BuzzWire. We used 4 Cu-rods soldered together as 2 long rods.
- wood or anything you can make a platform with. (we use MDF)
- !0 LED's and resistors (220 - 330 ohms) for checkpoint indicators
- 8 resistors (220 ohms) for voltage devider (see next step)
= 2resistors 10k
- 10K potentiometer... any type will do.
- some different colored hookup wire
- isolating tape or duct tape (off course!) ;-)
- 2 hobby/RC servo motors
- nuts and bolts for the start and finish contacts
- Something to make 2 handles that also will support the servo's (we used a paintrollers handle with a piece of PVC-tube)
- Lots of caffeïne ;-)
Step 2: The Schematic
This is the complete schematic for the BuzzWire-4-2. (And YES, I know this drawing looks crappy ;-) )
I suggest to use 2 standard breadboards, or if you like, you can use some proto PCB board and put everything together in 1 place. Or maybe you can make a Arduino BuzzWire-shield... I'dd like that :-)
For now we can ignore the servo's and Player1/Player2 pins (analogPin 0&1 respectively). You can connect these when the handles are build.
The signal pin from player1's servo on the handle will go to digital pin9, and player2's to pin 10
On one breadboard, set-up the 2 74HC595 shift-registers, and the resistors to the LED's... You can also put the LED's lower on the breadboard for testing before you put them on the platform if you want.
On each shift-register outputs Q0 - Q4 are used, representing checkpoints 1-5 for both players (IC connected straight to arduino is player1)
Data-pin is connected to I/O pin11 on arduino.
Clock-pin is connected to I/O pin12 on arduino.
Latch-pin is connected to I/O pin8 on arduino.
Lots of useful information including how to connect the 74HC595's can be found at http://www.arduino.cc/en/Tutorial/ShiftOut
Connect one end of the speaker to I/0 pin2 on the arduino and the other end to the ground. Not much to explain here.
On the second breadboard, set up a voltage divider with 8 resistors of 220ohms, one end to ground, other to 5V from arduino.
This will be used to make the 5 checkpoints, start, finish, and wire-touched detection on 1 single arduino pin per player.
The +5V-side will later on be connected to the BuzzWire, after the first resistor starting from there to the Finish-contact, next to the contacts for checkpoint5, then 4 and so on down to to 1,
Before the last one is the start-contact. (don't worry, how we made the start-finish and checkpoints contacts comes in the building steps!)
Later on, when we made the "variable ring" with the steel cable, we'll connect that to analog pins 0 and 1. And trough a 10k resistor to the ground.
Last plug a potentiometer (10K or something) in your breadboard between +5V en GND, and hook the sensorpin to arduino's analog Pin2. This will be used to adjust the difficulty (speed) of the game.
Now let's go take a short look at the code,
Step 3: The Code
However the code isn't very difficult, but still I was kind of proud that, after a full day of writing code without testing (while Jan was building the platform and handles etc.) It almost completely worked when testing it all out for the first time. So we didn't had to spend hours on debugging, just a few minutes.
This left us with enough time to implement some extra functions and "finishin touches" which made this project completed and a succesfull weekend-project.
Let's have a look at some significant parts of it.
first the variables:
byte P1pin = A0; //analoge sensorpins (players ring)
byte P2pin = A1;
byte speedPin = A2; //analog difficulty pin (potmeter)
These are the 3 used analog inputs. If you see unexpected behavior after building and connecting everything, maybe you switched the player's handles. You can either reconnect the wires or change P1pin and P2pin veriables in te code.
byte dataPin = 11; //Shiftregister DATA-pin
byte latchPin = 8; //Shiftregister LATCH-pin
byte clkPin = 12; //Shiftregister CLOCK-pin
These are the connections to the first shiftregister, the second is connected to the first. again: for mor info check http://www.arduino.cc/en/Tutorial/ShiftOut
The code to handle the shiftout for the led's can be found somewhere near the bottom of the code in a function called: updateLeds()
I must admit that the code still can use some tweaking/clean-up, for example: the pins for the speaker and signal pins for the servo's aren't set as a variable on top of the code yet, but hard-coded in the functions.
If you want to change the PWM pins where you connect te servo's, simply look in the setup()-loop and change values for:
If you want to change the pin to wich you connect the speaker, look at the bottom of the code for every function looking like this:
the first value is the speakerpin (2 in this case) the next 2 values are frequency and duration of the tone, in case you want to change the sounds.
the tone() function is used in the last 3 functions called: buzz(), beginbuzz() and victory()
Since the code is well commented, I think it's useless to go more in detail about it.
Take a look at it, read the comments, and if you have any questions, contact me, or look in the comments below, maybe you're is already answered by someone else ;-)
And now let's go over to Jan, and how the thing was build...
Step 4: Making the Handles
While searching for materials in the local DIY-stores, we picked up some PVC- tubing and 2 paintrollers.
The iron rod was removed from the handles. (Not discarded! Can be usefull for other projects.)
Next the PVCtube together with 2-component harsh was used to make an extension.
Some cutting and drilling was done on the backside of the handle to make the servo's fit. Make shure the servo's are aligned with the handle axis.
A piece of steel cable was attached to one end of the PVC tube with some strong (duct) tape, the other end of the cable goes trough the tube and handle and is connected with some M3bolts and nuts to the servo.
Step 5: Making the "BuzzWire"
For the buzzwire, you can use any well conductive material that is somehow bendable. We used and recommandcopper rods, but steel, iron etc. will work too.
Since the rods were a little short, 2 were soldered together to get 1 long rod. A small copper tube is used to solder the ends together.
This was bended into some shape for the track... The used equations and mathematical functions to calculate this course stay top-secret... But I can tell you that it's mainly a case of bending back and forward untill you are satisfied with the result ;-)
Don't be afraid to use 3 dimensions!
Off course this needs to be done in twofold.
Step 6: Putting It All Together
The playing area is made of wood and consists of 4 pieces:
- A bottom plate, with 4 holes for the 2 buzzwires and 4 for large nuts that are contact points for the handles at the start and finish of each wire.
- A middle plate used to separate the 2 buzzwires so players can't see each other progress. In this plate, 10 small holes are drilled, 5 for each players' checkpoints and 10 larger holes are drilled next to the checkpoints for leds.
- 2 side panels, for stability and also to lift the bottomplate so the wiring can run underneath.
The buzzwires are glued to the bottom panel at the start side only so the handles can be removed easily.
Look at the pictures for more information, when we have more digital material, like close-up movies from the loop, or pictures if I put aoll components on a protoPCB or something. I'll update this instructable.
If there are specific questions, put them in the comments :-)
Thanks for reading.
... to be continued