| CARVIEW |
Jonathan Manton's Blog
Archive
Does the Voltage Across an Inductor Immediately Reverse if the Inductor is Suddenly Disconnected?
Consider current flowing from a battery through an inductor then a resistor before returning to the battery again. What happens if the battery is suddenly removed from the circuit? Online browsing suggests that the voltage across the inductor reverses “to maintain current flow” but the explanations for this are either by incomplete analogy or by emphatic assertion. Moreover, one could argue for the opposite conclusion: if an inductor maintains current flow, then since the direction of current determines the direction of the voltage drop, the direction of the voltage drop should remain the same, not change!
To understand precisely what happens, it is important to think in terms of actual electrons. When the battery is connected, there is a stream of electrons being pushed out of the negative terminal of the battery, being pushed through the resistor, being pushed through the inductor then being pulled back into the battery through its positive terminal. The question is what happens if the inductor is ripped from the circuit, thereby disconnecting its ends from the circuit. (The explanation of what happens does not change in any substantial way whether it is the battery or the inductor that is removed.)
The analogy of an inductor is a heavy water wheel. The inductor stores energy in a magnetic field while a water wheel stores energy as rotational kinetic energy. But if we switch off the water supply to a water wheel, and the water wheel keeps turning, what happens? Nothing much! And if we disconnect an inductor, so there is no “circuit” for current to flow in, what can happen?
One trick is to think not of a water wheel but of a (heavy) fan inside a section of pipe. Ripping the inductor out of the circuit corresponds to cutting the piping on either side of the fan and immediately capping the ends of the pipes. This capping mimics the fact that electrons cannot flow past the ends of wires; not taking sparks into consideration. Crucially then, when we disconnect the fan, there is still piping on either side of the fan, and still water left in these pipes.
Consider the water pressure in the capped pipe segments on both sides of the fan. Assume prior to cutting out the fan, water had been flowing from right to left through the fan. (Indeed, when the pump is first switched on, it will cause a pressure difference to build up across the fan. This pressure difference is what causes the fan to start to spin. As the fan spins faster, this pressure difference gets less and (ideally) goes to zero in the limit.) Initially then, there is a higher pressure on the right side of the fan. The fan keeps turning, powered partly by the pressure difference but mainly by its stored rotational kinetic energy. (Think of its blades as being very heavy, therefore not wanting to slow down.) So water gets sucked from the pipe on the right and pushed into the pipe on the left. These pipes are capped, therefore, the pressure on the right decreases while the pressure on the left increases. “Voltage drop” is a difference in pressure, therefore, the “voltage drop” across the “inductor” is changing.
There is no discontinuous change in pressure! The claim that the voltage across an inductor will immediately reverse direction is false!
That said, the pressure difference is changing, and there will come a time when the left pipe will have a higher pressure than the right pipe. Now there are two competing forces: the stored kinetic energy in the fan wants to keep pumping water from right to left, while the larger pressure on the left wants to force water from left to right. The fan will start to slow down and eventually stop, albeit instantaneously. At the very moment the fan stops spinning, there is a much larger pressure on the left than on the right. Therefore, this pressure difference will force the fan to start spinning in the opposite direction!
Under ideal conditions then, the voltage across the inductor will oscillate!
Why should we believe this analogy though? Returning to the electrons, the story goes as follows. Assume an inductor, in a circuit, has a current flowing through it, from left to right. Therefore, electrons are flowing through the inductor from right to left (because Benjamin Franklin had 50% chance of getting the convention of current flow correct). If the inductor is ripped out of the circuit, the magnetic field that had been built up will still “push” electrons through the inductor in an attempt to maintain the same current flow. The density of electrons on the right side of the inductor will therefore decrease, while the density on the left side will therefore increase. Electrons repel each other, so it becomes harder and harder for the inductor to keep pushing electrons from right to left because every electron wants its own space and it is getting more and more crowded on the left side of the inductor. Eventually, the magnetic field has used up all its energy trying to cram as many electrons as possible into the left side of the inductor. The electrons on the left are wanting to get away from each other and are therefore pushing each other over to the right side of the inductor. This “force” induces a voltage drop across the inductor: as electrons want to flow from left to right, we say the left side of the inductor is more negative than the right side. The voltage drop has therefore reversed, but it did not occur immediately, nor will it last forever, because the system will oscillate: as the electrons on the left move to the right, they cause a magnetic field to build up in the inductor, and the process repeats ad infinitum.
Adding to the explanation, we can recognise a build-up of charge as a capacitor. There is always parasitic capacitance because charge can always accumulate in a section of wire. Therefore, there is no such thing as a perfect inductor (for if there were, we could not disconnect it!). Rather, an actual inductor can be modelled by an ideal inductor in parallel with an ideal capacitor. (Technically, there should also be a resistor in series to model the inevitable loss in ordinary inductors.) An inductor and capacitor in parallel form what is known as a resonant “LC” circuit, which, as the name suggests, resonates!
Compiling avr-gcc toolchain from scratch
Follow instructions here but some things needed fixing; summarised below.
Double hyphens: Options below such as –target=avr should be typed with two hyphens at the start. (WordPress converts a double-hyphen to a single but longer one by default.)
Install binutils
- Download latest binutils (e.g. binutils-2.20.1.tar.bz2), untar and cd to top level
- mkdir obj-avr; cd obj-avr
- ../configure –prefix=/usr/local/avr –target=avr –disable-nls –disable-werror
- make
- sudo make install
- Add /usr/local/avr/bin to PATH
Note: On Mac, a warning that stat64 is deprecated is given. The –disable-werror option prevents warnings from being treated as errors.
Install gcc
- Download latest mpfr (e.g. mpfr-3.0.0.tar.bz2) and untar
- Download patches for mpfr (e.g. cumulative patches) and apply
- cd mpfr-3.0.0
- patch -N -Z -p1 < ../allpatches_mpfr_3.0.0.txt
- Download latest mpc (e.g. mpc-0.8.2.tar.gz) and untar
- Download latest gmp (e.g. gmp-5.0.1.tar.bz2) and untar
- Download latest avr architecture patches
- [Without this step, avr-libc will fail to compile]
- I used this patch but I had to add commas manually in the patch file first (because most of the entries in the patch file were missing commas)
- Save the file as “changes.patch.txt”
- Download latest gcc (e.g. gcc-core-4.5.1.tar.bz2), untar and cd to top level
- patch -p0 < ../changes.patch.txt
- Create links to mpc, gmp and mpfr
- ln -s ../gmp-5.0.1 gmp
- ln -s ../mpc-0.8.2 mpc
- ln -s ../mpfr-3.0.0 mpfr
- mkdir obj-avr; cd obj-avr
- ../configure –target=avr –prefix=/usr/local/avr –disable-nls –enable-languages=c –disable-libssp
- make
- This failed with an error message about gmp-impl.h and longlong.h not being found (a known bug) therefore:
- cp ../gmp/gmp-impl.h gmp
- cp ../gmp/longlong.h gmp
- make
- This failed with an error message about gmp-impl.h and longlong.h not being found (a known bug) therefore:
- sudo make install
Note: It appears that gcc would like the mathematics packages gmp, mpc and mpfr so that it can evaluate mathematical expressions at compile time such as initialisation of constants.
Note: Finding the right patch files for gcc was a challenge; there does not seem to be a central place to look. One could try going to the gcc patches mailing list and searching, or alternatively just try google directly.
Install avr-libc
- Download latest avr-libc (e.g. avr-libc-1.7.0.tar.bz2), untar and cd to top level
- mkdir obj-avr; cd obj-avr
- ../configure –prefix=/usr/local/avr –build=`../config.guess` –host=avr
- make
- sudo make install
Note: The script config.guess simply returns the architecture of the computer you are on (e.g. i686-apple-darwin10.4.0 in my case).
Install avrdude
- Download latest avrdude (e.g. avrdude-5.10.tar.gz), untar and cd to top level
- ./configure –prefix=/usr/local/avr
- make
- sudo make install
Pages
Categories
- Education (3)
- Electronics (2)
- Informal Classroom Notes (35)
- Puzzles (1)
- Quotes (1)
- Research (5)
- Software (1)
- Speeches (1)
- Uncategorized (8)
Archives
- November 2020
- May 2020
- December 2018
- October 2018
- August 2018
- August 2017
- August 2016
- October 2015
- February 2015
- August 2014
- July 2014
- December 2013
- October 2013
- June 2013
- February 2013
- December 2012
- September 2012
- August 2012
- July 2012
- June 2012
- October 2011
- November 2010
- August 2010
- July 2010
- June 2010
- August 2009
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |
-
Subscribe
Subscribed
Already have a WordPress.com account? Log in now.