Gas station without pumps

2013 February 28

Rethinking the power-amp lab again

Filed under: Circuits course — gasstationwithoutpumps @ 22:30
Tags: , ,

I took the breadboard that had been working for me at home for the class-D power amp to the lab today, and tried getting it to work in the way that I expected the students to do it, with 3 power supplies.

It failed miserably.

Even after tinkering with the circuit a bit, the FETs kept getting hot (indicating that I was not successfully having only one on at a time).  I’ve already released the handout for the power amp lab,  but the students will not be able to get the amplifier working from those instructions.  I have several choices facing me:

  • Get rid of the power-amp lab entirely, and take 2 weeks for the EKG lab.  Originally, I had planned 2 weeks for the EKG lab, as it is slightly more difficult than the pressure sensor lab, but the difference in difficulty is not 2-to-1.
  • Modify the class-D lab to use a single power supply, as I’ve been doing at home.  I think that the problem I was facing was that the larger voltages of the dual supply made the overlap range where both FETs were on much larger, and the simple cMOS-inverter output stage could not be driven fast enough to pass rapidly through the range.  It may be enough to use two 3-v supplies, with everything except the loudspeaker running from +3V to -3V, and the other end of the loudspeaker at 0V.  I’d be limited to the voltage range of the MCP6004 chip, which is 6V (the absolute max is 7V, and I’ve been running them at 6.6V at home without much trouble, though I’ve probably shortened their lifetime a lot).  That would limit the power to the loudspeaker to around 0.6W, which is still a lot more than the op amps can deliver.  Dual 3V supplies (and no extra 6v supply) would be a simpler design that what I have in the handout, but it should be very close to what I debugged at home.  I should probably try it out in the lab tomorrow.
  • Use bipolar transistors to drive the FET gates with more current so that they switch faster.  We haven’t talked about bipolar transistors (except very,very cursorily in the context of the phototransistor, and the lab reports indicated that only one or two people had followed through to understand how the phototransistor works).
  • Give up on class-D and do a simpler class-A amplifier with the loudspeaker as the load resistance.  This is not the right way to use the loudspeaker, since it will have a large DC bias (pushing the cone out or pulling it in, rather than having it rest in the middle), but is a very simple circuit, and can use negative feedback from the loudspeaker to correct for any nonlinearity in the the circuit.  It is also horribly inefficient, and whatever FET we use is almost sure to get warm. We could solder a heat sink onto the transistors, if needed, but that adds a different sort of complexity to the lab.
  • Do a class-A amplifier with a power bipolar transistor.

I don’t really like any of these solutions, but I’ll have to pick one this weekend and write it up for the students.  If we start the EKG lab a week earlier than planned, I’ll have to try building an EKG amplifier on the protoboard this weekend, to make sure that it works well enough, and get the handout for it written. Doing a lower-voltage class-D amplifier would require the least modification to the handout.  Bipolar transistors would require not only acquiring the transistors, but debugging the lab with bipolars (and I might want to switch back to a class-AB amplifier if I use bipolars).




Pressure-sensor lab went well

Filed under: Circuits course — gasstationwithoutpumps @ 21:32
Tags: , , , ,

The pressure-sensor lab went fairly well today.  We once again borrowed soldering irons from the RF lab (where my co-instructor teaches), but we did not borrow enough board holders, so a number of students had to solder with the boards just resting on the benchtop.  This was not a major problem, but having more board holders would be good.

Many of the students had done an adequate job of doing the design ahead of time, and even those who had not mostly managed to finish within 4 hours (but the lab is supposed to be scheduled for 3 hours).  Most groups managed to demonstrate working PC boards with instrumentation amplifiers amplifying the differential output of the strain-gauge pressure sensors, generally with gains in the range 100 to 300. I have one group coming in on Monday to finish the soldering—they took the more cautious approach of debugging on a breadboard first, and had to do a little redesign to make everything work.  I think that they’ll complete with no problems on Monday, as they had good notes on what their breadboarded circuit was, and had come up with what looked like a feasible layout.

Soldering was much more routine this time than on the first soldering lab.  Students were able to check their own work for cold-soldered joints, and only one group forgot to trim the extra wire length on the back of the board after soldering (they had a short when they put the board down, from two untrimmed leads touching).

Some students called me over to help them debug at one point, but I had to refuse, as they did not have  readable schematics that I could help them debug from.  After I told them why I couldn’t help them, they redrew their schematics, and I then helped them check the design against their soldered board.  It seems that they had soldered everything up correctly according to their schematic, and the DC voltages were right at all the nodes, but the twisted-wire cable to the pressure sensor had the wires scrambled. (Luckily, they had followed my advice of using 4 different colors for the wires, though they had not followed the red=+5v, black=0v convention—several students are still using colors at random.)  When they screwed the wires into the right terminals, their circuit worked.  It seems that schematics were not the only thing that they were sloppy with!

Some of the students used PDF markup tools to add the layout of their extra wires and parts to the prototyping board PDF worksheet.  That seems to have worked well for them, producing neater and more easily checked layouts that the pencil scrawls that I (and many of the students) used.  I hope they tell me in their lab reports what tool they used, so that I can recommend it for the EKG lab and for the pressure-sensor lab next year.  No one did the wire lists that I recommended, but there were relatively few wiring errors (and those were inherited from errors in the schematics, so wiring lists would not have helped).  I think I’ll leave the wiring lists out of the assignment next year.

One thing that surprised me (another moment of culture shock), was that the seniors in bioengineering did not know what a peristaltic pump was.  I was trying to connect what they were doing to something they already knew, only to find out that what I thought was familiar to them was novel.  I demonstrated the basic principle for a couple of them by hooking two ends of the flexible tubing up to the two ports of their differential sensor, and pinching the tube between a pen and the benchtop.  By pulling the tube through the squeezed area, I could get a large pressure difference between the ports.  Since peristaltic pumps are standard lab equipment in many of the labs they are working in, I was surprised that they have never used one or even known of their existence.  I’m now wondering whether I should do the demo demonstrating the principle in class on Monday for everyone.

2013 February 27

Twenty-first day of circuits class

Filed under: Circuits course — gasstationwithoutpumps @ 20:04
Tags: , , , ,

This post has not been appearing on, so I’m going to try doing binary search on it to find the problem.

I started today’s class with questions about this week’s lab—students had fewer than I expected, so they are either very confident about their designs or so lost they don’t know what to ask. I guess we’ll find out in the lab tomorrow.

I showed them the tiny medical-grade pressure sensor that I had considered using, but ultimately rejected as too fragile, switching to a sturdier sensor with an easier-to-assemble breakout board. I also showed them my assembled prototyping board and talked about twisted-pair cables to minimize inductive pickup, keeping wires short on the board, using color-coded wires for the different types of signals (red for +5v, black for gnd, some other color for Vref, yet another color for signal, … ).

Instrumentation amplifier protoboard with circuit wired for the pressure sensor lab (top left connector to pressure sensor, bottom center connector to Arduino)

Instrumentation amplifier protoboard with circuit wired for the pressure sensor lab (top left connector to pressure sensor, bottom center connector to Arduino). Red is +5, black is GND, brown is Vref, yellow is low-gain, orange is high gain, and green is the feedback for the second-stage op amp.

I also covered one other topic relevant to instrumentation amps: common-mode rejection ratio.

After talking about tomorrow’s lab, I started on material for next week’s lab:

  • AC power computation. I worry that I lost a few people, because I had to give them the \cos(x)\cos(y) = 0.5(\cos(x+y) + \cos(x-y)) trig identity and explain complex conjugation. The bottom line (that real power is Re(\bar{V}\bar{I}^*) should be useful in Monday’s class when we start looking at how much power is delivered to the loudspeaker at different frequencies with and without an LC filter.
  • More complicated loudspeaker model. I did decide to switch from the linear model I had been using to a model with a frequency-dependent inductor, and I updated and released the handout for the power-amp lab today.

We ended class almost precisely where I expected us to, so for once my timing estimates were good.

On Friday we’ll have the quiz—the students wanted the TA to take it before they did, so that they could be assured that it was not as oversized and difficult as the first quiz, but he does not have any time before tomorrow evening, which would be the latest that I could incorporate any feedback. So we’re just going to have to rely on my estimates of how difficult the quiz is (fairly hard, but not as hard as the first one—I’m hoping for a median of 50% this time).

On Monday, I’ll want to talk about

  • how class-D amplifiers work. I’m sure it is very strange for a circuits class to cover class-D amplifiers, without ever having covered classes A, B, AB, and C, but that’s the way it worked out for us.
  • LC high-pass filters before the loudspeaker.
  • Zobel networks for compensating loudspeakers to get resistive behavior.

If it looks like I’ll be running short of time, I’ll cut some of the Zobel network stuff, since I already decided that they would not add lossy compensation networks in their power amplifiers (I didn’t want to buy 10W resistors). Most of them will do LC filters, though, so I’d better cover that carefully, and of course the whole thing about how class-D amplifiers works is rather tricky, so Monday’s lecture will be pretty full.

2013 February 26

Missed a meeting due to lockdown

Filed under: home school — gasstationwithoutpumps @ 20:30
Tags: ,

This afternoon, at about 3:30, my family was just finishing a meeting with my son’s consultant teacher at Alternative Family Education, and I was about to cycle over to the County Office of Education for a meeting of the senior science fair judges.  We  got a “code red” alarm and the school was locked down. So we hung around, waiting for the lockdown to end so we could go about our business—we figured it would last half an hour or an hour.  There were 11 of us in the building: 4 teachers, 3 parents, and 4 teens.

At about 4:00 we heard a large number of shots fired in quick succession, and started thinking that the police had got their armed suspect and that the incident would soon be over. It was a bit scary being that close to a shooting .

We had internet and phone access, so we were able to get some information about what was happening, though not always directly (there was one phone call form a relative in Argentina, who’d heard about the incident on the news).  It seems that the first incident (that triggered the lockdown) was the shooting of two plain-clothes police officers half a block from the school, apparently as they were investigating a domestic violence report.  The second incident was the police shooting one of the suspects about a block away from the school.  It is believed that another armed suspect is still at large, and the whole neighborhood is cordoned off.  My understanding is that the two police officers were killed, as was the suspect that the police shot.

People from more violent cities in the US may laugh at our innocence, but this is the first time that Santa Cruz City police have been killed in the line of duty (according to the Santa Cruz Sentinel).  It is a sad day for the city.

The Sentinel article reported “Students from the locked down schools were bused to the County Building to be picked up by parents,” but apparently they forgot all about the 11 of us out in the AFE trailer, and we were not released until 7:15pm, when the daughter of one of the teachers  badgered the police to let us out.  With at least 6 different police forces involved in the barricades, I imagine that they had some serious communications problems.  I’m surprised, though, that the school administration had not made sure that we had been evacuated, as they had known we were in lockdown and had gotten counts from us of how many people were in the building.  Somewhere (either within the school system or within the police system) communication had broken down.  Apparently a nearby preschool had also not been released from lockdown.  I’m glad that we had only teens and adults in the building and not young kids.  I think that the schools may be wanting to re-examine their lockdown protocols, simplify them, and provide checks so that people don’t get forgotten in the future. (Though let’s hope that we never have an incident like this one again.)

While we were spending almost four hours we did various things to divert ourselves: 4 played Scrabble, a few caught up on work or surfed the internet, some read books (the trailer has a small but decent library), some told stories of their previous exciting adventures, and people chatted—it turned out that several of the people were neighbors of each other, and hadn’t realized it before.  Every once in a while we’d think that the bus for us had come and everyone would gather up there stuff, eager to leave, but it always turned out to be false alarm.

Overall, I’m sorry I missed the judge’s meeting, but I’m glad that the lockdown was just boring for us—not “exciting”.  Being a block away from a major shooting is more excitement than I need.

Science Cafe in Santa Cruz

Filed under: Uncategorized — gasstationwithoutpumps @ 13:37
I  just got notice of  a new science-for-the-public event in Santa Cruz started by Women in Science and Engineering (I had seen a flier for it on campus yesterday, but didn’t know who was running it):
Please join us for “Science on Tap” next week, a new “science cafe.” Grab a beer or appetizer and join an informal discussion of recent science research!  Please also invite your family and friends!
Date/Time: Wednesday, Feb 27, 7–9 pm
Speaker:   Dr. Carrie Partch of Chemistry and Biochemistry 
Topic:      “Circadian Rhythms – A look at how the clock controls our physiology.” 
This event series, based on the Nova “science cafe” model, is designed to connect the Santa Cruz community to the latest research happening just up the hill at U.C. Santa Cruz, so we hope you will come and bring your family and friends!  
To find out more information, check out our SOT webpage at:
We’re so excited about this new event series that we worked with the university to write a press release and had an article in the Sentinel, plus we’re putting up flyers all over town!
Chemistry grad student Alicia Michael has joined the WiSE officers as coordinator and founder of this amazing new event!

Happy Friday!

Kristin McCully
Vice President, WiSE

It sounds like a fun event, but I don’t know whether I’ll have this Wednesday evening free to go.

Next Page »

%d bloggers like this: