Saturday, 21 September 2013

The ring cycle continues...

So back to the drawing board I went.  I knew it was very important that I kept the ring as small as possible... Anna likes dainty stuff, not big jewellery, but you need a particular size to make something useful... to use an engineering stereotype, we like building stuff that is functional rather than just ornamental.  I don't know if that's because engineers aren't good at making things pretty (not necessarily true!), but we know when something is functional... determining whether it's pretty is up to the beholder.

I figured that the maximum I could get away with was an inch square and a few mm tall (oops, forgive the mixed units)... ideally as narrow as I could possibly do.  The smallest battery I could find of suitable size with a LiPo unit of around 120mAh capacity.   The battery in the middle is quoted as 23mm square with a thickness of 3mm... that's just about tolerable.



The one on the right is tiny... but couldn't really run anything substantial.  It's about 30mAh which would be tons for a memory LCD but I was now aiming for something hungrier.  I wanted a colour OLED display so that I could display photos on the ring.  A bit of research led me to one from a company called Densitron.  I presume they get made by a far east company as multiple companies seem to badge the same display, but 96x64 pixels sounded just about enough.... in any case, I couldn't find anything else this small with a higher res!  I could put it in the portrait orientation to minimise the width of the unit, so 23mm width was still on...

It offers SPI-like and parallel interfacing.  I did fancy a parallel interface but recognised I might end up short of pins... here's it hooked up in a basic fashion using the official test board from Densitron...


Because it uses the SSD1331 controller, it offers some hardware acceleration of lines and rectangles, which is very handy when your processor is a bit weak.  However, I'd been having a think about the processor options available, and I quite fancied giving the PIC32 a go.  It features a relatively powerful MIPS based processor core at typical speeds of 40MHz or 80MHz, with more IO than you can shake a stick at... variants offer USB, Ethernet and I2S functionality.

The latter in particular might be useful for audio projects, so this might be a great opportunity to learn a new platform.  The chips are cheap enough and getting started in development should be fairly easy.  I had read of Microchip's policy of crippling the MIPS GCC compiler they distribute (disabled -O2 and -O3 optimisation), charging ~$1000 to fully remove the restrictions, but that didn't feel like a major stumbling block... I could live with -O1 optimisation to start with or if I really needed more speed, use a different compiler.

So I started off by ordering a PICkit 3 and a few chips, building myself a little development board.  I went for the PIC32MX250F128B.  This 32-bit microcontroller features a spacious 128KB (yes, a whole 128 kilobytes!) of flash and 32KB of RAM.  While it had plenty of RAM, the Flash felt like it might be a bit short for photos.. I had wanted to go with the many pinned 128D variant, in QFN form, but when I started the project they were unobtainium!  This meant I had to go with the 28 pin variant.  This was going to be tight...


I built a little prototyping board with the header, and hooked it up to the PICkit 3.  No go... it didn't seem to understand the PIC32MX250 series... it was not aware of their existence!  I tried updating the firmware but that didn't seem to help either.  Grr.  So I ended up buying a Microstick II.  Unlike the PICkit 3, this actually worked properly and recognised the chip... which is not that surprising as it was designed as a small development board and comes with PIC32 chips included, along with dsPIC, I think.


Getting a good battery life from such a chip wasn't going to be straightforward.  Unlike the lower end chips that Microchip produce, the PIC32 is a relative power hog in comparison... while there are sleep states, it isn't as advanced power management-wise as something like the Gecko controllers, which are Cortex-based.  I was aware of the Gecko, but it lacked the same degree of I/O and the whole developing package didn't seem as straightforward.

Starting at the charging side, the logical source of power to charge the lithium battery is a USB input.  A MicroUSB connector is very small and almost ideal for charging a small lithium battery at around 4.1-4.2V from  approximately 5V.  The charger chip I ended up going with is another Microchip part, the MCP73811.  I was not consciously trying to pick a Microchip part, but it is a little SOT23-5 device that is cheap and perfect for the job.  It gives you the choice of either charging at 85mA or 450mA with no resistors... from looking at the datasheet, it looked safe to leave the PROG pin floating, which defaults it to 85mA... if I ever want to use the project with a much beefier battery, I can tie it high instead.

So that's the battery charging sorted.  Now there are the requirements for the various parts.  To do that, I'd need to know what needed powering...

I hadn't decided entirely what I wanted on the ring, other than a display for photos.  Audio might have been an option, but space didn't really allow a decent speaker.  I noticed that Murata make some very funky flat piezo speakers that with a bit of work could probably produce adequate sound quality, but there wasn't really the room in the design... I had a width of 23mm and really didn't want to increase that any further.

What else... well, a microSD slot would be nice, then there would be no practical limit to the storable pictures!  With a 96x64 display, the processor would either spend most of its time resizing or the card would be mostly empty.  Hm.  While a slot could have been crammed on sticking the card out of the side, it would be tricky while keeping it to a 2 layer PCB... I didn't want to go to 4 layer not for cost reasons but for modifications... I didn't want to have to get the board remade many times so wanted to do one rev, fix the issues on the PCB itself, and then have a final rev... or in a really unrealistic world, get everything right first time... :)

Okay... so maybe not ideal.  What about an accelerometer?  Mmm... that sounds like it could be good.  It can be quite an effective control interface when done right, and they are compact and not too expensive.  I decided that I wanted to go with an analogue output one as it just felt more comfortable, and the packages weren't quite as evil... I ended up choosing the ADXL335 - this is a 3-axis +/- 3G accelerometer in a package which is only semi-evil.  They call it a LFCSP... and it's one of those blasted leadless things.  Thankfully most of the pins aren't used, and you could easily dead-bug it, but that isn't much good on a PCB.  I'd need a different approach...

In any case, the accelerometer is perfectly happy in the 2.5V to 3.3V range... great,same as the PIC32.  Looking at the OLED, that is also happy in the 2.5V to the 3.3V range.  Marvellous... looks like we're on for a 2.5V main digital rail.  There's a whole bunch of choices for buck converters with identical pinouts, but I ended up going for the TPS62205.  This is a high efficiency buck converter which looked on paper that it'd do a great job, and if it didn't, there were load of other options I could try in the same footprint.

Ah... the OLED doesn't have an integrated booster for the actual display.  From looking at the datasheet, it looks like it'll need 14V.  Hm.  Not ideal... I've not exactly got lots of room free on the PCB, so it needs to be a very small boost converter, with an equally small (and shallow!) inductor.

This time the ideal choice came from Linear Technology... a part called the LT3494.  The first thing to note about this part is that it's small.  Very small.


And all the pins are on the blessed underside... not only that, but it has a big grounding pad which you must connect.  So I did another search... and no, couldn't find anything else in a SOT23 that was quite as good.  Ah well... the only way this is really going to happen is with a hot air gun... so I bought one of the low cost Atten ones, as mentioned in a previous blog entry.  With some solder paste and a stencil, I might just stand a chance here...

Good.  So we have charging circuitry, power for PIC32, OLED VDD, OLED VCC, and the Accelerometer.  What else?  Well... if you want to use the USB on the PIC32, that wants a 3.3V supply for the transceiver module.  Okay, no problem... this will be powered directly off the USB port, so a linear LDO is fine, giving a smaller footprint than a switched mode one.  I went for a simple LP2985.

So that's the power done... what about input?  Well, a few physical buttons are definitely a good idea.  With the 28 pin package, I'm really limited for inputs, particularly given the analogue-out accelerometer, so how about a resistive divider?  Yep... sounds good.  Every button has a different pull down to ground from a known resistance to the digital rail.  Let's make it 100K to keep the efficiency nice and high.  Then the first (most commonly used, preferably) button can be 100K, next one, 50K, next one after than 25K, and so on.  The nice thing about this arrangement is that providing your A/D is not rubbish, you can get a good 5-6 buttons and also detect combinations of buttons too!  Nice.

Now there's a few buttons and an accelerometer.  But I really wanted a touch screen.  REALLY wanted a touchscreen.  The problem I found was that no-one made one this small... at least not that I could find - sure, I saw touchscreen phones with something suitably small, but they are both expensive and there'd be a chance I'd fail to reverse engineer the protocol, or just break the blessed thing, leaving me with an expensive piece of junk.

All I was after was a suitable overlay.  I could get hold of ITO film, but building a touchscreen is far more complicated than just taking a couple of sheets... you need a spacer layer as well, and then to fabricate the whole thing neatly.  It sounded like a step too far, but I thought I'd experiment anyway... I'd found a cheap watch on eBay (one of a few million you can probably get) - what made this one special is that it looked like it may have a proper touchscreen... reason being that I saw it had a calculator application, not just the whole touch left side, touch right side going on.

So I bought one... and waited... and waited.  After about a month or so, it eventually turned up...


Yep, seems to work, let's try the calculator...


Not too bad, actually!  Seems to work okay... but... mm... that's just a grid of conductive material, isn't it?  Let's have a look inside...


Simple piezo element in the back, classic epoxy bob of a processor, along with what you'd bet money on was a 32.678kHz crystal.  Let's see if we can take a peek at the actual display...

 

Okay... so a zebra connector down to the touch panel, which... yes... is a grid.  Bah.  If I followed the grid and the dimensions perfectly, I might be able to use it, but I just don't have enough IO pins for a row/column arrangement... at most I might have been able to multiplex with the accelerometer's 3 pins... so no go.  At least it was cheap... and there's always a little fun to be had reading the manuals for these things...


Not that my Chinese is anywhere near as good!

In any case, the I/O and power were finalised, so now could get on with the PCB...

Put a ring on it...

Me and Anna got engaged yesterday!  For a few years I've been trying to come up with an idea for a special ring that I could present to her... I wanted it to be something geeky, so a regular ring wasn't going to do... it had to have lights and stuff... otherwise who'd know what'd happen...

As these things often do, it started out quite simple.  I'd read about Charlieplexing before on Hackaday, and it seemed like a great way of doing a little array.  I figured I could just about get away with a 5x6 array on a board measuring 18x23mm... small enough to make into a ring.  It wouldn't need anything fancy... an 8-bit micro would be plenty enough to drive and display a few scrolling messages.

The schematic in progress ended up like this...


Using a QFN16 package let everything fit on neatly, with IO to spare to connect to other doodads when I actually figured out how to do it.  Processor was to be a PIC16F684.  There's quite a few pics of similar sizes, so I liked the idea of doing one with touch sensing.

The LTC3525 DC/DC converter went on the underside.  Power source was to be a supercapacitor, which was going to allow for very fast charging... a few amps for a few seconds, and you're done - excellent!  There are many companies who make these things, but after doing some research, the best I could find in small form factors were from an australian company called Cap XX.  They do them in prismatic packaging which allows for a very thin form factor... ideal for a design like this!

I bought a few and did some experiments...


This here is a series-stacked pair of HA130 cells, which are charged to around 5V with a very low power levelling opamp circuit, using the MAX4470... this works out to be much more efficient in terms of energy consumption than a lower resistance balancing ladder.  That small gap between the two bits of copper on the right hand side is a crude (but effective) resistive touch switch.  This controls a PMOS FET (with some gate protection circuitry) which allows current to pass to the LED.

While it worked pretty well on the bench, I noticed that the supercapacitors were discharging much faster than my simulations had anticipated.  After some discussion with CAP-XX, it turned out that self-discharge rate and leakage current are treated as two very different things... only the latter is specified.  The rate was so high that it wouldn't stay at a useful level for more than a few hours.... gah.  And paralleling cells instead doesn't help the standby current one jot as the discharge rate will be high on both cells.  A boost converter would allow a longer standby but the on time would be very short near the end.

Ah well.  It didn't look like this was going to be practical.  The thing was, if I started looking again at a conventional battery, pretty much anything would be overkill for just a few lights.  Hmm.  Maybe I could look at doing something a bit more complicated...

Sunday, 11 August 2013

Class A contenders numbers 2 and 3...

As it is now heading towards the winter months again, my thoughts go back to Class A amplification.  While the JLH is a very nice amplifier, I haven't felt it is the ultimate solution, at least not for the whole of my odd speaker.

The JLH simplicity makes it a slightly quirky affair... too much deviation from the original design and it gets upset, which is a shame as a chunk more feedback would make it fit much better in my system in terms of gain and also lower the distortion helpfully.

I also thought it worth to revisit the JLH to see what was possible with higher voltages and bias points... at this point, I'm just interested in the 1 watt into 8 ohms performance... here's the results I got from the experiments...

                    2H   3H   4H   5H
24V 560mA = 13.4W  -59  -73  -89  -102
27V 667mA = 18.1W  -61  -76  -95  -109
24V 835mA = 20.1W  -67  -79  -104 -113
30V 774mA = 23.2W  -63  -79  -99  -114
33V 922mA = 30.4W  -65  -82  -104 -118
35V 973mA = 34.1W  -66  -83  -105 -118 

So substantial gains from higher voltages but also a lot more waste.

I have been looking at other simple designs too.  A kind audio fellow in France sent me some original boards for the Hiraga 8W design.  I've had my own boards based on this design sitting around for, ooh, probably a year now, including one based on PTFE (christened the "Slippy Amp" as ink would just slide off it) but never quite got around to finishing them.  All that needed to be re-added was some 1 ohm power resistors, after I'd carelessly not mounted one of the power transistors very well.



The schematic can be found on the link above.  It is a very simple amplifier with a lovely symmetry to the stages.  It runs at fairly low voltage, but with very high bias... around 1.7A.  You can run it off big lead acid batteries, if not for that long.

I haven't actually sat and listened to the Hiragas as yet simply because the measurements suggested a big difference in characteristics between the two boards, which is likely to lead to a flawed evaluation.

                 2H   3H   4H   5H   6H   7H
Hiraga Board 1  -42  -81  -76  -74  -83 -101
Hiraga Board 2  -45  -52  -86  -69  -81  -79


I'm not entirely sure why that is, whether it is careless abuse on my part or whether some of the parts are damaged, but in any case it will be interesting to compare to my own boards when complete.  The basic distortion performance appears to be considerably worse than the even simpler JLH design for the same power consumption.


To throw something very different into the mix, I had decided to build a new amplifier for the bass drivers... rather than going for a Class D, I'd decided to try a Class AB which had the potential to run in Class A for a few watts.  The design in question is the LME49830 reference design, originally from National Semiconductor, before being absorbed by TI.

The LM49830 is essentially a near-complete MOSFET driving solution for an amplifier design, containing all the front end and driving circuitry required for building an amplifier.  It is very low distortion and results in a fairly simple PCB.  Rather than go to the trouble of designing my own from scratch, I decided to use the reference design.


The boards are 3.2mm FR4, with 4 oz traces.  Not cheap, but if you are building something to handle power and want something that will not flex, this makes a lot of sense.  I decided to stay close to the original specifications of the parts - a lot of the parts are exactly as listed on the BOM.  A few minor changes are the use of silver mica instead of polypropylene for the signal filtering, non-inductive wirewound power resistors, and slightly bigger local decoupling caps for the LME49830.

The power devices used in the design are the Toshiba 2SK1530 and 2SJ201, PDFs on Bob Cordell's website.  These are beefy complementary MOSFETs with a lower than usual turn-on voltage - they should not be confused with lateral MOSFETs which have a very different structure.

When finally built up, they look something like this...


A parallel pair of N FETs and P FETs are used for high power handling and low output impedance.  The pairs of FETs were as tightly matched as were possible from the ones I had.

As supplied, it appeared that the LME49830 reference design can be biased from approximately 200mA to 550mA.  For normal use, that is plenty but for lower voltage operation I was interested in seeing what benefits there were from going that little bit further.  Adding a resistor in parallel let me increase the maximum point to see what was possible.  I decided that going beyond 700mA would probably be pointless so ended up setting that as the maximum.  Here are the distortion results so far, again for 1W into 8 ohms, with +/- 23.5V rails...

             2H   3H   4H   5H   6H   7H   8H   9H
201mA bias   -98 -100 -111 -107 -124 -119 -124 -127
541mA bias  -105 -107 -125 -118 -125 -124 -126 -127
700mA bias  -115 -116 -133 -126 -133 -132 n/a  -135

The distortion as can be seen is incredibly low.  For the 700mA bias result, I suspect the D/A and A/D are actually the limiting factor in the results rather than the amplifier itself.

Listening to the amplifier is an unusual experience.  I'm not sure what to make of it so far... it reminds me slightly of the ExtremeA amplifier, but will need a bit more time to make my mind up...

Sunday, 28 July 2013

Getting on with some vinyl...

Well, I've been a bit remiss in keeping the blog up to date, but I was spending quite a lot of time over the past few months on getting a Sunrise prototype ready.  When I came back from the meet, it reminded me that my own turntable was in need of a bit of work in order to be able to listen to vinyl and actually test Sunrise locally.

Our house isn't particularly large, so it is hard to find room for all the audio equipment, particularly the multiple amplifiers while having room for the television which sits on a separate stand... so I'd been putting it off.  But no longer...

The "bit of work" is a new tonearm for the Teres.  I'd bought a T3Pro tonearm to replace the old Origin Live'd RB250 arm that I'd used for so long.  It's a parallel tracking tonearm as opposed to the more usual tangential tracking arm that you usually find on turntables, mainly because inner groove distortion is something I find particularly unpleasant.

There is quite a lot of setup involved, I guess that is the case for any tonearm, but there a few more adjustments than usual to be made.  I've set it up first with a fairly inexpensive cartridge, the Nagaoka MP-100, in case any mistakes were made in the process - thankfully the cartridge seems to have come through unscathed!

Here's how it looks so far...


And a closer up of the wand...


While I have sound and what appears to be reliable tracking, there still seems to be a fair way to go with optimisation.  Sound is a bit sibilant and very much reminiscent of what I consider in my relatively limited experience to be a typical "moving magnet" cartridge sound.  It may well be user error, but we'll see...

Here's a good thing... the actual arm itself is essentially silent - this is different from any other air bearing arm I've encountered, which normally have a very audible hissing sound.  The air pump itself is designed for aquarium use, and while far from silent should not be too hard to quiet down in an appropriate foam-lined box.

So lots of work still to do on the turntable, more tweaking and alignment, more solid mountings for various things, but at least it can play now!

Monday, 8 April 2013

12V Power supply gets a revamp, part 2 - maximum overdrive...

So yes... a bit carried away.  It all starts with buying some large chokes... then a big case... then a big chunky 2x12V 225VA encapsulated toroid.


And before you know it you have a pretty silly brute force unregulated supply that could deliver something like 15A.  Yes, ideally you wouldn't have this iron in such close proximity, but this is all I could do in the case... these chokes are pretty large!

The supply has an off-load voltage of around 19VDC though it doesn't take much to drop it down to 17VDC.   This is much higher than I need plus the off-load losses are significant - I was seeing 4W dissipation with nothing connected.  Ouch... some of that will be in the 17V zeners, but this all seems like gross overkill.

It will make the beginnings of a good audio PSU but this perhaps isn't what I want for a network supply.

Now I had the NAS, I wanted to try running it with the existing 12V PSU I built early last year, but found that it just didn't have the grunt to cope with the spin-up of the HDs in the NAS.  Sticking a big cap on the output only made it hiccup, so figured a better solution would simply be a beefier DC/DC conversion stage.

To keep efficiency, it had to be a synchronous buck topology, and a bit of research suggested that the LM3150 would be a good option.  TI sell evaluation boards for these, so a bit of a play in their Web Bench suggested what parts I'd need to reconfigure the boards to do my bidding - they are made on beefy 2oz copper with wide tracks so should have no problem in delivering >10A of current.

Thankfully pretty much everything was available from Mouser.  To handle the increased current, the N-channel MOSFETs needed to be changed.  As it so happens, TI make some pretty good ones.. the catchily-named CSD16321Q5C is a 25V, 100A (okay, 31A in most real world cases) part which has more than enough current capability, and is also designed to be heatsinkable from the top if you need more current handling!

A literally big component change was replacing the inductor with a much beefier one - a SER2915L-682KL... it barely fitted on the board!


The aim was to try and keep copper losses as low as possible... this inductor is a >=20A part so should have no trouble at all delivering 5A, even in a box with very little ventilation.


To swap over the FETs, I used my new hot air gun, an Atten 858D.  I saw the review on the EEVBlog a while back and it did seem to be the best tool for the job for a fairly small amount of money.  When it comes to 2oz copper board with wide traces, even an 80W soldering iron will struggle to get enough heat in to remove parts - this is where a hot air gun really comes in handy.   I don't think there's any way I would have gotten the solid caps off with my iron.

So I tested up the boards with crocodile clips - success - a clean 12V output!  Although the regulation seemed a little poor... I later found out that the crocodile clips had a whopping 0.2 ohms resistance - horrendous for any kind of significant current testing!  Need to make some fresh ones with thick copper cable...

 The new DC/DC seemed to be working okay, but the existing 50VA transformer in the PSU box just wasn't going to have the oomph required.  Even with a single HD, the cable modem, router and NAS were going to peak at 35W or so consumption when the drive spins up... the 50VA will be well out of its comfort zone.

Fortunately I had an 80VA handy... the catch being that it's a 2x9V rather than a 2x12V.  Standard transformer voltages are a little bit annoying... the standard windings go along the lines of 6V, 9V, 12V, 15V... thing is that no transformer offers perfect regulation so there can be a significant disparity in off-load vs. full-load voltage.  A 12V transformer after rectification and smoothing is likely to be something like 17VDC with only light loading, unless you put a big choke in before the cap.

2x9V would have been perfect for a 12V supply, but I need more than that to charge a battery... ideally between 13.5V and 13.8V for a 12V, depending on temperature.

To handle UPS functionality, I decided to go with a PicoUPS board.



This is quite a neat little board which is based around a couple of ORing controllers that let it use beefy NMOS as diodes, essentially... the controllers have a comparator which decides whether to switch battery or mains sourced DC to the output... when the mains voltage drops below the battery, it should seamlessly switch to the battery.

In order to charge the battery, the board uses a P-channel MOSFET with a little controller IC that appears to provide constant current.  As far as I know, it doesn't apply any continuous voltage limiting, although the board itself should not be run above 17VDC input.

While I had a nice efficient UPS solution now, the transformer was a worry.  9VAC would barely rectify to above 14VDC, even off load... ideally this needs a 10VAC output transformer but such things are custom jobs and as such very expensive.  The fact that the transformer is epoxy-sealed eliminates the possibility of adding extra turns... so let's try to make things as efficient as possible...

After some searching, I found what appear to be the very best diodes you can buy short of doing it all with MOSFETs and a controller.. the "Super Barrier" range from Diodes, Inc.  The forward voltage drop is considerably less than any other diode I encountered, so combined with thick 30A copper cabling, should help to minimise losses.  The particular model is the SBR10U40CT - a 2x5A rectifier in TO220 format.

Technically it is a dual diode, but as far as I can tell, they are fabricated on the same die and thermally connected so providing the resistances are well matched, should be okay to wire in parallel.  I wouldn't recommend running them up to 10A in this configuration but it should be plenty good enough for 5A continuous, I'd imagine.



A simple means of mounting them was to use the mounting hole for the toroid and drill/cut out a piece of stripboard to mount them on.  These things run very cool - not surprising at all given their very high efficiency.  You do have to wonder why they even bothered putting them in a TO220 package as it's kind of self-defeating... the heatsinking is so good that they don't get warm enough to give anywhere near their best voltage drop performance.

The thing about diodes is that the voltage drop tends to decrease as the temperature goes up - so you'll get the worst performance Vf-wise at room temperature or less... at 85C, you'll get a considerably lower drop.  On the minus side, the leakage is much higher and the devices lifespan will be impeded.  Swings and roundabouts.

In any case, when I get around to buying one, cutting off the heatsink tabs with a high speed disc will probably help save a fraction of a volt - before doing this, will need to check the part temperatures in a closed box after sustained use as they may well be getting much warmer now!



Putting it all together... in goes the new DC/DC converter board, face up.  Plenty of mylar tape to prevent shorts with the bottom of the case, lots of insulation on the mains wiring.  There's a switch on the front to give the option of disconnecting the PicoUPS from the DC/DC converter, just for when you *really* want to cut the power.

So does it work?  Indeed, yes!  Voltage to the battery with the NAS powered down is about 13.9V, within acceptable limits.  When the NAS is operational, voltage to the battery decreases to about 13.5V, which should just about enough to float charge it but probably marginal.

Switching off the mains seems to give a seamless switch to the battery, and it seems to be able to power the router, cable modem and NAS with no problems... I think it would have a tougher time starting them from battery, but definitely okay for switchover!


Efficiency seems to be about the same as before.  The new gigabit router uses about a watt more than the old Linksys, so now up to about 8W with the NAS switched off.  Not bad, though, given that now includes trickle charging the battery.

I should note that I haven't put in undervoltage protection - this was present on the old DC/DC converter board but didn't have a chance to figure out a good solution for the LM3150... this essentially means that in an extreme situation, the battery would discharge to the point of damage.  However, this would be a very extended run on the battery (without NAS, I figure at least 4 hours) and the equipment attached is likely to stop drawing much current before things get really bad for the battery.  Hopefully the desulphator won't get called into action too often!

12V Power supply gets a revamp, part 1...

Doesn't time fly... I have been doing stuff at home... just not as much as I'd like!

I decided it was time to get a NAS and get a proper storage solution sorted out for 2013... so ended up going for one of the Synology boxes in January.  I wanted highish performance (>50MB/sec) and lowish power consumption (<10W for the CPU idle) in the same box... I was hoping to hold out for the Atom SoC based stuff but it seemed to be taking forever to materialise.  Of course, now they have been announced.

While it is relatively power efficient (I measure it at about 9W before the HD spins up, at which point it sits at around 14W) for the speed of it, I was concerned out what would happen in the advent of a power cut.  They are not renowned for coping well in such a scenario.

So a UPS seemed like a good idea.  An off the shelf inverter-style one would be not very efficient, so wanted to go for something that could output 12V cleanly and easily.  Something that uses a cheap 12V lead acid battery and is designed for efficiency.

The first approach was to try modifying the switching supply that the Synology came with to output 13.8V.  It's a standard block power supply, efficiency rating V so not bad at all in terms of waste power.


After finally breaking my way into the case (they really don't want you to open these things!) and removing some extra metal shielding, I was greeted with this...


I took a look at the electrolytic caps inside and didn't like what I saw.  These might be a perfectly reputable brand (indeed, I was able to find a datasheet) as far as Korean caps go but felt more comfortable replacing them with more familiar Panasonic units of a 25V rating... particularly as I intended to up the voltage output.
 

A look at the underside reveals that the supply is based on an LD7578 PWM controller.  The output section is based around a neat UM603 which contains a dual op-amp and a 2.5V reference wired to one of them.  Logically, there had to be a voltage divider near the chip... indeed there was.  As an added bonus there was an unpopulated part which had pins in parallel with the resistor in question, so I could do the mod quite neatly - you'll see a diagonally placed resistor near the main chip in the picture below.


 I now had a perfect 13.8V output.  The problem was that the supply was now out of kilter.  While it will happily provide 13.8V at very light load, any significant loading of the supply was triggering protection circuitry and the supply would go into "hiccup" mode, which was audible through the iron.

I'd had enough of this hassle before with switched mode supplies, so decided to go back to the original 12V supply design with a linear first stage, though I went a bit over the top...

Sunday, 25 November 2012

Toothbrush time...

It's been a while since I've had time to post, in between working on Sunrise and full-time work, but I thought I'd post a few shots from a teardown of my Oral-B toothbrush, as it was badly in need of a new battery.


 The toothbrush in question was the top of the line one - I believe later versions are a bit fancier now, but it was pretty expensive, and after a few years use, the battery life had dropped from 4-5 days or so down to about 1-2 days between charges.

The battery is a NiMH tabbed cell, soldered in.  The choice appeared to be between approx. 55 quid for a refurbished brush, or £8.30 inc. P&P for a new cell.  I decided to take the latter option... despite Braun's warnings that doing it yourself will knacker the water seals.  Frankly, for less than a tenner, you're not going to lose much even if the brush does suffer from water ingress at a later point.

Getting the thing open wasn't too hard - there are tutorials on Youtube, but the internal plastic retaining clips were a little more fiddly than anticipated... thankfully didn't snap the induction coil wire when it gave way!


Under the LCD screen, there was lurking an MSP430, which was slightly surprising, as I'd have thought they'd be using a more cut-down controller for something like this.  Certainly in the lower cost brushes, I seem to recall seeing an unknown uC.

In any case, even an MSP430 cannot run off 1.2V so there must be a boost converter  on there... probably that little SOT package just below, as there's a chunky-ish inductor just above it.  I presume that the motor runs directly off the battery via. a MOSFET under control of the MSP430, as the boost converter is unlikely to be that efficient at this low a voltage.


The charging circuit looks pretty simple.  I haven't traced it out, but noticed that it's a pretty slow charge, so probably nothing exotic.


Here's the old battery in place, with the retaining spring removed between the motor and the battery.  Note that there's actually quite a lot of spare length in the chassis - the original battery is 42mm long, but you could probably fit another 10mm or so in there.  Such a shame that it wasn't ever so slightly longer to take a regular AA.

They've also decided that a 0.1uF cap across the motor terminals was necessary... wonder if this is for RFI or whether it was adversely affecting the microcontroller in some way.



New battery in place.  The cell is rated 2000mAh, and is allegedly a Sanyo, so of decent quality.  The terminal strips were a little wider than the original but are easily cut down with scissors as the metal is so thin.

And then, put it all back together again... still charging, but seems to be fine so far... :)