Gas station without pumps

2016 August 30

Smoke detector to avoid

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

When I was getting the solar panels installed last year, the Planning Department insisted on us installing new smoke+CO detectors, replacing our current smoke detectors.  I was not real thrilled with the idea, but I let the contractor install the new detectors to keep the building inspector happy.

I was under the impression that CO detectors should be installed low (unlike smoke detectors, which should be installed high), but that turns out to be a myth—CO diffuses rapidly through air and can be equally well detected either high or low.  CO has a molecular weight of 28 g/mol, compared to 29 g/mol for the mixture of gases in air, so if it did stratify, it would be high, not low. The main constraints of CO detectors is to keep them out of bathrooms (too humid) and at least 15 feet from stoves (small amounts of CO emitted during cooking—need to dilute it to avoid false alarms).

The detectors that the contractor bought were First Alert Model PC910, a smoke+CO detector with a 10-year battery. This post is a review of our experience with the smoke detectors over the past year.

Here is the front of the First Alert PC901 smoke detector, with the cover pried off and not fully replaced.

Here is the front of the First Alert PC901 smoke detector, with the cover pried off and not fully replaced.

At first the alarms seemed fine—pressing the test button gave an easily audible alarm, and the detectors looked no worse than any other smoke detector. But a couple of weeks after installation, the alarm woke us up out of a sound sleep. Detecting no smoke in the house, we pressed the test/silence button—no effect. So, desperate to shut the thing off, we took it down and tried to deactivate it.

There is an "off-switch" on the back, but to use it, you have to break off a tab (only possible with tools) and permanently disable the device.

There is an “off-switch” on the back, but to use it, you have to break off a tab (only possible with tools) and permanently disable the device.

It is rather annoying that the first false alarm from the device disables the $50 device permanently—seems like a scam to me.

A week later the second smoke alarm did the same thing, but this time I was able to pry the lid of and turn off alarm by disconnecting the battery without necessarily permanently deactivating it. I reconnected the battery the next morning and everything seemed fine, until it gave another false alarm in the middle of the night two days later.  I disconnected the battery again and left it off.

I figured I was done, but about a year later (earlier this week), the last of the smoke detectors gave its false alarm and couldn’t be turned off—I had to pry the case open and disconnect the battery.

The wires from the blue battery have been disconnected from the white header on the PC board. The big brown cylinder is the CO detector, the white disk on the bottom left is the loudspeaker, and the black box in the middle is where the LED and photodetector are housed for the optical smoke detection.

The wires from the blue battery have been disconnected from the white header on the PC board. The big brown cylinder is the CO detector, the white disk on the bottom left is the loudspeaker, and the black box in the middle is where the LED and photodetector are housed for the optical smoke detection.

All the false alarms were from the smoke detector, probably as a result of dust or cat hair confusing photoelectric detector. I expect a certain number of false alarms from smoke detectors, particularly resulting from kitchen activity, but getting false alarms in the middle of the night with nothing obvious triggering them is super annoying (I never had that sort of false alarm from my old smoke detectors).

What irks me most about the First Alert detector is that I was not able to turn the alarm off after a false alarm—the well-hidden “silence” button simply didn’t do anything. The design of the smoke detector so that you need to destroy the device to turn off a false alarm is absolutely unacceptable design. I will not buy another smoke detector from First Alert.

The Planning Department’s insistence on smoke+CO detectors has backfired—we’ve gone from having working smoke detectors (but no CO detectors) to having no functional detectors (except in the book room, where the older, unreplaced smoke detector is still working).  I’m out about $150 (plus installation costs) and have to go out and buy new smoke alarms, so it will cost me a total of over $200 to get back to the level I was at before the ill-advised purchase of the First Alert devices.

I’m currently considering Kidde i9010 ionization smoke alarms with 10-year batteries (the ionization devices are less subject to false alarms from dust than the photoelectric ones) for the bedrooms, and a Universal Security Instruments MI3050SB alarm with both ionization and photoelectric sensors for the dining room, where false alarms will be less annoying.  I’ll probably get a couple of plug-into-outlet CO detectors as well, probably Kidde KN-COPP-3 CO detectors, because I like that they display the CO concentration.  It is cheaper to get combined smoke/CO detectors, but I they all seem to be photoelectric, not ionization detectors, and I’m now leery of photoelectric smoke detectors in the bedroom—dust/cat-hair false alarms are too irritating.

2016 August 26

Santa Cruz Shakespeare last weekend for 2016

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

This is the last weekend for Santa Cruz Shakespeare (one show tonight, two each on Saturday and Sunday). I’ve seen all three plays this year, and definitely liked the Hamlet best (see 2016 Santa Cruz Shakespeare season and Santa Cruz Shakespeare has released Hamlet photos).

Santa Cruz Shakespeare has just released the photo call for the intern’s fringe showOrlando, which we saw in the sold-out closing performance last Wednesday.  The intern’s shows are always lively, low-budget romps, and this one was no exception. The directing reminded me a lot of the directing that John Pasha has done for the conservatories at WEST—a lot of choral work and lines split among several actors.  I don’t know whether this is just currently trendy (perhaps to equalize the number of lines per actor) or whether it is a considered choice for actors who are not quite up to long monologues and dialogues. Either way, it worked fairly well, and the cross-dressing and gender changing played well to a Santa Cruz audience. (Note: Orlando is all about gender roles and gender changing, so this was not a Santa Cruz interpretation put uncomfortably onto the play, but integral to the original concept.)

My son went to Ashland last week with WEST to see six plays at the Oregon Shakespeare Festival.  OSF was also doing Hamlet this summer, but their take on it had heavy metal guitar music. My son reported that the OSF Hamlet was good, but not as good as the Santa Cruz one (which he saw twice, once with us and once with the WEST conservatory group). I can see heavy metal music as appropriate for Hamlet, but not for Ophelia, whose madness is of a gentler sort.

2016 August 20

Using 4¢ diode for log-transimpedance

In Transimpedance pulse monitor does need low-pass, I realized that Schottky diodes were not going to work well for the transimpedance amplifier, and in Using nFET body diode for log-transimpedance, I tested using the body diode of a power nFET, finding that it worked quite well over at least 7.5 decades (from 1nA to 40mA).  But I wanted to see whether students could use a cheap 4¢ general-purpose diode.

I used the same setup as when testing the nFET body diodes.  The results were pretty much the same whether I used a 1N914B or 1N4148 diode (they share a datasheet, but the 1N914B has somewhat better constraints on the forward voltage):

The gain (in mV/dB) is about 85% larger than using an nFET body diode.

The gain (in mV/dB) is about 85% larger than using an nFET body diode.

Note that at currents over about 1mA the diode current starts to saturate, deviating from the exponential pattern.

Note that at currents over about 1mA the diode current starts to saturate, deviating from the exponential pattern.

When I tried using the 1N914B diode in the same log-transimpedance amplifier as I used for the nFET body diode, it didn’t work—I got output that looked nothing like a pulse (nor like 60Hz interference). I could recover proper behavior by putting a large (100nF) capacitor in parallel with the diode, to make a low-pass filter to remove signals above a few Hz, but that wasn’t necessary for the nFET body diode (perhaps it had enough internal capacitance to do the filtering). I could reduce the capacitor to 100pF, with 60Hz interference coming in, though not being too bad, but reducing to 10pF gave me noise again rather than the pulse signal.

I was hoping not to need that extra capacitor, because the design is already more complicated than I would like for this stage of the course, and figuring out what capacitor to use is difficult—trial and error is easier than rational design here!

I tried tracking down the big, short (less than 250µs) spikes that were corrupting the signal. The first thing I tried cleaned up the problem entirely: disconnecting the power supply from the laptop so that the USB power was coming from the laptop battery rather than the power supply . That this worked actually surprised me, since the 3.3V supply and the 1.65V Vref both had beefy bypass capacitors.

I don’t know whether the noise problems are in the microcontroller (which is providing the regulated 3.3V from the noisy USB 5V) or are coupled into the analog circuit some other way. Putting a 10µF capacitor from the USB5V to GND did not help when the power supply was connected, so perhaps the problem is radiated from the power-supply cable rather than conducted through the USB cable.

I’ve noticed problems before with noise from the laptop power supply causing problems in my analog circuits (the 90kHz interference in my ultrasound experiments), and I’ve see much bigger problems with some of the cheap Windows laptops students use. The bottom line, I guess, is that  I have to tell students to run PteroDAQ from battery power, not switching-supply power, even if the power supply seems more than adequately bypassed.

2016 August 19

Redoing impedance test for tiny loudspeaker

Filed under: Data acquisition,freshman design seminar — gasstationwithoutpumps @ 18:21
Tags: , ,

In Ultrasonic rangefinder tests with tiny loudspeaker, I tested the 10mm CDM-10008 loudspeaker and found it ringing around 9.4kHz, but I reported

I don’t see any resonance around 9.4kHz in the impedance plot, though I admit not looking for narrow resonance peaks in that range.

Today I redid the impedance tests using a 10Ω sense resistor, so that I could use the same range for all voltage measurements, resulting in more correct impedance measurements.  I could definitely hear a resonance around 9.5kHz (and given my deafness at high frequencies, it must have been very loud indeed for me to hear it so clearly), so I looked for another peak in that neighborhood.  It is there and measurable, but not very prominent in the plot:

Because the second peak is on the sloping part of the plot and quite small, I had to model the loudspeaker with a j ω^α L semi-inductor to get a good fit.

Because the second peak is on the sloping part of the plot and quite small, I had to model the loudspeaker with a j ωα L semi-inductor to get a good fit.

I have not attempted to fit the data points past 200kHz, because I don’t believe that the multimeter I was using is really good at those frequencies.  The “corner frequency” I’m reporting around 100kHz is where the DC resistance is equal in magnitude to the impedance of the semi-inductor.

Given how small the peak is on the |Z| graph, but how loud the sound is around 9.5kHz, I probably need a different way of looking for resonances beyond the main one. I can’t rely on my ears for loudness at high frequencies, but perhaps I could use a microphone and record the amplitude it sees as a function of frequency.

2016 August 18

Ultrasonic rangefinder tests with tiny loudspeaker

Filed under: Data acquisition,freshman design seminar — gasstationwithoutpumps @ 23:31
Tags: , ,

I’m still working on doing the ultrasonic rangefinder project  (In More testing for ultrasonic rangefinder, I gave a digital filter and showed it working with a non-resonant electret microphone and amplifier and pings from a Maxbotix rangefinder.  In Ultrasonic rangefinders arrived, I looked at generating good 40kHz pings while listening to the direct sound with a microphone and amplifier. In Ultrasonic rangefinder without amplifier, I tried seeing if we could use the transducers without an amplifier. In Ultrasonic rangefinder with loudspeaker, I tried using a midrange loudspeaker to generate the pings (but was limited to about 20kHz.)

For the past couple of days I’ve been working with a tiny (10mm) loudspeaker, to see if I could get to higher frequencies without a resonant transducer, so that I could play with doing spread-spectrum pings that can be deconvolved to get more precise and more accurate measurements of echoes. I expected the 8Ω loudspeaker to be much less efficient than a resonant transmitter, but beyond that I had few preconceived notions of how well it would work.

Here is the front of the CDM-10008 10mm loudspeaker.

Here is the front of the CDM-10008 10mm loudspeaker.

Here is the back of the loudspeaker, with the two solder points visible on the bottom.

Here is the back of the loudspeaker, with the two solder points visible on the bottom.

Soldering the leads on was more difficult than I expected. I started out putting the loudspeaker face down on the bench and approaching it with the wire and soldering iron, but the loudspeaker jumped off the bench and stuck to the iron—I’d forgotten that the soldering iron tip really does contain iron, and that the magnet for the tiny loudspeaker is unshielded. After sticking the loudspeaker into a Panavise board holder, I had no trouble soldering on the leads.

Here is the loudspeaker with wires soldered on, and a female header with some double-ended male header pins to make it easier to attach to a breadboard.

Here is the loudspeaker with wires soldered on, and a female header with some double-ended male header pins to make it easier to attach to a breadboard.

The first thing to do (after checking that the leads weren’t shorted) was to measure the impedance as a function of frequency, using a voltmeter, a 100Ω series resistor, and a function generator. I was working at home, so I used a Fluke 8060A multimeter that I bought used on e-bay (which replaced my old 8060A that had failed). Unfortunately, the “new” meter is not much better, as the different voltage ranges seem to have radically different calibration. I used one range consistently for the loudspeaker voltage, and another consistently for the resistor voltage, so the shape of the curve should be ok (up to 300kHz), but |Z| may need to be shifted up or down by as much as 20%.

The resonant peak at 1340Hz is consistent with the datasheet, which specifies 1200Hz with a range from 960Hz to 1440Hz. They specify the power output for the speaker in the range around the resonant peak, which gives an exaggerated view of the response elsewhere.

The resonant peak at 1340Hz is consistent with the datasheet, which specifies 1200Hz with a range from 960Hz to 1440Hz. They specify the power output for the speaker in the range around the resonant peak, which gives an exaggerated view of the response elsewhere.

I tried driving the loudspeaker directly from pins 16 and 17 of the Teensy LC, which I had configured for high drive, with the setup() routine containing

    CORE_PIN16_CONFIG |= PORT_PCR_DSE;
    CORE_PIN17_CONFIG |= PORT_PCR_DSE;

I also put a 10Ω resistor in series with the 8Ω loudspeaker, to limit the current demanded of the I/O pins (though still far more than they are supposed to deliver). With this setup I got about ±1.6V between the pins, ±860mV across the resistor (so ±86mA), and ±670mV across the loudspeaker. The loudspeaker voltages showed spikes, but the resistor voltages were fairly clean square waves, even with 100kHz square waves.

I then made an amplifier for the electret microphone, keeping the gain per stage low to avoid the 1MHz gain-bandwidth limit of the MCP6004 op amps. With a gain of only 10 per stage, I should have a bandwidth close to 100kHz.

Here is the schematic for my test fixture. I looked at the microphone and speaker signals with both my Bitscope oscilloscope and at the microphone signals with the Teensy ADC.

Here is the schematic for my test fixture. I looked at the microphone and speaker signals with both my Bitscope oscilloscope and at the microphone signals with the Teensy ADC.

I started out looking a some complicated pulse patterns that I had designed to have high energy in the 20kHz–50kHz range, but a low autocorrelation other than at 0s. These pulse patterns should be good for the spread-spectrum tests I wanted to make. I was disappointed, however, in not being able to see the patterns in the recordings from the microphone, so I switched to a simpler stimulus—a single short pulse.

Short pulses seemed to trigger a resonance in the loudspeaker at about 9.4kHz, though short pulses resulted in an initial higher frequency mode being excited.

Short pulses seemed to trigger a resonance in the loudspeaker at about 9.4kHz, though short pulses resulted in an initial higher frequency mode being excited.

Each of the plots were made by averaging about 3 dozen traces recorded by the Teensy, to reduce noise. I found that I had to unplug the power supply from the laptop that was providing the USB power, as I otherwise got a lot of 90kHz noise.

I don’t see any resonance around 9.4kHz in the impedance plot, though I admit not looking for narrow resonance peaks in that range. I was a little worried that it might be related to the high-pass filters in the amplifiers which had a corner frequency near there, so I redid the tests with different filters, changing the 330pF to 680pF, so lowering the corner frequency to 4590Hz. The impulse response is much the same:

The signal is a little stronger with the high-pass having a lower corner frequency, but otherwise not changed much.

The signal is a little stronger with the high-pass having a lower corner frequency, but otherwise not changed much.

Note: the signal visible before the sound arrives is probably due to electrical noise from the loudspeaker coupled through the power supply,as it appears as the pulse is shut off.

Unfortunately, this little loudspeaker does not seem to be usable for the spread-spectrum sound production that I had hoped for, as the 9.4kHz ringing is definitely going to corrupt any high-frequency waveform I try to impose.

The ringing the loudspeaker is larger than for the ultrasonic transducer, so we’re actually getting more sound, but the transducer takes much less current, and I’ve not attempted to compare efficiencies.  Both ring for 1–1.5ms, which is too long for what I wanted to do.

Next Page »

%d bloggers like this: