Gas station without pumps

2013 January 19

Doing the hysteresis lab without a scope

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

One of the students in my circuits class is dropping due to having too full a schedule (19 units, including the biochem enzyme mechanics course and the tech writing course, both of which have a deserved reputation as taking a lot of time).  He wants to audit the course, doing as much of the work as he can at home, rather than in the university-equipped lab.  He does not have an oscilloscope, function generator, or high-quality multimeter at home, so was wondering how much he could do cheaply.  I’m known for trying to do things on a shoestring (like buying coffee mugs at the thrift store, rather than beakers for the water baths in the thermistor lab), and I’ve done most of the labs at home myself.  I do have an oscilloscope at home, though (a Kikusui COS5060 that I bought on e-bay) and an old but pretty good handheld multimeter (Fluke 8060A).  He could equip his bench at home with adequate equipment for this course for about $200–500, depending how lucky he gets on e-bay or other used-equipment purchases, but that is a large amount to an undergrad student.

The PC board with the 74HC14 Schmitt trigger chip is designed for this minimal oscillator circuit.  The signals taken out to the screw terminals are GND, +5V, and the input and output of the Schmitt-trigger inverter.

The PC board with the 74HC14 Schmitt trigger chip is designed for this minimal oscillator circuit. The signals taken out to the screw terminals are GND, +5V, and the input and output of the Schmitt-trigger inverter.

Some of the labs don’t need high-quality equipment.

  1. The thermistor lab can be done with $5 ohmmeter/voltmeter and the Arduino.
  2. The DC characterization of the electret microphone also only needs a cheap voltmeter and the Arduino, though one would have to omit the higher voltage measurements (above 5v) unless one had two voltmeters and a higher voltage power supply (a 9v battery, for example).  An extra potentiometer might be needed to make the power supply adjustable. Looking at the output of the microphone on an oscilloscope does naturally require an oscilloscope, but the Data Logger software can let you look at low-frequency signals (with a 3ms period on the input sampling you can see signals up to about 100Hz, though aliasing can be a problem).
  3. The electrode lab that we’ll be doing this week needs a high-quality true RMS multimeter, since we’ll be measuring the amplitude of sine waves up to about 100kHz.  I tried doing the lab with a cheap multimeter, and it failed miserably—the readings were way off at the higher frequencies, hiding the phenomenon we were trying to observe.  I’ve not come up with a cheap way to get the Arduino to measure AC voltages.  I looked into “true RMS” chips, like those used in voltmeters (for example,the AD737), but they cost $6–7 or more and need dual-rail power supplies.  One could put together an AC voltmeter for the Arduino, but it would be a bit complicated, and might not be much better than the $5 multimeters.  I might look into that more sometime, as it would be nice to automate the characterization of passive circuits, but I don’t have anything to offer the student this year.  There are True RMS voltmeters available for around $40, but I don’t know how they behave at higher frequencies—I’ve not tried to hunt down complete specs for them.
  4. The hysteresis lab can mostly be done without a scope. The threshold voltage measurements can be done with the Arduino and Data Logger software.  For the capacitance touch sensor, the lab already uses the pulseIn function of the Arduino for measuring pulse width, though it doesn’t report it to the user (for the tocuh-sensor program, the Arduino just needs a power supply, as there is no communication over the USB line once the program is downloaded).  Someone willing to do a few lines of programming on the Arduino could have a loop that measures a pulse input, reports it over the serial line, and then waits for 100msec.  Using the Arduino environment’s serial monitor, one could easily see the effect of changing R and C values on the pulse width. Although it is easier to do the design and testing if you can look at the waveforms on the scope, it should be possible to pick RC values that are reasonable even without that.

This morning, I tried seeing if we could use the loudspeaker to monitor what was going on with the hysteresis oscillator. The PC board is currently set up to implement the minimal circuit, and I did not want to put a low-impedance (8Ω) load on the oscillator, since I figured that could make the output voltage swing low enough to suppress oscillation. (I checked, and it does indeed suppress the oscillation.) But the 74HC14N chip has 5 more inverters on it, so I tried using three of them as digital amplifiers. I could have used just one inverter and connected the other lead of the speaker to GND, but I figured we could get a louder output by driving one wire high while the other was driven low.

Schmitt-trigger hysteresis oscillator driving a loudspeaker.  All inverters are from a single 74HC14N chip.

Schmitt-trigger hysteresis oscillator driving a loudspeaker.
All inverters are from a single 74HC14N chip.

I used pins 4 and 6 as the output pins for the loudspeaker, since the wires on the speaker come with a female header that has the two leads 0.2″ apart—I just needed to solder a pair of male header pins to the board to be able to plug and unplug the speaker. I had one solder hole available for each pin of the chip, so wiring pin 2 to pin 3 was trivial. To wire pins 1, 5, and 8 together, I used an insulated wire that I stripped back about an inch, and connected 1 and 5 together on the top of the board, with the bare wire running though the hole for pin 5 under the board to the hole for pin 8. I wouldn’t recommend this circuit for driving a loudspeaker normally, as the chip is not capable of sourcing or sinking enough current for an 8Ω load (it is spec’ed at ±25mA, which would give only a 200mV swing for an 8Ω load).

If appropriate RC values are chosen to get audio frequencies, the signal is indeed quite audible on the loudspeaker and the frequency shift as the touch plate is touched is very obvious. My board was wired so that I had around 32kHz (not audible) without a touch and around 2–6kHz with a touch. Touching the sensor more or less firmly (changing the area of the “finger” plate of the capacitor) changed the frequency in the expected way.  If I didn’t ground myself to the Arduino ground (touching the metal case of my laptop), the high-frequency sound was often buried by a 60Hz modulation of it, though the waveform on the scope indicated that the high-frequency oscillation was still present.

I tried looking at the voltage across the loudspeaker using my oscilloscope.  Indeed there is a ±200mV square wave there, but there is also a large (+5V or –5V) spike at each transition, which probably accounts for most of the energy.  The spike arises because the loudspeaker is essentially an inductor at high frequencies and it takes a while for the current to change when the voltage changes.

Sometimes, if I touch the oscillator input node without grounding myself, I can kick the oscillator into a much higher frequency oscillation (around 3MHz), which I did not observe without the loudspeaker.  I suspect that this might involve coupling though the power lines of the chip, but I did not investigate further.

This weekend, as I’m writing up the 5th lab (the first op-amp lab), I’ll try to keep in mind how much of the lab one could do without the bench equipment.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: