I have owned this stereo microscope since I was a teenager. At first used for examining rocks and minerals in my collection, it has found many uses over the years, mostly used during assembly and inspection of various bits of electronic gear. It has been a workhorse microscope, well used, and well loved.
Despite this it bit me!
I know the feeling all too well, that little 60Hz nibble of 120Vac electrical power, a feeling anyone who has worked with electricity like I have recognizes instantly. Somewhere in this microscope 120Vac power is shorted to the frame.
Taking the ‘scope apart it does not take long before I find where a wire has worn through and the copper is stripped bare. Decades of use have allowed the up and down movement of the focus mechanism to expose the wire that goes to the upper stage lamp.
Looking at the old 120Vac incandescent bulbs I put into motion an idea that had occurred to me before… Replace these old bulbs with some bright white LED’s.
Some 3D printing and some new wiring has the lamps replaced, but the question remains… How to control these new lamps?
Looking through my supply of parts I cannot find a pair of potentiometers that will mount in the same position as the old on-off switches originally used to control the lamps. Pots would allow me to have dimming control of the LED’s. I do not want to order something, there must be a solution using what I have on-hand.
What I do have is a nice button that fits in place of one of the original switches. I remount one of the switches and put the button in the other location. But how do you control two lights and maybe some dimming with one button? Take a que from the fancy LED flashlights that are common these days.
Yes, my microscope lights are now running code, just sheer overkill. Short presses of the button switches between the lights… Upper, lower, then both, then none. Long presses of the button makes the lights alternately brighten and dim. Just a few lines of code running on an Arduino Nano.