Gas station without pumps

2024 April 8

World Scientific is marketing my book

Filed under: Circuits course — gasstationwithoutpumps @ 21:32
Tags: , , , , ,

World Scientific Publishing is marketing my book.  They have put out a flyer for several of their electronics books (https://www.worldscientific.com/pb-assets/wspc-site/catalogue-pdf/Electrical-Electronics-Engineering2024-25-1705395593457.pdf), and my book is the first one on the flyer!

Of course, they don’t mention that the PDF for the book is also available on LeanPub for only $7.99 (https://leanpub.com/applied_analog_electronics), but I wouldn’t expect them to.

2020 November 24

Black Friday—Cyber Monday sale

Filed under: Uncategorized — gasstationwithoutpumps @ 20:44
Tags: , ,

I have decided to put my book on sale for the traditional American sale season, but I’m too lazy to remember to synchronize to midnight Thursday night.  So I’ve reduced the minimum price from $8 to $6 (well, from $7.99 to $5.99) starting now, and I’ll raise it back up in about a week.

No coupon needed: just go to https://leanpub.com/applied_analog_electronics and pick the price you want to pay.

2018 December 16

I may be self-publishing forever

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

Sigh, just as I’m finishing my textbook, I find out that publishers don’t want new textbooks. I did have one feeler from Springer, whose book prices are high and royalties low, and they wanted me to provide camera-ready copy. What were they going to do as publishers, other than keep almost all the money?

I have been self-publishing drafts of the text book in PDF format through LeanPub. I can sell the text for about $10 and make more money per book than if a publisher sold it for $80.  I have a new version that I tried to put up on LeanPub last Thursday, but I ran into a problem on their web site in changing the URL, and I’m waiting for them to fix it.  They were able to reproduce the problem and have told me that fixing it is a high priority, so I’ll probably be able to release the new version early this week (maybe 2018 Dec 17 or 18).

My big problem for the textbook is marketing (whether self-publishing or through traditional publishers)—how do textbook authors get other instructors aware of their book and willing to try it in a course?  Because my book takes a somewhat different approach to teaching electronics than the standard university course (which does about a year of applied math and circuits before doing any design), it isn’t a direct replacement for existing texts, but requires some redesign of curriculum.  That makes it an even harder sell, though I think that my design-early approach to teaching engineering is more in line with pedagogical research.

2017 January 7

Book draft 2017 Jan 7

Filed under: Circuits course — gasstationwithoutpumps @ 17:03
Tags: , , ,

I’ll be releasing an updated version of the Applied Electronics for Bioengineers text on LeanPub today.  I’ll probably raise the minimum price next week, to reflect the improved quality, but I’ll give people a few days to get the book at the old price.  (Remember that the LeanPub model allows you to get all future editions of the book free, as long as I continue publishing through them, so there is no reason to wait until a new edition comes out.)

I’ll list the changes in two sections: changes that were made since the October 2016 release, then changes that were made in the Oct 2016 release (because I don’t seem to have posted those to the blog).

Changes since October 2016

  • Fleshed out assignment schedule and moved to Preface.
  • Rearranged several of the early chapters (without significant content change) for better ordering of assignments.
  • Added mention of Analog Discovery 2 to oscilloscope chapter, replaced some Bitscope traces with Analog Discovery~2 traces.
  • Added bonus frequency response activity to pressure sensor lab.
  • Added Lego-brick pictures for the optical-pulse-monitor lab.
  • Revised all chapters and labs from the microphone chapter to the EKG lab (the second half of the course).  Many of the changes were minor revisions (typo fixes, indexing, changing to numbered exercises, spell check).
  • Added exercises to the microphone chapter and moved some exercises from the microphone lab to the microphone chapter.
  • Moved some of the oscilloscope introduction from the microphone lab to the sampling lab.
  • Rewrote DC analysis of microphone to use function generator, rather than potentiometer, for variable voltage.
  • Added R+L figure to loudspeaker chapter, rather than referring to impedance chapter.
  • Moved inductor description to new chapter just before loudspeakers.
  • Added RMS power exercise and R-L plot exercise to loudspeaker chapter.
  • Moved some intro amplifier material from preamplifier lab to pressure-sensor lab, reflecting change in order of labs.
  • Moved some instructions about color coding wiring from preamplifier to an earlier lab.
  • Added mention of using earbuds instead of loudspeakers for preamplifier lab.
  • Redid Miller plateau oscilloscope trace using Analog Discovery 2, using smaller gate resistor to get higher speed.
  • Added cross-section of a power nFET (still needs to be redrawn)
  • Fixed clipping on several schematics (the Vdd power symbol gets clipped if at the top of the schematic—a known bug in SchemeIt).
  • Put inductive load in the single-nFET driver schematic, including flyback diode.
  • Added explanation of why the crude model for computing slew rate is so far off.
  • Removed most references to obsolete AOI514 nFETs (using NTD4858N nFETs instead).  This required gathering new data to characterize the transistors.
  • Redid the section on open-collector outputs for LM2903 comparators.
  • Added table of conductivity for NaCl solutions.
  • Added section on 4-electrode conductivity measurements.
  • Moved information about nulling ohmmeters when measuring resistance from electrode lab to loudspeaker lab.
  • Reiterated some of the EKG safety info in the EKG lab.

Changes between April 2016 and October 2016

  • Added more background to first chapter (logarithms, picture of complex plane) and started chapter numbering at 1 instead of 0.
  • Rearranged chapters for new lab order, with all the audio labs after the pressure sensor and optical pulse monitor.
  • Updated information on using lead-free solder.
  • Added a generic block diagram to lab report guidelines, and added definition of “port” to the block diagram discussion.
  • Added subsection on Thévenin equivalent of voltage divider.
  • Added section on series and parallel connections to resistance chapter, to reflect lower prerequisite expectations of course.
  • Moved some gnuplot exercises into thermistor lab from sampling and aliasing, to reflect new lab order, also moved PteroDAQ installation instructions.
  • Added picture of metal thermometer to thermistor lab.
  • Added voltmeter connection schematic to DAQ chapter.
  • Moved details of PteroDAQ out of DAQ chapter to separate appendix.
  • Added potentiometer schematic and photo to resistance chapter.
  • Split data acquisition from sampling and aliasing into separate chapters.
  • Improved figure showing aliasing and Nyquist frequency.
  • Added pictures for wire stripping and flying resistors to sampling lab.
  • Added scaffolding for oscilloscope probe exercise.
  • Hysteresis measurement changed to use function generator.
  • Moved multi-stage amplifier discussion to beginning of amplifier chapter and beefed it up.
  • Added introduction to differential amplifiers before instrumentation amps and op amps.
  • Added pH meter block diagram to beginning of amplifier chapter.
  • Moved discussion of clipping to the end of the instrumentation amplifier section.
  • Added active low-pass filters to amplifier chapter.
  • Added chapter on transimpedance amplifiers with section on log-transimpedance amplifiers and rewrote pulse-monitor lab to use logarithmic current-to-voltage conversion.
  • Added discussion of absorbance of melanin, fat, and water to blood section.
  • Moved the instrumentation amplifier internals to new chapter, before the EKG chapter.
  • Simplified the sensitivity calculation for LEDs and phototransistors, making the exercise more productive.
  • Added text to caption of microphone preamp photo.
  • Moved loudness section from the amplifier chapter to the microphone chapter.
  • Added notes at end of loudspeaker lab to improve student reporting of models.
  • Added more safety information to EKG chapter
  • Made all exercises be numbered, and changed most of the prelab questions into numbered exercises.
  • Added equipment-needed lists to the beginning of each lab.
  • Redrew several block diagrams using draw.io, and added captions to several figures to indicate what drawing tool was used.
  • Changed caption formatting to be more distinctly different from body text.
  • Cleaned up several schematics.

2016 October 16

Lagrangian mechanics for linear electronics

Filed under: Uncategorized — gasstationwithoutpumps @ 13:27
Tags: , ,

This post is a continuation of Having trouble learning Lagrangian mechanics, looking at electronic systems rather than mechanical ones.  Again, this is not intended as a tutorial but a dump of my understanding, to clarify it in my own head, and to get corrections or suggestions from my readers, many of whom are far better at physics than me.

For electronics, I’ll use charge q as my coordinate, with current $i = \dot q$ as its derivative with respect to time.  In all but the simplest circuits, there will be multiple charges or currents involved, which I’ll distinguish with subscripts.

Some notation:

  • \mathcal{L} is the difference between kinetic and potential energy of the system.  The potential energy will be the energy stored in capacitors, \frac{q^2}{2C}, and the kinetic energy the energy in the inductors, L\dot q^2/2.  (Note: that is only self-inductance.  If we have mutual inductance L_{12} between two inductors, we need to use L_{12}\dot q_1\dot q_2 /2 for the kinetic energy—I’m a bit confused by that, as we could have negative kinetic energy.  I rarely use inductors or transformers in my electronics, so I’ve not had to work out my confusion yet.)
  • \mathcal{P} is the power dissipated by the resistors in the system: R{\dot q}^2/2.
  • \mathcal{F} is the vector input to the system needed to make the energy balance work out.  By using charge for each coordinate, the units here will be volts.

With this notation, the basic formula is

\frac{d}{dt}\frac{\partial \mathcal{L}}{\partial \dot q} - \frac{\partial \mathcal{L}}{\partial q} + \frac{\partial \mathcal{P}}{\partial \dot q} = F_{q}~.

Let’s check the units:

  • Potential energy: \frac{\partial}{\partial q} \left(\frac{q^2}{2C}\right)= \frac{q}{C}, which is indeed volts.
  • Kinetic energy: \frac{d}{dt}\frac{\partial  L\dot q^2/2}{\partial \dot q} = L\ddot q, which is also volts.
  • Dissipated power:\frac{\partial R{\dot q}^2/2}{\partial \dot q} = R \dot q, which is again volts (Ohm’s Law).

Now all we need to do is to figure out which q_i or \dot q_i has to be associated with each component of the system, and what voltages the \mathcal{F}_i correspond to.  I think that will be easiest if I have some specific circuits to work with.  Let’s start with a very simple one:

Simple RLC series circuit with a voltage source.

Simple RLC series circuit with a voltage source.

We can use a single coordinate, the charge on the capacitor, q_1, so that the current flow \dot q_1 is clockwise in the schematic. We get the Lagrangian \mathcal{L} = L_1{\dot q_1}^2/2 - \frac{{q_1}^2}{2C_1}~. The power dissipation is \mathcal{P}=R_1{\dot q_1}^2/2, and taking the derivatives gives us \mathcal{F}_1 = L_1 \ddot q_1 + R_1 \dot q_1 + q_1/C, which is the voltage for the voltage source.

For electronics modeling, we often want to look at the ratio of two different voltages in a system, for example, the output of a filter relative to the input to a filter. How do we set that up? Let’s look at a very simple low-pass RC filter:

The upper schematic shows the normal way to represent the low-pass filter. The lower schematic shows it with a voltage source and a voltmeter, with two loops (one of which has no current).

The upper schematic shows the normal way to represent the low-pass filter. The lower schematic shows it with a voltage source and a voltmeter, with two loops (one of which has no current).

The potential energy is just \frac{(q_1+q_2)^2}{2C}, there is no kinetic energy (no inductors), and the dissipation is R{\dot q_1}^2/2. Taking the derivatives of the Lagrangian gives us
\mathcal{F}_1 = \frac{q_1 + q_2}{C} + R \dot q_1 and
\mathcal{F}_2 = \frac{q_1 + q_2}{C}.
In other words, we get the voltage at the voltage source and the voltage at the voltmeter. If we want to do anything with these equations, we need to recognize that the q_2 and \dot q_2 terms are 0 (modeling the voltmeter as a perfect infinite impedance), giving us the usual formulas for the input and output voltage, in terms of the charge on the capacitor: v_{in} = \frac{q_1}{C} + R \dot q_1 and v_{out} = \frac{q_1}{C}.

If we take Laplace transforms, we get V_{in} = Q_1/C + RsQ_1 and V_{out}= Q_1/C, which gives us the transfer function \frac{V_{out}}{V_{in}} = \frac{1}{RCs + 1}, as expected.  (Plug in s=j\omega to get the usual format in terms of angular frequency.)

I could do another, more complicated example, but I think that the idea is clear (to me):

  • Make a charge (and current) coordinate for each current loop in the circuit—including a dummy loop with current 0 wherever you want to measure the voltage.
  • Set up the Lagrangian by adding terms for each inductor (kinetic energy) and subtracting terms for each capacitor (potential energy), and set up the power-dissipation functions by adding terms for each resistor.
  • Take the appropriate derivatives to get the voltages.
  • If needed, eliminate charge terms by using more easily measured voltage terms.

I don’t find this process any simpler than using complex impedances and the usual Kirchhoff laws, but it isn’t much more complicated.  It may be easier to use the Lagrangian formulation than setting up the equations directly when there are mutual inductances to deal with—I’ll have to think about that some more.

Of course, the big advantage I’ve been told about for Lagrangian mechanics is in electromechanical systems, where you model the mechanical part as in Having trouble learning Lagrangian mechanics and the electronic part as in this post, with only a conservative coupling network added to combine the two. It is in setting up the coupling network that I get confused when trying to model electromechanical systems, and I’ll leave that confusion for a later post.

Next Page »