Archive for March, 2009

cuckoo clock upgrade and repair


jtag connecter

When I designed the clock, I neglected to include space for some sort of jtag connector. I left unlabeled through-hole solder pads on the board so that I could program it, but they had to be soldered/unsoldered each time I wanted to take the clock out of service and reprogram it. I finally realized that I could just take the same connector I am using for jtag on the oscilloscope and just epoxy it on one of the edges of the board and run little wires to where they had to go and that would be elegant. I did so and it reprograms properly.

tiniest bit of solder

The oled display can handle up to 18V, so I designed the DC-DC converter power supply to deliver 16.3V to it. This turns out to run the display too bright and too warm (the display has an image burned in now as a result). So I calculated that by replacing a 120k feedback resistor with a 100k resistor, I could get it down to 13.8V. While replacing the resistor, I noticed a stray speck of solder that was between another resistor and a trace, so I heated it up a bit to see if it was supposed to be there (if there was a trace between them on the board), but I couldn’t tell. When I plugged it back in, the image on the display had disappeared (it was there, but it was extremely dim). I assumed it was the resistor I had just replaced and not the speck of solder, so I tried soldering/unsoldering it and going back to the original resistance a couple times unsuccessfully.

Finally, I checked the schematic (RTFM?) – there, I noticed that the shutdown pin needed to be high for the DC-DC converter to be active. It was measuring low, so I checked the source code and I had never written anything to drive that pin high. This implied the blob of solder had done that for me from the first time I soldered it together, nearly a year and a half ago. The splork of solder had shorted the pin on the microcontroller that controlled the DC-DC converter’s shutdown pin to something high. Now that it wasn’t being shorted high, I needed to write some “turn this pin high on startup” code and program it (with the fancy new jtag connector from above). I did so, but the display still didn’t come on. After some frustrating time trying various things to get the display to come back on, it dawned on me that it was the 16.3V display voltage line that had been shorted to the microcontroller pin and that might have damaged the ability of the microcontroller to drive that pin high. I scraped part of that trace off and connected it to another spare i/o pin on the microcontroller and changed the code correspondingly and now it works fine.

jabberwocky repair and upgrade


current sense

In 4 places on the oscilloscope, I put a series resistor just after the power supply so that I could measure the current being drawn by each load. For a battery-powered device like this one, the voltage drop across a small resistor isn’t enough to measure precisely with an 8 bit AtoD converter, so in each place, I used a fixed gain difference amplifier (with a gain of 50V/V) with inputs connected directly across the small resistor.

That’s all well and good, but I was getting 0V output from each one. It finally dawned on me what the problem might be. The data sheet said in one place that it amplified the magnitude of the difference between the two inputs, so I assumed the + and – inputs were interchangeable. When I drew the schematic symbol for the part, I happened to place the + pin where I should have placed the – pin. I looked at the data sheet again and in several other places it said that the + should be on the supply side of the resistor and the – on the load side and it is all completely obvious now that the data-sheet writers intended for it to be this way. So 4 pair of 3mm long crossed wires later and discussions of economic theory aside, the currents are now no longer reading zero.

analog input stage

So far, I have been working on the software for the oscilloscope by using the microcontroller’s onboard AtoD converter. I did some limited testing of the analog input stage last summer just to make sure it worked like I thought it should when I designed it, but have ignored it since. Yesterday, I tested it just a bit more so that I was confident it wouldn’t output any voltage that the microcontroller couldn’t deal with and then connected the output from the analog input stage to the analog input of the microcontroller. So now, putting a sine wave on the BNC input to my handheld oscilloscope puts an (inverted) sine wave on the screen.