Monday, July 23, 2007

Schmart prototyping

Prototyping is one of those things we need to do but recently SchmartBoard has made it a little easier. Over many years I have used a variety of commercial systems as well as specialised boards I designed for myself. But nobody really has a system quite like the SchmartBoard.

A SchmartBoard is exactly 2 inches (50.8mm) square and it has a specialised pattern on it which allows you to hand solder integrated circuits with pad or pin pitches as small as 0.4mm. I haven't used the 0.4mm yet, but I can tell you that 0.5mm and 0.65mm are a soda to handle, including the 0.5mm QFN style pattern seen here.

This board is a little unusual in that it has two patterns on it, one a 32pin, which can be used for things like the CP2102/3 USB devices, or an Atmel AVR processor, while the 10 pin one can be used for a variety of power devices and driver devices from manufacturers such as Maxim. I tried all manner of techniques for hand soldering QFN's, but this is the only one that works.

So how do they do it?
The SchmartBoard actually has a shallow groove where the IC pin sits. And that is the secret! My method is a little different to that in the documentation, before I mount the device I use a solder flux pen (felt tipped), my favourite being the Kester #2331-ZX which I usually buy from DigiKey, and applying a small amount of flux along the board where the pins will sit. I carefully place the IC using tweezers (a magnifier does help!) and while holding the device down with the tweezer points I carefully tack solder two diagonally located pins on the device.

Then I carefully check alignment and solder the remaining pins, usually using an STTC-106 tip in my Metcal MX-500 solder station. Of course you don't REALLY have to have a $600 station like a Metcal. Your good old fashioned Weller or whatever will work with a VERY fine tip of appropriate temperature.

After soldering the device I clean up any excess flux with an MG Chemicals Flux Remover Pen 4140-P, again from DigiKey.

Thursday, July 5, 2007

Pullup resistors - how and why

I was working away yesterday when I got an IM from a hobbyist friend
"I was playing with some switches and your design said to use 10K pull-up resistors, they take about 500uA of current each, why so much? Aren't pull-ups just to get a voltage?"

Well, yes and no! There are several reasons to use a pull-up resistor
  1. Establish a logical 1 input on the pin.
  2. Provide wiping current for switches.
  3. Act as a current source for something like an open-drain or open-collector output
Back in the dark ages when TTL (Transistor-Transistor Logic) ruled, logic inputs actually drew current! Not a lot, but to ensure that a pin was pulled 'high' you needed to source at least 40uA at a minimum of 2.4V. The input of a TTL circuit is typically the open emitter of an NPN transistor. So generally a value between 1K and 5K was commonly used. Todays most common integrated circuits use CMOS technology, and if the pull-up is merely to provide a logical 1 at the input then even 100K would be acceptable. Many microcontrollers such as the Atmel AVR and Microchip PIC parts have internally selectable pull-ups for convenience and reduced parts count. The actual resistance value will vary, but is often in the range of 40-80K ohms.

Switches open up a whole new ball game. The contacts of most switches are made with a highly conductive metal plating over a lower cost metal such as brass. When selecting a switch for your application check the data carefully as some types will require a minimum 'wiping' current which is needed to inhibit oxidation of the contact surface, particularly for designs where the switch contacts do not 'wipe' across each other. Once again, modern parts require lower currents, but if a switch seems to be unreliable, try increasing the current by reducing the value of the pull-up resistor.

When the resistor is used to provide the output load for an open drain or open collector circuit its value needs to be high enough to keep the current down to a reasonable value, but low enough to provide enough current to get the required speed. A perfect example is the I2C (i-squared-c) bus from NXP. A large number of inputs can appear in parallel so the pull-up needs to provide sufficient current to take all of them to the high state. And it must do so whilst charging up the input capacitance of all the devices and any parasitic capacitances in boards or cables quickly enough to get the appropriate rise times.

One common mistake I see is people using I2C with controllers and accepting the internal pull-up as being adequate for driving the bus. It just might work if the one I2C peripheral or memory part is the only thing connected to the processor and it is very close to the host. But even then many users report that they cannot get the 100kHz or 400kHz speed of the I2C bus, the might have to reduce the clock to 10kHz or even less. I2C was specified with a 4.7K pull-up for a darned good reason, and you will see that the rise times and thus speed capability of the bus only achieve optimal values when you use that pull-up.

Wednesday, July 4, 2007

Responding ... to the user - an LED dimmer

It seems that the one thing setting small design houses, such as mine, apart from the big boys, is the money we can spend on the 'user interface' to our hardware such as my recent LED dimmer project. Every day we look longingly at the nice membrane keypads, joystick actuators and the current crop of easy to use silicone keypads like those on your TV remote. So how on earth can we do those sorts of things without spending horrendous amounts of money?

Recently I was looking at a small joystick device that was emulating a mouse on a board, very nice. When I tracked it down it turned out that there are a couple of new things out there to make our lives easier.
First c
ame the ITT TPC1133 'tri-directional' navigation device. Or as it has become known in this office, the jogger. Push the small arc segment one direction, it closes a pair of contacts, push it the other way and it closes the other pair. Now when you leave it centred and push in, it closes both pairs. Very nice.

So where to get it? Well having tracked down the part at ITT Industries I then started looking at distributors, surely nobody would stock such a useful thing? At the first port of call I was right! Turns out Mouser must have stocked it for a heartbeat, but now they tell us it is obsolete! Darn, so search on. Saved, once again, by our good friends at DigiKey. Who not only list it, but have stock, and at very reasonable prices.

Now I had the solution to a problem, I needed to control the brightness of some LEDs very simply. Using this little jogger I was able to produce a board all of 19x50mm ( 3/4" x 2" ) that uses PWM to dim the LEDs, and here is how it turned out.

The jogger is tiny, suits this application perfectly and has been well received already by users. So much so that it is spawning an entire range of related products. Thank you ITT and DigiKey.

How did it come to this?

It seems now that this decision to start my first blog is long overdue. For many years I have kept detailed lab notebooks of my work and every now and again something in there is useful to somebody else. Over the last few years people have been saying "why not blog it?". Well, why not.
What you will see here has no grand plan. I hope it will be a collection of interesting, thought provoking, and sometimes even useful snippets based on things that I am working on.