Gas station without pumps

2015 December 21

New tools and parts list for applied electronics

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

I just finished making a new parts and tools list for the Spring 2016 offering of my applied electronics course.  The class doesn’t start until March, but I’m getting the parts list in early this year, so that the staff have sufficient time to buy and repackage everything before classes start.  I really want the parts and tools to be available on the first lab day (29 March 2016) this time.

I’ve spent a lot of time finding appropriate tools and parts at low cost, but the UCSC purchasing system may make it difficult, as they don’t allow the use of major sites like Amazon and AliExpress, which are often the only way to get low-cost items from China without doubling the price.

2014 June 10

Digi-key end-of-life notification for IR emitter

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

One of the things I like about dealing with Digi-key as a supplier for electronics parts is that they treat me like an important customer, even though I order only small numbers of parts.  For example, they automatically send out notifications whenever a manufacturer informs them that a part is being discontinued—like the notice I got today:

Part Life Notification

Dear Valued Digi-Key Customer,

You have purchased the following part number from Digi-Key within the last two years. The manufacturer has announced an update to the part status.

Part Affected
Description LED IR EMITTER 950NM
Manufacturer Part Number SFH 4512
Digi-Key Part Number 475-2943-ND
Customer Reference Number IR EMITTER
Status End Of Life
Last Time Buy Date 12/01/2014
Substitutes Please click here

It used to be that only big industrial customers got that sort of service—now even hobbyists, students, and professors can be kept informed about the parts they use. Digi-key doesn’t have to spend a lot to do individual notifications (it’s all automated), but it probably took them a fair amount of time to set up the system to do so, and this sort of attention to customer service is one of the things that has made me a loyal (though small) customer.

I’ll drop the IR emitter from next year’s class part list (we didn’t do much with it this year anyway).

I’ll also change the red LED from LED red diffuse 3mm 625nm WP710A10ID to WP3A8HD whose peak emission is at 700nm (where the molar extinction coefficient for oxyhemoglobin is only 290 cm-1/M, rather than ~683 cm-1/M for the 627nm peak of the WP710A10ID we used this year). Ideal would be a 686nm peak, where oxyhemoglobin is most transparent (272.8 cm-1/M), but there’s not much available between 700nm and 660nm (some more expensive ones at 697nm, which makes little difference from 700nm), and 700nm is better than 660nm.

2014 April 3

Thermistor lab second half took too long

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

I thought that splitting last year’s thermistor lab into two parts would mean that it would fit comfortably into 2 3-hour periods, but I still spent 5.5 hours in the lab today with the students, even though they had done most of the measuring on Tuesday.  What went wrong? and how can I prevent problems like this in future (both later this quarter and next year)?

The students got the rest of their parts today (except for the thermometers, which will come too late for the students to use). I checked out the digital thermometers that we’d been loaned before class, and found that 4 of the 10 were clearly wrong, reading about 2°C too high.  That was in addition to the thermometer I found on Tuesday that was about 20°C too low. Tomorrow, I’ll have to take some time to talk about the differences between precision, repeatability, and accuracy.

I started by having students finish the homework assignment together (Design a circuit to convert a 1kΩ–3.3kΩ variable resistance sensor to a 1v–2v voltage output, with 1v for the 1kΩ resistance and 2v for the 3.3kΩ resistance. Use standard resistor values that you have in your kit), and wire it up using the power supplies and a multimeter. I also used this as a time to teach them about how to use the power supplies (letting them warm up, setting voltage and current before turning on the output, turning on and off the output without touching the power switch). I also told them about the resistor color code and two ways to use resistors in a breadboard: using 0.4″ spacing and having the resistor horizontal near the breadboard, or the “flying resistor” with 0.1″ spacing and a vertical resistor. I suggested that they might find the flying resistor easier to work with in some of the later breadboarding, and suggested that they get in the habit of always having the band for the most significant digit at the top of the resistor.

One of the students had done something very clever before lab—he’d taken the 64 tapes of 20 resistors each, sorted them by size and then used transparent tape along one edge to make a booklet of resistor sheets.  The half hour or so of time that took him will probably save him many times that much during the quarter—I had him show his work to everyone and suggested that they take the time to do likewise.  He also found, while doing the sorting, that two of the resistor tapes were mislabeled (he already knew the resistor color code, so could see at a glance that the 47kΩ and 100kΩ resistors had their labels swapped.  I think that this student is already thinking like an engineer—he may not have the math skills of a professional engineer, but he has the attention to detail and forethought that characterizes the really competent engineers. I hope that this early promise continues throughout the quarter.

One big problem with the lab time was that almost no one had actually done the pre-lab design problem to optimize the resistance to pair with the thermistor, so they spent an hour or two struggling to set up the equations and do the calculus during lab. Everyone did eventually get a reasonable value for their design resistor by setting up the equations and doing the calculus (with the aid of Wolfram Alpha), but sitting at a bench in the lab doing math is clearly not an optimal use of lab time. What can I do to prevent that delay? Demanding that they show up to lab with the solutions did not work last year or this, so I need a different technique.

Tomorrow I’ll talk to the students about time management (writing up the report for Tuesday’s lab either Tuesday or Wednesday, so that only the new stuff on Thursday needs to be added, for example) and doing design exercises before coming to lab.

I’m thinking that next year I may split the thermistor lab into 3 parts: part one is what we did on Tuesday minus the soldering; part two would be just setting up and testing the DAQ boards (installing software, soldering, and doing some simple tests) and wiring up the simple voltage-divider exercise; and part three would be wiring up the thermistor and resistor to the DAQ board, checking linearity, and plotting temperature as a function of time. I could then require that the design report due on Friday be mainly about the data collected on Tuesday and the calculations for the design of the temperature-to-voltage converter. By forcing them to turn in the design report with the calculations long before they come to lab, there is a better chance that they’ll do the design work outside lab time.

That would rather mess up the weekly pairing—I wonder whether to think of that as a bug or a feature. If I forced repartnering before the temperature recording got done, students would be coming in with two different design reports and having to reconcile them. That might cause them to actually read each other’s reports, which could be a good thing. I’ll have to see what ripple effect this rescheduling would have on the rest of the quarter.

Finishing up the soldering that was started on Tuesday did not take up much time—within about half an hour everyone had a board that had good-looking solder joints on all 64 connections.

Installing PteroDAQ on the KL25Z boards also took more time than I’d like, mainly because of the necessity of first installing’s firmware fix, then installing PteroDAQ, then switching to the other USB port to run PteroDAQ. Downloading from the bitbucket site confused a lot of the students (I find the site confusing that way also—there should be an obvious big button that downloads everything without “cloning” a repository or doing anything mysterious. I ended up passing around my flash drive so that people wouldn’t have to deal with bitbucket. Almost everyone managed to get PteroDAQ working eventually, but it took more time than I expected.(One student may be having hardware problems with the KL25Z board or the USB cable—there was no 3.3v power measured.  Another student had a bad USB cable—the board worked ok with other cables.) I wonder if there is a way to make the bitbucket repository more user-friendly for someone who just wants to install and run the software—it seems to be set up only for developers, not users.

Setting up their circuits on the breadboards took much longer than I expected.  Some of the problems were anticipated (like the students having a hard time finding the appropriate resistors, or clamping the insulation in the binding posts of the power supplies and so not getting any voltage), but a lot of the delay here was a mystery to me—students didn’t seem to be making progress for quite a while, but I couldn’t tell what was delaying them. I’ll have a hard time fixing the delay problem here if I don’t know its cause.

So far the students have learned to use the multimeter as an ohmmeter and as a voltmeter, and next week they’ll learn to use it as an ammeter.  We’ll also get a little use from the function generator and oscilloscope next week. I think I’ll also start introducing AC voltage tomorrow, instead of waiting until next Monday, unless the students have a lot of questions about the writeups they need to do (I expect that there will be some gnuplot questions).






2014 April 1

Thermistor lab 1 stressful, but successful

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

My son and I went to the lab at 11 this morning, to see if he could get PteroDAQ to work on the Windows machines.  He fairly quickly got things working with Python3, and he eventually even found the problem in Python2 and so it should work with either now on Windows 7 machines.  On the Macs, the alpha version of PteroDAQ works on Python3, but still seems to hang with Python2.

There are still a lot of features unimplemented in PteroDAQ, but he is planning to do the alpha release tonight.  The most obvious missing features is that the digital channels don’t record yet (you can select them, but the communications protocol for digital channels is not implemented yet).  Another obvious missing feature is sampling on interrupts instead of a timer—again, the GUI provides the options but the implementation isn’t there yet.  I expect that these two features will be in place by some time next week—luckily they are not needed for the class this quarter.  There are a number of other features that are planned, but they are not visible in the GUI, so no one will miss them.

Incidentally, I came up with a really stupid slogan for the package: “PteroDAQ: the P is Psilent”, because my son gets annoyed with me for always pronouncing the “P”—I pronounce the “P” in “pterodactyl” also.

While my son was working on PteroDAQ, I was checking out the soldering irons that had been left for the lab to use—of the 5 old irons left there, two were usable (though both had broken strain reliefs on the cords to the irons). I complained to the lab support staff, since I’d been told that a full complement of 12 good digital Weller irons had been purchased for the lab in the Fall. It turns out that all the good irons had been reassigned to senior design projects. The staff managed to round up 3 of them, so we had 5 working soldering stations in time for the class. There are 3 weeks during the quarter when students need to solder—weeks 1, 3, 9, and 10—and I hope we can get the irons at each of those times (or they buy some more).

After a quick lunch at the taco truck (Ray’s Catering), we continued setting up the lab.  My son got Python3.4 installed on all the Windows machines (with PySerial) and put the version that worked with Python3 on those machines.  His getting it working with Python2.7 came later, and that version is only on his flash drive and the machine he worked on. While he did that, I set up the soldering stations, the secondary containment tubs and coffee cups, and the water sources: a coffee urn full of hot water (about 80–85°C), a large thermos of ice water, and a couple of pitchers of water from the tap.

When class started, the lab staff showed up with the kitted parts to issue to the students.  One student was late, because it was her first class in Baskin Engineering, and finding the lab is a bit difficult if you don’t know that most of the electronics labs are clustered around “Jack’s Lounge”—the study area surrounding the West Mechanical Chase.  Everyone got their kits, though, before the lab support person had to leave.

Our first order of business was to unpack the parts and check off whether everyone had everything. There were certain parts that I knew would be missing, because the lab staff had forgotten to put in part of the order to ITEADstudio when they ordered the custom PC boards.  Those parts were ordered late and were shipped from Hong Kong yesterday.  I hope we get them by next week—we need the capacitors for the Thursday lab next week. One student was missing his electret microphone, which he’ll need by next week—he’ll have to talk to the lab staff about his missing part.  They do have spares, since I had overestimated how many students would be taking the class this Spring.  I had expected 20–40 and ended up with only 9.

The resistor assortment that was ordered for them this year is 20 each of 64 different values (from 1Ω to 10MΩ) rather than 10 each of 112 values like I ordered last year. (This was my choice, not a staff change of order—it saves about $5 on the resistors, which were the most expensive thing in the parts kit.)  That means they’ll get a little less precision moving from calculated values to what is actually available, but they’ll have more of their favorite values.

Another minor problem in the packaging is that the EKG electrodes had not been sealed into ziploc bags.  I’m afraid that they’ll dry out completely by the end of the quarter and urged the students to get them into sealed ziploc bags right away. We’ll find out at the end of the quarter whether the electrodes are still working. (Maybe I’d better stock up on some myself, so that I can provide the students with them if theirs have dried up. The electrodes cost 22¢ each in quantity, so I don’t want to just give them away to students who were careless with theirs, though.)

The lab also had no 22 gauge wire—just a couple of almost empty spools of 24 gauge in red and black. The lab staff has ordered a small quantity of 22 gauge wire for the lab, which I’ll have to hide to keep the other class in the lab from stealing—they unspool 10s of feet of wire, use it once and throw it away. I don’t know who is supervising them (not their professor), but they seem to have no notion that wire costs money.

A bigger problem was that the students had no thermometers, and today and Thursday were the two labs that needed the thermometers! Luckily I spotted the lab manager wandering by and complained to him about the missing thermometers.  He knew about the problem, but hadn’t told me, because the thermometers were supposed to come in today. Luckily, he came up with a work-around, finding some cheap digital thermometers that are used in another lab (not as cheap as the alcohol thermometers in the student kits, but more precise and easier to use) and loaning them to us.

After checking all the parts, we proceeded to soldering headers onto the Freedom boards. Only one or two of the nine students had soldered before, and the 64 solder points on the board is a lot for a newbie, particularly when they wanted me to inspect their solder joints after every one or two. A couple of students got solder bridges that were easily removed by reheating the solder, and a lot had cold solder joints, which were also fixed by reheating the joint. We did not finish the soldering, because I wanted them to get to the temperature measurements as soon as the digital thermometers arrived.

I found that I had forgotten to get tape to attach the thermistors and the thermometers so that their tips were together, so while I ran over to the faculty services office to get tape, my son explained how to use the multimeters as ohmmeters. The students then proceeded to measure resistance and temperature in their coffee cups (kept always within the secondary containment tubs—I don’t want any spills in the lab!). I had to run to the drinking fountain a couple of times to refill the room temperature pitchers, and to the lab upstairs once to get more ice.

The goal was to get at least 10 resistance measurements at widely spaced temperature ranges over as wide a range as possible. Many of the students got over 20 readings, with a range from about 3°C to about 80°C.  Some students had trouble getting the low and high ends of the range—finally it was explained to them that you had to prechill or preheat the ceramic cup, or it would change the temperature of the water it contained.  The notion of thermal mass (which they supposedly had in high school chemistry) does not seem to have worked its way into their model of the world yet.

So despite the delays in getting PteroDAQ written (I expected the alpha release at the beginning of January) and the screwups and delays in ordering parts and tools for the lab, almost everything that was supposed to get done in the first lab got done, and we’ll have time in the second lab session on Thursday to catch up and get everything done.  We’ll finish up the soldering then and go over the multimeters more carefully, before they try measuring voltages from their thermistor+resistor voltage dividers, both with multimeters and with their Freedom KL25Z boards.

It took me 45 minutes after the students left to clean up the lab and dump all the water in the bathroom sinks, so I was in the lab (except for a short lunch break) from 11 to 5:45.  Maybe it is a good thing that I don’t have so many students that I need two lab sections!

Tomorrow we’ll analyze the data together, and the students will learn how to use Gnuplot to plot data, to plot models, and to fit models to data. I’m hoping that this year’s design reports will have better graphs than last year’s—it took the students a long time to get the message that I cared about things like correct axis labeling and a long time for them to learn how to change the gnuplot scripts themselves.  This year I’m planning to walk them through analyzing their own data in-class, rather than expecting them to figure things out from provided examples.



2013 January 23

Seventh day of circuits class

Filed under: Circuits course — gasstationwithoutpumps @ 19:57
Tags: , , , ,

We’re now about 1/5th of the way through the course (2/10 labs done, 7/34 lectures done).  Things have smoothed out a bit since the first week, and I have a better understanding of what pace I can keep with the students.  I’ve lost two of the top students whose schedules did not permit them to stay for the whole 3-hour lab.   They were finding it too difficult to do the labs on their own time.  Part of the problem here is that seniors are over-scheduled—I had intended this course for sophomores and juniors, not seniors, but I ended up with those students who’d been putting off learning circuits as long as possible.

Today’s class went almost exactly as I had planned it (a rare luxury for me).  I had just a few concepts to get across, and fairly simple progression from each topic to the next:

  • e^{j\theta} = \cos(\theta) + j \sin(\theta)
  • Polar notation: any complex number can be represented as z= A e^{j \theta} (This included the notion of amplitude.)
  • sinusoids:  e^{j\omega t} We talked about frequency, angular frequency, and period, reminding them of the relationships between them.
  • Phasors: multiplying by a complex number does amplitude and phase change z e^{j\omega t} = A e^{j\theta} e^{j \omega t} = A e^{j (\omega t + \theta)}.
  • From Q=CV, we derived i(t) = C \frac{dV}{dt}.  Actually, I did the full chain rule, and talked about when \frac{dC}{dt} was close enough to zero to be ignored.  We plotted (crudely) voltage and current versus time, noticing the difference in phase and relating the movement of the charge to the increase or decrease of voltage.
  • We then divided voltage by current to impedance of a capacitor: Z = 1/ (j \omega C) and we noticed that at low frequency a capacitor is a an open circuit and at high frequency the capacitor is a short circuit.
  • Finally, we analyzed a voltage divider consisting of a resistor and capacitor, rederiving the voltage-divider formula, since no one saw quickly that the formula was one they already knew, just using impedance in place of resistance.

That’s where we ran out of time, so I gave the students a homework exercise: use gnuplot to plot the magnitude of Vout/Vin for the RC voltage divider as a function of frequency for different R and C values.  I did not give them values for R and C (I should have given them 1kΩ and 1µF) nor a frequency range (I should have given them 1Hz to 1MHz), but I did tell them to use a log-log plot. They should end up with something like the following, though I don’t expect them to put in the asymptotes.

Low-pass filter made with a voltage divider having a 1kΩ resistor on top and a 1µF capacitor on the bottom.

Low-pass filter made with a voltage divider having a 1kΩ resistor on top and a 1µF capacitor on the bottom.

On Friday, after tomorrow’s lab, I’ll have to remember to bring in my laptop so that we can explore the gain of simple RC filters and I can introduce the notion of the Bode plot.  I think that we’ll leave phase alone for a while, though.  I’ll probably also have to explain RMS voltage on Friday, since that is what they’ll measure in the lab tomorrow.  I’ll also want to talk a little about stainless steel, silver/silver-chloride, and other bio-relevant materials.

I’ve been thinking a bit about how to schedule the course next time, to make the first two weeks less hectic.  I think that twice a week labs (with the first seven sessions being parts kit, thermistor resistance, thermistor voltage to Arduino, microphone DC characteristics, microphone on oscilloscope, stainless steel electrodes, and Ag/AgCl electrodes) would put us just half a week behind where we are this year in terms of labs, but probably a bit ahead in terms of theory, since we would not have used a lecture on the parts kit.  The lab write-ups would probably still be weekly, even with twice-weekly labs.

Distributing the parts kit in a lab session would give us a good time to teach using the wire strippers and making clip leads with the alligator clips.  Perhaps there would even be time to learn the pattern of breadboard connections by probing with a multimeter and a couple pieces of wire.

Next Page »

%d bloggers like this: