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.

No comments:

Post a Comment