Duck Hunt Shooting Game on CRO

July 25, 2009 by admin · 3 Comments
Filed under: Microcontrollers, electronics 

Object Shooting Game on C.R.O. using ATmega32

deveshamaiya and ketan kothari

What Is It ???

This is a very interesting project. You all must have played the game “Duck Hunt” in video game . Here is a circuit that let you play the same shooting game but now the display device is not your television while it is a C.R.O. that is Cathode Ray Oscilloscope.

How to Do It Yourself ???

Now come to the concept part of the design. The basic building blocks of the design are ATmega32 (Atmel AVR Family), an Digital to Analog convertor, and a CRO.

R-2R

The circuit above is a simple R-2R ladder type of Digital to Analog Converter. It has total 8 inputs as digital word input and an analog output from Op-Amp LM358.

The basic control of signal is provided by the controller i.e. ATmega32. mega32 generates digital output from two of its ports which in turn converted into analog voltage using a pair of DAC’s.

circuit1-300x207

In our case we have used buffers to couple microcontroller’s output to the DAC input, this is because while doing experiments we were facing some problems because of unbalance in the R-2R ratio of DAC circuit. Now buffer properly isolates the microcontroller output to the DAC input.For buffer we used 74HCT541 IC you can go for some other also.

To couple the analog output from DAC to the CRO input we used MIC 50ohm cable, and ofcourse CRO needs BNC connectors for input. The most important thing is we are using CRO display in X-Y mode of operation. Each of two DAC generates analog signals corresponding to X and Y input respectively.

Source Code

Download Complete Source Code Compiled using WinAVR here. This source code includes functions to generate object by raster scanning on CRO screen. If you can use this code Do it…but if proved to be a good helper to you do reply me first. Thanks !!!


How it Works ???

Now the most important part, How to make a gun for Shooting and how the system actually works. The behind is very simple, Our gun has a sensor for green light at its tip. Sensor senses the green light and send the feedback to microcontroller. When i press the trigger of gun infront of any moving object on CRO screen, sensor sends a feed back to the microcontroller and microcontroller sounds the buzzer. This is how we detected the duck on the screen. Comparator is used to generate a tuned feed back to the microcontroller.