Ed Nisley's Blog: Shop notes, electronics, firmware, machinery, 3D printing, laser cuttery, and curiosities. Contents: 100% human thinking, 0% AI slop.
A discarded 20 W halogen desk lamp arrived in the Basement Laboratory for rebuilding:
Halogen Desk Lamp – head layout
An incandescent bulb doesn’t care about AC or DC, so a simple transformer also serves as a counterweight in the base:
Halogen Desk Lamp – 12 V 20 W transformer
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:
Halogen Desk Lamp – 10 W LED driver innards
Nice strain relief on those line-voltage wires, eh?
A simple test setup with three 3 W COB LED panels:
Halogen Desk Lamp – 3x3W COB LED test
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:
COB LED 3x3W – 10 W driver – 100 mA-div 10 V-div
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.
The clamp holding the magnifying lamp (with a fluorescent ring light!) over the Basement Laboratory Desk finally fractured:
Magnifying Lamp Pivot – broken parts
Gorilla Tape held the broken parts together well enough to determine how it used to work:
Magnifying Lamp Pivot – hole sizing
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:
Magnifying Lamp Pivot – stock layout
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:
Magnifying Lamp Pivot – hole marking
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:
Magnifying Lamp Pivot – drill press alignment
The masking tape serves as a depth reminder:
Magnifying Lamp Pivot – drilling
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:
Magnifying Lamp Pivot – 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:
Magnifying Lamp Pivot – clearance filing
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:
Magnifying Lamp Pivot – parts
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:
Magnifying Lamp Pivot – installed
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:
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:
LED Panel – power supply test setup
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:
LED Panel – restored
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:
LED Panel – single LED test
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.
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.
NPN Switch – protoboard
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:
Transistor characteristics – saturation and cutoff – load line
Reminder of linear vs. log scales converting hyperbolas into straight lines.
#from luma.core.interface.serial import spi
from luma.core.interface.serial import i2c
... snippage ...
# reduce SPI bus from default 8 MHz to (maybe) avoid OLED failure-to-start
#serial = spi(device=0,port=0,bus_speed_hz=1000000)
# use I2C bus to avoid SPI timing spec failure
serial = i2c(port=1,address=(0x78 >> 1)) # PCB label = 0x78, low bit = R/W
The OLED PCB lists the I2C address with the R/W bit
And then It Just Works, with one gotcha. Although the Python program shuts itself and the system down, the wall wart continues to supply power and, because the I2C bus doesn’t include a Reset line, the OLED display doesn’t know the RPi has gone away. So you must issue a command to turn it off before shutting down:
device.cleanup() # ideally, switches to low-power mode
rc = subp.call(['sudo','shutdown','-P','now'])
Now, to discover what works … oddly … with these displays.