Tuesday, April 25, 2017

Not feeling rn. My mind is in Spaaaaaace. Focus in Thor. Nooooooo. It's k. Review day. We're not doing stufffffff. Mason trashes some colleges day.

Universities Mason trashed today:
UC Irvine
UNLV (engineers wanted)
Cal Poly Pomona
Harvey Mudd (just that they don't accept transfers)
Immediately out of college students "you are STILL useless out of college"
and some Cal State Schools, especially for students looking to do graduate work

Words in Spanish that I'm working on memorizing today.  Fun fact, Blogger doesn't believe in tabs for some reason. Spaces all the way son
(from http://www.linguasorb.com/spanish/verbs/most-common-verbs/2)
llevar         to carry/bring
tratar          to treat/handle
recibir        to recieve
conseguir   to get/obtain
permitir     to permit
sacar          to take out/stick out
presentar   to introduce
acabar       to finish
traer          to bring
morir        to die
realizar     to accomplish/achieve
lograr       to get/achieve/obtain
reconocer to recognize
alcanzar   to catch up/reach
dirigir      to direct
utilizar     to utilize
cumplir    to fulfil/carry out
offrecer    to offer
intentar    to try/attempt
Hmm, 19. almost a perfect 20.

Ah, class begins.  ~8:30
I went outside to do burpees to lower my energy level. And also to take a picture that will be shown later in the blog in memorandum of Alex's now absent mustache.
We talk about capacitors for a bit and then get on to op amp integrators and differentiators, from the end of chapter 6 if I recall.

They look like this:
Look at that beaut of a circuit.  What a beaut. 

There exists a differentiator.  We wont be caring very much since there's a lot of noise on the output. But we will be doing a lab on the things! And boy oh boy, you get to see the noise.

Onto Chapter 7 things: Switching functions! Which the book seems to make a quick note of, use for a chapter, and then discard.  
there is u for unit step, delta for unit impulse, and r for unit ramp starting at time 0.
we can use these to model 1st (and second) order circuit transient response.
We can describe a voltage source in terms of the unit step function.

Differentiator Lab:
So we're going to calculate the appropriate frequency to find a gain of one between our in and out signals on this amazing Differentiator circuit.  See below graph for values, and picture for diagram and derivation of how we got to 230Hz for unity gain. Note that we went with .1 V on the input so as to reduce noise to the point where we could observe significant gains on the output.  

Results, with three measurements and an r^2 correspondence between predicted and measured:

Calculations and Prelab:

Signal for 230 Hz:

Signal for 100 Hz:

Signal for 500 Hz:

Circuit with ground at pin 20, signal in at 7, and ±5V on the rails:


After I finished the lab, Prof Mason was teaching some easy 1st order equations nonsense, so I used this time to unite my face with a plant. Plant Thor felt lonely, so he invited friends:
Ciao!


Sunday, April 23, 2017

Rockets and Robots with Professor Martin Mason


In this episode, you'll hear from Professor Martin Mason of Mt. San Antonio College about his recent projects in rocket building and robotics.  Stick around to hear from his robotics team about their challenges in robotics and future goals.


Check out this episode on The Creators & Engineers Podcast!

Tuesday, April 18, 2017

Tau-ting a circuit


Today, I arrived a moment late to class.  I'd felt awful leaving the house, better than yesterday, but still with sinuses a-drip and mind a-grog, despite my nearly full 8 hours of sleep.  But fortunately, the god of neat plant conversations smiled upon me. I had a delightful conversation with the landscaper about "manicuring" cacti, which I now know to be one of two plural forms for the word cactus. He was trimming the bottoms of the spiky plant, to give them a less bunchy look.  I tried to find the species name, but I couldn't find it on this cactus gallery, and I'm not that persistent..   http://succulent-plant.com/thumbnails03.html
Now I'm really curious what it was.  The gardener said he didn't know, but that he would find out.  Perhaps I'll see the plant-man again one day. *Cue dramatic mysterious plant music*

Professor Mason thought it prudent to introduce inductors today.  Parallel and Series inductors, and more, what a time to be alive!

We did a bit of basic calculus on inductors.  For instance, did you know that
V = L*di/dt
Well now you do.  And if you do a first order circuit, where a resistor is in series with an inductor, you might find that
V(t) = V_0 * e^(t/tau) where tau = L/R. or T = 1/(RC).
This is the behavior of a first order circuit.

We did a practice circuit with 5V in series with a switch, then in parallel to a pair of resistors and a capacitor.  We modeled the time behavior of the circuit.  We calculated the time constant, tau, to be .015s, and 5Tau (which we will measure with an oscilloscope) to be .075s.


Alex made the circuit today:

We did this in preparation for the lab.


Triggered response of RC circuit, Tau is the time difference between base and plateau, about 80ms. We ran the data and were very close to the calculated Tau.  We found:




We measured the time by reading the oscilloscope, taking the difference between the trigger point and point where the voltage has about peaked.  We observe 10% error, which is really good.  We have to estimate the point where 5Tau is on the oscilloscope screen, which accounts for the marginal error.


LC Circuit Lab type occurence
We moved on from capacitors to inductors. Capacitors are old news, and we move on quicker than a.. hmm what's a good pop culture reference... ah, we move on quicker than United Airlines customer base after their embarrassing "gaffe" last week. Heh, I am clearly the pinnacle of wit.

Recall, inductors are the reciprocal of capacitors.
T = RC (caps) = L/R (inductors)

We did a practice example.  We're going to find the value of the inductor Mason gave us based on that diagram.  We're going to measure 5 Tau, and calculate backwards to find the size of the Inductor.


We adjusted our settings, and found 5 tau = 5 micro seconds.  Therefore, Tau is 1 microsecond, and we can solve backwards to find the inductance. Given a 1kOhm and 2.2kOhm resistor in parallel, the equivalent resistance was 687 ohms, and we find the inductor is about .67mH.  Science Bitches!
*I'm getting my energy back, definitely going running today...Caffeine is magic~*



RAGE BRIDGE

RAGEBRIDGE is the name of a motor controller.  Calm down now. A large arc appears across the connector, caused by capacitive load discharging (I assume).

So we ran over capacitors in class.  Not literally. We might have literally blown an electrolytic though. Woo!
Capacitors aren't so crazy.  Recall from physics:
q = Cv
and
C = e_0*A/d.
This describes how to treat a capacitor in a nutshell.
There was a long treatment of what capacitors are.  I'm going to instead describe what electrolytics are.  Electrolytics are made of salt in solvent with aluminum electrodes.  They're bigger than most capacitors, but they're fairly cheap, and have a wide range of capacitances up into the micro Farads.

One has to be careful about which lead is which, electrolytics are limited in their ability to be voltage biased in one direction.

There are some others. They're all neat. My fingers lament my not wanting to type about them.

Capacitors generally block dc, pass ac, shift phase to the right, and can be used to start motors or suppress noise. The useful thing to know:
i = C*dv/dt  &  v = 1/C * integral(i)dt from t_0 to t.
and the energy stored, w, which is represented as the integral from -inf to t:
w = C*integral(p=v*dv) = 1/2*C*v^2 from -inf to t.
If we note that v = q/C, then
w = q^2/(2C)

Beyond math, the important properties of a capacitor are:
A. The voltage across a cap cannot change instantaneously
B. The current across a cap at DC approaches zero
C. Ideal caps don't dissipate energy
D. non ideal capacitors may leak a little current.
We did an in-class example of how capacitors behave.  Calculations:


Capacitor Voltage Lab

1. sketched cap voltage/current for all inputs


So we applied a sinusoidal frequency at 1 and 2kHz and 2V to a series RC, and then did the same with a triangular input voltage at 100Hz, 4V. See below:

2,3,4 Oscilloscope windows



We used the software's math toolbox on the scope to view both the current and the voltage.  We know the current because we can calculate it as a function of the measured Voltage, and the known resistance.



2kHz sinusoidal input













1kHz sinusoidal input











Triangular 100 Hz input



Circuit with an inductor                                          Circuit with a capacitor

We repeated the lab for inductors:


In this lab, we demonstrated the capacitor current at various AC supplies, and how reactive components shift the voltage signal out of phase. Voltage across inductors leads the resistive voltage, and capacitive voltage lags resistive voltage.



Come, gather round friends and Op Amps, Cascade into the future

On the day we call Tuesday, quiet it was in the room
Kevin was tired, class would start quite soon
His birthday arrived without a great ruckus
Until Thor clanked his coffee gear in among us.

I made coffee for Kevin (and the class) on his birthday.  I might have put more than just coffee in.  Happy 21st Kev.


Today's lecture was a simple linear continuation on the Op Amps discussing we've been having for awhile.  We talked about cascaded Op Amps.  Cascaded Op amps are simply a group of Op amps that stack gains multiplicatively (a devious word to spell).  In contrast to that devious word, these Op amps are fairly easy.

A = A1*A2*A3

The cascade connection, it should be noted, can very easily saturate the Op Amp.  Don't do that unintentionally. We did a bit of practice with this.

LAB- Part 1

Temperature Measurement with a Wheatstone Bridge
In this lab, we designed an Op amp circuit with a wheatstone bridge and a difference amplifier.  Balancing the bridge was an integral part of this lab.  If the bridge doesn't get balanced, we almost get to voltages where the op amp is saturated. We designed a bridge circuit.

2. Wheatstone bridge and difference amplifier design

Since the thermistor was 10.7kOhms at room temp, we put an extra 700 ohms in series with the top left resistor to balance the circuit.  We chose resistors for the op amp circuit such that gain would be greater than 6, to amplify .4V difference to be amplified to 2.4V.  We therefore chose 6.8k resistors for R2 and R4, and 10K resistors for R1 and R3 for an associated gain of 6.8.

1. Data:



We achieved our target goals, with an input difference of .43V amplified to a difference of 2.2V.  We expected a gain of 2.9 Volts with the given resistance, which implies that either we failed to account for some resistance, or that our Op Amp was approaching saturation.  Since our feed on the op amp was 5V, we assume the former, that some resistance was unaccounted for.

Exercise 2- DAC

This lab was pretty neat, since we were introduced to transforming a digital signal to an analog one.  To do this, we use resistors that scale exponentially, and several input voltages.  We did an example problem. The digital signals are amplified such that each increment in the analog output corresponds to a one or a zero on the digital voltage inputs.  Notable: the "digital" voltage inputs must be a constant one or zero; if one input in half the expected input voltage, everything breaks.


We were also introduced to instrumentation amplifiers, which amplify the difference between two input signals.  These guys can come in single IC packages, but aren't cheap, about $2/ IC.
gain for these are:
Av = 1+2R/R_g



Thursday, April 6, 2017

Thus, It begins anew; no Operational Amplifiers for you

Woke up late this morning.  Fortunately, an hour late for me is still 6:52, and I made it to class on time. Even had time to shower, make coffee, wash dishes, and run a wet swiffer my bathroom's (presumably fake) hardwood floors.  Unfortunately I didn't have time for a walk.  Or to shave.  It was a good and hairy morning, nevertheless.

To school I travelled, and to class I went.  Upon entering the room, Mason met my eyes.  His beard bristled in indication of his anticipation for another day of excellent engineering.  His eyes teemed with knowledge waiting to be shared.  The knowledge of a new world unbeknownst to most non-engineers.  This was the world of XKCD comics.  He made a joke about sociologists. We did a simple inverting op amp example circuit.  And Mason saw that it was science.
We did a one of these, calculated gains, noted voltage rails.

Alex made a diagram.  We watched with admiration.


We did a one of these, and did nodal analysis.  There was a significant moment where we realized that the voltage on both inputs of the Op amp is about zero.





Then we were instructed in the summing amplifier.  The equation for this is simply the sum of those three Voltages over their respective resistances.  So, as the middle equations notes, Vout is the sum of the voltages if R1=R2=R3=..., times the ratio of Rf to Rin.


Lab 1 of 2
Summing Op Amp
We select R1 = R2, and use the inverting equation from above.  Values and measurements below:


We talked about another amplifier.  It had 4 resistors of non-equal resistances, and was anything but simple.  Difference amplifier.  Complication equation. If R3=R1, R2=R4, the equation gets much better.  If all are equal, then the output is simply the difference.

Lab 2: Difference Amplifier






Select R1=R3=10kOhm, R2=R4=21.5kOhm

Replace R3 with R2 in the below equation:

















April 4 - The healing process begins + Op Amps

So electronics has changed a lot since 1968.  But hey, why not get introduced to the OG op amp.  Here it is.  BEHOLD, THE LM741.  In other news, Blogger is bugging out when I use pictures from the internet.  Tears.
Image result for lm741

Apparently the internal components are "complicated." Looks like a gaggle of transistors, resistors and diodes, with a single capacitor.  I'm disappointed we didn't go further on this. This could be interesting to learn from.  I'll probably google it later, kinda busy right now, gotta prepare for the podcast recording I'll be doing at 1pm.
Image result for lm741

About op amps: you have two resistors and two inputs, the inverting and non-inverting. The usual configuration is in the first picture, where R1 is voltage in, and R2 is the feedback resistor. The ratio between these two resistors is important to calculate "gainz".
The open loop voltage gain is the gain with out any resistance from input to feedback.
Ideal op amp has infinite input resistance (infinite resistance between two input leads), and a minimum resistance between the voltage supply and the output.  below: the equivalent circuit of an op amp, where the voltage dependent voltage supply depends on the voltage difference between the two input nodes.
Image result for op amp

So we did some examples with nodal analysis.

MOVING ON

The bandwidth of the 741 is 1.5MHz.  That's pretty wide I think.  Good stuff.  There's a lot of interesting stuff in terms of op amp characteristics.  Like Power Supply rejection ratio--it's pretty bad.  Lots of noise on the output.

Hooray for modern Op amps (1988 is modern).  So OP27 is more modern.  It does things:
Image result for op27
Low noise.  High speed. Low drift (which indicates temperature), and high open loop gain: 1.8 million Ohms

So the lab today, we'll be using the inverting voltage amplifier.  With the OP27.

Results