Gas station without pumps

2014 January 31

Wire loop vs. twisted pair try 1

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

I was thinking about things we might do in the first lab day for the Applied Circuits course next quarter, now that I have 2 lab sessions a week.  The first, obvious thing is to unpack the lab kits and identify the different components, labeling the capacitor zip locks with values of the contained capacitors, and learning to use the wire strippers, the power supplies, and the voltmeters.

I’m thinking that I should have the students make a 3′ red-black twisted pair and pack it with their parts, so that they don’t try getting new power wires every week.

One experiment I was considering having them do is to look at the AC signal from a large loop of wire and from twisted pair, to see the difference in noise pickup.  I tried doing this at home today, with rather disappointing results.  The large loop did not pick up more 60Hz noise than the twisted pair when viewed on either my Kikusui oscilloscope or by Bitscope USB oscilloscope.  In fact I couldn’t see any noise with either one.

I tried adding my 1500-gain EKG amplifier as a front end, and then I could see about 60μV noise, but that did not change whether I used a long loop, a twisted pair, or a very short loop between the instrumentation amp inputs.

I first tried looking at how much noise there was from the Bitscope with the DP01 active probe using AC coupling:

Looking at shorted inputs  for the AC-coupled DP01 active probe in its high gain mode.  This is 2mV/division, 100µs/division, "macro" mode.  The noise is a couple of mV.

Looking at shorted inputs for the AC-coupled DP01 active probe in its high gain mode. This is 2mV/division, 100µs/division, “macro” mode. The noise is a couple of mV, about the same as the noise level without the DP01, but the resolution is much better with the DP01.  The high-speed trace here is to show the component of the noise that is around 30.8kHz, which is about as big as the 60Hz component.  The 30.8kHz noise is most likely from the USB power supply into the Bitscope.  The Bitscope does not appear to have as good power-supply noise rejection as one might want.

I then hooked up the EKG amplifier board (which should have a gain around 1508) using a separate power supply, and looked at the noise on the Vref signal (which is just buffered from a voltage divider on the power supply).

At 2mV per division and 10ms per division, we can see a little 60Hz noise added to the high-frequency noise of the Bitscope, but the noise is still only 2–3mV, which would be an input-referenced noise of about 2µV given the amplifier gain around 1500.

At 2mV per division and 10ms per division, we can see a little 60Hz noise added to the high-frequency noise of the Bitscope, but the noise is still only 2–3mV, which would be an input-referenced noise of about 2µV given the amplifier gain around 1500.

The noise on Vref is not much more than noise inherent to the Bitscope and is very similar to the noise I see looking just at the output of the power supply without the EKG attached.
Next I looked at the output of the EKG, with both inputs shorted to Vref.

This is now 40mv/division and 10ms/division looking at the output of the EKG amplifer with both inputs shorted to Vref.  The output noise is around 90mV, so the input-referenced noise is around 60µV.

This is now 40mv/division and 10ms/division looking at the output of the EKG amplifer with both inputs shorted to Vref. The output noise is around 90mV, so the input-referenced noise is around 60µV.

Now we see a signal that is not just Bitscope or power supply noise, and have a noise floor for looking at signals at the input of the EKG amplifier.

Unfortunately, replacing the short with a large loop of wire does not appreciably change the signal, but if I connect the two EKG inputs to Vref via separate 2.2MΩ resistors, I get a large output:

200mV/division, 10msec/division.  Inputs of EKG amplifier separately connected to Vref via 2.2MΩ resistors.  This signal is about 1.04V peak-to-peak (so the input is about 690µV.

200mV/division, 10msec/division. Inputs of EKG amplifier separately connected to Vref via 2.2MΩ resistors. This signal is about 1.04V peak-to-peak (so the input is about 690µV).

The output can be changed substantially by putting my hand near the resistors—the 60Hz noise appears to be capacitively coupled into the amplifier. I can reduce the peak-to-peak voltage to about 500mV  (that is around 300µV at the input) and make it have a larger 120Hz that is almost 10dB larger than the 60Hz component, , just by moving my finger around near the resistors. I can also raise the signal until the EKG amplifier is swinging rail-to-rail (at least 3mV at the input).

So I don’t have a demonstration circuit for electromagnetic pickup here, but I do have one for capacitive coupling.  To detect currents induced in a loop, I probably need a transimpedance amplifier to detect small currents, rather than an instrumentation amplifier to detect small voltages .  I’ll leave that for a separate post.

Biomed lab tours and online discussions

Filed under: freshman design seminar — gasstationwithoutpumps @ 09:22
Tags: , , , , ,

I forgot to type up notes after the sixth day of the freshman design seminar, because I had a meeting right afterwards.  I’ll try to make up the deficit now, two days later.

At the beginning of class I collected the homework (which had originally been due Monday, but which I had given an extension on, so that students could do it right).  I’ve not looked at it yet, but I could tell when I collected it that students had taken to heart the message to type up their homework and put some care into it.  I hope that spills over into their other classes—not only will it benefit them, but it will help our department if the bioengineering students get a reputation for being diligent and meticulous.

Most of the class time was spent on lab tours in the Biomed building, given by four grad students who work there.  The tours were good, providing students with some idea what sort of work was being done and what sort of equipment was available for doing the work.  They saw high-temperature incubators for hyperthermophiles, a glovebox for working with anaerobic organisms, a qPCR machine, an ultracentrifuge, a cell sorter, a large warm room (hardly being used—there was one shaker table with one flask, which would easily have fit in a benchtop incubator),  mammalian cell culture facilities, and a teaching microscope for mouse surgery.  (And other stuff that I won’t bother to list here.)

The whole Biomed building seems to be half empty and even the occupied lab bays have a huge amount of space per person, especially compared to the rather cramped labs stuffed with students and researchers that we saw in Baskin a couple of weeks ago, which makes it irksome that the University administration has been preventing our department from doing recruiting for wet-lab faculty for lack of lab space.  All the space is earmarked for growth in a different department, which would take them 10 years to fill (if they ever manage to do so).  The space planning on our campus seems to be done by turf wars between deans with no central rebalancing, and one dean (not ours) now holds all the empty space on campus.  Our dean has an unimproved warehouse 3 miles away which would cost millions to convert into anything usable, even if it made sense to exile active researchers from campus.

The lab tour ran a bit long, and half the class had to leave, but the other half got an interesting discussion about getting into research as an undergrad from a grad student who had been an undergrad here.

The e-mail mailing list for the class is still not serving its function of providing an out-of-class discussion space.  Only eight students have posted anything and no student has responded to another student.  The list is still useful for my making announcement (like when homework has been posted on the web site), but it isn’t working as a discussion forum.  I’m apparently not very good at creating online discussions—I’ve not gotten them to work in classes yet, and even this blog has 86 views for every comment (and 40% of those comments are mine, so the ratio is more like 144 views per external comment).

I looked for some stats on MOOC discussion groups, to see how my online discussion compares with classes that are only on-line.  I found a series of blog posts by Jeffrey Pomerantz where he analyzes the data for a MOOC course he is teaching.  The one about online discussions showed him getting 1787 posts and 707 comments in 8 weeks, for a class whose size was 27623 total registrants, 14130 active students,  9321 video viewers, 2938 who did one homework, or 1418 who completed the course (numbers from his post about course completion).  If we take the video viewers as the most realistic measure of the class size, we get about 3.3% of the students posting or commenting per week.  Maybe my 60% participation in one week is not as bad as I feared, even if it doesn’t have the feel of a discussion yet.

2014 January 30

Shakespeare Santa Cruz donors informed

Filed under: Uncategorized — gasstationwithoutpumps @ 16:33
Tags: , ,

UCSC finally got around to informing the Shakespeare Santa Cruz donors about the existence of Shakespeare Play On (a day or two before the Shakespeare Play On fundraising deadline, with over $100,000 still needed):

Thank you for supporting Shakespeare Santa Cruz

As many of you may know, Shakespeare Santa Cruz—at least as a campus-sponsored activity—ended last month with the holiday production of It’s a Wonderful Life: A Live Radio Play. The decision that the campus could no longer afford to provide ongoing financial support to Shakespeare Santa Cruz was one of the most difficult of my tenure as chancellor.

However, as you may have heard, a community-based nonprofit group—Shakespeare Play On—is spearheading a drive to establish a more financially viable company and relaunch the popular festival in time for a Summer 2014 season. Their representatives and the campus are actively discussing the possible use of the Stanley-Sinsheimer Glen and other facilities on campus.

The new company has already received tremendous donor support for this ambitious undertaking. Yet, representatives of Shakespeare Play On have told me that this remains a critical time for the organization—and they asked that I write to you and other past supporters of Shakespeare Santa Cruz, letting you know that help is still needed.

If you are interested in Shakespeare Play On, please take a few minutes to learn more about the organization and its financial needs. You may do so by visiting www.shakespeareplayon.net.

On behalf of the campus, please also accept my heartfelt thanks for your past support of Shakespeare Santa Cruz. The performances, the designs, the staging—literally everything about the productions—would not have been possible without the support of people like you.

I am sure Shakespeare Play On would be as appreciative of your generosity as the campus was during the festival’s first 32 years.

Sincerely,

George Blumenthal
Chancellor, UC Santa Cruz

This letter is gracious, but a bit late (mid-December would have been much more valuable).  I hope it comes in time to do some good.

2014 January 28

High school senior workload

Filed under: home school — gasstationwithoutpumps @ 22:00
Tags: , ,

Shireen Dadmehr, in Math Teacher Mambo: Seniors, Workload, Responsibility, talks about high-school seniors dropping out of her CS course:

The flip side of this is that depending on what courses the students take their senior year, and how they approach their scholarship applications and college applications, and what sports they play, and how far their daily commute is, the amount of time they have for homework and sleep and life fluctuates. Needless to say, there are stressed out little bundles of walking sleepless zombies.

Her dilemma is whether to push the students to stick with what they signed up for or to let them drop courses that are either too ambitious for them or just lower priority in an over-loaded schedule. My advice to her is simple—talk to the students and make sure that they aren’t just scared of the material or not getting it due to things that could be changed in the teaching, but let them make their own decisions about whether the effort is bringing enough reward.

As a home-schooling parent of a high-school senior, I’ve also got to deal with helping my son balance his workload—I have high standards and high expectations for him, and I’d like to have him do everything he started this year, but some things are taking more time than anticipated, so it is time to re-evaluate the importance of different activities.

The second semester is starting now, so this is the ideal time to rebalance the workload.

His first semester was supposed to be econ, AP chem, writing (a mix of college essays and tech writing),  group theory, two computer science/computer engineering projects (the light gloves and upgrades to the Arduino data logger), and theater.  The mix of what was done was not quite what was envisioned—more of some things and less of others.

The AP chem and econ are pretty much where they should be (a few days behind in chem due to illness, about a week to go to finish econ) at the semester break.

The college essays turned out to take far more time and effort than originally anticipated (by me and him—his mother had a more realistic view), which pushed the tech writing out.  The college essays got done, but only at the expense of no winter break. Luckily this problem was seen early enough that the transcript was revised to describe his fall semester English class more accurately.

More acting got done than originally expected (and we originally expected a heavy acting load), as he ended up with 5 roles (rather than 1 or 2) in the school one-acts and he added a 3-day workshop during winter break.  This last month has been crazy, with performances almost every weekend, but things should wind down after the Dinosaur Prom Improv performance this Sunday, to just 2 theater classes a week (Dinosaur Prom and Much Ado About Nothing).  The two going away are the Page-to-Stage theater class (where he was the oldest student) to make room for younger kids on the waiting list for the spring production, and the school production which is once a year and had the performance last weekend.  With 2 theater groups instead of 4, he should have more time for other classes.

He’s been working diligently (often spending more time than he really has available) on the light gloves.  In addition to hours of programming or hardware design he’s been meeting weekly or more with the team and having Skype/Google Hangout meetings with investors and with new, remote engineers thinking of joining the team.  I think that they’re getting their second set of prototypes fabricated this month, and he’ll need to start intensive programming to get the Bluetooth LE chip working and communicating with a laptop or cell phone.  I believe that they are getting 10 prototype boards assembled commercially, rather than having to deal with the surface mount parts themselves—the price was low enough that the time savings (and probable quality) justified the extra price.  I think that they are still planning to have a Kickstarter campaign this spring and go into production over the summer, but that schedule may slip if the programming and debugging takes longer than they expect.  (Note: I’m not involved in this project, except once in a while as someone to bounce ideas off of, so all those “I think” and “I believe” statements are vague impressions not the result of detailed status reports.)

The Arduino Data Logger project was put on hold over the fall, but I really need him to get back to that very soon, as I’ll have to tell the staff whether to order Arduino boards or KL25Z (or KL26Z) boards for my circuits class soon.  The extra features that I requested are not critical, but we can’t use the KL25Z boards unless they are supported by the data logger software, and it would be nice to have the much higher resolution and sampling rate of the KL25Z boards.

Because group theory was always last on the priority list and had only Dad-imposed deadlines, it has lost out.  We’re still in Chapter 3, and I don’t see much hope of our catching up by the end of the year.  I see three choices:

  • Drop Group Theory from the transcript, treating as a nice idea that there just wasn’t time for.
  • Push real hard to try to complete the book anyway—I don’t see this happening, as the group theory is just fun math, not something he “needs”, so it I want it to be something we do together for fun, not under high stress.  It is the lowest priority of our courses in my mind, so I can’t see pushing him hard on it.
  • Reduce our ambition to only ½ or even ⅓ of the book, and reduce the credits for the course correspondingly.

He’s finished with econ (almost) and with college essays, but is picking up government/civics and dramatic literature.

The civics will probably be at about the same effort level as the econ, but it may be hard to find a good source at the right level—the MIT open courseware econ lectures made a nice, rather lightweight econ course, supplemented by a few popular-press econ books.  Government/civics doesn’t have the mathematical appeal of econ, and most high-school or freshman college books on the subject are rather dry and boring.  Oh, well, that course is my wife’s responsibility (as was the econ), and she can undoubtedly do a better job of finding materials for it that I could.

The dramatic literature course is preparation for the trip to the Oregon Shakespeare Festival and should not be a problem for him—certainly nothing like the torture of college-application essays!  He’s done two previous dramatic literature courses with the same teacher (different plays each year, based of the OSF schedule), and knows what to expect.

So this spring semester should see

  • replacement of econ by civics
  • replacement of college-application essays by dramatic literature
  • continuation of AP Chem
  • switch from mostly hardware and app/web programming to embedded software for light gloves
  • two-fold reduction in acting (down to a sane level)
  • addition of data logger project
  • low-level continuation or elimination of  group theory

I think that the spring is likely to be less stressful than the fall, but still a full load.

We’ll have to make a decision on the group theory soon, for the updated report through the Common App.

2014 January 27

Sixth day of freshman design seminar

Today I went into class with a long list of things to get done, but didn’t quite get to all of them:

  • Feedback on first homework.
  • Look at data sheets together.
  • Get class consensus on resistor values from homework due today.
  • Demo the Arduino Data Logger with the phototransistor and photodiode.
  • Discuss next homework (designing a colorimeter).
  • Start talking about Arduino programming.

The feedback on the homework went pretty much as planned.  I told them that the homework was not graded, but that I had both individual and general feedback on it.  Here is a summary of the general feedback:

  • College homework should be typed.  Professors expect it, even if they never say so.  The one exception is math homework, and I recommend to students that they learn LaTeX and typeset even their math.
  • Homework should always be stapled, not loose sheets, which get separated and lost.
  • Hand-drawn pictures are ok for this class (and many other classes), but I strongly recommend learning to use a drawing tool.  Adobe Illustrator is a popular one for those who have money, but Inkscape is an adequate tool for 2D diagrams and is free, though its user interface is rather clunky.  For more professional engineering drawings, I believe that AutoCAD has a free (or very low-cost) version for students. Sketchup and Blender are popular free tools for 3D modeling.  For schematic capture, I now use DigiKey’s SchemeIt, which I demoed briefly for the students (after having some trouble with the wireless connection in the room—I’ll have to check to see whether there is a live DHCP port by the projector cable in the room).
  • Most students added little to what we did in class. I pointed out that K–12 teachers mainly wanted them to spit back what they had been told, but that college professors were usually looking for added value—stuff from reading outside class or from original design.
  • I pointed out the importance of vocabulary (“diffraction” vs. “refraction”, “focus” vs. “collimate”) and of getting the right physical phenomena (Bragg’s Law for diffraction gratings, Snell’s Law and optical dispersion for prisms).  I told them to read the Wikipedia article on optical dispersion, so that they could understand the complexity of determining the wavelength-to-refraction-angle transformation, which is highly dependent on the material the prism is made of.
  • I also suggested that just dumping factoids (like the Bragg’s Law formula) on the paper without explaining the connection to the design didn’t really buy them much.
  • I pointed out the difficult design problem I had given them (300nm–700nm) with a diffraction grating would result in the second diffraction of 350nm at the same location as the first diffraction spot for 700nm—to handle both one would need two optical filters: one for the long wavelength, one for the short.  Even if we limit the range we’re interested in (say to 400nm–700nm), we’d still need a filter, since the sensor would still detect the 2nd-order 350nm spot, even though we weren’t interested in it.
  • I showed a couple of designs for a collimator (a lens and a slit, or a pair of slits on either end of a black tube) and explained why collimation was needed for a spectrometer (none of them had included a collimator).

The feedback took about the amount of time I expected, and I think I managed to communicate the problems without crushing anyone’s egos.  I was careful to tell them that I was not grading them on the homework, but providing feedback for them to do better later on things that would count—particularly that other faculty would often have these expectations of them without ever articulating them.  This freshman class is intended in part to help the students adapt to the college culture in a low-stakes environment.

Simple circuits for measuring light with an Arduino.

Simple circuits for measuring light with an Arduino. Update 2014 Feb 6: Q1 is intended to be an NPN phototransistor, not PNP as shown here!

We then looked at the WP3DP3BT phototransistor data sheet together.  First, I explained the mechanical drawing (dimensions in mm, the diameter sign , the two different ways that the case indicates which lead is which—both the flat and the shorter lead indicating the collector). This prompted a question about the naming of the collector and emitter (since it seemed strange to them that the collector went to the power lead and the emitter to the resistor), so I briefly explained that it was a NPN transistor, that the N’s stood for negative doping resulting in an excess of electrons as charge carriers, and that the emitter emitted the electrons and the collector collected them. I don’t know if that helped anyone.

I then asked the students what they needed help understanding for the numeric part of the data sheet. We ended up talking about 5 of the 7 parameters provided, covering a lot of different things (like that nA stood for nanoamps, not “not available”—a confusion I had not anticipated). I briefly went over milli-, micro-, nano- and explained that engineers preferred using those prefixes to expressing powers of 10, so that the prefer to express the dark current as 100nA, rather than 10-7A. Some scientific calculators provide engineering notation, in which only multiples of 3 are used as the power of 10, and the numbers are between 1 and 999.999999… .

I had to explain the difference between collector-to-emitter and emitter-to-collector voltages, and show the current vs. VCE curve with the two breakdowns. We talked a bit about the saturation voltage (0.8V with an irradiance of 20mW/cm2 and a current of 2mA). I’m not sure I understand that specification that well myself—it mainly tells me that we want to stay well below a 2mA current.

I asked the students for their resistance values from their homework, expecting some fairly random values that would reveal different misunderstandings. What I had not expected is that most of the class had nothing—not even a guess—at the resistance. I would have expected them to ask questions on the class e-mail list if they didn’t understand, but the notion of asking each other (or a faculty member) for help still seems completely foreign to them.

So we spent some time going over how to interpret the on-state collector current: 0.2 nA at an irradiance of 1mW/cm2 of 940nm light. I then had the look for more information that was given in the question, which no one had in front of them:

For Monday, 2014 Jan 27, as individuals (not groups), find a data sheet for the phototransistor WP3DP3BT. Also, select a cheap photodiode that is available in the same size and shape of package as the WP3DP3BT phototransistor and look up its data sheet. For the photodiode and the phototransistor, report the dark current, the voltage drop across the device (that would be collector-emitter saturation voltage for a phototransistor and the open-circuit voltage for a photodiode), and the sensitivity (current at 1mW/cm2 at λ=940nm, which is the wavelength where silicon photodiodes and phototransistors are most sensitive). Find a plot of the spectral sensitivity of a silicon photodiode or phototransistor (it need not be from the data sheets you found—all the silicon photodiodes and phototransistors have similar properties, unless the packaging they are in filters the light). We want to make a circuit so that the full-scale (5v) reading on the Arduino corresponds to an irradiance of 204.8μW/cm2 at 940nm, so that each of the 1024 steps corresponds to an increment of 0.2μW/cm2.

Eventually someone figured out that we wanted a 5v output to correspond to 204.8μW/cm2. I asked what current that irradiance produced. Note that this is a simple linear scaling of the 0.2 nA at an irradiance of 1mW/cm2. It took several minutes for them to do this on their calculators, and several tries before the class agreed on a value (luckily the right one). Now that they had a voltage and a current, I asked them for the resistance that was needed. One student quickly mentioned Ohm’s law, and they set about doing the division. It took them a couple of minutes to do this division on their calculators, and then most of them got it wrong (getting values in the µΩ range!).  Eventually they managed to converge to 122.1kΩ, after almost settling on 12.2kΩ, but what I had expected to be a 30–60-second computation for computing the resistance had taken 10–15 minutes.  The arithmetic and algebra skills of college freshmen are even lower than I had feared.

I showed them a chart of standard resistance values and helped them round to 120kΩ.  I showed them a 120kΩ resistor and measured it with a multimeter to make sure I had the right resistor.  I passed around an Arduino board and a breadboard and explained the point of ther breadboard. I hooked the resistor up in series with the phototransistor (on a pre-prepared breadboard) and used the Arduino data logger to show them the voltage changing as I covered and uncovered the phototransistor. (Next year I should probably reduce the sensitivity they are requested to match to 0.1µW/cm2 per step, as the classroom light was bright enough to move the voltage almost full scale.)

Class had been over officially by 10 minutes at this point (the first time I looked at my watch), so I gave each student a cuvette and asked them to look up what a colorimeter was and design one around the cuvette.

We still need to discuss the photodiode resistance value (I’ll see if anyone figures it out by Wednesday, when I’ve asked them to turn in the homework for real).  We have lab tours on Wednesday, though, so there won’t be time to discuss colorimeters before they design them.  I hope they have the sense to read about them on Wikipedia or the many web sites that give high school labs using them. The actual assignment was

By Mon 2014 Feb 3, design a colorimeter around the cuvette you picked up in class. Your design report should describe the function of the device, explain how it works, have a detailed drawing (with dimensions) of it, have a materials list of what is needed to build it, and give instructions for using it. If there are any computer components, an outline of the needed software should be included also.

Next Page »

%d bloggers like this: