This electronic skeet shoot game was inspired by a similar version by masonhorder. LED bar graph displays are used instead of individual LEDs. By using two 10 Segment Red, Yellow, Green, Blue LED Bar Graph displays along with two Blue LED bar graph displays, it gives a total of 40 LEDs in a relatively small space. There are four red bars in the center to represent the "target" area. Three 7 segment common cathode LED displays are used to display the level, number of LEDs hit in the target area, number of shots left and the score. These are all driven by a MAX7219 driver IC which in-turn is controlled by an ATTiny85 micro-controller. The micro-controller also drives a speaker and handles the input from the two switches.
VideoGamesThere are nine levels of play:
- Level 1 - Sequential alternating four led skeet with a fixed 50mS between each frame.
- Level 2 - Sequential alternating three led skeet with a fixed 40mS between each frame.
- Level 3 - Sequential alternating two led skeet with a fixed 30mS between each frame.
- Level 4 - Sequential alternating one led skeet with a fixed 30mS between each frame.
- Level 5 - Sequential alternating three led skeet with a variable time between each frame.
- Level 6 - Sequential alternating two led skeet with a variable time between each frame.
- Level 7 - Sequential alternating one led skeet with a variable time between each frame.
- Level 8 - Random two led skeet with a fixed 600mS before the next change.
- Level 9 - Random two led skeet with a variable time before the next change.
You have 24 shots for each level. Each red LED "hit" will give you 1 point. So on Level 1, each shot can score up to 4 points. After 24 shots, your combined score is shown. Pressing the Shoot button again will allow you select a new level or play the same level again.
Case DesignMost of the design is in the layout of the printed circuit board. It becomes the front panel for a simple box that was created using OpenSCAD. Since the PCB is the front panel, all components that are not required by the user are mounted on the back of the PCB. To continue to use DIP packages for both the ATTiny85 and MAX7219 chips, standard IC sockets are mounted on the back by flating out the pins and soldering them like an SMD device.
(Note: I wired the DC Power socket incorrectly on the schematic hence the milling around the DC Power Socket on the board to fix the problem. The Eagle files attached have already had this problem fixed).
Printing/AssemblyThe Eagle files for the Schematic and PCB layout have been included. I made my board using the toner method. I also printed on the top side board using the toner method as well.
The 3D printing of the box is simple and requires no support. Drill out the PCB mount holes with a 2.5mm drill and create a thread using a 3mm tap. Use M3 screws to mount the PCB.
The source code provided is for an ATtiny85 micro-controller. I programmed the ATTiny85 chip on my AVR ISP programmer.
Use the following fuses
avrdude -c usbtiny -p t85 -U lfuse:w:0xe1:m
avrdude -c usbtiny -p t85 -U hfuse:w:0xdd:m
avrdude -c usbtiny -p t85 -U efuse:w:0xfe:m
This will turn off the prescaler and enables the PLL so the chip can run at 16MHz.
In the Arduino IDE, add the following package in File-Preferences-Settings-Additional Board Manager URLs
http://drazzy.com/package_drazzy.com_index.json
Adding the additional boards to the Ardunio IDE
Now select the following from the Tools menu
- Board: “ATtiny25/45/85”
- Chip: “ATtiny85”
- Clock: “16MHz (PLL)”
- Programmer: USBtinyISP
Set the board and programmer options
Open the sketch and select Sketch-Upload using programmer to upload the sketch to the ATtiny85.
Comments