Of all known metals, mercury is probably one of the most famous, if only for its lustrous, liquid form at room temperature. Over the centuries, it has been commonly used in a wide variety of applications, including industrial chemical processes, in cosmetics, for telescope mirrors, thermometers, fluorescent lamps, dental fillings, bearings, batteries, switches and most recently in atomic clocks.
Though hardly free from the controversy often surrounding a toxic heavy metal, it’s hard to argue the myriad ways in which mercury has played a positive role in humanity’s technological progress and scientific discoveries. This article will focus both on its historical, current, and possible future uses, as well as the darker side of this fascinating metal.
[Andrew] had a servo damaged by someone connecting the power supply to the wrong pins (whoops) which fried the microcontroller and a logic level shifter. With a bit of reverse engineering, he successfully restored basic servo functionality by writing some new code. The new code implements only basic features, but that’s enough to save the device from the junk bin.
Why bother reverse engineering a servo? Well, if dollars are reasons then there are many for saving a HerkuleX DRS-0602 from the junk heap; they cost around 320 USD before shipping. Another reason to try is that the microcontroller turned out to be an AVR XMega, which gave [Andrew] confidence in writing some new code.
If you want to understand more about how these servos work, [Andrew] provides good photos of the insides and identifies the major components and their connections and functions. There are some mysteries (such as details of the motor and embedded encoder, which are FAULHABER 2232DBHHO) but [Andrew] figured out enough to write some basic code to allow the servo to work as a standard servo with a UART interface.
This clone uses an ATtiny85 and an RF module to emulate and send the frequency that the gate is waiting for. To accomplish that, [serverframework] had to figure out both the operating frequency and the timing used by the remote. The crystal inside seemed to indicate 295 MHz, and a quick check of the device’s FCC registration confirmed it. Then he used an SDR dongle to watch the data coming across when he pressed the button, and ran it through Audacity to figure out the timing.
Unfortunately, the 295 MHz crystal is a rare beast, so [serverframework] had to transplant the original to the donor RF module. Then it was just a matter of programming the ATtiny85 to send the frequency with the right timing. It actually does a better job since the original has no timing crystal, and the ‘tiny is clocked with a standard 16 kHz oscillator. The code is available within [serverframework]’s excellent write-up, and you can see a tiny demo after the break.