Friday, 17 February 2012

USBtiny ISP Review

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

After using the ATMega328 from my Arduino UNO in the ZX81 USB Keyboard, I needed to replace it. The chips themselves are only £3-4, so is much cheaper than buying a whole new Arduino. The only issue is the chip needs to have the bootloader burned into it before it can use the USB Serial programming in the Arduino. You can actually by them with the bootloader already programmed for about £5, but I was looking  to burn it myself to give me more options in the future.
This needs to be programmed using the standard 6 pin AVR ISP header. I was planning to get a programmer at some point in the future, but I though I might try to see if I could knock one up quickly. I found a few designs online for parallel port, but the one I tried didn't work, probably due to the length of the cables, or the drive capabilities of the parallel port. I had the same problems back in the early days of PIC work before I got a PIC Start. So I had a look around at other options and found the USBtiny ISP from adafruit, as a kit from .:oomlout:. in the UK, so this is just a quick review of that.
It arrived as kit this morning, it would have been nice to have a single sheet schematic or something, but the step by step build instructions are online,
It didn't take long to build up the board, clip it into the case and away it went. and worked first time.
It's nice to find things that just work without having to hack about with anything!

Thursday, 9 February 2012

PIC vs Arduino

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

Well, there's a contentious title!

After many years programming microprocessors like the Z80, the 6502 and the 68K back in the 80's, I first met the microcontroller in the form of the PIC16C84 in the mid 90's. I built a homemade parallel port programmer and away I went. Since then I've used various PIC's in personal and commercial projects, initially in assembler, and later in C. It's the usual story of 'which microcontroller should I use?', and well, there's a bunch of PIC's in the box, the official programmer, home made prototyping boards, the IDE is setup and working and I know my way around them. So, as long as there is a PIC variant that has the requisite features, it's the easy (read 'lazy') choice. However, a couple of years ago, I had a couple of ideas for projects using USB, so I got some PIC's with USB support and built some prototypes. These never went anywhere, there seemed to be loads of problems, the USB framework seemed to be in a state of flux, so the examples were based on a different version to the current one, the latest version didn't work with the IDE, there were incompatibilities with the core framework, and when it did compile, it didn't work! I spent ages with various libraries and versions of MPLAB and a couple of different types of PIC and got nowhere, so they were put on the shelf.
Recently, I've been evaluating the Arduino as a way for beginners to get into hardware and software, and it seems to be really well thought out. Someone who doesn't know electronics or programming can pick one of these up for £20-£30 and have an LED flashing in a few minutes. It's then quite easy to follow some simple examples and add more complex hardware and software, and they seem to have the libraries sorted out so thinks like driving an LCD or even a LAN connection are taken care of with a simple code interface.
After only a couple of minutes of plugging at the breadboard, an HD44780 based LCD display is up and running, not a bad start. I can see a couple of failed PIC projects being resurrected on the Arduino - watch this space!

Wednesday, 8 February 2012

Samsung LCD TV's - power supply fault

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

My parent's bought a Samsung LE40R74 the same as mine, because I'd been into Curry's and peered through the grill on the back and seen that inside was the LTA400WT-L01 panel. At the time I worked with large LCD panels as part of public information displays (bus stations, airports etc.), and that was one of the panels we had chosen to use, so I knew the were fairly decent and had seemed to stand the test of time.
They got it and it did the job very well. Then it went off, or rather it started occasionally switching off, and sometimes wouldn't switch on. So I took the back off and had a look around, and there seemed to be a couple of dried up capacitors which had opened their vents. Capacitors work the opposite way around to mussels, if you cook them and they open up, you throw them away. I noticed that the ones that had gone were very close to a heatsink. It seemed to be a poor design, that close to a heat source, they are bound to dry up over
The duff capacitors were filters on the low voltage and standby side of the power board, so presumably as they had dried out their capacitance reduced and so it was failing to generate sufficient power to keep the TV on.
I popped out to my wonderful local electronics shop (ESR) and got some replacement caps, 105C rated and replaced all those in the area around the heatsink and away we go, the TV is back up and running.
That was a couple of years ago, but since then a couple of people have come to me with similar Samsung TV's with similar symptoms. I don't normally repair TV's, but in this case, it sounded like it was the same issue. And indeed it was, these ones also had dried up capacitors, in the same place around that heatsink. The later models seemed to have gone for 2200uF rather than 1000uF, and yesterday, another one arrived, an LE40R88, same problem, but in this one they had used 25v caps rather than 10v as before, which was still sufficient for the 5v rail. So it sounds like they are trying to fix this problem by changing the caps, but they seem to have moved them closer to the heatsink!

Thursday, 2 February 2012

Universal Laptop Power Supply Further Update

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

After using this for a while, I've made a few changes. The power LED was wired in place of the original on the unit and wasn't ideal. As there is a delay in starting, it doesn't light immediately, and if there isn't much load it doesn't go off immediately. The combined with a possibly dodgy mains switch led me to make a change. I also thought a couple of 4mm posts would actually be a good idea, to make the unit more general purpose, so time for a bit of rework.

I added the 4mm posts and a new 'output on' LED wired across those (well almost +V is taken from the input side of the ammeter so as not to show up on there. I also removed the original 10K divider resistor from the main PCB and replaced it with one directly on the output, to remove any voltage drop from the internal wiring and the ammeter.
I replaced the faulty mains switch with a chunkier one and added a mains LED. I replaced the mains socket on the PCB with a 0.156" header to tidy up the wiring.

And now here is the finished unit, next to my existing 5V / 12V bench supply.



Note from 2022: This is still in regular use, still with the "temporary" pencil labelling.

Thursday, 26 January 2012

Universal Laptop Power Supply Update

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

I've been looking further at this unit and have decided to rehouse it in a bench power supply case and add some additional features.

One useful thing in a supply like this, particularly when testing laptops, is an ammeter. This will show if a laptop is charging, and indeed how much it is drawing from the supply. I've also been looking at the voltage selection and the low voltage feedback side of the supply. It uses a potential divider across the output, 10K at the top and the bottom is one of a selection of precision resistors, chosen by the position of the switch,  ranging from 1240R to 1910R. The centre of the divider is used to drive the LED on the opto isolator back to the mains side.

I've been doing the maths, and it looks like it needs to be about 2.6V to switch on the LED, which will switch off the chopper driver. So, when the output voltage is high enough to make the voltage at the divider is over 2.6V, the LED turns on and the chopper stops charging the output capacitors and the voltage drops until it is below 2.6V, the LED turns off and the chopper starts charging the output capacitors again.

The original selector switch is 11 position, and the lower 4 have an additional signal diode in series with the resistor. This seems to be needed to keep the overall resistance in the same range, by knocking 0.6V off the LED voltage.

In rehousing it, I did think about removing the existing switch and wiring a replacement from the front panel, but I thought I could probably just replace it. I did a bit more maths to work out the best replacement resistor values, and could make reasonably close to most of them with a combination of 2 standard E24 1% resistors. In the end, I thought if a job is worth doing, do it properly, so I went for a 12 way switch with 12 500R multiturn pots and approximate values to set the desired values mid range in the pots. I used multi turn pots for the best accuracy, and ended up with about +/- 1V adjustment on each one which has left me lots of room to set them as accurately as possible.



I thought I may as well use the extra position on the 12 way switch, so I added a 24V range, I also changed two of the lower ranges from 14V and 15V to 13.8V and 14.4V as these seemed more generally useful.

I would normally use 4mm terminals for something like this, but I wanted to keep the original cable, which is a single piece of coax, so I went for a 3 pin XLR connector for the output, more than sufficient for the maximum rated current.


So here is the finished unit, temporary labelled in pencil.


Note from 2022: I am still using this regularly and the front panel is still labelled in pencil.

Friday, 20 January 2012

Universal Laptop Power Supply Teardown

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

I've been using a 'Universal Laptop Power Supply' for the last year or so to test laptops where either the owner hasn't brought the charger or there is potentially a problem with theirs. It seems to do the job, it's a 120W unit with selectable voltages from 14V to 22V, and a selection of tips that have suited every laptop I've used it with, except for one old Dell laptop.

Recently though it's been making a buzzing noise under load. Not necessarily a problem, but it's been getting louder and more annoying. So, I thought it was time to take it to bits and see what makes it tick (or rather buzz).

It seems to be fairly well made compared to some units I've seen. There is some unpopulated area at one end, which appears to be a 5V USB charging supply option not on this model.

Turns out the fan on there was making the noise, an 8V 30mm unit. I've removed it and tested it on a bench power supply, at 8V and it runs fine, as noisy as expected from a small fan, but not as bad as it had been inside the PSU. It seems it was being driven by a voltage which slowly rises with load, and at about 3-4V it is trying to start but fails to spin and just sits there and buzzes. Not a very good design really, it shouldn't be run below a safe guaranteed starting voltage, in this case, about 5V.

UPDATE: Comments disabled on this post as it seems to attract a lot of spam.

Wednesday, 30 November 2011

Hotswap IDE bays

This is an old post, preserved for reference.
The products and services mentioned within are no longer available.

One of the things I need to do a lot with building and repairing computers is to remove a hard drive and attach it to a second system to do an offline virus scan or attempt to recover data. For SATA drives that is easy, I have a couple of eSATA docks which allow me to slide in any SATA drive without a problem. As SATA hotswapping is not a problem (at least with AHCI mode in the BIOS), this allow me to boot the known working system and get the virus scanner an everything up and running before attaching the drive. Hopefully this should detect any bootblock issues etc.

I still have need to test IDE drives, and they are more of an issue as I either have to dismantle the second PC and connect it internally, which means it is present during boot which isn't ideal, or I have to mess around with USB-IDE adapters and external power supplies which isn't ideal either as it is a bit of a faff and is limited by USB speeds. I got a couple of removable IDE caddies which improved things as it made it easier to connect to the PC, but still meant I needed to have the drive present during booting.
So the idea I had was to use a couple of IDE-SATA convertors. These little boards allows you to use SATA drives with an IDE host or, as in this case, use IDE drives with a SATA host. I did some testing with the drives powered up all the time, and connected via the adapters to the SATA ports on the motherboard and they were detected fine and accessible at full speed. All that was needed now was hotswap capability.
The caddies have a key operated power switch, which cuts power to the drives to allow removal. The SATA-IDE adapters only need 5V (usually provided by a 3.5" floppy power connector), so I found the switched 5V line on the back of the caddy and wired it to the SATA-IDE adapter power so it would be switched on and off with the drive.
Now for the test. Power it on before boot to check it all still works, yes, no problem. So now I booted with the key turned off, and once booted, turned they key on. The drive spun up and was detected just as if I had slid in a SATA drive. I then made a second to complete the pair and now use these regularly for testing IDE drives.

For Data Recovery or Virus problems, see www.tynemouthsoftware.co.uk