Wednesday, March 17, 2010

10 Weeks to the Day!!

I am a couple days late in posting this but the message is the same:

I'm Finished!
(Start to Finish: Jan. 4 - Mar. 15)

That's right, I put in the time and have finished building a working prototype as described in my Design Specification. I am proud to say that I have been able to implement everything I intended to and even have some plans to further develop upon next term. I realize that I have not kept up on posting my current status, but I was really pushing to complete this on the 10 week mark. I will continue to post on my development process following this post, so do stay tuned, the best is yet to come!!

For now I thought it would be fun to post some interesting facts that accompany this accomplishment.

TIME FACTS:
- Avg. Time in Lab per Week: 25 hours
- Avg. Total Time Spent per Week: 30 hours
- Longest Contiguous Time in Lab: 15 hours
- Shortest Time in Lab: About 5 minutes (I forgot something at home)
- Earliest Arrival Time to Lab: 6:15 AM
- Latest Departure Time from Lab: 2:00 AM
- Total Time Spent (Thus Far): 300 hours (I still have documentation and testing)

MONEY FACTS:
- Estimated Final Cost (Materials Only): $440
- Estimated Labor Cost, as Intern (@ $20 / hour): $6,000
- Estimated Labor Cost, as Entry Level Professional (@ $30 / hour): $9,000

MOST FRUSTRATING MOMENT:
- This is a tough one because anytime you hit a wall, it is frustrating. I think if I had to pick one, it would be in just the first week or two of starting in on the project. I had spent about an hour in lab wiring the first test circuit for the gunshot detection interface. When finished, I looked over the circuit and everything looked correct, so I turned on the power. When nothing showed on the output, I started checking the circuit again, the first check being my opAmp. I touched the opAmp to see if it was warm... it was HOT, about 150 F hot. Needless to say, this was not a pleasant experience. As it tuned out, I had reversed the power and ground on the opAmp rails, which pretty much killed that device. This little slip up set me back almost a week because I had only one opAmp on hand, and I had ordered more online just the day before. Aside from the time delay, I had also burnt my finger a little, and left a nice melted spot on my wiring board.


MOST SATISFYING MOMENT:

- One major issue I faced with this project was using a custom user interface that I developed in Photoshop. This was difficult because the size of the picture was quite large and my memory space is very limited. In order to use my custom picture, instead of drawing the UI, I had to manually load the picture into the flash memory. Once in flash, I could read the picture and load it to the screen. This entire process took me the better part of three days, working with a friend. When we finally were able to load a picture from flash memory, into the data memory and display it on the screen... put simply, we were ecstatic.


Needless to say, I am quite [excited, revealed, thankful, exhausted...] (you pick). I have really enjoyed this project, enough so, that I will keep working on it to make it better. I think the first thing I need to do is get my wife a big present for being so patient with all the late nights.


Sunday, March 14, 2010

Corrective Action

Well, I did not disappoint! As of last Friday (3/12) I was about 95% done. All I had left was to adjust timing a little for my buzzer and put the code onto my board. But, today I went to lab with the intent of only being there for a few hours... I was sadly mistaken. As intended, I was able to finish developing my C code that runs on the Nios CPU that I have developed. I was also able to program my hardware code such that, when the device is powered on, the FPGA will be automatically configured.

When I began running my project without a USB cable connected, the board would power down (slowly) after only 30 seconds of being on, not an intended feature! This slow and consistent death of my project pointed to only one culprit, the power regulation board. Before anyone begins to worry, all of my hardware is still fully functioning, including the power regulator. In fact, the the well being of my hardware is thanks to a built-in feature of the regulator, where it will shutoff if it becomes too warm. This excessive heat can be caused by a small number of things, and in my case it was simply due to a lack of cooling.

As it turns out, I made a small error in calculations. Instead of dissipating only about 0.3 Watts of heat (which is not much to worry about), the regulator was producing 3 Watts (definitely something to worry about)! A simple recalculation shows this:

12.5 V in - 7.5 V out = 5 V dissipated by the regulator
The system draws about 600mA's from the regulator
5 V * 600mA = 3 Watts

In order to fix this, I had to add a heat sink and a couple fans, not really a big deal by the sound of it. Unfortunately, to do this required moving the power supply to a new location where a fan could directly point at it. Also, I now need to make not one hole, but two, to accommodate the fans and create airflow.

This ordeal has set me back a day, and my project is currently in pieces due to the remodeling of the package. I now plan to spend a significant amount of time tomorrow finishing the remodel and completing the project. I have to have it all done by Thursday of this week (3/18) as I have made plans to go to the range and test it out.

Tuesday, March 9, 2010

Progress By Leaps and Bounds

I realized today, that it has been over a week since my last post. Crazy how quickly time moves when you're in lab! Anyway, it is with much satisfaction that I get to report, I am on track to finish by the end of this term, maybe by the end of this week even!

Over the last couple of weekends, I have been tirelessly working on integrating a System on a Programmable Chip (SoPC) into my development board. This basically means that I have developed a CPU architecture that runs on my FPGA (I will post soon about this topic, in more detail). As of last night, I have redesigned my UI (Main Screen - v2, seen Below).

In this new version, I have separated Final Time from the Time Sheet, and expanded the number of recordable shots. Also, I increased the type and size of the font for readability. I have successfully loaded the new UI in the the on board flash memory and have been able to print text in the tables.

While I have done much more than just the CPU and UI in past week, I don't have a lot of time to go into detail at the moment. Plus, many final tweaks need to be made, so I will wait till I am done before posting too much about the software. What I can tell you is that I have the following working:
  • Start button
  • Gunshot detection
  • Timing between gunshots (with a mere 1/10th of second in between shots)
  • Text printing to the screen
  • Internal LED's controlled by external button
  • Buzzer
  • Power supply
I don't have much left and plan to stay in lab until it is done tomorrow (3/11). I have a bottle of champagne in the fridge awaiting my completion that I must not disappoint ;)