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!



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.



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.



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:


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.