4 channel power supply for beamtest


We needed a 4 channel power supply for beamtest, so here it is:

It is made from the following ingredients:
four 5V @ 10A closed frame power supplies, a 4A fuse, a fan, a master switch, four polyswitches rated at 8A hold current, four 28A single-pole switches, four 20A DC ammeters and a fancy case that has a nicely designed/machined front panel.

Thanks for the help with the front panel, Robin/Roy, and thanks Christina/Casey for making the 15m cable bundle.


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.

arm7-labrador3-oscilloscope board being fabricated


After a month or so of scrambling to redesign the oscilloscope, it is finally at the board house being fabricated. The board ended up being 2 layers and 99.5mm X 79.5mm. The 6mil spacing, 6mil width and 15mil minimum hole size ended up being a necessity (the last board I did was 8mil/8mil/20mil).

The oscilloscope is battery (rechargable LiPoly) or usb powered, has 2 channels of input (DC coupled only), has a 128×124 pixel color OLED display. The AtoD converter is called a “labrador3” or just “lab3,” and it is an ASIC that was designed for use in ANITA, an antarctic neutrino detector experiment. It has 9 channels and holds 260 samples per channel in a switched capacitor array that can run at up to 3.7GSa/s. When a trigger comes, it converts all samples to digital values with 2340 parallel Wilkinson analog to digital converters (each one is a comparator + a 12 bit latch). The advantage of this way of doing it is the high-speed sampling using relatively low-power. The disadvantage of is that it can’t sample data continuously.

The input impedance of this scope is 1MOhm. The analog bandwidth is a big unknown at this point. The lab3 can sample billions of times per second, but I’ve never designed RF circuits before, so this first attempt will probably only be useful at a much much lower sampling speed. The input amplifier has a bandwidth of about 700MHz, and my sloppy, space-constrained board routing will undoubtedly limit that much further. My professor gave me the freedom to do whatever I wanted for the input stage (he suggested a different method for adding the 1.25V which I ignored) and for the routing, so I can’t blame anyone but me when it doesn’t work. The people in the IDLab did give me several pieces of advice for all this, so if it does work, credit will have to be shared with them.

The main reason to have anything but a resistive divider on the front-end of the oscilloscope is that the lab3 can only digitize voltages between 0.5V and 2.0V. In the neutrino detector experiment, the input was ac coupled and then a 1.25V DC bias voltage was set up on the input to the lab3, so there was no problem. In a general-purpose oscilloscope, however, one frequently wants to see the DC offset of a given signal, so the choice was made to make the input DC-coupled and use a summing amplifier to add 1.25V to the (attenuated) signal, knowing that that would severely constrain the analog bandwidth of the scope.

The input stage is high-impedance (4 sets of 4MOhm resistive dividers in parallel going into a 4to1 multiplexer) and has schottky protection diode pairs that limit the voltage going into the multiplexer to about +-(0.75V+the diode’s forward voltage), so a relatively high-voltage input should not destroy the device, since the current that develops through the high resistance is very small (~71uA for a 177V input signal across a 2.5MOhm resistor, the top of one of the resistive dividers). The IV curve for the schottkys that I picked doesn’t even show anything below 10,000uA and the forward voltage in that case is 0.24V, so the input to the multiplexer should never see more than +-1V.

At this point (3 weeks before I need to give a presentation on this project and hopefully show it in a functioning state), I still have to come up with a parts list (which is mostly complete), email it to the appropriate people in the IDLab to get the parts purchase ordered and then just wait about a week for the board and parts to come in, then scramble to get it soldered together, taking care at each step to see that each DC-DC converter and the input amplifier stages output the appropriate voltages before soldering down the delicate ICs.

After that’s done, and assuming it works, the rest is writing software to control the lab3 and DACs and to display the data and do some bandwidth & slew-rate testing before the presentation. Easy as pie. Three weeks to go? No problem. 🙂 Remind me I said that in about 2.5 weeks.

edit 2008-04-25 9:21pm HST: Just FYI, there are 771 SMD pads on the top, 196 SMD pads on the bottom and 392 holes to be drilled, total and the board is ~12 square inches. For comparison, last semester’s board was ~4 square inches had 256 SMD pads on the top, none on the bottom and 126 holes drilled through.

GPL’d clock software released


As promised, the software is released under the GPL (v3) at http://arm7-oled-clock.googlecode.com/ (only available in a subversion repository right now).

A slight flaw was detected in the hardware design (schematics and pcb) in the last week that made it not work, so rather than release something that is known not working, I’m gonna fix it and then release. There is an easy workaround for the flaw, but no sense anyone printing boards that don’t work as-is. So the hardware design files are coming soon. Stay tuned.

presentation today


I gave a short presentation on my project today in class.

I took a picture of the face from an analog watch I have and had my clock display the picture behind the hands:
Yes, the “3” is a slightly modified version of the “8.”

a word of warning


Don’t plug a 7.5V battery into a device with a maximum 5.5V tolerant dc-dc converter and a maximum 6V tolerant capacitor.

the printed circuit board works! (sort of)


After a day of wondering why the microcontroller + crystal didn’t oscillate at all, it was discovered that the 4 pin crystal was wired backwards (4321 instead of 1234). Two methods of fixing this were attempted (rotating the part 90 degrees and shifting the part on the circuit were both found to connect the two leads that were crystal to the microcontroller’s xin and xout). Both failed. It is unknown why. Guesses include using the wrong capacitance crystal, or blowing up the oscillator inside the microcontroller in some way. My vote’s on the latter at the very least since the prototype used a crystal with the internal oscillator and worked fine since September until two days ago but doesn’t oscillate anymore with a crystal.

Then, after a couple days of worrying about why the crystal didn’t work, full-size oscillators were aquired instead because that’s all that could be found locally (parts kit + electronics supply store). Both the prototype and the circuit board now function with external oscillators. The circuit board looks a little funny with such a large, non-surface mount part hot-glued to it. Not really as elegant as I wanted, but it works.

The vectorboard pictured below is just for the temporary jtag header for programming.


but functional:

the arm7-oled-clock pcb arrived!




Here’s what it looks like populated (click for full-size):




Tonight, I got two things done. The first I named “vectored calls,” where I can have the clock display a completely different face based on the mode selected with a rotary encoder. The second is that now it displays latin numbers around the clock hands instead of just dots. See the pictures below.

As it was earlier today, with dots (red=hour, blue=minute, green=second):

After I did the numbers thing (I think my 9 is a little wonky):

And here’s a pic of the whole circuit board along with it just drawing the ends of the hands:

Note that I was able to take the pictures in quick succession because the vectored calls let me select the different display modes just by turning the knob (yes, I retook the last one a half-hour later).