Ever wanted to take your dungeoneering experiences to the next level? Well, I have, and for me, building an interactive dungeon board was the way to go.
The idea for this project came to be when I had to build something with arduino for a school project. I was about to play Dungeons and dragons for the first time, and after doing lots of research, figured that the game could be made a lot more interesting and interactive.
Some forms of improving the dungeon that I saw included: projecting the board with a beamer, building full scale environments, and customisable mini's. But I wanted to make the whole a little more gamey, and decided to combine D&D and Arduino.
Thus I came up with the concept for an interactive dungeon board, but that's not where it started.
My initial focus was the miniatures. Minis are cool, everybody knows that, but I figured there was a whole lot of potential that wasn't being tapped into. Before knowing my limitations I started brainstorming about how I was going to make minis more interesting. I came up with ideas for minis with NFC functions, that could save your D&D character data, and display it on a monitor for easy calculation and such.
After broadening my scope I figured it would be fun to play around with the game board. Like with walls that fit in between the grooves of the squares and tiles that triggered something on contact. This way the dungeon master would be able to program certain tiles with an effect, such as a trap, treasure, or trap-treasure. After presenting my initial pitch, I received some very useful feedback. A lot of it was technical talk about how to realise my light-up minis, that I didn't understand (my understanding of electronics and physics is rather limited), but someone pointed out to me that the most interesting part about my idea was the part where the dungeon master could program tiles to have a secret effect on the players. This was something I'd only slipped in at the last moment, but it intrigued me. Perhaps he was right. It was probably the most interesting interaction of my concept, so I decided to focus on that.
I readjusted my pitch and changed course, to design and build an interactive dungeon board.
What does it do? well,
- The Dungeon master can set a square to any of 4 modes (colors)
- White - A normal square that does nothing special
- Red - A trap that activates when you step on it
- Orange - A square that contains a treasure chest... That attacks you when you pick it up
- Green - A square that contains a treasure chest... With actual treasure! Good for you!
Want to know how to make one yourself? Read on!
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Making Sense of Sensors
Part of the project requirement was to make use of sensors. I considered using buttons, light sensors, and range sensors, but ultimately settled on pressure sensors because it seemed to make the most sense. After all, when you put down a figure you're putting pressure on the board, so it seemed to me this would be the easiest to implement. It did however come with it's own set of complications (mainly weight based).
My design required one Round Force-Sensitive resistor or square one, for each square, which, if you're going to make a board with a lot of squares, will cost quite a bit. That's why, for a bigger board, I would recommend using Pressure-Sensitive Conductive Sheet and figuring out how to use it as a replacement.
Do keep in mind that these sensors have a rather high threshold, requiring either your squares to have a high base weight, or your minis to be heavy enough on their own. The way I set it up, required about 40-50 grams to trigger the sensor enough to send an analog signal.
Another important factor is how concentrated the weight is on the sensor. A good way to do this is to hot-glue the square to your sensor with a small drop of glue, or to use a tiny bit of blue-tac. This creates a small round surface that focuses the weight of the mini and square within the sensor. If you put pressure on the edges of the sensor as well as the sensitive part, it won't detect anything. However, be careful, as using a focus makes pressing on the edges of the square tilt it. This might cause the square to snap off. This is why I recommend blue-tac or Sugru.
Since the sensors have pins that go directly into your breadboard or solder-plate, you'll need to extend the pins to be able to place the squares far enough apart to make a grid. In the images above I demonstrate how I used simple electrical wires with pins to extend the reach.
Step 2: Cracking the Code
I don't have an extensive knowledge of programming. In fact, I'd never programmed until half a year ago when I started learning Python and HTML/PHP. Unfortunately, Arduino doesn't support python, so I wouldn't be able to directly apply my knowledge there. However, I have a good feel for the logic of programming. The difficult part for me is knowing how to formulate it correctly, and memorizing the functions and how to call upon them.
That's why I figured I'd write a mockup for the code in a coding style, but in my own words, so that I could later translate it into actual code for the Arduino. I included images of my mockups above for your viewing pleasure.
I played with a couple of ways to do it, and ended up with this simple If statement that was easily programmable, and as short as possible. This was really the only basic function that I'd need for the project, and I'm happy with how it turned out. It was really important to me that any dungeon master would be able to program the squares, with as little extra information as possible. I decided to keep the functions limited for clarity and programming ease.
I've included two versions of my eventual code: one that uses digital pins, and one that uses analog ones. The analog ones are more sensitive, but you'll usually have more digital pins at your disposal.
The improved one houses the analog pins and also code comments.
To increase the number of squares on your board, simply make a new variable and read variable for the pin you want to use, and add it to the rest of them, it's that easy.
Step 3: Building With the Breadboard
- 2 wires with pins on each end
- 1 Force-sensitive Resistor (preferably with elongated pins)
- 1 10k Ohm Resistor
For the entire project:
- 3 LEDs (Red, Orange and Green) ,3 wires, and 3 (330 Ohm) resistors for them
- 1 Piezo Buzzer, 1 (I used 1M Ohm) resistor and 2 wires for it
- 2 wires for power and ground (1 extra if you need to connect 2 sides of your breadboard)
- Wire to elongate your pins (LEDs and FSRs)
- 1 breadboard
- An Arduino
Due to my lack of electronic knowledge, I required a little help with putting together my breadboard. However, once I got the hang of it with some help from fellow students, I was able to progress myself quite aptly. And of course, as always, google is your friend.
I needed to make a few final adjustments to my gear, namely my LEDs. I needed to elongate the pins in order to have them reach my display. To make it easier on my future self, I color coded the positive and the negative pin of the LED with green and orange wires respectively (swapped out for respectively pink and blue in the schema).
I grouped input (the pressure sensors) on one end and output (LEDs and Buzzer) on the other for clarity. In the schema I felt no need to do this due to the naturally higher clarity and amount of space.
The schema provided above shows you how to connect a pressure sensor (replaced by a photo-resistor in the schema due to a lack of an FSR part in the simulator) to an analog pin, but the connection to a digital one is identical on the breadboard side.
In the case of my demo I color coded the pressure sensors to the intended color of their square, but each square can be programmed to any color.
In the scheme I employ a couple of color codes:
- Pink is power
- Blue is ground
- Yellow is output
- Red, Orange, and Green refer to their LEDs of that color or pressure sensor coded to that color
Step 4: Putting It All Together
When putting together my board I had the luxury of a laser cutter at my disposal. I cut out several layers that I used to build up a frame with some space to fidget in between if any wires were to come loose since I had no time to solder it.
I stuck my breadboard to a square that fit exactly into a gap in the bottom of the frame, and left the Arduino hanging out for easy access. I slipped the FSRs through holes that I made in a layer in the top and drilled holes for the LEDs to go through. I would definitely recommend soldering everything together if you have the time, it really sucks when you're putting together the frame and a wire pops loose and you've got to fidget the pin back into the right little hole.
There are many ways to make the frame, and you'll definitely want to upscale from mine since this is only a proof of concept. You might notice that in the pictures some cello-tape is used. This is because the hot glue let go during transportation and I had to improvise when documenting the process back home.
The reason I went with a wooden exterior was the fact that it would be the best combination of easy to mold and build (thanks to the laser cutter), and sturdiness. Another reason was a thematic one. Wood seemed to better fit D&D than say, plastic from a 3D printer.
To make my pieces heavy enough I used coins, this trick would probably work with regular D&D minis too (sticking coins to them that is). If I'd had more time I would've modeled proper minis and 3d printed them, but that simply was no longer feasible. And they probably wouldn't have been heavy enough either.
Step 5: Playtime
Now that everything is put together, it's time to play.
The dungeon master uses the arduino code editor to adjust what square triggers what effect. Here's my demo function:
Upload to the arduino when you're happy, mister dungeon master!
Now the tiles are active and ready to be played with.
Psst... If you want those sound files from the video for your board, I've dropped them here.
Participated in the
Arduino All The Things! Contest