I started today’s lecture by returning a parts-and-tools kit to a student who had left it in lab yesterday—but admonished students not to tease him, since I had left my laptop in the classroom on Wednesday (a much more valuable item in a much less secure location). That’s the second time in about a year that I’ve left my laptop in a classroom, which is something I never used to do. (Of course, I’ve been using my laptop in classes a lot more than I used to, so it may not be that I’m getting old and forgetful, just that I have had more opportunities to leave it behind.)
I talked to the students about color-coding their wiring on their breadboards and on their prototyping boards. The main lesson about color-coding was that black was reserved for ground, red for the positive power supply, and that I had four other colors available for them (blue, green, yellow, and white) in 22-gauge wire. They also have 24-gauge wire in the lab in white and orange, but I’m trying to discourage the use of 24-gauge wire, since it is not well held by the breadboards or KL25Z-board headers, and debugging the loose wires is a pain. I told them that I would not help them debug any boards that did not follow the red and black convention (red for all connections to the positive power supply and for nothing else, black for all the ground wires and nothing else). The other wires I suggested be color-coded on both the schematic and the board, based on the function. For example, all the virtual-ground wires might be white, all the input wires blue, all the wires after pre-amplification green, and so forth. The exact color coding they use doesn’t matter, as long as they document it clearly and use it consistently.
Hmm, it looks like I’ve never blogged about the newer version of the prototyping boards, so I should include a picture here. I did include a picture before in Twenty-first day of circuits class:
Instrumentation amplifier protoboard with circuit wired for the pressure sensor lab (top left connector to pressure sensor, bottom center connect or to Arduino)
Here is a layout as represented in the Eagle program. Most of the PC board wiring is on the bottom layer, but the +5V power supply crosses over on the top layer (the red trace). We’ll actually use the 3.3V supply on the KL25Z boards, not +5V power, but that is a minor detail.
This is a layout of the board as shown by Eagle.
The students are given a worksheet for them to plan their layouts on:
This layout worksheet is distributed to the class as a PDF file. The students can either mark up the PDF with PDF editing tools (which some students have done successfully in the past), or draw on it with pencils or colored pencils.
Only the holes that wires can be placed in are shown—the holes intended for components are omitted from this worksheet.
I also talked about the importance of keeping wires short and close to the board, and of not routing wires over components. I’m not expecting students to really internalize that message until they’ve had to debug an inaccessible chip in a nest of long wires, but I’ll put the message out there as often as I can. I’ve already grumbled at several students in lab for having incomprehensible tangles of wires that were all one color, and I’ll continue to do so.
After the brief warm-up on wire colors, I talked about instrumentation amps as circuit blocks—how they differed from op amps, though both look like differential amplifiers. The key is that op amps have unspecified gain and offset, so need to be used in a negative feedback circuit, which turns them in to amplifiers for single-ended inputs, with inputs and outputs both referenced to a single Vref. The instrumentation amp has a specified gain (usually controlled by a single external resistor) and a true differential input, with the output still referenced to an external Vref input.
I talked about the output voltage limits of the INA126PA chips they’ll be using, but I did not go to the data sheet to look up the limits, but made up some approximate ones. I warned them that I was making up approximate ones and that they needed to look the real limits up on the data sheet, but I’m betting that over half the class won’t do that, preferring to believe numbers in their notes that they have been told are fake to looking up the real numbers.
I then had the students help me create a Vref source (a pair of resistors in a voltage divider, followed by a unity-gain buffer), so that we could take current from Vref without violating the voltage-divider constraint.
I showed the students the prototyping board worksheet and where all the components went, and explained how to use the worksheet to do layout before soldering.
I ran out of time, so on Monday, I’ll have to talk about the pressure sensors they’ll be using, and about what the inside of an instrumentation amp consists of (how to build one out of op amps). I’ll want to do both the 3-op-amp design and the 2-op-amp design, because I’m going to have them build their EKGs in the last week using the 2-op-amp design.