Tuesday, March 29, 2011

mayhem on a C6713 chip

Its amazing what two weeks without compiling code will do to one. I have been working so hard on senior design that I forgot about compiling and loading code onto the development board. I did get our lab working properly and figured out what the code was doing. normally c code on a computer using a compiler isn't too touchy about memory as long as you have enough. In the embedded systems world you have buffers and more buffers which have finite sizes and therefore must transfer stuff in and out of the at a near constant basis.

Tonight I have to create a poster for a contest I am not entering for pattern recognition. I still have to make the poster and still have to finish everything. I really hope this project results in some good measurements. I am going to be up all night.

See you all in the morning

Friday, March 25, 2011

Last day of spring break :(

I had a week and I can honestly say I've used it to get a lot done. Yesterday we started building the amplifier circuit and got some results. Today I want to tweak the design and get the two scales working and recognizable by our microcontroller. Below is the simple script I wrote in MATLAB to get the resistor values and the offset voltage. apparently the solver wants numbers instead of being all numeric. One has to run this, get some numbers and run it again for the thing to work. If anyone has a better idea I'm all ears.

clc
clear

Vohi = 5;
Volow = 0;

%%Thevinin Equivalents

Flexlow = 13500;
Flexhi = 14500;


Vthevlow = 5*(Flexlow/(10000 + Flexlow))
Rthevlow = ((1/10000)+(1/Flexlow))^-1


Vthevhi = 5*(Flexhi/(10000 + Flexhi))
Rthevhi = ((1/10000)+(1/Flexhi))^-1

%Solver

 [R, V] = solve('0 = V-((2.8723 - V)*(R/5.7447e+003))',...)
   '5 = V-((2.9592 - V)*(R/5.9184e+003))')

Today I also want to get the motor circuit working and find the parts needed to control it via the micro controller. If these things get done this week it will have been a spectacular week.

Tuesday, March 22, 2011

Omp amps have a purspose?? Yes!

Spring break is upon me and instead of gracing some tropical beach to knock back a few fruity drinks while listening to Margaritiaville I am striving to finish my senior design project.. Todays hot topic was using the Flex sensors to determine the weight of product in the bowls which tips a scale. the data sheet for these guys is here: Flex Sensors A resistance claim of 10-20k Ohms depending on how drastically one bends it. we are in a hard position where our sensor ranges from 13-14k Ohms. this produces a small window of voltage change between 2.08 volts and 2.17 volts.

Not bad though we are using an OMP AMP! here is a picture of a basic inverting amplifier. We see in this one that the (+) input to the circuit is grounded. This needs to change to a voltage that we can use to make the low voltage aka 2.08 volts to equal a gain of zero and the 2.17 volts to equal a much larger gain. Since the window is small here our relationship between the flexing and final voltage output (between zero to 5 volts) is going to be quite linear. We did some math and plugged the numbers into MATHCAD (Here is the link Mathcad ) and voila we have an answer for the value of the R2 and the voltage offset. Note though in order to understand what is going on here you need to know we used a Thevinin Equivalent circuit to represent the voltage divider created by the flex sensor on top and a 10k resistor on the bottom.


The circuit may need a little bit of tweaking as we are assuming the op amp is ideal but I am confident we can make it work.

Tomorrow I am actually going to go somewhere. I am taking my Lovely girlfriend to the Museum of Science and Industry. I will be thinking of senior design but hopefully I will be intrigued by the Body Worlds exhibit (Link http://www.bodyworlds.com/en.html ). My philosophy is that if you're going somewhere cool or scenic why not learn something or work up a good sweat. you'll be surprised how much fun that is and if the place to a lot of sweating to get to it certainly won't be that crowded.

To-ta-loo everyone

Wednesday, March 16, 2011

The should I or Shouldn't I

As I inch forward to graduation I keel thinking about what to do about my job situation. I am certain I could get a job programming PLC's of any kind and be successful at it. But is it the right thing? That field is actually labeled as more technician based stuff than EE stuff. Accepting a job like that would almost be backing myself into a corner with little or no maneuvering room.  Once you start doing that, it's all you'll be doing. No more C or VHDL programming which I'd rather do.

I haven't accepted anything and am more than likely to draw this one out for a month or two to see what else pops up. Any suggestions pleas?

Sunday, March 13, 2011

Daylight savings takes its toll

Well I cannot fall asleep and it's nearly 1pm on a Sunday night.  I miss Hawaii where daylight savings time only meant that the Packer Game started at 6am instead of the 7am way too early kick off.


I have made significant progress in "Ye olde Speech Recognition"  program where I started taking averages of Mel Cepstrum coefficiants and low and behold I have classifiable data
As you can see it is separable and with a little tweaking I may be able to make them MUCH more separable. 
The other program I had to write was a compression analyzing program where we were suppost to create fifty random strings of letters in fifty different files, zip them via MATLAB and then analyze the size in various combinations. I can do this.... I did it. It took a long time because I had never done it before but... then we have to randomly corrupt one of the files, and perform NCD analysis on them. I am still hashing out how to randomly corrupt a file in C code. I have a feeling I am going to be in the lab all day tomorrow working on this one. I was told in lecture (We Were Told) this would take on the order of 30 - 90 minutes to do depending on the level of understanding. Sadly and I'm not alone on this one it has been over 8 hours and will probably break 13 if I am not lucky. 

Yesterday there were an enormous amount of people wearing these green shirts making a pilgrimage down to North Ave. This is where the bars are located. Normally I wouldn't be curious as to this but it was about noon on Saturday. It was a pub crawl. Don't these people have things to do? I am racing around for time and resources, trying to find a job get good grades and keep up with my reading. Whomever says college is a leisurely life didn't study Electrical Engineering or was pretty damn smart. 

I've also been glued to what's happening half way around the world in Japan. How can one country so small have such bad luck with nuclear energy? I really don't think they should go after the engineers who designed the reactors. if you can build a reactor to withstand a 7.9 earht quake you could be reasonably sure it will hold... but I guess not. I am hoping they can quickly stabilize the place and get to helping the citizenry who appear to be in rough shape. From what I hear it is the best prepared country in the world for dealing with earthquakes so once they get the reactor secured the wheel will once again begin turning. 

I'm trying to think if anything else exciting has happened since I last wrote or blogged. this means I must write more.



Tuesday, March 8, 2011

A late night at Kinkos

I am annoyed. Texas instruments has a software package called "Code Composer" studio on the market that I am using. I cannot find all the necessary files to do all the tutorials. We've been through numerous lab sessions but I need to dive in deeper to the debugging section to understand snippets of code and am missing files. even worse was that class was cancelled tonight. We are far behind in that class and I do not want a sprint to the finish due to lack of planning. My laziness is not a factor here because I WANT to go ahead and do this stuff.

I have the help files neatly printed thanks to Kinkos. Which by the way is only open until 11pm everyday instead of the 24 hours it used to be. That is horrible. I have actually been in there at three am and always found it to be comforting that I could go in whenever and print out whatever I needed. sigh....

Still no luck with the speech recognition although I am mounting a new plan of attack. One of the biggest gripes I have about UWM's EE program is the lack of required programming classes. I don't have many but this one is huge. Right now I am competing with a number of well schooled CE's who have the experience and don't care about power grids. I know how most of them work but really don't care.

Now it seems that I am suppost to know C hands down. I know a little. and I am learning now but I have to work three times harder than the others because they have the skills needed to get the code written while I am reading chapters of "A book on C" late at night (Think tonight). That book however is a really great book. I just need time to read it.

Tuesday, March 1, 2011

All is well at the moment

Alas I have not posted in a while and since then so much has happened. which is exactly why I haven't posted in a while.  First off my debounce problem is solve. I bought some better buttons from www.sparkfun.com and they worked much better. Combining them with a library specifically for buttons and presto! the incrimenting works wonders. the buttons Radio Shack sells work but are very noisy. for those of you purchasing any I recommend a "D" flip flop. That will debounce the button and give you a solid yes or no.

Since then I have also rigged the DS1307 RTC (Real Time Clock) into my design and figured out how to get it to correctly log the time and bring it to the Microprocessor as a variable. It works very well at the moment. It is using the I2C 2 wire network and has an address of 0x68. I had to do quite a bit of reading before I new exactly what to do. A few online tutorials helped greatly.

The motor problem for our food dispenser was solved today by a quick trip to American Science and Surplus. The store has a very unusual but awesome inventory of all things for tinkerers. We found our water tank (an empty cleaned Cheetoes Tube) for all of forty cents and several motors for half the cost of a new one online. Please shop there. I cannot say enough about how valuable a store like that is in the area. I have no idea where they got the motor. It is used but works great for a prototype.

Things are coming together for this project which is a good thing because the other nightmare my Pattern Recognition project is going to keep me up several nights.

In other news I have officially broke onto the job market and am activly looking so if anyone....