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.