Gas station without pumps

2014 March 5

Sixteenth day: Arduino demo

Filed under: freshman design seminar,Pressure gauge — gasstationwithoutpumps @ 20:57
Tags: , , , , , ,

Today’s class in the freshman design seminar went well. I started by returning the drafts of the design reports and giving some generic feedback. I realized on reading the reports that I had not given a good explanation of what I meant by describing the components of the system—two of the groups had given me long parts lists on the first page of their reports, something that would only really be appropriate in an appendix. I explained that what I wanted was what the main blocks in the block diagram were, and that they should use the block diagram to organize their report, writing a page for each block. I also suggested that they use the block diagram to partition the project among the group members, with each group member working on a different component, then getting back together to reconcile any discrepancies. Note that this is much more like real engineering group work than the usual K–12 group project, which is usually done most efficiently by turning the whole project over to the most competent member of the group.

After the feedback on design reports, I offered the students a chance to get a demo of building an Arduino program with sensing and motor control. This was a completely extemporaneous demo—I had gathered a number of possibly useful components, but had not tested anything ahead of time nor even figured out what order to do the demo in.  I asked the students if they wanted me to start with sensing or control—they asked for the motor control first.

I started by pulling a motor out of box of motors I had gotten when the elementary school my wife works at cleaned out their closets.  I told the students that I had no idea what the spec of the motor were, but since it came from an elementary school, it probably ran on 3v batteries.  I tested the motor by hooking it up first to the 3.3v, then to the 5v power on my Arduino Uno.  It spun just fine on 3.3v, but squealed a bit on 5v, so we decided to run it on 3.3v.

I then pulled out the Sainsmart 4-relay board that I had bought some time ago but never used.  I explained how a relay worked, what single-pole double-throw meant, and normally open (NO) and normally closed (NC) contacts. I used the board unpowered with the NC contacts to spin the motor, then moved the wire over to the NO contacts to turn the motor off.  I then hooked up power to the board and tried connecting input IN1 to power to activate the relay.  Nothing happened. I then tried connecting IN1 to ground, and the relay clicked and the motor spun.  The inputs to the Sainsmart board are active low, which I explained to the students (though I did not use the terminology “active low”—perhaps I should have).  I did make a point of establishing that the relay provides very good isolation between the control logic and the circuitry being controlled—you can hook up AC power from the walls to the relay contacts without interfering with the logic circuitry.

Having established that the relay worked, the next step was to get the class (as a group) to write an Arduino program to control the motor using the relay. With me taking notes on the whiteboard, they quickly came up with the pinMode command for the setup, the digitalWrite and delay for the loop, and with only a tiny bit of prompting with a second digitalWrite and delay to turn the motor back off.  They even realized the need to have different delays for the on and off, so we could tell whether we had the polarity right on the control.  Here is the program we came up with:

#define RELAY_PIN (3)

void setup()
{   pinMode(RELAY_PIN, OUTPUT);
}

void loop()
{
  digitalWrite(RELAY_PIN,LOW); // turn motor ON via relay (or off via transistor)
  delay(1000);  // on for 1 second
  digitalWrite(RELAY_PIN,HIGH); // turn motor OFF via relay (or on via transistor)
  delay(3000); // off for 3 seconds
}

I typed the code in and downloaded it to the Arduino Uno, and it worked as expected.  (It would be nice if the Arduino IDE would allow me to increase the font size, like almost every other program I use, so that students could have read the projection of what I was typing better.)

I then offered the students a choice of going on to sensing or looking at pulse-width modulation for proportional control.  They wanted PWM. I explained why PWM is not really doable with relays (the relays are too slow, and chattering them would wear them out after a while.  I did not have the specs on the relay handy, but I just looked up the specs for the SRD-05VDC-SL-C relays on the board: They have a mechanical life of 10,000,000 cycles, but an electrical life of only 100,000 cycles.  The relay takes about 7msec to make a contact and about 3msec to break a contact, so they can’t be operated much faster than about 60 times a second, which could wear them out in as little as half an hour.

So instead of a relay, I suggested an nFET (Field-Effect Transistor). I gave them a circuit with one side of the motor connected to 3.3V, the other to the drain of an nFET, with the source connected to ground.  I explained that the voltage between the gate and the source (VGS) controlled whether the transistor was on or off, and that putting 5v on the gate would turn it on fairly well. I then got out an AOI518 nFET and stuck it in my breadboard, explaining the orientation to allow using the other holes to connect to the source, gate, and drain.

I mentioned that different FETs have the order of the pins different, so one has to look up the pinout on data sheet. I pulled up the AOI518 data sheet, which has on the first page “RDS(ON) (at VGS = 4.5V) < 11.9mΩ”. I explained that if we were putting a whole amp through the FET (we’re not doing anywhere near that much current), the voltage drop would be 11.9mV, so the power dissipated in the transistor would be only 11.9mW, not enough to get it warm. I mentioned that more current would result in more power being dissipated (I2R), and that the FETs could get quite warm. I passed around my other breadboard which has six melted holes from FETs getting quite hot when I was trying to debug the class-D amplifier design. The students were surprised that the FETs still worked after getting that hot (I must admit that I was also).

I hooked up the AOI518 nFET using double-headed male header pins and female jumper cables, and the motor alternated on for 3 seconds, off for one second. We now had the transistor controlling the motor, so it was time to switch to PWM. I went to the Arduino reference page and looked around for PWM, finding it on analogWrite(). I clicked that link and we looked at the page, seeing that analog Write was like digitalWrite, except that we could put in a value from 0 to 255 that controlled what fraction of the time the pin was high.

I edited the code, changing the first digitalWrite() to analogWrite(nFET_GATE_PIN, 255), and commenting out the rest of the loop. We downloaded that, and it turned the motor on, as expected. I then tried writing 128, which still turned the motor on, but perhaps not as strongly (hard to tell with no load). Writing 50 resulted in the motor not starting. Writing 100 let the motor run if I started it by hand, but wouldn’t start the motor from a dead stop. I used this opportunity to point out that controlling the motor was not linear—1/5th didn’t run at 1/5th speed, but wouldn’t run the motor at all.

Next we switched over to doing sensors (with only 10 minutes left in the class). I got out the pressure sensor and instrumentation amp from the circuits course and hooked it up. The screwdriver I had packed in the box had too large a blade for the 0.1″ screw terminals, but luckily the tiny screwdriver on my Swiss Army knife (tucked away in the corkscrew) was small enough. After hooking up the pressure sensor to A0, I downloaded the Arduino Data Logger to the Uno, and started it from a terminal window. I set the triggering to every 100msec (which probably should be the default for the data logger), the input to A0, and convert to volts. I then demoed the pressure sensor by blowing into or sucking on the plastic tube hooked up to the sensor. With the low-gain output from the amplifier, the output swung about 0.5 v either way from the 2.5v center. Moving the A0 wire over to the high-gain output of the amplifier gave a more visible signal. I also turned off the “convert to volts” to show the students the values actually read by the Arduino (511 and 512, the middle of the range from 0 to 1023).

Because the class was over at that point, I offered to stay for another 10 minutes to show them how to use the pressure sensor to control the motor. One or two students had other classes to run to, but most stayed. I then wrote a program that would normally have the motor off, but would turn it full on if I got the pressure reading up to 512+255 and would turn it on partway (using PWM) between 512 and 512+255. I made several typos when entering the program (including messing up the braces and putting in an extraneous semicolon), but on the third compilation it downloaded successfully and controlled the motor as expected.

One student asked why the motor was off when I wasn’t blowing into the tube, so I explained about 512 being the pressure reading when nothing was happening (neither blowing into the tube nor sucking on it). I changed the zero point for the motor to a pressure reading of 300, so that the motor was normally most of the way on, but could be turned off by sucking on the tube. Here is the program we ended up with

#define nFET_GATE_PIN (3)

void setup()
{   pinMode(nFET_GATE_PIN, OUTPUT);
    pinMode(A0, INPUT);
}

void loop()
{ int pressure;
  pressure=analogRead(A0);
  if (pressure < 300)
  {    digitalWrite(nFET_GATE_PIN,LOW);  // turn motor off
  }
  else
  {   if (pressure>300+255)
      { digitalWrite(nFET_GATE_PIN,HIGH);  // turn motor on full
      }
      else
      {    analogWrite(nFET_GATE_PIN,pressure-300); // turn motor partway on
      }
  }
}

Note: this code is not an example of brilliant programming style. I can see several things that I would have done differently if I had had time to think about the code, but for this blog it is more useful to show the actual artifact that was developed in the demo, even if it makes me cringe a little.

Overall, I thought that the demo went well, despite being completely extemporaneous. Running over by 10 minutes might have been avoidable, but only by omitting something useful (like the feedback on the design reports). The demo itself lasted about 70 minutes, making the whole class run 80 minutes instead of 70. I think I compressed the demo about as much as was feasible for the level the students were at.

Based on how the students developed the first motor-control program quickly in class, I think that some of them are beginning to get some of the main ideas of programming: explicit instructions and sequential ordering. Because we were out of time by the point I got to using conditionals, I did not get a chance to probe their understanding there.

2013 September 22

Electronic sensors for water quality

Filed under: freshman design seminar — gasstationwithoutpumps @ 16:19
Tags: , , , , ,

I just read an article in AEE – Advances in Engineering Education—A Journal of Engineering Education Applications, vol. 3 #2, 2012, SENSE IT: Teaching STEM principles to middle and high school students through the design, construction and deployment of water quality sensors:

This paper describes the structure and impact of an NSF-funded ITEST project designed to enrich science, technology, engineering, and mathematics (STEM) education using educational modules that teach students to construct, program, and test a series of sensors used to monitor water quality.

The four sensors that they used for the middle school and high school students (thermistor for temperature, LED and photoresistor for turbidity, pressure gauge for depth, and electrodes for conductivity) would be suitable for the freshman design seminar. I already use the thermistor lab as the first lab in the circuits course, and I do a more sophisticated version of the conductivity and pressure sensor labs (measuring impedance with polarizable and non-polarizable electrodes and using a pressure sensor that is just a strain gauge, so that they need to build the amplifier for it).  Details of the curriculum and the sensors themselves can be found at http://senseit.org

The application to water quality measurements is reasonable, and for the freshman seminar it might be worth a field trip down to San Lorenzo River or Cowell beach to test out their designs.

We would use Arduinos or KL25Z boards, rather than Lego NXT bricks, and waterproofing their designs could be a part of the engineering. Using a drybox and a connector should not be too difficult. The robotics club has used IP68 Sealcon strain reliefs from www.productsforautomation.com for cables and Buccaneer mini IP68 connectors for disconnectable connections, both successfully. Some parts could be potted in epoxy, like the cameras for the underwater robot.

My main concern is that making the instruments be standalone might be too challenging, but just duplicating what the high school students do might not be challenging enough. I also don’t want to have to teach half the circuits course for the freshman design seminar, so I’d like to keep the necessary electronics to a minimum.

2013 August 13

MPX2053DP pressure sensor being discontinued

Filed under: Circuits course — gasstationwithoutpumps @ 18:24
Tags: , ,

I just got notice today that Freescale is discontinuing the MPX2053DP pressure sensor that I used for the pressure sensor lab in the Applied Circuits course. DigiKey sent me an “end-of-life” notice with a “last time buy date” of 02/22/2014. It is service like this that makes me glad to buy from Digikey.

I don’t see any indication of the end of life status for the MPX2053DP on the Freescale website, which either means that Freescale is very poor at maintaining their website, or that Digikey has made a mistake here.  I’m betting on incompetent web maintenance at Freescale.

I’m wondering whether I should order some spares (I still have 8 breakout boards). I have 12 that I soldered to breakout boards for the lab (which UCSC reimbursed me for), plus one that I made for myself. Eight spares would cost $110.56, and 10 spares $125.60 (plus tax and shipping in both cases). I should probably check with the lab manager to find out what their recommended policy is for spare parts on discontinued items.

It may not be that important, since the MPX2050DP is still available, and it has essentially the same specs (except somewhat better linearity) and is actually slightly cheaper.  If we need more, we can get the MPX2050DP instead.

2013 July 2

Pressure sensor with air pump

I’ve been thinking of expanding the pressure sensor lab for the Applied Circuits Course to do something more than just measure breath pressure.  Perhaps something that conveys another physics or engineering concept.

One thing I thought of doing was measuring the back pressure and air flow on an aquarium air pump bubbling air into an aquarium. Looking at the tradeoff of flow-rate and back pressure would be a good characterization of an air pump (something I wish was clearly shown in advertisements for aquarium air pumps and air stones).  Measuring flow rate is a bit of a pain—about the best I could think of was to bubble air into an inverted soda bottle (or other known volume) and time it.

This would be a good physics experiment and might even make a decent middle-school product-science science fair project (using a cheap mechanical low-pressure gauge, rather than an electronic pressure sensor), but setting up tanks of water in an electronics lab is a logistic nightmare, and I don’t think I want to go there.

I can generate back pressure with just a simple clamp on the hose, though, and without a flow rate measurement we could do everything completely dry.

Setup for measuring the back pressure for an aquarium air pump (needs USB connection for data logger and power).

Setup for measuring the back pressure for an aquarium air pump (needs USB connection for data logger and power).

Using the Arduino data loggger my son wrote, I recorded the air pressure while adjusting the clamp (to get the y-axis scale correct, I had to use the estimated gain of the amplifier based on resistor sizes used in the amplifier).

The peak pressure, with the clamp sealing the hose shut, seems to be about 14.5 kPa (2.1psi).

The peak pressure, with the clamp sealing the hose shut, seems to be about 14.5 kPa (2.1psi).

I was interested in the fluctuation in the pressure, so I set the clamp to get about half the maximum back pressure, then recorded with the Arduino data logger set to its highest sampling frequency (1ms/sample).

The fluctuation in back pressure seems to have both a 60Hz and a 420Hz component.

The fluctuation in back pressure seems to have both a 60Hz and a 420Hz component with back pressure at about half maximum.

Because the Arduino data logger has trouble dealing with audio frequency signals, I decided to take another look at the signals using the Bitscope pocket analyzer.

The waveform for the pressure fluctuations from the AQT3001 air pump, with the backpressure about 7kPa (half the maximum).

The waveform for the pressure fluctuations from the AQT3001 air pump, with the back pressure about 7.5kPa (half the maximum).

One advantage of using the Bitscope is that it has FFT analysis:

Spectrum for the back pressure fluctuation.  One can see many of the multiples of 60Hz, with the particularly strong peak at 420Hz.

Spectrum for the back pressure fluctuation. One can see many of the multiples of 60Hz, with the particularly strong peak at 420Hz.

I was also interested in testing a Whisper40 air pump (a more powerful, but quieter, pump). When I clamped the hose shut for that air pump, the hi-gain output of the amplifier for the pressure sensor saturated, so I had to use the low gain output to determine the maximum pressure (24.8kPA, or about 3.6psi). The cheap Grafco clamp that I used is a bit hard to get complete shutoff with (I needed to adjust the position of the tubing and use pliers to turn the knob).  It is easy to get complete shutoff if the tube is folded over, but then modulation of less than complete shutoff is difficult.

The fluctuation in pressure shows a different waveform from the AQT3001:

The Whisper40 air pump, with the clamp set to get about half the maximum back pressure, produces a 60Hz sawtooth pressure waveform, without the strong 420Hz component seen from the AQT3001.

The Whisper40 air pump, with the clamp set to get a bit less than half the maximum back pressure, produces a 60Hz sawtooth pressure waveform, without the strong 420Hz component seen from the AQT3001. The peak-to-peak fluctuation in pressure seems to be largest around this back pressure. The 3kPa fluctuation is larger than for the AQT3001, but the pump seems quieter.

The main noise from the pump is not from the fluctuation in the pressure in the air hose, but radiation from the case of the pump. That noise seems to be least when the back pressure is about 1.1kPa (not at zero, surprisingly). The fluctuation is then all positive pressure, ranging from 0 to 2.2kPa and is nearly sinusoidal, with some 2nd and 3rd harmonic.

As the back pressure increases for the Whisper40, the 2nd, 3rd, and 4th harmonics get larger, but the 60Hz fundamental gets smaller. The 4th harmonic is maximized (with the 1st through 4th harmonics almost equal) at about 22.8kPa, above which all harmonics get smaller, until the air hose is completely pinched off and there is no pressure variation.

When driving the large airstone in our aquarium, the Whisper40 has a back pressure of about 7.50kPa (1.1psi) with a peak-to-peak fluctuation of about 2.6kPa.

I’m not sure whether this air-pump back-pressure experiment is worth adding to the pressure sensor lab.  If I decide to do it, we would need to get a dozen cheap air pumps.  The Tetra 77853 Whisper 40 air pump is $11.83 each from Amazon, but the smaller one for 10-gallon aquariums is only $6.88.  With 12 Ts and 12 clamps, this would cost about $108, which is not a significant cost for the lab.

2013 April 10

Supplemental sheets, draft 3

This post updates and replaces the Supplemental sheets, draft 2. It reflects the redesign of the course based on running a prototype version of the course in as a group tutorial in Winter 2013.

Lecture Course

Undergraduate Supplemental Sheet
Information to accompany Request for Course Approval
Sponsoring Agency: Biomolecular Engineering
Course #:
101
Catalog Title: Applied Circuits for Bioengineers

Please answer all of the following questions using a separate sheet for your response.
1. Are you proposing a revision to an existing course? If so give the name, number, and GE designations (if applicable) currently held.

This is not a revision to any existing course.A prototype version of the course was run as BME 194 Group Tutorial in Winter 2013. Notes on the design and daily running of that prototype can be found at https://gasstationwithoutpumps.wordpress.com/circuits-course-table-of-contents

2. In concrete, substantive terms explain how the course will proceed. List the major topics to be covered, preferably by week.

The Applied Circuits course is centered around the labs in the accompanying lab course.  Concepts are taught as needed for the labs, with design and analysis exercises in the lecture course cementing the understanding. The recurring theme throughout the course is voltage dividers: for change of voltage, for current-to-voltage conversion, for high-pass and low-pass RC filters, in Wheatstone bridges, and as feedback circuits in op amp circuits.  The intent of this course is to provide substantial design experience for bioengineering students early in their studies, and to serve both as as bridge course to entice students into the bioelectronics concentration and as a terminal electronics course for those students focussing on other areas.

  1. Basic DC circuit concept review: voltage current, resistance, Kirchhoff’s Laws, Ohm’s Law, voltage divider, notion of a transducer.
    The first week should cover all the concepts needed to do the thermistor lab successfully.
  2. Models of thermistor resistance as a function of temperature. Voltage and current sources, AC vs DC, DC blocking by capacitors, RC time constant, complex numbers, sine waves, RMS voltage, phasors. The second week should cover all the concepts needed to do the electret microphone lab successfully.
  3. Low-pass and high-pass RC filters as voltage dividers, Bode plots. Concepts necessary for properly understanding digitized signals: quantized time, quantized voltage, sampling frequency, Nyquist frequency, aliasing.
  4. Amplifier basics: op amps, AC coupling, gain computation, DC bias for single-power-supply offsets, bias source with unity-gain amplifier.  In the lab, students will design, build, and test a low-gain amplifier (around 5–10 V/V) for audio signals from an electret microphone. We’ll also include a simple current-amplifier model of a bipolar transistor, so that they can increase the current capability of their amplfier.
  5. Op amps with feedback that has complex impedance (frequency-dependent feedback), RC time constants, parallel capacitors, hysteresis, square-wave oscillator using Schmitt triggers, capacitance-output sensors, capacitance-to-frequency conversion.   Topics are selected to support students designing a capacitive touch sensor in the accompanying lab.
  6. Phototransistors and FETs for the tinkering lab and for the class-D amplifier lab. In preparation for the lab in which students model a pair of electrodes as R+(C||R), we will need a variety of both electronics and electrochemistry concepts: variation of parameters with frequency, impedance of capacitors, magnitude of impedance, series and parallel circuits, limitations of R+(C||R) model, and at least a vague understanding of half-cell potentials for the electrode reactions: Ag → Ag+ + e-, Ag+ + Cl- → AgCl, Fe + 2 Cl-→ FeCl2 + 2 e-.
  7. Differential signals, twisted-pair wiring to reduce noise, strain gauge bridges, instrumentation amplifier, DC coupling, multi-stage amplifiers.
    Topics are selected to support the design of a 2-stage amplifier for a piezoresistive pressure sensor in the lab.
  8. System design, comparators, more on FETs. Students will design a class-D power amplifier to implement in the lab.
  9. A little electrophysiology: action potentials, electromyograms, electrocardiograms. Topics are chosen so that students can design a simple 3-wire electrocardiogram (EKG) in the lab.There will also be a bit more development of simple (single-pole) filters.
  10. The last week will be review and special topics requested by the students.

3. Systemwide Senate Regulation 760 specifies that 1 academic credit corresponds to 3 hours of work per week for the student in a 10-week quarter. Please briefly explain how the course will lead to sufficient work with reference to e.g., lectures, sections, amount of homework, field trips, etc. [Please note that if significant changes are proposed to the format of the course after its initial approval, you will need to submit new course approval paperwork to answer this question in light of the new course format.]

The combination of BME101 and BME101L is 7 units (21 hours per week).  The time will be spent approximately as follows:

  • 3.5 hours lecture/discussion
  • 3.5 hours reading background and circuits text
  • 3 hours read lab handouts and doing pre-lab design activities
  • 6 hours lab
  • 5 hours writing design reports for lab

4. Include a complete reading list or its equivalent in other media.

No existing book covers all the material.  For the prototype run of the course, we relied heavily on Wikipedia articles, which turned out to be too dense for many of the students.  Other alternatives (such as Op amps for everyone by Ron Mancini http://www.e-booksdirectory.com/details.php?ebook=1469 Chapters 1–6 and Op Amp Applications Handbook by Analog Devices http://www.analog.com/library/analogDialogue/archives/39-05/op_amp_applications_handbook.html Sections 1-1 and 1-4) were also much too advanced.

In future we will most likely use the free on-line text All about Circuits as the primary text, with material not covered there (such as the various sensors) coming mainly from Wikipedia and the datasheets for the components.

5. State the basis on which evaluation of individual students’ achievements in this course will be made by the instructor (e.g., class participation, examinations, papers, projects).

Students will be evaluated primarily on design reports with some in-class or take-home quizzes to ensure that they do the needed reading on theoretical concepts.

6. List other UCSC courses covering similar material, if known.

EE 101 covers some of the same circuit material, but without the focus on sensors and without instrumentation amps.  It covers linear circuit theory in much more depth and focuses on mathematical analysis of complicated linear circuits, rather than on design with simple circuits.  The expectation for bioengineering students is that those in the bioelectronics track would take BME 101 before taking EE101, and that those in other tracks would take BME 101 as a terminal electronics course providing substantial engineering design.  The extra material in BME 101 would prepare the bioengineering students better for EE 101.

Physics 160 offers a similar level of practical electronics, but focuses on physics applications, rather than on bioengineering applications, and is only offered in alternate years.

7. List expected resource requirements including course support and specialized facilities or equipment for divisional review. (This information must also be reported to the scheduling office each quarter the course is offered.)

The lecture part of the course needs no special equipment—a standard media-equipped classroom with a whiteboard, screen, and data projector should suffice. Having a portable laptop-connected oscilloscope would make demos much easier to do, but is not essential.

The lecture course is not really separable from the associated lab course,whose equipment needs are described on the supplemental sheet for that course.

The course requires a faculty member (simultaneously teaching the co-requisite Applied Circuits lab course) and a teaching assistant or undergraduate group tutor for discussion sections and assistance in grading.  The same TA/group tutor should be used for both the lecture and the lab courses.

8. If applicable, justify any pre-requisites or enrollment restrictions proposed for this course. For pre-requisites sponsored by other departments/programs, please provide evidence of consultation.

Students will be required to have single-variable calculus and a physics electricity and magnetism course. Both are standard prerequisites for any circuits course. Although DC circuits can be analyzed without calculus, differentiation and integration are fundamental to AC analysis. Students should have already been introduced to the ideas of capacitors and inductors and to serial and parallel circuits.

The prerequisite courses are already required courses for biology majors and bioengineering majors, so no additional impact on the courses is expected.

9. Proposals for new or revised Disciplinary Communication courses will be considered within the context of the approved DC plan for the relevant major(s). If applicable, please complete and submit the new proposal form (http://reg.ucsc.edu/forms/DC_statement_form.doc or http://reg.ucsc.edu/forms/DC_statement_form.pdf) or the revisions to approved plans form (http://reg.ucsc.edu/forms/DC_approval_revision.doc or http://reg.ucsc.edu/forms/DC_approval_revision.pdf).

This course is not expected to contribute to any major’s disciplinary communication requirement, though students will get extensive writing practice in the design reports (writing between 50 and 100 pages during the quarter).

10. If you are requesting a GE designation for the proposed course, please justify your request making reference to the attached guidelines.

No General Education code is proposed for this course, as all relevant codes will have already been satisfied by the prerequisites.

11. If this is a new course and you requesting a new GE, do you think an old GE designation(s) is also appropriate? (CEP would like to maintain as many old GE offerings as is possible for the time being.)

No General Education code is proposed for this course, as all relevant codes (old or new) will have already been satisfied by the prerequisites.

Lab course

Undergraduate Supplemental Sheet
Information to accompany Request for Course Approval
Sponsoring Agency Biomolecular Engineering
Course #
101L
Catalog Title
Applied Circuits Lab

Please answer all of the following questions using a separate sheet for your response.
1. Are you proposing a revision to an existing course? If so give the name, number, and GE designations (if applicable) currently held.

This is not a revision to any existing course. A prototype version of the course was run as BME 194F Group Tutorial in Winter 2013. Notes on the design and daily running of that prototype can be found at https://gasstationwithoutpumps.wordpress.com/circuits-course-table-of-contents

2. In concrete, substantive terms explain how the course will proceed. List the major topics to be covered, preferably by week.

The course is a lab course paired with BME 101, Applied Circuits for Bioengineers.  The labs have been designed to be relevant to bioengineers and to have as much design as is feasible in a first circuits course.  The labs are the core of the course, with lecture/discussion classes to support them. There will be six hours of lab a week, split into 2 3-hour sessions. Lab assignments will generally take two lab sessions, with data collection in the first lab session, and data analysis and design between lab sessions.   Some of the more straightforward labs will need only a single session.  Except for the first intro lab, these labs have been used in the prototype run of the class as 3-hour labs.  Most did not fit in one 3-hour lab session and would benefit from being split into two separate lab sessions with data analysis and design between the sessions.

  1. Intro to parts, tools, and lab equipment (single session)
  2. Thermistor
  3. Microphone
  4. Sampling and aliasing (single session)
  5. Audio amp
  6. Hysteresis oscillator and soldering lab
  7. FET and phototransistor
  8. Electrode modeling
  9. Pressure sensor and instrumentation amp (soldered)
  10. Class-D power amplifier
  11. EKG (instrumentation amp with filters, soldered)
  1. Intro to parts, tools, and lab equipment
    Students will learn about the test equipment by having them use the multimeters to measure other multimeters. What is the resistance of a multimeter that is measuring voltage? of one that is measuring current? what current or voltage is used for the resistance measurement? Students will be  issued their parts and tool kits, learn to use the wire strippers and make twisted-wire cables for the power supplies to use all quarter.  They will learn to set the current limits on the power supplies and  measure voltages and currents for resistor loads around 500Ω.  This lab will not require a written lab report.
    Lab skills developed: wire strippers, multimeter for measuring voltage and current, setting bench power supply
    Equipment needed: multimeter, power supply
  2. Thermistor lab
    The thermistor lab will have two lab sessions involving the use of a Vishay BC Components NTCLE413E2103F520L thermistor or equivalent.
For the first lab session, the students will use a bench multimeter to measure the resistance of the thermistor, dunking it in various water baths (with thermometers in them to measure the temperature). They should fit a simple curve to this data based on standard thermistor models. A class period will be spent on learning both the model and how to do model fitting with gnuplot, and there will be a between-lab exercise where they derive the formula for maximizing | dV/dT | in a voltage divider that converts the resistance to a voltage.
    For the scond lab session, they will add a series resistor to make a voltage divider. They have to choose a value to get as large and linear a voltage response as possible at some specified “most-interesting” temperature (perhaps body temperature, perhaps room temperature, perhaps DNA melting temperature).  They will then measure and plot the voltage output for another set of water baths. If they do it right, they should get a much more linear response than for their resistance measurements. 
Finally, they will hook up the voltage divider to an Arduino analog input and record a time series of a water bath cooling off (perhaps adding an ice cube to warm water to get a fast temperature change), and plot temperature as a function of time.
    Lab skills developed: use of multimeter for measuring resistance and voltage, use of Arduino with data-acquisition program to record a time series, fitting a model to data points, simple breadboarding.Equipment needed: multimeter, power supply, thermistor, selection of various resistors, breadboard, clip leads, thermoses for water baths, secondary containment tubs to avoid water spills in the electronics lab. Arduino boards will be part of the student-purchased lab kit. All uses of the Arduino board assume connection via USB cable to a desktop or laptop computer that has the data logger software that we will provide.
  3. Electret microphone
    First, we will have the students measure and plot the DC current vs. voltage for the microphone. The microphone is normally operated with a 3V drop across it, but can stand up to 10V, so they should be able to set the Agilent E3631A  bench power supply to various values from 0V to 10V and get the voltage and current readings directly from the bench supply, which has 4-place accuracy for both voltage and current. Ideally, they should see that the current is nearly constant as voltage is varied—nothing like a resistor.  They will follow up the hand measurements with automated measurements using the Arduino to measure the voltage across the mic and current through it for voltages up to about 4v.  The FET in the microphone shows a typical exponential I vs. V characteristic below threshold, and a gradually increasing current as voltage increases in the saturation region.  We’ll do plotting and model fitting in the data analysis class between the two labs.
    Second, we will have them do current-to-voltage conversion with a 5v power supply and a resistor to get a 1.5v DC output from the microphone and hook up the output of the microphone to the input of the oscilloscope. Input can be whistling, talking, iPod earpiece, … . They should learn the difference between AC-coupled and DC-coupled inputs to the scope, and how to set the horizontal and vertical scales of the scope. They will also design and wire their own DC blocking RC filter (going down to about 1Hz), and confirm that it has a similar effect to the AC coupling on the scope. Fourth, they will play sine waves from the function generator through a loudspeaker next to the mic, observe the voltage output with the scope, and measure the AC voltage with a multimeter, perhaps plotting output voltage as a function of frequency. Note: the specs for the electret mic show a fairly flat response from 50Hz to 3kHz, so most of what the students will see here is the poor response of a cheap speaker at low frequencies.
    EE concepts: current sources, AC vs DC, DC blocking by capacitors, RC time constant, sine waves, RMS voltage, properties varying with frequency.Lab skills: power supply, oscilloscope, function generator, RMS AC voltage measurement.Equipment needed: multimeter, oscilloscope, function generator, power supply, electret microphone, small loudspeaker, selection of various resistors, breadboard, clip leads.
  4. Sampling and Aliasing
    Students will use the data logger software on the Arduino to sample sine waves from a function generator at different sampling rates.  They will need to design a high-pass RC filter to shift the DC voltage from centered at 0 to centered at 2.5v in the middle of the Arduino A-to-D converter range.  They will also design a low-pass filter (with corner frequency below the Nyquist frequency) to see the effect of filtering on the aliasing.
    EE concepts: quantized time, quantized voltage, sampling frequency, Nyquist frequency, aliasing, RC filters.
    Equipment needed:  function generator, Arduino board, computer.
  5. Audio amplifier
    Students will use an op amp to build a simple non-inverting audio amplifier for an electret microphone, setting the gain to around 6 or 7. The amplifier will need a a high-pass filter to provide DC level shifting at the input to the amplifier. Note that we are using single-power-supply op amps, so they will have to design a bias voltage supply as well. The output of the amplifier will be recorded on the Arduino (providing another example of signal aliasing).
    The second half of the lab will add a single bipolar transistor to increase the current and make a class A output stage for the amplifier, as the op amp does not provide enough current to drive the 8Ω loudspeaker loudly.
    EE concepts: op amp, DC bias, bias source with unity-gain amplifier, AC coupling, gain computation.
    Lab skills: complicated breadboarding (enough wires to have problems with messy wiring). If we add the Arduino recording, we could get into interesting problems with buffer overrun if their sampling rate is higher than the Arduino’s USB link can handle.
    Equipment needed: breadboard, op amp chip, assorted resistors and capacitors, electret microphone, Arduino board, optional loudspeaker.
  6. Hysteresis and capacitive touch sensor
    For the first half of the lab, students will characterize a Schmitt trigger chip, determining VIL, VIH, VOL, and VOH. Using these properties, they will design an RC oscillator circuit with a specified period or pulse width (say 10μs), and measure the frequency and pulse width of the oscillator.
    For the second half of the lab, the students will build a relaxation oscillator whose frequency is dependent on the parasitic capacitance of a touch plate, which the students can make from Al foil and plastic food wrap. In addition to breadboarding, students will wire this circuit by soldering wires and components on a PC board designed for the oscillator circuit. Students will have to measure the frequency of the oscillator with and without the plate being touched. We will provide a simple Arduino program that is sensitive to changes in the pulse width of the oscillator and that turns an LED on or off, to turn the frequency change into an on/off switch.  Students will treat the oscillator board as a 4-terminal component, and examine the effect of adding resistors or capacitors between different terminals.
    EE concepts: frequency-dependent feedback, oscillator, RC time constants, parallel capacitors.
    Lab skills: soldering, frequency measurement with digital scope.
    Equipment needed: Power supply, multimeter, Arduino, clip leads, amplifier prototyping board, oscilloscope.
  7. Phototransistor and FET
    First half: characterize phototransistor in ambient light and shaded.  Characterize nFET and pFET.
    Second half: students will “tinker” with the components they have to produce a light-sensitive, noise-making toy.
    EE concepts: phototransistors, FETs.
    Equipment needed: breadboard, phototransistor, power FETs, loudspeaker, hysteresis oscillator from previous lab, oscilloscope.
  8. Electrode measurements
    First, we will have the students attempt to measure the resistance of a saline solution using a pair of stainless steel electrodes and a multimeter. This should fail, as the multimeter gradually charges the capacitance of the electrode/electrolyte interface.Second, the students will use a function generator driving a voltage divider with a load resistor in the range 10–100Ω. The students will measure the RMS voltage across the resistor and across the electrodes for different frequencies from 3Hz to 300kHz (the range of the AC measurements for the Agilent 34401A Multimeter). They will plot the magnitude of the impedance of the electrodes as a function of frequency and fit an R2+(R1||C1) model to the data, most likely using gnuplot. There will be a prelab exercise to set up plotting of the model and do a little hand tweaking of parameters to help them understand what each parameter changes about the curve.Third, the students will repeat the measurements and fits for different concentrations of NaCl, from 0.01M to 1M. Seeing what parameters change a lot and what parameters change only slightly should help them understand the physical basis for the electrical model.Fourth, students will make Ag/AgCl electrodes from fine silver wire. The two standard methods for this involve either soaking in chlorine bleach or electroplating. To reduce chemical hazards, we will use the electroplating method. As a prelab exercise, students will calculate the area of their electrodes and the recommended electroplating current.  In the lab, they will adjust the voltage on the bench supplies until they get the desired plating current.Fifth, the students will measure and plot the resistance of a pair of Ag/AgCl electrodes as a function of frequency (as with the stainless steel electrodes).Sixth, if there is time, students will measure the potential between a stainless steel electrode and an Ag/AgCl electrode.EE concepts: magnitude of impedance, series and parallel circuits, variation of parameters with frequency, limitations of R+(C||R) model.Electrochemistry concepts: At least a vague understanding of half-cell potentials, current density, Ag → Ag+ + e-, Ag+ + Cl- → AgCl, Fe + 2 Cl-→ FeCl2 + 2 e-.Lab skills: bench power supply, function generator, multimeter, fitting functions of complex numbers, handling liquids in proximity of electronic equipment.Equipment needed: multimeter, function generator, power supply, stainless steel electrode pairs, silver wires, frame for mounting silver wire, resistors, breadboard, clip leads, NaCl solutions in different concentrations, beakers for salt water, secondary containment tubs to avoid salt water spills in the electronics lab.
  9. Pressure sensor and instrumentation amplifier
    Students will design an instrumentation amplifier with a gain of 300 or 500 to amplify the differential strain-gauge signal from a medical-grade pressure sensor (the Freescale MPX2300DT1), to make a signal large enough to be read with the Arduino A/D converter. The circuit will be soldered on the instrumentation amp/op amp protoboard. The sensor calibration will be checked with water depth in a small reservoir. Note: the pressure sensor comes in a package that exposes the wire bonds and is too delicate for student assembly by novice solderers. We will make a sensor module that protects the sensor and mounts the sensor side to a 3/4″ PVC male-threaded plug, so that it can be easily incorporated into a reservoir, and mounts the electronic side on a PC board with screw terminals for connecting to student circuits.  This sensor is currently being prototyped, and if it turns out to be too fragile, we will use a Freescale MPX2050GP, which has a sturdier package, but is slightly less sensitive and more expensive. (It also isn’t made of medical-grade plastics, but that is not important for this lab.) Note that we are deliberately notusing pressure sensors with integrated amplifiers, as the pedagogical point of this lab is to learn about instrumentation amplifiers.EE concepts: differential signals, twisted-pair wiring, strain gauge bridges, instrumentation amplifier, DC coupling, gain.Equipment needed: Power supply, amplifier prototyping board, oscilloscope, pressure sensor mounted in PVC plug with breakout board for easy connection, water reservoir made of PVC pipe, secondary containment tub to avoid water spills in electronics lab.
  10. Class-D power amplifier
  11. Electrocardiogram (EKG)
    Students will design and solder an instrumentation amplifier with a gain of 2000 and bandpass of about 0.1Hz to 100Hz. The amplifier will be used with 3 disposable EKG electrodes to display EKG signals on the oscilloscope and record them on the Arduino.Equipment needed: Instrumentation amplifier protoboard, EKG electrodes, alligator clips, Arduino, oscilloscope.

3. Systemwide Senate Regulation 760 specifies that 1 academic credit corresponds to 3 hours of work per week for the student in a 10-week quarter. Please briefly explain how the course will lead to sufficient work with reference to e.g., lectures, sections, amount of homework, field trips, etc. [Please note that if significant changes are proposed to the format of the course after its initial approval, you will need to submit new course approval paperwork to answer this question in light of the new course format.]

The combination of BME101 and BME101L is 7 units (21 hours per week).  The time will be spent approximately as follows:

  • 3.5 hours lecture/discussion
  • 3.5 hours reading background and circuits text
  • 3 hours read lab handouts and doing pre-lab design activities
  • 6 hours lab
  • 5 hours writing design reports for lab

4. Include a complete reading list or its equivalent in other media.

Lab handouts: there is a 5- to 10-page handout for each week’s labs, giving background material and design goals for the lab, usually with a pre-lab design exercise.  The handouts from the prototype run of the course can be found at http://users.soe.ucsc.edu/~karplus/bme194/w13/#labs
Data sheets: Students will be required to find and read data sheets for each of the components that they use in the lab.  All components are current commodity components, and so have data sheets easily found on the web.  Other readings are associated with the lecture course.

5. State the basis on which evaluation of individual students’ achievements in this course will be made by the instructor (e.g., class participation, examinations, papers, projects).

Students will be evaluated on in-lab demonstrations of skills (including functional designs) and on the weekly lab write-ups.

6. List other UCSC courses covering similar material, if known.

CMPE 167/L (sensors and sensing technologies) covers some of the same sensors and design methods, but at a more advanced level.  BME 101L would be excellent preparation for the CMPE 167/L course.

Physics 160 offers a similar level of practical electronics, but focuses on physics applications, rather than on bioengineering applications, and is only offered in alternate years.

7. List expected resource requirements including course support and specialized facilities or equipment for divisional review. (This information must also be reported to the scheduling office each quarter the course is offered.)

The course will need the equipment of a standard analog electronics teaching lab: power supply, multimeter, function generator,  oscilloscope,  computer, and soldering irons. The equipment in Baskin Engineering 150 (commonly used for EE 101L) is ideally suited for this lab. There are 12 stations in the lab, providing a capacity of 24 students since they work in pairs rather than as individuals.  The only things missing from the lab stations are soldering irons and circuit board holders (such as the Panavise Jr.), a cost of about $45 per station.  Given that a cohort of bioengineering students is currently about 35–40 students, two lab sections would have to be offered each year.

In addition, a few special-purpose setups will be needed for some of the labs, but all this equipment has already been constructed for the prototype run of the course.

There are a number of consumable parts used for the labs (integrated circuits, resistors, capacitors, PC boards, wire, and so forth), but these are easily covered by standard School of Engineering lab fees.  The currently approved lab fee is about $131, but may need some adjustment to change exactly what tools and parts are included, particularly if the students are required to buy their own soldering irons (a $20 increase).

The course requires a faculty member (simultaneously teaching the co-requisite Applied Circuits course) and a teaching assistant (for providing help in the labs and for evaluating student lab demonstrations). Because the lab is such a core part of the combined course, it requires faculty presence in the lab, not just coverage by TAs or group tutors.

8. If applicable, justify any pre-requisites or enrollment restrictions proposed for this course. For pre-requisites sponsored by other departments/programs, please provide evidence of consultation.

Students will be required to have single-variable calculus and a physics electricity and magnetism course. Both are standard prerequisites for any circuits course. Most of the labs can be done without calculus, but it is essential for the accompanying lecture course.

9. Proposals for new or revised Disciplinary Communication courses will be considered within the context of the approved DC plan for the relevant major(s). If applicable, please complete and submit the new proposal form (http://reg.ucsc.edu/forms/DC_statement_form.doc or http://reg.ucsc.edu/forms/DC_statement_form.pdf) or the revisions to approved plans form (http://reg.ucsc.edu/forms/DC_approval_revision.doc or http://reg.ucsc.edu/forms/DC_approval_revision.pdf).

This course is not expected to contribute to any major’s disciplinary communication requirement, though students will get extensive writing practice in the design reports (writing between 50 and 100 pages during the quarter).

10. If you are requesting a GE designation for the proposed course, please justify your request making reference to the attached guidelines.

No General Education code is proposed for this course, as all relevant codes will have already been satisfied by the prerequisites.

11. If this is a new course and you requesting a new GE, do you think an old GE designation(s) is also appropriate? (CEP would like to maintain as many old GE offerings as is possible for the time being.)

No General Education code is proposed for this course, as all relevant codes (old or new) will have already been satisfied by the prerequisites.

Next Page »

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

Follow

Get every new post delivered to your Inbox.

Join 251 other followers

%d bloggers like this: