# Gas station without pumps

## 2016 June 25

### Pulse monitor with log-transimpedance amplifier

Filed under: Uncategorized — gasstationwithoutpumps @ 02:04
Tags: , , , ,

I’ve been planning since the Santa Cruz Mini Maker Faire to wire up an optical pulse monitor with a log-transimpedance amplifier as the first stage, so that I could use the pulse monitor in full sun or in a dimly lit room, with a dim green LED or with a bright infrared LED. The idea is to make the output of the first stage proportional to the log of the photocurrent, rather than to the photocurrent, then use a band-pass filter to get rid of the DC component and any 60Hz fluctuation, leaving only the fluctuation due to the pulse.

This pulse signal should be independent of the overall light level but on the absorbance of the finger, because
$\log(I) = c + \log(\mbox{transmitted}) = c+ \log(\mbox{illumination}) + \log(\mbox{transmitted}/\mbox{illumination}$, for some constant $c$. If the illumination is constant or has only high-frequency components, then the bandpass filter will eliminate both $c$ and $\log(\mbox{illumination})$, leaving only the absorbance $\log(\mbox{transmitted}/\mbox{illumination})$.

I deliberately did not start working on it until I had finished my grading for the quarter, so only got it built last week, just before going to Montreal for a family reunion of my wife’s family. So I’m only now getting around to blogging about it.

To make the log-transimpedance amplifier, I need a component where the voltage is proportional to the log of the current.  For this I used a diode-connected PNP transistor:

The base-to-emitter diode has a current that is exponential in the voltage, and the collector-to-emitter current is proportional to the base-to-emitter current, at least until the transistor approaches saturation (which starts around 10mA).

The A1015 PNP transistor has a voltage proportional to the log of current, with about 60mV/decade. I did not use a unity-gain buffer when measuring the voltage and current, connecting the Teensy ADC channels A10 and A11 directly to the emitter and base+collector of the transistor. Measurements at less than 5µA were difficult, because the high impedance of the sense resistor made the ADC measurements inaccurate.

I tried a pulse monitor using the A1015 PNP transistor as the log-impedance element, and it worked ok, but I can do better, I think, using an IR LED as the log-impedance element:

The WP710A10F3C IR LED has a low forward voltage, and can be used from 100nA to 30mA, given that we don’t need high accuracy on the log function. We get about 105mV/decade, so it is more sensitive than the A1015 transistor. Note: I did use a unity-gain butter for these measurements, which allowed me to get down to about 50nA—still much higher than the photocurrents I observed in very low light.

The IR LED has a wide range over which the voltage is the logarithm of the current, or $\frac{dV}{dI} \approx 241mV/I$. For 10nA, the equivalent gain is about 24MΩ, and for 1µA, the gain is about 240kΩ. For 10pA (about the smallest current I’ve observed for operating the pulse monitor in very dim light), the equivalent gain is 24GΩ.

This amplifier uses only 3 op amps: a log-transimpedance stage with an IR LED as the impedance and two bandpass inverting amplifiers.

The 330pF capacitor in parallel with the log-impedance is very important—without it I get very short glitches which the next two stages lengthen into long glitches in the passband of the filters.  Making the capacitor larger reduces the glitches, but makes the corner frequency of the effective low-pass filter too low when light levels are very low, and the signal is attenuated.  Any smaller, and the glitches don’t get adequately removed.

I have tested the pulse monitor over a wide range of light levels, with a DC output of the first stage from 234mV to 1.033V, corresponding to photocurrents of 11pA to 463µA, a range of 42 million (7.6 decades). At very low light levels, the signal tends to be buried in 60Hz interference, but if I ground myself, it is still usable.

In very low light, the capacitive coupling of 60Hz noise buries the signal, but the bandpass filters help recover it.

At high light levels, it is easy to get clean signals, as the 60Hz interference is swamped out by the large photocurrent.

Note that the voltage swing is almost independent of the overall light level, as it depends only on the percentage fluctuation in opacity of the finger, which depends mainly on how much pressure is applied. If you get the pressure on the finger close to the mean arterial pressure (so that the finger throbs), you can get quite a large change in opacity—I’ve computed changes of 17% in opacity.

## 2016 June 21

### Net zero electricity

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

After a winter of using more electricity than our solar panel generated, we’ve finally gotten our electric meter back to the reading it had before we hooked up the solar panel. We’ve generated about 2.25MWh over about 46 weeks, and the remaining 6 weeks should be among the highest generation days of the year, so we will end up with more electrical energy generated than consumed by our household when PG&E computes the net energy for the year.  They’ll give us a tiny amount of money for the excess electricity, but nowhere near enough to offset the monthly minimum charge for being on the grid.

I expected the peak electricity generation to be around the summer solstice (yesterday, 2016 June 20), but the biggest daily generation so far was actually 11593 Wh on 2016 May 31.  I think that the offset is partly due to morning shadows from trees and partly due to Santa Cruz’s morning fog.

## 2016 June 11

### Love’s Labour’s Lost

Filed under: Uncategorized — gasstationwithoutpumps @ 07:54
Tags: , , ,

Boyet with the ladies of France

Last weekend, my wife and I took a trip down to Santa Barbara, for three purposes:

• To see our son play Boyet in Love’s Labour’s Lost with Shakespeare in the Park
• To bring him two large wheeled duffel bags that we had stored for him
• To bring back about 100 pounds of his luggage

Earlier in the week, we had seen UCSC’s Shakes to Go do a very stripped down version of Love’s Labour’s Lost (45 minutes) at the elementary school where my wife works. It was interesting to contrast the two productions: one of which has to travel and be performed for elementary and middle-school audiences with no on-stage rehearsal, and the other which is only performed twice before a primarily adult audience.

The UCSC version had to be ruthlessly cut to fit in the class period schedules of schools, and almost all the verbal jests had to be jettisoned. Given that the play is full of now-obscure puns and sexual innuendo, there was not much left but the bare bones of the plot. It was still funny enough to amuse the students, but it was a bit unsatisfying for adults.  All 10 actors were theater majors, which is not surprising given the time commitment (a quarter of rehearsals, followed by a quarter with dozens of performances, each of which can take up a full morning).

The UCSB version was not cut as drastically (about twice as long with a running time of 1:28), but many of Berowne’s longer speeches were cut to the bone, and some jokes were lost.  The costuming was more elaborate for this production, and there was less double casting (17 actors instead of 10 makes a huge difference).  Several of the actors were not theater majors and one did not even have English as a native language, but the acting and directing was overall very good.

I took my cameras with me to UCSB and recorded the two performances of the play (with the permission of the director), so you can see for yourself how the production went (I think I did a better job of filming for the Sunday production than the Saturday one):

Saturday:

Sunday:

We were in a hurry on Saturday, so we took the Greyhound from Santa Cruz to Santa Barbara, making it in time to eat supper with him at Buddha Bowls before his 5:00 call.  Greyhound is the fastest public transit to Santa Barbara, but we prefer the comfort of the Coast Starlight train, even though it adds several hours to the trip, so we took the Coast Starlight and the Highway 17 Express back on Monday.

We had some time to kill between feeding him and the performance starting at 7:30, so we walked around the lagoon on the UCSB, which has quite a variety of birds (we saw egrets, cormorants, and a great blue heron).

I believe that this heron we saw is a great blue heron, based on pictures of herons I found on the web.

On Sunday, we helped clean part of the apartment and pack most of his clothes and bedding, leaving him with enough to get through to his trip home on Wednesday.  He ended up with an easily managed load of luggage, after he stored his bicycle with the police for the summer (a very handy service that cuts down on bike theft and abandoned bikes).

The large rolling duffel bag that we brought home for him was overloaded (68 pounds, compared to Amtrak’s 50lb limit), so I had to rearrange the luggage at the train station on Monday—I’d anticipated this need, so it only took a couple of minutes to remove the already packed pannier from the duffel, and transfer a few clothes to the carry-on suitcase.

One big difference from when I was a student is that he had practically no books—what few textbooks he’d had this year he’d been able to get electronically, and most of his recreational reading is from the web rather than on paper.

We had a little time to kill Sunday afternoon while he caught up on sleep (there’d been a cast party Sat night), so we looked at the newly refurbished library on the UCSB campus. The facilities seem quite nice, but were overloaded on the weekend before finals.  There seem to be enough computers and power outlets, but not enough WiFi bandwidth (we heard students talking about going elsewhere to study, because of problems with the WiFi).

## 2016 June 5

### Non-academic science career information aggregator

Filed under: Uncategorized — gasstationwithoutpumps @ 04:02
Tags: ,

I was recently pointed to a collection of links that many science and engineering grad students may find useful: The Prodigal Academic: Non-academic science career information aggregator

Below is a list of websites that may be helpful.of interest to scientists looking outside of academia. This is by no means a complete list, so if you know of other useful sites, let me know, and I will add them in!

CV vs resume: …

Possibly interesting career guidance: …

Interesting non-academic science online discussion: …

I’ve not copied the actual links, just the headers, as I don’t want to steal content from The Prodigal Academic, but just point to the web page as a useful resource. Most grad students in the sciences have to seek jobs outside academia, but their mentors are, for the most part, clueless about life outside academia (me included).

In engineering, the working degree is the MS, not the PhD (which is primarily for those seeking academic positions, or with a few small industrial or government research labs). Most engineering faculty are aware of the MS (“real” job) vs PhD (academic job) distinction, but still advise their students towards the path they themselves took.  Since many engineering faculty did some time in industry before turning to academia, there are often mentors around who can suggest different career paths.

In science fields. most faculty have been in academia their whole lives and can’t provide any useful information about other choices.  (Although I’m an engineering faculty member, I’ve also been in academia my whole life, so I can identify with the science faculty here.)

One major distinction between science and engineering is that in most science fields, the PhD is a requirement even for entry-level jobs, because of the huge over-production of PhDs in those fields. Biomedical research is probably the worst, in that several years of postdoc “training” are expected, so that many do not get jobs with any security of  employment until they are in their 40s.  (And by “security of employment”, I don’t mean tenure—I mean a job that doesn’t have defined end date before you even start work.) Huge numbers of scientists work on short-term contracts (2 years is common for a postdoc contract) with little expectation of the contracts turning into longer-term jobs.

So students need to be looking beyond their faculty advisers for advice about what to do with their degrees, and The Prodigal Academic has collected a number of useful posts with advice that many faculty members can’t give.  I plan to send the link to mailing lists of students, who might benefit from more knowledge of alternatives to the academic careers of their faculty advisers.

## 2016 June 1

### Poll data and electability

Filed under: Uncategorized — gasstationwithoutpumps @ 19:03
Tags: , , , ,

I’m a bit worried about the possibility that Donald Trump might win the Presidential election.  I don’t personally see how any sane person could vote for him, but US politics never seems to have been ruled by sanity.

I was looking at the poll summaries at RealClearPolitics:

I hope that the “superdelegates” at the Democratic national convention are watching these polls also and doing everything they can to make sure that Trump is not elected, even if it means that their favorite candidate doesn’t get the nomination.

Next Page »

The Rubric Theme. Create a free website or blog at WordPress.com.