Gas station without pumps

2016 April 30

Sixteenth weight progress report

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

This post is yet another weight progress report, continuing the previous one. I’m doing a little better this month, going above my target range for only 5 days:

Weight is still hovering around the upper end of my self-selected target range.

Weight is still hovering around the upper end of my self-selected target range.

April saw a gradual decrease in weight, followed by a large upward spike at the end of the month.

April saw a gradual decrease in weight, followed by a large upward spike at the end of the month.

The large upward spike corresponded to a 4-day trip to Illinois for a family wedding and a 90th birthday celebration for my dad.  His birthday was months ago, but travel to Colorado in mid-winter is a difficult, so we moved the celebration to the same weekend as his granddaughter’s wedding, so that we could get everyone to come.

My exercise for April was good (averaging 4.72 miles/day bicycling), despite the trip to Illinois and having had a bad cold for the last week (flying with a bad cold is no fun).

2016 April 29

Miswiring errors

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

In yesterday’s post, Revised microphone pre-amp lab too long, I wrote about problems in this week’s lab, and one of the items seems to have resonated with at least one other instructor:

a surprisingly large number connected both nodes for a resistor to the same end of a resistor, leaving the other end unconnected.  I’ve not seen that mistake before, so I don’t know what triggered it.

CCPhysicist commented

I’ve seen that error (connecting two wires to the same end of a resistor) before, more than once, but I also don’t have a clue why they do it. It is worst if the resistors are in a box where they can see the connectors but not the resistors (even when they see the resistor symbol between the connectors), but also happens with loose resistors. Now my students have the excuse that we start doing those labs before we get to DC circuits in lecture, so I assume it means they have no idea that current flows through things and that switches break a circuit, but I have no idea why they get to college without any experience related to the basic concept of electric current. Maybe whatever misconceptions they have about current are stubborn enough to survive a semester of physics.

As for why you got many instances of that error, I’d suspect “authoritative ignorance” syndrome. Others were following someone who talks a good game but doesn’t know the play. Can happen just by one person looking at what another is doing, without any actual bad mentoring taking place.

I don’t think that “authoritative ignorance” was the problem here, as the students making the error were in both sections and they made it in different places in the circuit. I responded with my best guess at what was happening:

My conjecture is that students aren’t using a misconception of current—they aren’t thinking about the function of the resistor at all. They just have the idea “connect up the resistor to A and B”. Having a wire between point A and the resistor and between point B and the resistor satisfies that objective, even though it doesn’t mean anything if the resistor is not between A and B

I discussed this with the class today, and suggested that they change their mental language and think of connecting a resistor between two nodes, rather than to two other components. I also talked about switching their thinking from “components connected by wires” to the dual graph, nodes connected by components, and assigning a color to each node.

Color coding each node makes it much easier to notice incorrect connections (two different colors connected together), though it doesn’t help with noticing missing connections.  For that, I recommend that students check each component to make sure every node is there, and every node to make sure it has the right number of components.

CCPhysicist commented

Perhaps I will work on introducing the concept that labs like most of our circuit labs are about discovering the function of everything we use (meters as well, because they are part of the circuit, and even the wires themselves), and discourage the use of words like “to” instead of “through”. After all, the two wires in your example actually do carry current “to” and “from” the resistor!

I insist in the weekly design reports that students not use “voltage through” or “current across”, but always “voltage across” and “current through” to talk about V and I for a component.  I don’t think that this help much with their understanding, though, as the misunderstandings about voltage always being a difference are still common, and students still routinely apply Ohm’s Law to voltages and currents measured in different places.

Any problem that involves a voltage, a current, and a resistance causes many of them to invoke V=IR, even when the voltage and current are unrelated or related in something other than a simple resistance.  (For example, when chosing a DC bias resistor for an electret microphone, we have a non-linear I-vs-V relationship for the mic, and generally have a voltage drop across the resistor that needs to be added to the voltage drop across the microphone to get the power-supply voltage, but students will take any of the voltages (the mic voltage, the voltage across the resistor, or the power-supply voltage) to get the resistance of the bias resistor, when only one of the voltages is appropriate.

My labs are not about “discovering the function of everything we use”, but about learning how to design circuits with imperfect parts. (That’s one difference between a physics lab and an engineering lab.) I’m trying to give the students tool skills: both mental tools and physical tools.  The notion of having multiple models for something and using the simplest one you can get away with is one of the skills I’m trying to get them to develop.  The extremely simple models used in intro physics courses are often not good enough for practical use and developing better models from first principles is too hard, so we do a lot of measuring and empirical fitting.  (The loudspeaker modeling lab is a good example, where we go through 4 different models of the loudspeaker: R, L+R, L+R+RLC, semi-inductor+R+RLC.  Sometimes the simple model of the loudspeaker as being 4Ω is adequate, and sometimes we’ll use the full complexity of the non-linear model.)

There are a lot of learning experiences that are generally unavailable with simulations (like the problem of measuring voltages in voltage dividers made of 4.7MΩ resistors when your meter has a 10MΩ input impedance, or the problem of clipping when using high gain in an op amp, because of input voltage offset errors).  Students are much more likely to remember to design around input offset voltages if they have observed an unexpected output voltage offset and tried to figure out what caused it, than if they are simply guided to do designs that have low gain without knowing why (or allowed to do large-gain designs without realizing that they wouldn’t work reliably, as I have often done myself, even though I theoretically know better).

 

2016 April 28

Revised microphone pre-amp lab too long

Filed under: Circuits course — gasstationwithoutpumps @ 23:47
Tags: , , ,

How many of my posts have the theme “lab too long”? (answer: too many)

I spent 10 hours in the instructional lab on Tuesday and 11 hours today (Thursday) helping students do the microphone pre-amp lab, and my group tutor is going to have to open the lab on Sunday for several students to finish soldering and testing their boards.

This means that the lab is between 1.5–2× longer than it should be.  You’d think that I would be able to predict the length of a lab better by my fourth year of teaching this course!

What went wrong, and how can I fix it for next year?

  • The design is somewhat harder for the first op-amp lab than in previous years, because I made a decision to do all the op-amp labs this year with a single power supply, not dual supplies.  That makes for a slightly more difficult start, but students don’t have to make the transition from dual supplies (which are getting quite rare these days) to single supplies. The transition is a surprisingly hard one for students to make, as the simplification that they learned for the case when the reference voltage is zero no longer apply, and they have to learn everything over again.  Learning the more general form first will, I believe, result in less confusion in the long run, but it does make for a slightly more complex first project.
  • This year I’m having students solder their pre-amp boards, so that they can re-use them as part of their class-D power amplifier in three weeks.  This was a deliberate choice, to reduce the amount of effort in the class-D lab, which was running too long in previous years, but it roughly doubled the time it took students to finish the lab.
  • Because students had larger ceramic capacitors this year, and I had them set the high-pass cutoff frequency near their speaker resonances, some students opted to use very large capacitors and small resistors for their high-pass filters. This made a very small impedance in the passband, and attenuated the signal from the microphone and its large-impedance biasing resistor.
    I’ll have to put a warning in the book about the high-pass filter needing to have a larger impedance than the bias resistor, to avoid changing the current-to-voltage conversion.
  • Some students had the opposite problem, putting a small capacitor with a very large resistor, so that there was a very high impedance signal driving the input to the amplifier. Since we are using op amps with tiny bias currents, this is not a problem for the circuit’s functioning, but it made looking at the signals with the oscilloscope difficult—increasing the difficulty of debugging.
  • Many students were surprised to see that the output voltage was not centered at their Vref voltage.  This provided a teaching moment for looking at the MCP6004 data sheet and explaining the notion of the input offset voltage. Because they were using gains of 100×–300×, the ±4.5mV offset became an output offset of ±0.45V–1.35V, sometimes resulting in serious clipping.  I need to warn students about that imperfection of op amps before they do the design.  A better design would use a multi-stage amplifier, with high-pass filters between stages to get rid of accumulated DC offset.
  • I suggested to several students that they look at Vout vs. Vin, by recording a slow sine wave (say 300Hz) at 5kHz sampling with PteroDAQ.  This turned out to have some interesting effects when students used 32× averaging, because the time delay between the two channels was enough to get the signals far enough out of phase to open up the plot into an ellipse. Again, I’ll need to talk about that in class tomorrow.
  • Lots of students made the mistake of incorrectly applying Ohm’s Law and getting too large a bias resistor, so that their microphones were not in saturation at the power-supply voltage of 3.3V.  Luckily, increasing the voltage to 5V (as we will do in the power-amp lab) will rescue their designs.
  • Lots of students made the standard mistakes of skipping a wire or two, or putting a wire in the wrong hole while soldering, but a surprisingly large number connected both nodes for a resistor to the same end of a resistor, leaving the other end unconnected.  I’ve not seen that mistake before, so I don’t know what triggered it.
  • The lead-free solder we have to work with this year (99.3% Sn, 0.7% Cu) is a pain to work with—it doesn’t tin the soldering irons well, and it is difficult to remove from the boards in the event of a mistake.

I think that the soldering lab should not be the first op-amp lab, but I still like the idea of the students having to solder up their microphone preamps. So I’ll have to do a major reorganization of the book this summer, to move a different lab into the first position.

Currently, I’m thinking that the transimpedance amplifier and pulse monitor lab would be a good choice as the first op-amp lab.  It would be a bit unusual to start with a transimpedance amplifier rather than a standard voltage amplifier, but the transimpedance amplifier is actually conceptually simpler.  Unfortunately, the pulse monitor using a transimpedance amplifier really needs to be 2 stages, with a transimpedance amplifier to bias the phototransistor, a high-pass filter, and an AC gain stage.  (Yes, I know I’ve posted about pulse monitors without amplifiers, but a major point of the lab is to teach about transimpedance amplifiers.)

The corner frequencies for the pulse monitor are really low, requiring big resistors even with their biggest capacitors, so the “too small a resistor” problem goes away, though not the “too big a resistor” problem.

By making the microphone preamp the second, or even third, op amp lab, students will spend less time on getting a breadboarded design working, and more time on learning to lay out and solder their circuits. They’ll also be much more amenable to a 2-stage design, to reduce the output offset voltage.  I think that rearranging the labs may be worth the effort it will take to rewrite the corresponding chapters of the book, but undoubtedly something else will go wrong next year, and I’ll have to do yet another major revision.

Ah well, at least I’ve gotten the demo for tomorrow’s class (blood and breath pressure) working tonight, and I’ll be able to get to bed before midnight.

2016 April 20

AliExpress guarantee is bogus

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

I have bought a number of things (mainly electronics) direct from China using AliExpress.  I was encouraged to do so by their “Buyer Protection”:

Full Refund if you don’t receive your order

You will get a full refund if your order does not arrive within the delivery time promised by the seller.

[http://activities.aliexpress.com/adcms/www-aliexpress-com/buyerprotection/index.php]

I have twice now needed to invoke that guarantee—both times items shipped by China Post that did not arrive.  I don’t know whether the problem is that shippers weren’t sending stuff, or stuff was getting “lost” in China Post.

The first time was a small order, and AliExpress followed through on their guarantee.

The second time was a larger order for my class (about $150 worth of resistor assortments), and the shipper sent me a tracking number that indicated that the shipment had been sent to Russia.  I opened the dispute with AliExpress after waiting a month for the delivery, and after a long wait they denied the claim saying that they were satisfied with the evidence.  I escalated the dispute, and the escalation was denied—in the denial I was sent a different tracking number claiming that the delivery had been made 2 months earlier.

I was not informed of messages from the seller, only of final decisions by AliExpress (for instance, the “corrected” tracking number was supposedly entered into the AliExpress system on 11 April, but I didn’t get informed of it until 20 April, when AliExpress denied my escalated claim).

The tracking claims that delivery was attempted on Feb 27 at 1:16pm and made on Feb 29, at 5:32pm.  I was home both times and no such delivery was made.  (Also our mailman never gets to our part of the route by early afternoon, and rarely even by 5:32pm—I believe that the tracking is fraudulent, which leads me to suspect China Post, rather than the shipper.)

Bottom-line:  the AliExpress guarantee is not worth much if no delivery is made.  In future, I will not order from AliExpress except when either

  • the item is so cheap I don’t really care if it isn’t delivered (there seems to be about a 20% risk).
  • the item is expensive enough that I’m willing to pay for a reliable delivery service like DHL rather than the free shipping through China Post.

Update 2016 June 9: AliExpress did refund the money for the undelivered goods—it took a while, and the process was murky, but I retract what I said earlier about their not standing behind their guarantee. I will still be using them only when I’m either willing to risk non-delivery or willing to pay a lot for delivery, as I still have no confidence in China Post, and I don’t want to go through the process of asking for refunds that take 3 months to receive.

2016 April 16

Santa Cruz Mini Maker Faire went well

The first Santa Cruz Mini Maker Faire seemed to go well.  I did not get to see much of it, since I was busy at my booth most of the day, though I did get a break for lunch while my assistant Henry manned the booth, and I made a quick tour of the exhibits during that break, to see what was there, though with no time to chat with other exhibitors.

I understand that about 1800 people bought tickets to the Mini Maker Faire, which probably means there were over 2000 people on-site, including volunteers and makers.  I hope the food vendors did OK—I ate at the Ate3One truck, since I never have before, but my opinion afterwards was that CruzNGourmet and Zameen have better food (both of those trucks are frequently on campus, and I’ve eat at each several times).

My day went pretty well, though I had one annoying problem, having to do with my pulse monitor display. When I set up the booth Friday evening, the pulse monitor was not working, and I thought that the phototransistor had somehow been broken in the rough ride in the bike trailer, so I brought the pulse monitor home, replaced the phototransistor and tested in thoroughly.  Everything worked great, so I packed it more carefully for transport in the morning.

When I got everything set up Saturday morning, I found I had no electricity, though the electricity had worked fine the night before.  After I finally tracked down a staff member with the authority to do anything about it, he suggested unplugging the other stuff plugged in and switching outlets.  I turned out that the only problem was that the outlets were so old and worn out that they no longer gripped plugs properly—taping the extension cord to the outlet box so that the weight of the cord didn’t pull out the plug fixed the power problem.

Once I had power, I tested the pulse monitor, and it failed again!  I used the oscilloscope to debug the problem, and found that the first stage transimpedance amplifier was saturating—there was too much light in the room, and even shading the pulse monitor didn’t help. By then, my assistant for the day (and my group tutor for the class on campus), Henry, had arrived and gotten the parking permit on his car, so I raced home on my bike to get resistors, capacitors, op amp chips, multimeters, hookup wire,and clip leads to try to rebuild the pulse monitor from scratch on the bread board.

When I got back to Gateway School, I tried a simple fix before rebuilding everything—I added a pair of clip leads to the board so that I could add a smaller resistor in parallel with the feedback resistor in the transimpedance amplifier, reducing the gain by a factor of about 30.  This reduced gain kept the first stage from saturating, and the pulse monitor worked fine.  Rather than rebuild the amplifier, I just left the pair of clip leads and the resistor in place all day—they caused no problem despite many people trying out the pulse monitor.

I think that I want to redesign the pulse monitor with a logarithmic first stage, so that it will be insensitive to ambient light over several decades of light.  That should be an easy fix, but I’ll have to test it to make sure it works. I don’t think I’ll have time this weekend or next to do that, but I’ll add it to my to-do list.

I’ll need to think about whether to include having a logarithmic response in the textbook—that is certainly more advanced than what I currently include (just a transimpedance amplifier), which is already pushing students a bit.  A transimpedance amplifier is a pretty common component in bioelectronics, so I really want to leave one in the course.  I’m not sure a logarithmic amplifier is important enough or simple enough to include at this level (I don’t currently cover the non-linearity of diodes).

 

Here is the booth display with my assistant, Henry. I was permitted to use painter's tape to attach the banner to the whiteboard.

Here is the booth display with my assistant, Henry. I was permitted to use painter’s tape to attach the banner to the whiteboard.

The magenta laptop on right (which my family refers to as the “Barbie laptop”) was a used Windows laptop that I bought for testing out PteroDAQ installation on Windows. It was set up with PteroDAQ running all day, recording a voltage from a pressure sensor and a frequency from a hysteresis oscillator (as a capacitance touch center).

Just to the left of that was a fairly bright stroboscope, using 20 of my constant-current LED boards. To its left is my laptop, displaying the current draft of my book. Behind (and above) the laptop is my desk lamp, which uses the same electronic hardware as the stroboscope, though with only 6 LED boards, not 20.

In front of the laptop is the pulse monitor, which includes a TFT display in an improvised foamcore stand. I used just a half block for the pulse sensor, relying on ambient light (sunlight and the desk lamp) for illuminating the finger.

To the left of the pulse monitor was a stack of business cards for my book and sheets of paper with my email address and URLs for this blog and the book.  I should have included the PteroDAQ URL as well, but I had forgotten to do so. I did tell a lot of people how to find PteroDAQ from the navigation bar of my blog, but putting it on the handout would have been better. Ah well, something to fix next year (if Gateway is crazy enough to do another Mini Maker Faire, which I hope they are).

I also had all my bare PC boards that I had designed and not populated, plus my two Hexmotor H-bridge boards, behind the business cards. One of the amplifier prototyping boards was displaying in the Panavise that I use for soldering.

On the far left of the table is my Kikusui oscilloscope and two function generators, set up to generate Lissajous figures.  I let kids play with the frequencies of the function generators, take their pulse with the pulse monitor, and play with the pressure sensor and the capacitive touch sensor.

My booth was not the most popular of the Faire by any means (certainly the R2 Makers Club in the next booth was more popular), but I was kept busy all day and I talked with a lot of people who seemed genuinely interested in what I was doing, both with the UCSC course and as a hobbyist.

Next Page »

%d bloggers like this: