Wednesday, October 19, 2011

Repair: HP Ultrium2 Drive

Being the digital hoarder that I am I routinely end up with several hundred gigabytes I no longer actively need but don't want to just delete. The options when it comes to modern day large volume data archival are limited. The more straightforward choices are HDD, BluRay or DVDs. None of those are really reliable in the long run. The recoding layer in optical media deteriorates too fast and HDDs are generally unreliable if left idle for extended periods of time. So a good long time ago I bought an ancient DAT drive which I used for about a year then upgraded to an Ultrium1. Usually these enterprise grade backup devices are crazy expensive when released, then 5-10 years later they're within my budget :) The hard part is finding one that hasn't been used to death in some server-farm somewhere. Rarely drives bought as spares then never used go up on eBay which can turn out to be a killer deal, but otherwise It's basically a lottery. My first Ultrium1 drive did have some use in it, but nothing serious. I was happy enough with it and now have about 1TB archived all in all on LTO-1 tapes (they're 100GB per tape). About a week ago while browsing eBay I found an LTO-2 drive for $55+international shipping (which was $56, heh..) so I bought it.



The drive is an HP C7379 double-height drive. (My LTO-1 was a single height).
Now I assumed that the double-height drives are more robust mechanically and more reliable electronically because I took apart the single-height drive a few times and things are really cramped in there which I went ahead and blamed some of the stability issues on that I had with it over the years (without any real evidence).

So the new drive arrives and I put it in my archival machine for testing. I insert the first cartridge and even before the insertion process is complete the Tape Error LED starts flashing. Not good!

I proceeded to do a cleaning run, but the Tape Error came up for the Cleaning Tape as well. Hrmm..

My first assumption was that the CM (Cartridge Memory, an RFID-like wireless EEPROM inside every LTO cartridge) is not being read properly because the LED started flashing even before the spooling sequence begun. The drive didn't even open the cartridge door to take out the leader pin before the error came up. (The way Ultrium works is basically the cartridges have a single roll of tape in them the end of which is glued onto a metal pin. The drive physically pulls the metal pin along with the tape out of the cartridge and starts spooling the tape onto an internal drum. In contrast with VCR where you have two drums inside the cartridge, in Ultrium one of the drums is in the drive.)

So basically since the tape never even touched the heads when I got the errors, and there was no apparent mechanical failure during the load sequence, the CM reader became the prime suspect.

Thankfully double-height drives are much more serviceable than the single-heights. The CM reader module is a separate daughter-board labeled Philips FCMWP PCA. (WP stands for Write-protect since this board also connects to the optical gate and mechanical arm responsible for detecting write protection.)


So I took the board out and began to troubleshoot it. I was planning to capture the SPI communication to get a better picture of what's going on, but since I didn't have a 3.3v micro to do it and I was too lazy to bother with level shifting I decided to try other things that while more invasive I had the tools on hand for.
I desoldered the CM reader chip LTRCC10. This chip is a black-box. No information about it seems to be available anywhere. Actually that could be said for most Ultrium drive hardware. The only worthwhile material is the HP Ultrium Technical Reference Manual (google CRCM2161 to CRCM2167). Anyway, I traced the pins on said chip and the daughter-board to some extent.
The SPI stuff should be correct, the rest could be totally wrong, but maybe it'll be of some use to someone:

LTRCC10: (Pin numbering as silkscreening on the daugtherboard. (Pin1 ----- Pin16))
1: GND, 2: RF, 3: 5V Vcc, 4: RF, 5: GND, 6: XTAL1, 7: GND(? double-check), 8: XTAL2,
9: SPI Clock, 10: SPI In,11: SPI Out, 12: SPI Chip Select, 13: GND, 14: RF, 15: RF, 16: GND
I had no interest in the RF pins so whatever pins connected to the passives associated with RF I just labeled as such. If you want to build a CM reader with this chip you'll have to investigate them on your own, but you'll need a working drive anyway to reverse engineer the SPI protocol.
The LTRCC10 works at 3.3v SPI despite the 5V Vcc. Not sure if it would tolerate 5V SPI.

Daughterboard header :
1: Optogate Common?, 2: Onboard Optogate, 3: Write-protect Optogate, 4: 5v (CM Reader VCC and Optogate VCC), 5: EEPROM SPI Chip Select, 6: SPI In, 7: SPI Out, 8: GND, 9: SPI Clock, 10: CM Reader SPI Chip Select, 11: 3.3v (EEPROM Vcc)

The drive didn't really seem to be affected by the absence of the CM reader chip and continued to produce the exact same symptoms. I also tried disconnecting the EEPROM, which made the drive unable to boot up.

So I soldered both of the chips back in, then hooked up the reader board to my good LTO-1 drive's SPI bus, since it had the same LTRCC10 CM reader chip. I wanted to see if it produces any RF activity when it receives the correct read command. I cobbled together a radio detector (based on this) using a germanium transistor (as a diode), a 1nF capacitor and a +-50uA analog panel meter.



This test concluded that the reader chip did "something" at least, however the drive still failed to read CM. I assumed the reader chip was not the cause of the problem and left it alone.

At this point the only things left on the daughter board were the various passives that I tested with a multimeter for the most part and a 13.56Mhz quartz.
The operating frequency for the CM reader should be 13.56Mhz according to this document. I did a few insertion tests while lightly holding the quartz and managed to get the tape loaded without an error twice. This confirmed that the quartz was bad.

I had no 13.56Mhz quartz (suitable or otherwise) on hand so I tried the closest value I got which was 12Mhz. The difference of 1560Khz is way out of the +/- 7 Khz tolerance in the spec but... It seems to work just fine. I don't get any tape errors and it reads the cartridge name from the CM correctly. Unless it starts acting up during testing I'm going to leave it alone.



So that's one LTO drive (bought as functional) that had to be repaired. A success story I guess since I basically started the repair without any hopes of success after the seller refunded the price (minus shipping) as a last Hail-Mary attempt before selling it for parts to recoup some of my loss. It was mostly luck that I managed to fix it. Had the CM reader chip been defective for example the drive would've been beyond repair since there's no way to get replacements for that other than having a friend in a Chinese component warehouse or buying a broken drive. The drive also possibly still has some other issues.. if I want to do an assessment test in HP Tape Tools the drive locks up and the SCSI card driver eventually BSODs Windows unless I manually reset the drive. It does however appear to read and write tapes successfully.. for now.

Sunday, September 4, 2011

Equalizing battery bank charger V2

The related projects:

LPH7779 Nokia display board
LTC4151 voltage and current measuring board
Mini 5V Step-down board
and the charger boards from Equalizing battery bank charger V1

came together in the V2 charger.

I chose a smaller box for this one. Screwed the PCBs to bakelite carrier boards and stacked the carrier boards on top of each other through 4 posts made from threaded rod like so:


From top to bottom we have Charging, Measurement then Power supply levels.

Charging basically just has the UC2906-based charger boards from V1
Measurement has a completely overkill ATMega16 (only thing I had at home) that drives the display, and talks the to LTC4151 Voltage and current measurement board through I2C.
Power supply has simple filter/buffers for the 3 separate charger boards and the 5v step-down for the uC and display.

Bottom level and measurement level:



Measurement level:



Power supply level:

The wiring isn't exactly pretty but whatever.

The finished charger looks like this:



I added few extra features to it in the end. The AtMega can be programmed through the DB9 connector on the back. The UART is also exposed there, and periodic measurements are printed (in case I ever want to do any charge characteristic graphs or something).

Here's the first test run on my old e-bike battery bank:


Bascom code for the measurement and display can be found here

(I'd give credit for the LPH7779 code but I don't remember where I found it)

Thursday, July 28, 2011

Mini 5V Step-down board


I needed 5 volts for the micro-controller and display boards in the V2 charger from the 20V source that the charger boards themselves use. I decided to use an MC34063 I had lying around and designed this miniature board for it. Input cap, output cap, schottky, inductor and a current sense resistor. That's all there is to it. Works fine!

Eagles:

Schematic
PCB

Friday, July 22, 2011

LTC4151 voltage and current measuring board


I was looking for simple ways to monitor my charger boards for the V2 equalizing battery bank charger and came across this awesome chip by Linear. The LTC4151 is an I2C voltage and current monitor that can be powered from the same voltage source it's measuring (7v minimum, up to 80(!)V) and can measure current up to 4 Amps. It made it very easy to monitor the chargers.
On my board I just basically implemented the datasheet-recommended design including the kelvin sensing connection for the current sense resistor.
Since getting anything under 0.1ohms seemed to be an impossible feat over here I just bought 0.1s and stacked 2 on top of each other to get 0.05ohm sense resistors.

Combining this with the Nokia display project after some calibration (calculating the divisors for the ADC values after measuring with a trusted source) the outcome is promising:



Now we're getting somewhere. I still needed 5 volts for the micro-controller from the 20volts used by the chargers. Will deal with that in the next post.

Eagles:

Schematic
PCB

Sunday, July 3, 2011

LPH7779 Nokia display board

The first component project of the V2 equalizing battery bank charger came about to fill the need for a display. Sure I could've just used the regular old classic HD47780 character display but where's the fun (and learning experience) in that? I did a nice project with the classic display-of-choice when I built the 1Wire interface for it, and years and years ago when I wrote a picture-display by custom characters thing, so I was already pretty well acquainted with it. The Nokia display on the other hand has been on my mind for the past few years. I'm talking about the monochrome 3310 displays that were first salvaged from phones and interfaced with by hobbyists back in the days. Salvaging and reusing a graphical LCD sounds like a pretty fun thing to do. And so I bought a broken 3310 for 2EUR shipped. Can't beat that price buying a classic character display.

Next up was designing an interface board. There are basically two(three if you count dangling it off of a wire-strip) ways to reuse this display. Either taking it out of the plastic carrier board and building a small frame for it on the PCB, or cutting out the unneeded parts of the carrier board and re-purposing key and sound(?) holes as screw holes to fasten it to the board. Since someone over at this German hobby electronics forum
already made an Eagle library for the latter solution, and since that seemed like the option for lazier people anyway I went with that.
Since my target is going to be a 5-volt system I'll need a level shifter. I had a MAX3393 to do the job. It's really an effortless IC to work with if you don't mind the pin spacing.
I've also added a salvaged LT1117 3.3volt LDO voltage regulator to generate the 3.3v for the display on-board.

Don't mind the SMD tantalum capacitor in these images I tried several but concluded that the display is sort of picky about it, so it needs to be as specified 4.7uF or the display will be unstable.

Actually the single problem with this board is the lack of back-light which is about the biggest annoyance on the completed V2 charger and I'm really hating myself for it. If I ever make another one of these boards I'll definitely add SMD LEDs behind the display. Do this if you use this PCB. You'll thank yourself later. I'd add a minimum of 4.


The display does have great contrast and is easily readable in sunlight. But once it's behind a piece of Plexiglas and a thick front panel there will be shadow and It'll generally be a pain to read in less than full-on daylight conditions. I guess I should've realized sooner. Oh well.

Eagles:

Schematic
PCB

Equalizing battery bank charger V1

Background info: Years ago I bought a busted up chinese electric bicycle. It was in terrible shape and it took me make about 2 weeks to fix it up enough to make it rideable (full frame repaint, front wheel complete replacement, axle rebuild, lacing the hubmotor into new rim) It became a full-on restore but that's another story.. Anyway the bike uses a 36v battery pack made from three 12Amp-hour Sealed-Lead-Acid batteries. The ones that came with it were mostly dead. I ran an inconclusive desulfator experiment on them, being still much of an SLA noob at the time and managed to rejuvenate them to around 4Amp-hours capacity. Ergo, worthless. I bought brand spanking new batteries for it. I admit they were overpriced, off-brand and not even specifically deep-cycle models. I've put about 500 kilometers into the bike with them, and then I couldn't even finish a grocery-shopping run. 500kms is definitely not much, so I started thinking about what I can do to prolong the life of the next pack that I inevitably had to invest into.
I've been charging my batteries in series with a 36V charger, and never equalizing them. This would mean that if one cell in one of the batteries died the whole pack balance would be shot and the remaining batteries would die shortly after. But even if not the pack could go out of balance over time as the individual batteries wear out at different rates. It seems like a good idea to use an equalizing charger at least every once in a while. And I'm not ruling out the possibility of modifying the pack to allow for individual charging of the batteries ALL the time. This would be ideal because the pack would always be balanced out perfectly.
To be honest I'm not sure about the practical effectiveness of this and the cost of this project is possibly more than what I save even if I prolong the pack life by half a year or so, but it was great learning experience and I'm fairly pleased with the outcome (which is V2, this article is about V1 that I've completely dismantled after the first test run).

I had this nice case. (I thought it was for an old desktop multimeter but it was probably just sold as an empty case originally.) that I wanted to use for the project.

The charger was to be UCx906 based (Yes, a linear charger chip, not a switch-mode one. Yes It's not as efficient, but it's easy to work with.)
There was a simple design up for an UCx906 charger here. That I designed a PCB for some time ago.


I made 3 of these boards, for the 3 batteries in the pack.



One by one they all tested out fine, so I proceeded to put them in the case.

The UC chips have a couple of working modes but the board above is basically for the 3-stage charge characteristic. Stage 1 is bulk charge which is a full-configured-power charge stage until the battery reaches 13.8V, Stage 2 is controlled overcharge where the charge current slowly tapers off to float-levels until the battery reaches 14.2-14.4 volts, Stage 3 is float charge where the charge current is the minimum required to maintain the battery at 13.8V

(Or at least I think so.. To be honest I'm not sure about some aspects of this design but I'm going to trust it since the person who designed it has a HAM ID so they probably know more about the subject than I do (generally a good assumption in my case). It incorporates some elements from datasheet designs yet leaves some out. It does SEEM to work close to how it's intended though I think it switches over to OVERCHARGE mode a bit too early considering it's configuration.. Oh well..)

The controlled overcharge step is used (if I remember correctly) to remove the layer of sulphate that forms during deep discharges.

The chip itself has an OVERCHARGE INDICATE pin that goes low when the chip enters overcharge mode. Not really thinking anything through I went ahead and designed the following front panel:

Can you see the problem here? I have about 4 useless, and 3 semi-useless LEDs.
Knowing when the chip is in overcharge mode in itself is quite useless. And the power leds will all be on all the time unless one of the charger boards die. But I still proceeded to put it all together despite this.
I sort of realized this while I was building, but at that point it just seemed like a waste to not finish it without a clear idea for a second version. So I soldiered on even though I realized I'm never going to be satisfied with this design.

I mean the panels turned out good! and I re-did them like 3 times (the front one anyway).. It'd be such a waste of effort..


And so I was almost done.


And then I was done, and doing initial tests.


D'oh! Well what do you know? The lack of any informative displays is even more of an annoyance than I thought. But I did manage to track down a power supply issue at least...

I let it sit for a couple of weeks then completely dismantled it when everything came together for V2.

Eagles for the charger boards:

Schematic
PCB

Quick Project: IR remote-control power strip

I wanted a remote controllable power strip for my modest media-player setup consisting of small PC multimedia speakers, a chinese SD media player like this
and a USB HDD enclosure. I wanted the ability to conveniently power them off together for a couple of reasons: The speaker's amplifier produces an annoying hiss, and the media player's power LED is on constantly despite the player being off and is super bright, and I'd want to switch the HDD off anyway.
I know I could've just went out and bought an RF thing for around 10EUR but where's the fun in that?
Also this way I didn't add to the number of remotes I have. (I'll explain below.)
Salvaged a SOIC ATTiny26 from a busted coffee maker earlier. Soldered wires to it's pads so I could use it on simple experimenter's board. It also looks funky enough.



On the left is a standard ISP header.

I had an SFH506 IR receiver/demodulator which was already discontinued back in the days when IR remote control was all the rage in hobby projects here. The suggested replacement units never seemed to last that long. Maybe they were rated for a 3.3v, didn't bother to check then. Anyways this was the real thing, salvaged from an old VCR.


I had a generic 5V relay from a busted old CRT monitor which I'm switching from a GPIO of the ATTiny through a generic transistor. Power this all from an old cell phone charger board.
That's basically the setup. Ghettoed it all together in an acrylic box using zipties, hot glue, heat shrink and double sided mounting foam tape. (It does say quick in the title.)


Besides the initial soldering wires to the pins of the SOIC chip operation the entire thing probably didn't take 30 minutes to finish (including coding time) and it's been working great ever since. As for the remote:
I use a universal remote from my TV that has a slide switch for switching between TV and VCR modes. I decided to make use of that since I don't need the VCR functionality on it. It works out great because I can just set up an RC5 VCR code on the thing and RC5 is extremely easy to handle in BASCOM (basically just 1 function in a loop.. GetRC5).

All in all it was a fun project that I now use all the time, hardly took any effort to finish and was basically made from parts from the junk box.

Friday, March 4, 2011

DIY Power Supply for Home Server

I'm replacing my old power-hog home server with a new one based on the Intel D945GSEJT mainboard. This board is essentially a netbook platform that's been "desktopified". Among it's weirder points are that it uses the Mobile 945GSE chipset, SODIMM ram, 44PIN IDE, and that it runs off a single 12V supply. The reason I chose this board is that it consumes 13W in idle and 18W under full CPU and GPU load which is pretty much the lowest power consumption one can get with an Atom system (excluding some server-specific boards that were beyond my budget). Not wanting to use an ATX PSU I've decided to build a completely new power supply for the board. Not having to bother with all the voltages needed for ATX makes this a lot easier. I've decided to make a high-amp 12V supply, and a 5V supply capable of driving two HDDs.



I bought (actually it was a swap for some things I no longer had use for) a 100VA toroidal-core transformer to start with. This type of transformer is widely used by audio amp builders for example as they're more efficient and take up less space than plate transformers. After that we have the usual bridge rectifier and smoothing capacitor combo. For the latter I'm using a single 10000uF/63V electrolytic cap, a RIFA PEH169 rated for 78000 operating hours(cca. 9 years) @85C. Since we're nowhere near the rated voltage or the temperature given for the operating hours It should probably be safe to say that this cap will outlast everything else inside the case.

After rectification I get around 18Vs from this setup. For the DC regulation I decided to go with TI's power modules. The 6Amp PTN78020 for the 12v supply, and the 1.5Amp PTN78000 for the 5V one. The 5v supply is because I don't want to run more than 1 HDD off the board's internal dc-dc power supply so I'm running a couple of molex connectors from inside the PSU for 2 more. These power modules are pretty impressive. Essentially they're complete switching regulators on a piece of PCB. You just need to add some input and output capacitors (and optional ripple filtering) and you're done. They can reach up to 96% efficiency and come in 1.5/3/6 amp versions with various protections against frying themselves and whatever it is they are powering.
I went with the recommended implementation from the datasheet just adding the optional output ripple filter. Low ESR electrolytics and 1uF SMD ceramics. The thing to the left of the caps is a double ferrite bead.




The 1.5Amp module doesn't have the optional filter. At this point I was considering what to use for the output cap. That's why there isn't one in this picture. Ended up using the same as in the 6Amp module (470uF Low-ESR Samxon)





This is how the completed PSU looks like:



Board layouts & schematics are here: Download

I've just replaced my old server with the new one powered by this PSU.


Tuesday, February 8, 2011

Project builds

Built myself a couple of things that were missing from my toolkit.

The AVR-based LC Meter by YO6PIR to ballpark hand-wound and unknown inductors.
Yes.. It's not the prettiest thing to behold in the cheapo electrical box enclosure I put it in, but it works. There's some drift that I'm not sure whether is inherent in the design or something I messed up but it still works well enough.



and the ESR Meter Project by VE7IT which will be very useful for random repairs.
(PCB shown incomplete and capacitor soldered in with wrong polarity)



I've since marked a few values on the cover with a sharpie. About 80% of the scale is 0-10 Ohms which works out well enough since looking at ESR charts will tell us that almost every electrolytic should have an ESR well under 10 ohms (except low capacitance high-voltage ones). Most of the time a good cap will produce close to full deflection. (The one being measured in the picture is a 3.3uF 400V so It should still be in great condition at around 8 Ohms ESR.)