Laser Spy Game
Introduction: Laser Spy Game
I have to admit that this game is not really a new idea, you've seen in in cinema and TV a thousand times.
If you know the Big bang theory then you might have seen this: https://www.youtube.com/watch?v=VTmEtzseuaA
What really makes the difference now is the availability for cheap green laser pointers and the solution for the mirrors.
Now it is possible to built up this game for just a few euros or dollars.
So: Let's get started!
Supplies
What you need:
* a green laserpointer
* some adjustable mirrors (like these)
* an electronic control-board.
The green laserpointer might cost you 5-10.- € if you order a cheap one over the internet in China. I hope you don't want to fry you friends (and yourself) so take a 1mW version. It is strong enough, believe me. Most laserpointers from China will have a larger output anyway. And don't ever look directly into the laser! It will blind you forever!!!!
Make the adjustable mirrors according to this instructable:
They are about 2€ per piece if you use the high quality dentist mirrors. With the standard mosaic mirrors they will be below 50ct.
And finally this instructable is about the electronic control-board.
Step 1: The Schematic
I chose an Attiny84 because it has everything I need and it is quite cheap though.
I now use a special one wire bootloader to programm my microcontrollers. You can find the documentation and the sourcecode here: AVR Bootloader FastBoot von Peter Dannegger
This has several advantages:
* you don't need a full 6 or 8-pin programming interface (socket, cables ...)
* it works very fast, sometimes even faster than the ISP.
* You can use nearly every pin of the uC for programming.
* You have more pins free for other jobs.
The only disadvantage is: The bootloader itself takes 512 Bytes of your flash memory, which cannot be used by your application. But with 8kB of memory I have a lot of left.
The bootloader has to be programmed once for each chip. Maybe I can make a tutorial on this if there are a lot of questions. But it was not my work, I just use it as it is and can only thank Mr. Dannegger for his work!
Step 2: Testing the Schematics
The electronic control board should do the following:
* Switch the laser on and off
* Detect if the laser was interrupted
* play a sound in case of an interruption
You need the following pieces:
- 4x5cm breadboard
- attiny 24, 44 or 84 (depending on your programmer)
- two pushbuttons
- two LEDs
- one FET, or a normal transistor
- some resistors and one capacitor
- some cables
I started out with a solderless breadboard for initial testing as you can see in the picture. 983
This way I could improve the software and recognize possible problems in an early stage. Instead of sound and laser I used simple leds in the first place.
In a later stage, I replaced the poti and the LED for a red laser and the LDR built in a tube for fizzy tablets. ;-)
If you only copy my device you can skip this step. But if you have different parts, it might be good to test them also like I did.
Step 3: Building the Real Board
After the tests with the solderless breadboard were finished I decided to built the real thing. In the pictures you can see the steps from the nearly clean board to the final installation in the housing.
An interesting fact occured, when I tested the device with the final green laserpointer. Where there was no problem for the red laserpointer, the green laserpointer was quite dark, because the C-E-transition of the BC547 transistor reduces the voltage by 0.7V.
It was still visible, but only as a small dot on the wall.
So I changed the BC547 to a IRLML2502. This is a N-channel mosfet and doesn't reduce the voltage like the transistor did. It was not my first choice because of the small package. I usually use it on PCBs, but it is still possible to use it on breadboard. And this device needs an additional 10k pulldown on the gate, where I used a SMD-type.
Step 4: The Software
The software running on the attiny24 is the heart of this game.
I don't want to write things double, so just download the sourcecode and adjust your pins, if you chose to use other ones than I did. Everything is explained in the code itself. 611