Archive for category Electronics Workbench
Whiteboards from the SqWr Electronics Session 5, covering transistors as switches …
Reviewing I vs V plots, starting with a resistor and then a transistor as a current amplifier:
Reminder of why you can’t run a transistor at its maximum voltage and current at the same time:
A resistor load line, with power calculation at the switch on and off coordinates:
Detail of the power calculations, along with a diagram of the current and voltage when you actually switch the poor thing:
Oversimplification: most of the power happens in the middle, but as long as the switching frequency isn’t too high, it’s all good.
Schematic of the simplest possible switched LED circuit, along with a familiar mechanical switch equivalent:
We started with the “mechanical switch” to verify the connections:
Building the circuitry wasn’t too difficult, but covering the function generator and oscilloscope hookup took far more time than I expected.
My old analog Tek 2215 scope was a crowd-pleaser; there’s something visceral about watching a live CRT display you just don’t get from the annotated display on an LCD panel.
I’d planned to introduce capacitors, but just the cap show-n-tell went well into overtime. We’ll get into those in Session 6, plus exploring RC circuitry with function generators and oscilloscopes.
This compact fluorescent lamp seems to have survived nearly two decades of use in a desk lamp:
It had plenty of starts, although maybe not so many total hours, as the other CFLs you’ll find mentioned around here.
I swapped in a similar CFL and we’ll see what happens.
A discarded 20 W halogen desk lamp arrived in the Basement Laboratory for rebuilding:
An incandescent bulb doesn’t care about AC or DC, so a simple transformer also serves as a counterweight in the base:
I might replace it with some steel sheets, although I have no immediate need for a bare transformer.
A case adds 19¢ to each 10 W 300 mA LED driver:
Nice strain relief on those line-voltage wires, eh?
A simple test setup with three 3 W COB LED panels:
I clamped them to the aluminum sheet for heatsinking before I lit ’em up. The circles traced directly from the lamp’s hardware give some idea of the eventual layout.
I have more-intense LEDs, but spreading the light over a larger area should work better for the intended purpose. These are pleasant warm-white LEDs, too.
The fourth LED raised the forward voltage beyond the supply’s 42 V maximum, causing the supply to blink on and off.
Much to my surprise, the driver has plenty of 60 Hz ripple:
The top trace averages 280 mA and the bottom trace 32 V, so the LEDs run at 9 W = 3 W apiece, as they should.
Now, for some metalworking …
The clamp holding the magnifying lamp (with a fluorescent ring light!) over the Basement Laboratory Desk finally fractured:
Gorilla Tape held the broken parts together well enough to determine how it used to work:
The two parts used to be 11.2 mm thick, but it fit on a random chunk of half-inch aluminium plate so perfectly as to constitute a Good Omen:
I decided the saw kerf would make up the difference, because, sheesh, we’re talking pot metal here.
Lay out the center, use a transfer punch the same diameter as the lamp pivot to get the proper spacing, give it a whack:
The alert reader will note I came that close to drilling the hole through the wrong side of the angle.
And, yes, extrapolating the vertical edge downward suggests the large hole-to-be will intersect the small hole-in-being. This is deliberate: the clamp screw through the smaller hole fits into a recess around the lamp pivot shaft to keep it from sliding to-and-fro. I had to convince myself, but it really did work out OK.
Pay some attention to clamping it at right angles to the spindle so the big hole goes through more-or-less in the right direction:
The masking tape serves as a depth reminder:
Set it up in a machinist’s clamp, bandsaw in twain, file the kerf reasonably flat, clamp the halves together, then bandsaw the clearance slot:
The clearance kerf wasn’t nearly as on-center as I wanted, which doesn’t really matter, but I filed a bit more diligently on the shallow side while clearing up the slot:
Introducing the new parts to Mr Disk Sander roundified them enough to pass inspection. These angular bits obviously require a bit more attention to detail:
The lamp originally had a fancy knob on the screw which never worked particularly well, so I replaced it with a nylon locking nut to maintain a reasonable amount of pressure:
The far end of the screw has a square shaft fitting into a square hole in the lamp arm, making it easy to torque the nut enough to make the pivot grip the shaft properly; if I ever find my Belleville washer stash again, I’ll add one. I should cut the screw off, too, but that’s definitely in the nature of fine tuning.
A pleasant morning of Quality Shop Time!
The obligatory doodle with dimensions, some of which turned out to be completely incorrect:
Three years ago I found a bulgy electrolytic cap inside a failed HP w2408 monitor:
Back then, a 150 µF 450 V cap of the proper size (the 30 mm height being critical) was difficult to find and relatively expensive to purchase in onesies from the usual reliable sources, particularly as the repair advice I could find suggested it probably wasn’t the causing the monitor’s problems. So the monitor sat in pieces in an out-of-the-way corner of the Basement Laboratory while other events transpired.
As part of a long-delayed Great Cleanup of Small Projects, I discovered the caps are now four bucks delivered from halfway around the planet, so I got one, did the swap, reassembled the pieces, and the monitor works just like new. No pix, but you get the general idea.
For another few years, anyway.
For whatever reason, the 3.5 mm audio output seems dead. The monitor has a pair of teeny speakers that don’t do justice to its magnificent HDMI audio, but they’re entirely adequate for my simple needs: pre-SSH Raspberry Pi setup doesn’t call for much.
A recent Squidwrench meeting produced a treasure trove of discarded LED lighting, including a shoplight-style fixture in a narrow, finned aluminum extrusion. It was in “known-bad” condition, so I extracted the four LED panels, connected each one to a widowmaker cord, and determined I had two good ones, a mostly working one sporting some dead LEDs, and a corpse.
The working panels showed the power supplies produced about 19 V across two parallel strings of six LEDs, with each string running at 350 mA for a total of 700 mA = 13 W. I wired up a quartet of 6 Ω power resistors to check out the power supplies from the suspect panels:
The supply in the background is truly dead. I can’t tell whether it killed the LEDs or the gaggle of failing LEDs dragged it down with them.
Some multimeter probing revealed enough live LEDs to restore the partially working panel. A rather sweaty interlude at the SqWr hot-air rework station transplanted the good LEDs, whereupon combining it with the live supply gave me a third fully functional panel:
I did the test firing in the Basement Laboratory, because I’m nowhere near crazy enough to deploy a widowmaker line cord on the SqWr Operating Table in public.
I bandsawed the last working LED from the gutted donor panel:
The SMD LEDs mount on traces applied to and electrically insulated from the aluminum sheet, so unsoldering them required way more heat than you (well, I) might expect at first glance. A snap-on condenser lens over each LED concentrates the light into a nice cone, producing a narrow sheet of light from each panel.
The elaborate aluminum extrusion seems much too heavy for the individual panels, but those open-frame supplies definitely need more than casual protection. Now that LEDs are more common than when these panels came off the assembly line, I should probably replace the supplies with enclosed constant-current drivers and be done with it.
Topics for today’s Squidwrench Electronics Workshop: Session 5 in a continuing series.
Having discussed transistors as current-controlled current sources, we can now
select one as a victim use one as a switch, then add capacitors to learn about exponential charging, and introduce the oscilloscope as a vital tool.
So, we proceed:
Transistors as switches
Review graphical parameters
- saturation voltage for high Ic
- cutoff voltage for near-zero Ic
- resistive load line: VR = Vcc – Vc
- power dissipation hyperbola (at all Vc)
- secondary breakdown limit (at higher Vc)
Something like this, only drawn much larger and with actual numbers:
Reminder of linear vs. log scales converting hyperbolas into straight lines.
NPN transistor as “to ground” switch
- where to measure device voltages?
- passing mention of flyback diodes
- IB needed for saturation?
- Darlington transistors: beta multiplier, VBE adder
Without the LED, you get nice square waves:
An ancient green LED reduces Vc by a little over a volt:
Discuss PNP transistor as “from supply” switch
- why VCC must not exceed controller VDD
- kill microcontroller and logic gates
Wire up pulse gen to transistor
- function generator for base drive voltage
- collector resistor (then LED) as output
- how do you know what it’s doing?
- add oscilloscope to show voltages
- explanation of scope functions!
Capacitor as charge-storage devices
Useful ideas and equations
- C = Q/V
- so C = ΔQ/ΔV
- therefore i = C * Δv/Δt
- energy = 1/2 * C * V²
Charging capacitor from a voltage source through a resistor
- Exponential waveform: e^t/τ
- time constant τ=RC
- show 3τ = 5%
- and 5τ < 1%
Add cap to transistor switch with R to soften discharge path
- charge vs discharge paths
- calculate time constants
- wire it up
- verify with oscilloscope
The circuit will look like this:
Discussion of parts tolerance: 100 nF caps are really 78 nF
With one cap:
Add another cap for twice the time constant:
Let the scope calculate 10-90% rise time:
- rise time = 2.2 τ (compare with calculations!)
- rise time = 0.34/BW
Do it on hard mode with the old Tek scope for pedagogic purposes.
That should soak up the better part of four hours!