Gas station without pumps

2016 January 31

Thirteenth weight progress report

Filed under: Uncategorized — gasstationwithoutpumps @ 20:48
Tags: , , , , , ,

This post continues the series of weight progress reports from the previous one. Even after I adjusted my target weight range, to gradually relax the upper limit and allow it to increase at 0.6 lbs a year, I’ve still fallen outside the target range several times this month.

At the end of the month,I barely made it into my target range, and I still want to lose about 3 pounds.

At the end of the month, I barely made it into my target range, and I still want to lose about 3 pounds.

My exercise for January was fairly high (averaging 4.9 miles/day bicycling), and I was pretty good about my raw-fruits-and-vegetables-for-lunch diet.  But there were several faculty recruiting and grad student recruiting dinners, at which I ate too much high-calorie food.  There are still three more faculty recruiting dinners in February, so I’ll need to watch myself.

If I could bring back the strict discipline I had last year at this time, I could lose the remaining three pounds in three weeks, but it is hard for me to stop snacking and to leave the supper table before I feel full—I did it for 5 months last year, but I’m finding it more difficult this year.


2016 January 27

Student projects selected for Winter 2016

Filed under: freshman design seminar — gasstationwithoutpumps @ 21:46
Tags: , , ,

The students today selected their projects and teams.  We ended up with three different projects:

  • Ultrasonic rangefinder.  This involves building a rangefinder from transducers, not just hooking up an already designed rangefinder (though rangefinder modules from China are cheaper than the pair of transducers that they include). There are 3 students on this team. I ordered TCT40-16R/T 40kHz transceiver pairs from two different sources on e-bay, hoping that one of the packages will arrive within two weeks, and that they don’t both get caught in the Chinese New Year holiday.  If both come, I’ll have huge numbers of transceivers (16 pairs).
  • Pulse monitor. This is almost identical to the pulse monitor project in the applied electronics class, though I’m hoping that the students will have time to try to extract the pulse rate from the signal—doing some programming as well as the electronics. There are 2 students on this team.
  • LED cube and capacitive touch keyboard.  This is a “fun” project, with little direct applicability to bioengineering.  The hard parts are figuring out how to do the 3D soldering and getting individual control over all the LEDs with the limited pinout of the Teensy board. There are either two teams of three or three teams of two—I wasn’t entirely clear how the six students divided up.

Now I have to figure out what needs to be taught for each of these projects.  I’m pretty clear on the pulse monitor, as I’ve done that one before, but rangefinder and the LED cube are new.

The Teensy boards have capacitive touch inputs built-in, so the capacitive-touch keyboard will be fairly trivial using the touchRead() function of Teensyduino, which reports approximate capacitance in units of about 50pF. I’ll try making a 5-key keyboard this weekend and seeing how well it works.  I’ll try both a large-plate sensor, like I’ve used for the applied electronics lab and a design alternating sense wires and ground wires.  I suspect that the alternating wire design will be less sensitive to 60Hz pickup, but also a bit less sensitive to touch.

I’ll have to look at some of the RGB LED cube designs, to see how they are multiplexing the signals. I suspect that they use either Charlieplexing or a 1-of-n decoder.  A 4×4×4 cube has 64 LEDs (192 if RGB), which needs 9 pins (or 15 for RGB) if Charlieplexing, and 8 (or 16 for RGB) with a 1-of-16 decoder. The decoder makes for much simpler mapping and coding, which is important for programming color patterns. There aren’t enough PWM channels to do a good job of getting arbitrary colors at each LED, but PWM could be used for brightness (and some patterned color changes).

I think that the ultrasonic rangefinder will mainly be software, if we do all the pulse generation and detection digitally. The speed of sound is about 340 m/s (more precisely 331.5 m/s+0.6 T m/s/°C), so a resolution of 1mm requires 2.9µs resolution for time (typical cheap range finders have a 1cm or even 1″ resolution). If we sample the incoming sound every 2.5µs and store the waveform for processing, the 8k bytes of RAM on the Teensy LC can store enough data for the round trip for an object up to 3.48m away (if storing only one byte per sample).  The Teensy 3.2, with 64k bytes of RAM could store enough data for an 13.9 m range with 16-bit samples, but the echo would probably be much too quiet at that distance (I haven’t checked whether the analog-to-digital converter can do a 16-bit conversion every 2.5µs).

The common approach for many of ultrasonic range finders is to rely entirely on the resonant receiver to filter out the desired signal, and just amplify and threshold it to detect the first returning echo, which makes for fairly simple programming. If we record and do digital processing of the returned waveform, we should be able to detect multiple echoes, and it may even be advantageous to use a non-resonant microphone as a detector to get less ringing.

I checked to see if a non-resonant microphone would work, using a cheap electret microphone (probably CMA-4544PF-W), my microphone preamp for the applied electronics class, and the BitScope oscilloscope. I seem to be getting about a 1µA peak-to-peak signal from the microphone when listening to the Maxbotix LV-MaxSonar-EZ rangefinder for the direct signal close by, and about 0.1µA  peak-to-peak for a bounce from about 25cm away. The pulse from the Maxbotix lasts far longer than one might expect (almost 1ms), which indicates substantial ringing in the transmit transducer, and explains why the Maxbotix can’t detect distances less than about 6″.

It looks like a non-resonant microphone will be able to pick up the signal, though substantial amplification and some filtering will be required before digitizing, and I’m not sure how difficult it will be for the students to do the programming for high-speed analog-to-digital conversion, as the Teensyduino software probably doesn’t support 400kHz sampling rates.

It looks like all three projects are doable, but I’m not sure whether to steer the rangefinder group towards electronics or digital filtering solutions (and they will need steering, as they know neither electronics nor programming currently).

Good deed thwarted

Filed under: Uncategorized — gasstationwithoutpumps @ 10:55
Tags: ,

I got an email a few weeks ago, announcing a blood drive on campus.  It has been a few years since I gave blood—the last time I signed up for a blood drive, I got a bad cold and had to cancel. Several other blood drives I’d had to skip because they were scheduled on days when I had no spare time. When I was a grad student, I gave blood fairly frequently (3 or 4 times a year), but there was a Red Cross blood donation center near the Stanford campus, so I could schedule donations at my convenience, not waiting for a blood drive. It is much, much less convenient here, where there are only one or two blood drives a year.

I figured it was past time to give blood again, and so I signed up for an appointment, scheduled for 10:30 this morning.  I picked the time as a compromise between having to get up extra early and my afternoon scheduled classes and appointment.  Also, by the time I signed up, it was one of two appointment times left.

Yesterday, I got scheduled for an extra meeting about the design of a new course for 11:30 this morning, but I figured there was just time to give blood, recover for half an hour and make it to the meeting.

I got up a little early this morning, so that I could drink the extra 16 ounces (475ml) of liquid that they requested, and cycled up the hill to the Stevenson Event Center where the blood drive was located. I was 10 minutes early for the appointment, and feeling pretty good—I was actually going to be able to give blood this year!

Before I signed in, though, the man at the sign-in table warned me that they were running an hour behind schedule (that’s right, by 10:30 in the morning, they were already an hour behind schedule). So the slot that I had available for the blood drive was not, in fact available.

What is the point of Red Cross scheduling appointments for a blood drive, if they aren’t going to keep to their schedule?

I can understand having a first-come-first-served system, with no appointments.  I can understand an appointment system where every slot for giving blood is scheduled ahead of time.  I can understand having an appointment system and taking walk-ins when there is a spare station available and no one with an appointment waiting.

I can’t understand having a system that takes appointments then makes the people who have appointments wait an hour.  That is just incompetent scheduling.  Either they should have made fewer appointments, or they should have asked the walk-ins to wait.

I had to leave without giving blood, and I’m irritated with the incompetence of the Red Cross blood drive.  It may be several years before I attempt to give blood again, because it is clear that I’ll have to dedicate at least 2 and possibly 3 hours (to compensate for their incompetence at scheduling), rather than just one hour.

Perhaps the reason that there is a perennial shortage of blood donors in the US isn’t because people are unwilling to give, but because those who collect the blood are incompetently managed.

2016 January 26

Phototransistor I-vs-V plots

Filed under: Data acquisition,freshman design seminar — gasstationwithoutpumps @ 15:47
Tags: , ,

I realized this week that I had never plotted I-vs-V curves for phototransistors, and the data sheets don’t usually include them, so I measured some today.

I put an LTR-4206 phototransistor in series with a 1kΩ resistor (so that voltage across the resistor was current in mA), and drove the pair with a slow triangle wave (3.2Vpp with 1.6V offset) from my FG085 function generator, using a 470µF capacitor in parallel with the function generator to smooth out the steps.

I illuminated the phototransistor with a narrow-beam 591nm LED (33-2UYC/H3/S400-A6) from about 0.5″ away.  The LED has a 68Ω current-limiting resistor to 3.3V, resulting in an IR voltage drop of 1.248V, for about 18.35mA.

I recorded the voltage across the 1kΩ resistor and across the resistor plus phototransistor using PteroDAQ on a TeensyLC.

I interposed a Brand 1.5ml cuvette full of water or a piece of white paper to get different light levels:

On the log current plot, one can see that it is important to have sufficient collector-emitter voltage to get into the saturation region of the curve—we need about 0.5V. I'd need to add a dark box for a colorimeter, as the ambient light in a dimly lit room is about 0.5% of the light through the cuvette, and would throw the measurements off.

On the log current plot, one can see that it is important to have sufficient collector-emitter voltage to get into the saturation region of the curve—we need about 0.5V.
I’d need to add a dark box for a colorimeter, as the ambient light in a dimly lit room is about 0.5% of the light through the cuvette, and would throw the measurements off.

On the linear plot of current, one can see that the saturation current is not really constant, but increases with voltage. A simple resistor to convert current to voltage would result in non-linear response, as the collector-emitter voltage would not be constant.

On the linear plot of current, one can see that the saturation current is not really constant, but increases with voltage. A simple resistor to convert current to voltage would result in non-linear response, as the collector-emitter voltage would not be constant.

Making a colorimeter with a phototransistor to get good linearity probably requires a transimpedance amplifier, rather than a simple resistor, but it looks like a 2.5mA current range for the amplifier would be adequate. With a 3.3V supply, the VCE could be set to 0.7V and the gain to 1kΩ, with the output in the range 0.7V–3.2V.

Interposing a piece of paper in the light path is good for aligning the LED and the phototransistor, as the beam pattern becomes quite clear. One of the biggest challenges in making a homemade colorimeter is ensuring that the LED and phototransistor don’t get jostled as the cuvettes are added or removed.

2016 January 21

Santa Cruz Shakespeare—Oregon Shakespeare

Filed under: Uncategorized — gasstationwithoutpumps @ 21:31
Tags: , ,

Santa Cruz Shakespeare (SCS) is organizing a trip to Ashland to see the Oregon Shakespeare Festival (OSF) before the SCS season starts. It sounds like fun, but …

  • The trip is March 16–March 19, 2016, at the end of exam week, with grades due on March 22.
  • It costs $1250 a person (a bit high for a bus trip, 3 plays, and 3 nights of hotel—a lot more than the AFE trips my son took that saw 4–5 plays and several workshops).
  • Deposits have to be made before Feb 6.
  • They are going all that way by bus and then only seeing 3 plays.
  • My wife is not excited by the plays they plan to see:
    • an adaptation of Glibert and Sullivan’s Yeoman of the Guard
    • Twelfth Night
    • Great Expectations

I must confess, I’m not particularly excited by those choices either. Yeoman of the Guard is not the best of G&S, and I’ve no idea what OSF is doing in the adaptation. Adding country music does not sound appealing to me.

I think my wife and I both like Twelfth Night, but my wife is afraid that I’ll be comparing it to a performance that I saw in Berkeley when I was a grad student at Stanford (so almost 40 years ago). That performance included the a capella group Oak, Ash, and Thorn singing all the songs that are alluded to in the script (there are a lot of them), in addition to good acting and staging. I doubt I’ll ever see as good a Twelfth Night again. What amazes me is that the band is still together and still (sometimes) performing in the Bay Area.  (Hey, maybe Santa Cruz Shakespeare could hire them to do a great Twelfth Night performance!)

Great Expectations is not my favorite Dickens story (actually, I’m not sure I have a favorite Dickens story—it’s been a long time since I’ve read any of them).

Of course, so early in the season OSF only has 4 plays running (the SCS trip doesn’t include River Bride, which seemed the most interesting of the 4 plays running early.  Later on the OSF season gets more varied and more interesting, but SCS will be in rehearsal or production then, and unable to run a tour bus up to Ashland.

Maybe some year SCS will do the trip during UCSC’s spring break and OSF’s first plays of the season will be more enticing—then my wife and I might find the prospect more alluring (though going up later in the season, when it would be possible to see a wider variety of plays, is still more appealing).

Next Page »

Create a free website or blog at

%d bloggers like this: