Monday, February 27, 2012

Springs 12/23

On Thursday we combined two circuits to create an electrical spring. This is the abstraction of what we did:


The voltage went into the motor  proportional to torque, came out proportional to speed, went into the integrator, and came out of the integrator proportional to the angular position of the motor.  My last post about motors was pretty short. But I feel like I have a much better grasp of the concepts now, so I will go back and cover some of that information. Here is the diagram of the circuit we built with the motor in it:



The voltage going into the motor was proportional to to the torque. Motors turn electrical energy into mechanical energy,  and torque is the the twisty force of the motor. Since we had created a virtual ground using negative feedback we could control the current going into the motor by controlling the resistance with our potentiometers. The resistor to the right of the motor on the diagram made it so we could measure the speed coming out of the motor. On Thursday, we turned the motor into an electrical spring. To do this we added this integrator to our circuit:

It makes the voltage coming out of the motor proportional to position instead of speed, since position is the integral of speed. This works because of the capacitor: Vc = (1/C) ∫ i dt, so, since i=V/R, Vc = (1/RC) ∫ V dt and the output voltage of the whole circuit is Vout =  V+ + (1/RC) ∫ V+ dt.  Both parts of the circuit put together look like this:


As you can see, Vout on the current driver connects to V+ on the integrator, so the speed is converted into the position. Then, the position goes back into the motor as the torque. In a mechanical spring, the spring measure the distance that it has been compressed or stretched, computes the resulting torque, and applies the torque. Our circuit does that electrically. At the end we attached  a pendulum to the motor, and the pendulum always tried to stand straight up no matter which way the motor was positioned.

Monday, February 20, 2012

Motors 2/16

At the end of class on Monday we began talking about motors so that we could build circuits with motors in them on Thursday. This is what the circuit we built looked like:




In our circuits we connected the motors to an op-amp with negative feedback to create a virtual ground where the motor connected to a resistor and the input voltage. There is a virtual ground because V- wants to be the same as V+ since this circuit has negative feedback. V+ is connected to the ground, so V- is 0V. This allowed us to control the current going into our motor by changing the resistance with our potentiometers. By changing the voltage coming out of our potentiometers between -12 V and +12 V we were able to change the direction that the wheel moved on our motor. Then we put another potentiometer on our circuit so that the output would measure only the speed of our motor.

  The potentiometer created a voltage divider that canceled out a value in the equation of the motor so that we could measure the speed of the motor.
  The motors we used were pretty cool because they were Lego motors.  I think that the Lego's educational stuff is pretty cool, and I think it is very interesting that they are now making Lego sets marketed specifically for little girls. I wonder if this help lead to more interest in engineering for girls?  There are so many Legos in that room, I hope we get use them. I would honestly be pretty happy if we played with Legos the rest of the semester!

Sunday, February 19, 2012

Positive and Negative Feedback 2/13

  On Monday we talked about positive and negative feedback. Our discussion and a little googling made what was going on in the circuit we built the last week a little clearer. Here is a quick recap of op-amps; an op-amp is a thing with a positive input and a negative input, and one output. The equation that goes along with the op-amp is:
                                                                  Vo = A (V+ - V-)
If V+>V-, then Vo is positive. If  V+<V-, then Vo is negative.
    Last week when we built our circuits,  Vo  fed back into V+. Therefore our circuit had positive feedback. Because it had positive feedback it was an op-amp with hysteresis. Then we discussed what the output of an op-amp with negative feedback would look like, and we made it on a computer program called LT Spice.
Here is the diagram of a circuit with negative feedback...

As you can see, the output of the op-amp connects back into the negative input, which is why it's negative feed back! And here's a diagram pf a circuit with positive feedback, where the output of the op-amp feeds back into the positive input:


Below are graphs of what the output looks like for op-amps with positive and negative feedback. An op-amp with positive feedback has hysteresis, so the output depends on what it was before. As you can see on the graph, the output only changes from -12 to +12 when the input is -6 or 6.

  The second graph shows the output of an op-amp with negative feedback.  Unlike a circuit with positive feedback, a circuit with negative feedback can have an output that is inbetween -12V and 12V. I think Cailey's post explains it very well.
   I find LTspice  difficult to use, but I am sure it will get it easier with practice. My main objection to LTspice is that it only runs on Windows, so we have to run it in Virtual Box on our Macs. Running Windows on a Mac just seems sacrilegious to me.

Friday, February 10, 2012

Capacitors 2/9

On Thursday we learned about capacitors. Capacitors store voltage.  In our circuit, the voltage of the  capacitor increases until it is the same as the voltage in the circuit. But, since the voltage of the capacitor approaches the overall voltage asymptotically I don’t think it ever actually reaches the overall voltage.  As the voltage in the capacitor increases the current decreases, asymptotically approaching zero.
Here is a picture of the circuit we built:



    We just added a capacitor to the circuit that we had built on Monday, and it became an oscillator. We also changed the circuit so that output voltage went through a resistor and fed back into the op-amp as one of the inputs.  Our professor called what we built an op-amp with hysteresis. The important part  is that the op-amps output voltage switched between -12 volts and +12 volts. Consequently the capacitor oscillated between wanting to have its voltage be -12 volts and +12 volts.
   Then we put a speaker on the circuit so that the voltage of the capacitor went into it. We could change the pitch of the tone coming out of the speaker by changing the resistance with our potentiometers, which was pretty fun.
    After class I was pretty confident I understood what the circuit was doing, but the more I thought about the less I understood it. The more I try to write about it the more my confusion is deepened. Which left me wondering, could you still use an oscillator in a larger project even if you didn’t really understand how it worked? How far can you take this concept of  abstraction?

Tuesday, February 7, 2012

Abstraction and Hysteresis 2/6

    In class on Monday we talked about abstraction, which means that I don’t have to worry about physics! Our professor outlined some concepts that he hoped we understood by now and said that we did not have to understand them on any deeper level than he had explained them. I was pretty comfortable with the material that he expected us to know. But, ignorance really is bliss. Right now I am perfectly content with not knowing everything.
    After our discussion we built a circuit with potentiometers in it. Potentiometers are resistors that you can change the resistance of by turning a knob on top of them.  We connected two of them to a op-amp. Our op-amp always had an output voltage of either +12 volts or -12 volts, depending on which resistor had a higher voltage coming out of it, because the equation of our op-amp was:
Vout = A (V+ - V-)
A was a large, positive number, so the output depended on whether V+ - V- was positive or negative. 
The output was always either -12 V or +12 V because that was  what we had connected to our power rails. If V+ > V- the output was positive. If V->V+ the output was negative.
    Then we talked about hysteresis, which I understand when I’m looking at the graph but find difficult to explain in words. Our professor also explained it using a bent playing card, which made sense to me. Wikipedia defines hysteresis as the dependence of a system not only on its current environment but also on its past environment. What I do understand is that systems with hysteresis are useful for switches.
The graph below illustrates the voltage coming out of an op-amp with positive feedback.

 Positive feedback means that the output of the op-amp is fed back into the positive part of the op-amp. Because this op-amp has has positive feedback, it displays hysteresis. What we built was a was a Schmitt trigger. Wikipedia says "The circuit is named "trigger" because the output retains its value until the input changes sufficiently to trigger a change: in the non-inverting configuration, when the input is higher than a certain chosen threshold, the output is high; when the input is below a different (lower) chosen threshold, the output is low; when the input is between the two, the output retains its value." In our case the description is just a little different. When the input (V-) is lower than -6V the output is high, or +12V. When the When the input is higher than 6V the output is low, -12V. When the input is between the two values, the output is whatever it was before, and it does not change until it reaches either -6V or 6V. This is why systems with hysteresis are systems with memory, because when the input voltage is between -6V and 6V, the output voltage depends entirely on what the it was before.

Friday, February 3, 2012

Resistors and Breadboards 2/2

In class we learned about resistors and breadboards. Resistors are electrical components that provide electrical resistance. Resistance is the opposite of conductance. Our professor said said that we could think of it as a skinny pipe, if the current is water trying to flow through. Resistance is measured in ohms. If you know the resistance and voltage in your circuit, you can figure out the current using Ohm's Law. Ohm''s Law is
I=V/R
Breadboards are boards with a bunch holes in them that you can plug wires and components into to build circuits. They are made up of a grid of holes that are connected horizontally, but not vertically. There are two columns of holes on either edge that are connected vertically. Those lines are where you normally connect you power and ground. 

After learning about resistance and breadboards, we plugged a power source into the breadboard, and wired it so that the columns on the edges had -12 V, 0 V and 12 V coming out of them. We were able to test this using the oscilloscope.