# Gas station without pumps

## 2013 September 17

### Broken soldering iron

Filed under: Circuits course — gasstationwithoutpumps @ 11:51
Tags:

I’ve previously recommended that students get a cheap soldering station like the one I have, and even recommended that the School of Engineering buy a dozen or so for use in the applied circuits lab.

My son recently found out why they are cheap: the ferrule that holds the tip in is not firmly mounted—it just has a friction fit, and after a while it comes loose and the tip falls out:

The soldering iron after the tip has come out.

A closeup of the ferrule and handle. Pushing it back in and recrimping the tube to hold it tighter seems to have no effect.  One of the reviewers on Amazon recommended supergluing the ferrule in (that’s what they did when theirs failed).

It looks like I’ll be buying a new soldering iron soon. I’m undecided between getting a hot-air rework station with a soldering iron, or separate tools for the hot-air rework and for regular soldering. A combined tool is cheaper and takes less bench space, but I don’t often need the hot air, so a smaller soldering iron would be more convenient most of the time. Also, the cheap hot-air rework stations that include a vacuum pickup tool don’t usually have a soldering iron as well, though for $160 I can get an Aoyue 968A+ that does. If I get a new soldering iron, do I get another cheap one ($25) and regard it as disposable, or do I get a high-quality digital Weller iron  for $145, or the intermediate Weller analog unit for$90?

## 2013 September 3

### Towards automatic measurement of conductivity of saline solution

I’ve been thinking about a more automatic way to measure the conductivity of a saline solution than what I reported in Better measurement of conductivity of saline solution and Conductivity of saline solution.  The original lab is suitable for the circuits class, because it measures with sine waves and models the impedance of the electrodes, but it requires a sine-wave oscillator and an AC voltmeter that can handle high frequencies—neither of which makes for a low-cost device.

I was thinking that one could make a fairly simple device using the Freedom KL25Z board and a few extra components:

Bias circuit and load resistor for making a conductivity meter.

The idea is a simple one—instead of using a sine wave to drive the electrodes, use a square wave directly from the KL25Z. Connect the other electrode through a series resistor to a voltage centered between the two square-wave values, and use the 16-bit analog-to-digital converter to read the signal between the resistor and the electrodes just before changing the square-wave value.

With a low frequency square-wave, the electrodes will act like a resistor, but much of the resistance will come from the insulating film on the electrode, rather than the solution. At high frequencies, the capacitance of the insulating file will not have time to charge and discharge, and the resistance of the electrodes will depend mainly on the conductivity of the solution. At high enough frequencies, the output waveform will look like a triangle wave, rather than a square wave, and the amplitude of the signal will be proportional to $\frac{R_{3}}{R_{S}+R_{3}}$, where R3 is the pull-down resistor in the diagram, and RS is the resistance of the solution. That means that $R_{S} \propto R_{3}(1/A - 1)$, and the conductance can be computed as the inverse of resistance. The measured value depends, of course, on the size and spacing of the electrodes, so one would have to calibrate with a known conductivity solution to get the proper scaling.

I looked at the speed of the analog-to-digital converter on the KL25Z board, and they claim that they can get 16-bit conversion (though only with 12-bit accuracy, really) at 460k samples/sec—though I’ve not figured out the settings that really permit that. Higher accuracy is possible by averaging successive samples (which there is hardware support for), up to about 14.5 effective bits (averaging 32 differential samples, at a maximum rate of about 7.2kHz). By doing the averaging in software instead of hardware, we could run with a square-wave input up to about 90kHz (single-ended 16-bit samples at 180k samples/second seems to be fairly easy to set up). I think that is likely to be fast enough for all but the highest ionic concentrations, even using a very polarizable electrode like the 316L stainless steel ones we used for the Applied Circuits lab. One could check this by sweeping the frequency up, and seeing whether the estimate for RS converges.

I’ve not tried building and testing this idea yet, because the Arduino boards have too slow and too low-resolution A-to-D converters, and my son is hogging the Freedom KL25Z board for his light glove prototype. (I guess I need to get another copy of the board).

I don’t think I’ll be using this design in the Applied Circuits course (it is not suitable for teaching about modeling with linear components), but it might be a useful design for the freshman design seminar, or even for doing a titration lab in my son’s AP chem class. I understand that a standard lab is to titrate barium hydroxide with sulfuric acid, since the two reactants have conductive ions, but the barium sulfate precipitates out and the solution is essentially non-conductive when the two are perfectly balanced. The conductivity should form a nice “V” plot as sulfuric acid is added to a barium hydroxide solution—the units don’t even matter, since we just want to know what amount of sulfuric acid need to be added to attain the minimum, not what the conductivity is at the minimum.

To make a useful conductivity meter for something like AP chem, I’d need a much smaller probe that the pair of electrodes I used in the Applied Circuits class. I think I could make a decent probe out of a piece of stainless steel tubing and a piece of the 316L welding rod, if I could come up with a good way to hold them together concentrically, make sure they were always immersed to the same depth, and keep any wires to the rod and tube out of the solution. This might be a good problem for the freshman design seminar.

## 2013 August 14

### Service courses

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

Joe Redish, in his blog The Unabashed Academic: wrote a post On service courses, in which he talked about a physics course he teaches, recognizing that the primary audience is not physics majors:

In physics departments, a lot of the students we teach are not going to be physics majors.  They are going to be engineers, chemists, computer scientists, biologists, and doctors.  Everybody (that is, all physicists) agrees that physics is good for all future scientists since physics is the basis of all other sciences—at least that’s the way it seems to physicists.

He added that they wanted to take my course, despite the fact that they were biology majors and therefore it wasn’t of much relevance for them.

Well!  Despite the fact that I had thought carefully about what might be useful for biologists in their future careers, and focused on developing deep scientific thinking skills, it suddenly became clear that I had failed in an important part of my goal.  I had managed to teach some good knowledge and good thinking skills, but I had not made the connection for my students to the role of that knowledge or those skills in their future careers as biologists or medical professionals.  The occasional problem I had included with a biological or medical context did not suffice.

I therefore propose we who are delivering service courses for other scientists—and I mean mathematicians, chemists, and computer scientists as well as physicists—ought to measure our success not just by the scientific knowledge and skills that our students demonstrate, but by their perception of their value to themselves as future professionals.  We can tell ourselves, “Well, they’ll see later how useful all this is,” and they might, but that is really wishful thinking on our part.  If our students see that what we provide is valuable now, they will maintain and build on what they have learned in our classes.  Otherwise, it is likely that what we have taught will fade and our efforts will have been largely in vain.

I wish our faculty who taught service courses thought about their classes this way.  All too often I hear from students that they don’t remember anything from the required science classes, and that the faculty who taught those courses did not care whether they learned anything or not—both students and faculty were just going through the motions without any real teaching or learning taking place.

I’ve never taught a large service course for students outside my department (though my department has changed, I’ve always focused on courses that were very directly related to the major, even when teaching lower-division courses like Applied Discrete Math).  So I can’t speak from experience about teaching students who see no point to learning the content of the course—it must be tough.

About the closest I’ve come is in teaching tech writing, which I instituted as a requirement for computer engineering majors back in 1987.  That course was not one students enjoyed much (there was a huge amount of writing, and a corresponding huge grading load), and many saw it as well outside their area of competence (and for some, it was).  But even the tech writing course was carefully tailored for relevance to the engineers taking it. Every assignment I created was intended to develop skills that they could use as engineers and as students.

I’ve had people come up to me and tell me that they took the course from me 20 years ago (I rarely remember them), and that it was one of the most valuable courses they had in college—which is gratifying to hear, since few of them wanted to take it when they were students.

It is possible to make courses that seem outside the students’ interest relevant, but it takes some serious effort.  I think I managed to do that with the Applied Circuits for Bioengineers course that I prototyped last Winter and will be teaching again this coming Spring.  None of the students in the course were interested in bioelectronics—they had all put off the required circuits course as long as they could, because they were not interested in the material and had heard horror stories about how dry and difficult the EE course was.  By the end of the quarter, several of them were excited about what they could do with electronics, and wishing they had been able to take the course much earlier—they might have chosen bioelectronics instead of biomolecular engineering as their concentration.  The standard circuits course had squelched almost all interest in bioelectronics—only about 1 out of 20 or 30 bioengineering students had been choosing the bioelectronics concentration, and he was going on to do radio electronics for an MS degree, thanks to a particularly good lab instructor in EE.

It is never enough, even in a course for majors, to design the course around “they’ll need this later”.  It is far better to make them want to know it now, for things that they can do now.  For the Applied Circuits course, I concentrated ton the students doing design and construction in the labs, with just enough theory to do the design.  This is a big contrast to the traditional circuits course, which is all theory and math which EE students will use “later”—totally useless if the students then never take another EE course.

This year I hope to replace the requirement for the EE circuits course in the bioengineering major with a requirement for the applied circuits course.  Those who want to do bioelectronics will still have to take the EE circuits course, but they’ll go into it knowing half the material, and knowing what the theory is for, which should move the bioengineers from the bottom of the circuits course to the top.

I wish I had the capability to replace the chemistry and physics courses also, but I’m not aware of tenure-track faculty in either department who are interested in changing what and how they teach for students outside their own major.  Note that for the circuits course I could not get the EE department to teach the course that was needed—I had to teach myself circuits and design the course myself (which took me about 6 months full time).  And I was a lot closer to knowing circuits (from my experience in teaching digital logic and VLSI design) than I am to knowing chemistry (which the least serviceable service course that we require of bioengineers).

One thing that chemists and physicists could do to make their courses more useful and interesting to engineering students is to put design into the labs.  Engineers want to make things, not just study them.  Far too many of the freshman science labs are cookbook labs, where the students are just taught to follow carefully written instructions to make a series of measurements to get an answer to a question that they weren’t interested in to begin with.  What a waste of precious lab space and time.

## 2013 August 13

### MPX2053DP pressure sensor being discontinued

Filed under: Circuits course — gasstationwithoutpumps @ 18:24
Tags: , ,

I just got notice today that Freescale is discontinuing the MPX2053DP pressure sensor that I used for the pressure sensor lab in the Applied Circuits course. DigiKey sent me an “end-of-life” notice with a “last time buy date” of 02/22/2014. It is service like this that makes me glad to buy from Digikey.

I don’t see any indication of the end of life status for the MPX2053DP on the Freescale website, which either means that Freescale is very poor at maintaining their website, or that Digikey has made a mistake here.  I’m betting on incompetent web maintenance at Freescale.

I’m wondering whether I should order some spares (I still have 8 breakout boards). I have 12 that I soldered to breakout boards for the lab (which UCSC reimbursed me for), plus one that I made for myself. Eight spares would cost $110.56, and 10 spares$125.60 (plus tax and shipping in both cases). I should probably check with the lab manager to find out what their recommended policy is for spare parts on discontinued items.

It may not be that important, since the MPX2050DP is still available, and it has essentially the same specs (except somewhat better linearity) and is actually slightly cheaper.  If we need more, we can get the MPX2050DP instead.

## 2013 July 31

### Microphone sensitivity exercise

Filed under: Circuits course — gasstationwithoutpumps @ 13:46
Tags: , , , ,

I’ve been thinking a bit about improving the microphone lab for the Applied Circuits course.  Last year, I had the students measure DC current vs. voltage for an electret microphone and then look at the microphone outputs on the oscilloscope (see Mic modeling lab rethought).  I still want to do those parts, but I’d like to add some more reading of the datasheet, so that students have a better understanding of how they will compute gain later in the quarter.

The idea for the change in this lab occurred to me after discussing the loudness detector that my son wanted for his summer engineering project.  He needed to determine what gain to use to connect a silicon MEMS microphone (SPQ2410HR5H-PD) to an analog input pin of a KL25 chip.  He wanted to use the full 16-bit range of the A-to-D, without much clipping at the highest sound levels. Each bit provides an extra 6.021dB of range, so the 16-bit ADC should have a 96.3dB dynamic range.  The sound levels he is interested in are about 24dB to 120dB, so the gain needs to be set so that a 120dB sound pressure level corresponds to a full-scale signal.

He is running a 3.3v board, so his full-scale is 3.3v peak-to-peak, or 1.17v RMS (for a sine wave).  That conversion relies on understanding the difference between RMS voltage and amplitude of a sine wave, and between amplitude and peak-to-peak voltage. The full-scale voltage is 20 log10(1.17), or about 1.3dB(V).

Microphone sensitivity is usually specified in dB (V/Pa), which is 20 log10 (RMS voltage) with a 1 pascal RMS pressure wave (usually at 1kHz).  The microphone he plans to use is specified at –42±3dB (V/Pa), which is fairly typical of both silicon MEMS and electret microphones.The conversion between sound pressure levels and pascals is fairly simple: at 1kHz a 1Pa RMS pressure wave is a sound pressure level of about 94dB.

Scaling amplitude is equivalent to adding in the logarithmic scale of decibels, so for a sound pressure level of 120dB, the microphone output would be about 120–94–42±3=–16±3dB(V), but we want 1.3dB, so we need a gain of about 17.3dB, which would be about 7.4×. Using 10× (20dB gain) would limit his top sound pressure level to 117dB, and using 5× would allow him to go to 123dB.

One can do similar analysis to figure out how big a signal to expect at ordinary conversational sound pressure levels (around 60dB):  60–94–42=–76db(V).  That corresponds to about a 160µV RMS or 450µV peak-to-peak signal.

I tried checking this with my electret mic, which is spec’ed at –44±2dB, so I should expect 60–94–44±2=–78±2dB, or 125µV RMS and 350µV peak-to-peak. Note that the spec sheet measures the sensitivity with a 2.2kΩ load and 3v power supply, but we can increase the sensitivity by increasing the load resistance.  I’m seeing about a 1mV signal on my scope, so (given that I’m not measuring the loudness of my voice), that seems about right.

I’ll have to have students read about sound pressure level, loudness, and decibels for them to be able to understand how to read the spec sheet, so these calculations should be put between the microphone lab and the first amplifier lab.  I’ll have them measure peak-to-peak amplitude for speech, and we’ll compare it (after the lab) with the spec sheet.  This could be introduced as part of a bigger lesson on reading spec sheets—particularly how reading and understanding specs can save a lot of empirical testing.

Next Page »