Integrating software & hardware in a way that is nothing short of perfection.

Gun Nears Completion

CSE181A Winter 2011

Progress Report for Week #9 (2/23/2011 to 3/2/2011)

Project Title: Super Spray

Since it is week 9, we were totally swamped with projects for other classes, and so there’s not a whole lot of major progress this week on the hardware front.  The gun continued to get prepared for the permanent soldering of the parts onto perfboard.  We can’t take all of our hardware components off of the board and put them into the gun until we know our game works on the breadboard, in case we need to make any hardware changes.  Our game isn’t in a running state right now, so we can’t do that yet.  One thing we wanted to do to give our project more flexibility was to make it so that even when the microcontroller was mounted in the gun, that it could still be reprogrammed, in case of any bugs or feature additions.  Our AVRisp mkII programmer has six pins: GND, Vdd, MOSI, MISO, SCK, and the reset pin.  So, we picked up a cable used to connect power supplies to motherboards in computers.  It is an 8 pin EPS12v power  extension cable, so there was enough pins for us to use.  I cut the extension cable in half, and extended the wires.  One end will go to the microcontroller’s respective ports, and the other end will go into the AVRisp mkII programmer’s plug.  Here’s some pictures illustrating the process.

This is the cable and connectors. On the right is the male end, and is what will be coming from our micocontroller.

This is the cable as it will be coming out of the back of the gun. The cable will be in the back tank when it is in normal use. If it needs to be reprogrammed, we can unscrew the back tank, grab the cable, and plug it into our programmer, and write a new hex file to the microcontroller.

The microcontroller is going to be housed in what looks like from the outside to be a dummy water tank.  It’s just a plastic sphere with two halves that can be unscrewed.  It takes up a lot of space, so we decided to use it to house components.  In order to be able to use the microcontroller inside, we cut our perfboard to fit in the sphere.  Wires obviously need to escape from this housing, so we cut holes, 4 total, 2 on each side to be able to route wires to either the back of the gun or the front of the gun.

The perfboard that our microcontroller will be on is shown here inside of the green sphere. The other perfboard will house any other components as needed.

These are the holes in the microcontroller housing for wires going to the front of the gun.

These are the holes in the microcontroller housing for wires going to the back of the gun.

We’re still trying to get a case made for our LCD so that it looks clean, and so that it has something we can use to mount it to the gun.  We’re looking to have RapidTech, which is located at in Engineering Tower here at UCI, 3D print our modeled case.  We will most likely have it made with ABS plastic.  Adrian’s twin brother, Alvaro, is an Architecture major at the University of California, Berkeley and graciously made this design for our case.  Thank you Alvaro!

This is 3D render of the LCD case. Note the screw holes. It will be two pieces, front and back so that the LCD can be inserted. The wires from the LCD will have room in the bottom.

Here is a wireframe model of the case.

As for the software, progress has been going at a steady pace. This week was spent on optimizing the code that was already written. The reason for this is because we ran into a technical issue this week that we are in the middle of correcting. The problem we have deals with the webcam failing to correctly find the red laser on the wall when the projector is also on. When we tried our initial testing, we  had the webcam detect our laser without the use of the projector. This provided us with great results in the laser detection. However, when testing with a projector, our detection results become really unreliable. The coordinates move all over the place. Ultimately, we decided to go back to our code and see if the issue could first be corrected there before actually modifying the design of our game in order to obtain a greater result from the detection.

Programming the game code has also been going well. No problems have arose here so far. The main accomplishment of the week so far was combining the Highscores class we created with our Start Screen code, so that users will be able to see who is on the highscores list while they are on the main menu. It lays the framework for creating a score item that will be attached to the current user when starting a game session. This will essentially map the player’s actions to their score and keep track of it until the end of their session, at which point will add to the high scores table if it is high enough.

Hardware Goals for This Week

  • FINISH!  The gun has to completely done.  Parts need to be taken off the breadboard, soldered in, bluetooth mounted, the accelerometer needs to be mounted, the pump inserted, the LCD needs to be attached, etc.

Software Goals for This Week

  • Fix the technical issue. This is of the upmost priority right now. If we have this done, we will be in a position to showcase a running demo of our project.
  • Continue working on the game code.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s