Gas station without pumps

2013 February 26

Better model for loudspeaker

Filed under: Circuits course — gasstationwithoutpumps @ 11:34
Tags: , , , , , ,

In Seventeenth day of circuits class: inductors and gnuplot tutorial, I introduced two linear circuit models for the JAMO 30466/30462 loudspeakers that we’re using in the class:

    The model we developed in class for the 10W loudspeakers that the students bought in their parts kits.

The model we developed in class for the 10W loudspeakers that the students bought in their parts kits.

The improved model that matches the measured magnitude of the impedance better at high frequencies.

The improved model that matches the measured magnitude of the impedance better at high frequencies.

The second model fits better and is one of the standard ways of modeling loudspeakers, though I did not realize that at the time I developed the model.  I looked into some other ways people have modeled the slower-than-f^1 rise of impedance for loudspeakers.  There seem to be three popular approaches:

  • Adding more (R||L) sections in series.  This approach is handy when dealing with circuit simulators, since it remains a fully linear circuit.  It has a lot of parameters, though, and tends to produce fits that waver around the observed data.  The phase tends to be affected quite a bit by the extra sections.
  • Adding a “semi-inductor” that has impedance Z=\sqrt{j\omega}K (or a semi-inductor in parallel with an inductor).
  • Using a frequency-dependent inductor with Lhi being proportional to a power of frequency, rather than constant.

I tried both semi-inductors and frequency-dependent inductors, and I was not very impressed with the semi-inductor approach.  It took more parameters to get a worse fit.  The frequency-dependent inductor fit is excellent, though, and really has about as few parameters as a model of this data can:

Three simple models of a loudspeaker: R+L+(R||L||C), R+L+(R||L||C) + (R||L), and R+L(f)+(R||L||C), where the frequency dependency in the final model is simply a power law.

Three simple models of a loudspeaker: R+L+(R||L||C), R+L+(R||L||C) + (R||L),
and R+L(f)+(R||L||C), where the frequency dependency in the final model is simply a power law. 
The numbers may be slightly different from previous fits, because I redid the fitting, and small changes in the initial estimates or the order  in which fits are done can affect the result slightly.

To really distinguish between the different models of the loudspeaker, I should have recorded data that would allow me to try to figure out the phase as well as the magnitude of the impedance.  I don’t have the tools to measure phase directly (though I’ve been thinking about making a circuit to do that), but I could have measured  three RMS voltages instead of just two in the 47Ω + loudspeaker test circuit.  I measured the voltage across the resistor and across the loudspeaker, but not across the two in series.  The extra measurement would have allowed me to estimate the phase difference between current and voltage (though not the sign of the phase difference).  Maybe I’ll do that when I have a couple hours to spare to redo all the measurements.

In the lab handout for next week’s lab, I’ll explain Zobel networks for compensating the loudspeaker to get resistive behavior at high frequencies (but we won’t use a Zobel network, because it wastes a lot of power)  and designing LC filters to suppress the high frequencies.  The designs will be done with the frequency-dependent inductor model:

Model for the loudspeaker with one frequency-dependent component (the inductor).

Model for the loudspeaker with one frequency-dependent component (the inductor).

I’ll have to provide a lot of scaffolding for the LC design, as the students don’t have the programming ability (even for simple scripting in gnuplot) to do the optimization.  I’ll probably give them a script that produces graphs like the following, so that they can choose their components without having to do messy calculations, though they’ll have to modify the script a little bit:

Power to the loudspeaker for various LC low-pass filter designs.

Power to the loudspeaker for various LC low-pass filter designs.  Note that they probably won’t be using a ±3.3V power supply, and they’ll probably have a series resistor on the loudspeaker, for observing current waveforms on the oscilloscope.

Incidentally, this post is the 1000th post on this blog.  I was going to write something celebratory for the 1000th, but my son convinced me I should save the celebration for the real round number in post 1024 (which is where I run out of fingers for counting the posts).

UCSC tiptoes around crowd funding for science

Filed under: Uncategorized — gasstationwithoutpumps @ 09:56
Tags: , ,

UCSC is beginning to look seriously into crowd funding for small science and engineering projects (like student senior projects, which typically have budgets around $2k–3k and have very short timelines for finding donors).

I attended an information session (Fund your research through the crowd! – Jack Baskin School of Engineering – UC Santa Cruz) by Microrysa yesterday, which is a small startup specifically interested in crowdfunding science projects for universities.  They are doing some things right, but their choice of name (which Google wants to correct to mycorrhizae) indicates a certain naivete about search engine optimization, which is disturbing in a company that is about helping researchers get their research funded by outreach to the public.  It also means that people will have a hard time finding their site to make donations, even if they are looking for it.

One thing that Microrysa does right is working with the University so that the funding can go directly into a research account, rather than into a personal bank account where it would be taxable.  They also have taken the approach that what science donors want is to be kept up to date on the project, so the “rewards” of donation are progress reports (on the Microrysa website and by e-mail), rather than the T-shirts, coffee mugs, and other junk that SciFund seems to encourage.

I have a project that could use some micro funding.  To run the banana slug genomics course again, we’d need some more sequence data: preferably mate-pairs with a moderate insert size (like 1k bases).  Estimates for creating and sequencing such a library are around $5k.  With that data, plus what we already have, we should be able to assemble the banana slug genome into larger fragments than we currently can—maybe even big enough to do some gene-finding.

Crowdfunding has relatively low overhead (credit-card companies get 3%, the crowd-funding company gets 5%, and UCSC charges a gift tax of 6% to keep their development bureaucrats paid, even if they do none of the work of raising the funds), so researchers would get about 86–87% of the donated funds.  Given that Microrysa would be doing most of the work of setting up the web site and collecting the funds, I think that UCSC should forego the gift tax for crowdfunded projects, perhaps getting a contact list of donors instead.

2013 February 25

Twentieth day of circuits class

Filed under: Circuits course — gasstationwithoutpumps @ 17:41
Tags: , , , ,

We started today with a do-now problem, asking what the following circuit does:

current-to-voltage-converter

After 5 minutes, no one had any idea, so I asked questions until we got that In had a voltage of 0V, that the interesting property of In was its current, and that the same current flowed through R1. Then I gave them another 5 minutes. At that point, one or two students had an inkling that the circuit was a current-to-voltage converter, and one student even suggested that V_{out} = I_{in} R_{1}, which was almost right. I had draw the current into the circuit from In, so the output voltage was the negative of that. I walked them through the analysis that leads to that conclusion.

Then one student asked the obvious question—the one I was hoping a student would ask—how this differed from just using a pullup resistor as we had done for the electret mic.  So I tried to get them to compute the input impedance V_{in}/I_{in}.  After a great deal of difficulty, they came up with 0Ω.  We then compared V_{in} for the op-amp current-to-voltage converter and a pull-down or pull-up resistor.  I think that they see the difference between the op-amp circuit and the single resistor, but I’m not sure they understand when to use one and when to use the other.

I’ll probably see some op-amp current-to-voltage converters in next week’s audio amp lab, though they really aren’t needed with an electret mic (and they’ll probably get the bias voltage wrong, since the FET in the mic has to be kept in saturation, so needs to be at 1v or more). Hmm, with the proper biasing, the op-amp current-to-voltage converter could be used to get a fairly good gain from the mic without needing a DC-blocking capacitor to do level shifting, so maybe it isn’t such a bad idea to try use it.  I’ll try that out in the preamp for the class-D amplifier and see how well it works.

I then returned the lab reports and ranted about how important it was to get schematics exactly right, and how they’d keep redoing the lab reports until they got them right. I also lectured them about using “would” incorrectly (though only a couple of students are still doing that), about doing factoid dumps without connecting the information to the design problem they are addressing (again, just a few students still doing that), and about citations not being sufficient for copied figures or text—there must be explicit “Figure copied from … ” figure credits and explicit quotation marks or block quotes.  Lots of students are still omitting the figure credits.

I also talked about the value of having chunks of the schematic match the blocks of a block diagram, not mixing different blocks randomly, using the tinkering lab schematics (where the hysteresis oscillator board was a block of the block diagram) as an example.

Finally, I talked about the importance of thinking of voltages as being between two points: an FET does not know where “GND” is, and is controlled by VGS, not Vgate. I showed how putting a pFET between a loudspeaker and ground rather than between the positive power rail and the loudspeaker would result in the source voltage being just about the negative of the threshold voltage (so around 2V with our pFETs), and the pFET dissipating a lot of power.

I then took questions about this week’s lab. The first question to come up was about how to choose the Rgain resistor, which I used both as a chance to talk about the instrumentation amp and about gain in general.  I introduced them to gain-bandwidth product, and explained why one might want to use a multi-stage amplifier to get high gain with high bandwidth.  The amplifiers we use are about 1MHz gain-bandwidth product, so we could go up to 100kHz with a gain of 10, but only 1kHz with a gain of 1000.  Of course, for the pressure-sensor lab, we don’t need high frequencies so the gain-bandwidth product is not a limit in this lab.

The students then talked me through a block diagram for the lab, and we discussed (without coming to any conclusion) whether a low-pass filter was needed/useful and whether a second stage amplifier was needed/useful.  I did point out that they had two free screw terminals on the board for talking to the Arduino, so if they wanted to have two different gains or filtered and unfiltered outputs, they could.  There was a little discussion of what corner frequency was appropriate for a low-pass filter, and with a little nudging, I got them to remember last week’s sampling and aliasing lab.

We ran out of time before getting to material I had queued up in case things went faster than I expected:

  • common-mode rejection ratio
  • looking at the predictions for the tinkering lab as a group
  • AC power computation
  • microphone current-to-voltage conversion (choosing bias voltage)
  • more complicated loudspeaker model
  • Zobel networks for compensating loudspeakers

It’s actually a good thing that we didn’t get to the more complicated loudspeaker model, because I was playing around with a non-linear model (the main inductance varying as a power of frequency) and it looks like a better fit with fewer parameters than the linear model I had been using.  I’m considering rewriting the class-D amplifier handout to use that model instead.  Unfortunately, the LC filter design looks like we’ll have more pass-band ripple than I had previously thought, though still not too bad.

Tinkering lab reports show problems

Filed under: Circuits course — gasstationwithoutpumps @ 11:53
Tags: , , , ,

I thought that the tinkering lab (lab handout)had gone ok, because students had done a lot of experimenting and had all ended up with functional circuits.  But the lab reports that I graded this weekend indicated some serious problems:

  • A lot of the students made serious errors on their schematics.  Shorts, missing wires, and mislabeled parts were common. I’m making the students who had serious errors redo the report, and keep redoing it until they can produce correct schematics.  It wasn’t just the weakest students in the class making errors on the schematics—almost everyone was.
  • A lot of the students did not check their predictions of the behavior of the board when components were added between pairs of terminals.  If their initial predictions had been accurate, this would not have been a problem, but students with predictions that were way off didn’t check them.
  • There was no evidence that anyone improved their mental model of how the hysteresis oscillator worked as a result of either making the observations (which about half the class did) or thinking about the model more (which those who did not check their predictions could have done).
  • Some of the students appear to have poor technique for recording observations, as they tabulated observations that were not really consistent with how the boards behave.  Either they mis-recorded the conditions under which they did the test or they shorted together some nodes without noticing.  No one checked for consistency of the observations to see whether things that should have been nearly the same were nearly the same.

I’ll probably rant in class about wrong schematics ruining otherwise fine reports, and hope the message gets through that they have to check their work much more carefully.  They’ll really suffer on the labs that they have to solder up on the protoboards if they continue to work with such sloppy, useless schematics. I may rant about lab notebook technique also, since that will be even more important in biomolecular labs.

Next year, I’ll want to split this lab into 2, with one lab dedicated to collecting data, a class in between to analyze the data, and the next lab dedicated to doing the design.

 

 

2013 February 24

Santa Cruz is having an appliance fix-it clinic

Filed under: Uncategorized — gasstationwithoutpumps @ 14:22
Tags: , ,

According to the San Jose Mercury News (Bay Area fix-it clinics repair what usually gets trashed), Santa Cruz is having a “fix-it” clinic:

10 a.m.–2 p.m. Saturday, May 4, California Grey Bears, 2710 Chanticleer Ave. Details: email repair@greybears.org or call 831- 479-1055.

The idea is simple: you bring in a small (hand-carryable) appliance that is broken, and they’ll help you try to fix it. You have to pay for any parts that are needed, but nothing for labor. We have a few broken appliances out in the garage (intended for tear-down sessions with my son that we never got around to doing), but I don’t think any of them are worth fixing—I fixed the ones that were feasible, and the remaining ones are generally to the point where part salvage is about all they’re good for.

Still, it’s a nice idea and I hope they get a lot of participation.

« Previous PageNext Page »

%d bloggers like this: