Saturday, February 13, 2010

How to select Wire and Wire Strippers

Wire strippers are probably the number one tool of any DIY electronics project. Unfortunately, there are a million different types of wire strippers out there. Selecting the right set of wire strippers can be a difficult task. There are also a million different types of wire out there. Which one is right for my project?

Wire

Stranded and Solid Core

There are 2 parts to any wire, insulator and conductor. The conductor in any wire comes in two flavors, stranded and solid core. Solid core wire is as simple as wire can get, a piece of copper or some other conductive metal surrounded by an insulator. Stranded wire consists of many individual 'strands' of smaller diameter conductive material grouped together.

Solid core and stranded wire differ in two different ways. Solid core wire is rigid, and will break if bent multiple times. Stranded wire can be very flexible and is more suitable for applications where there is repetitive deformation. Stranded wire can also carry more current for comparable gauge than solid core.

There is another danger with solid core wire. If stressed, the conductor may break while the insulation stays intact. Visual inspection would show no problem with the wire, yet there would be no conductive path through the wire.

Insulation

Where there are basically on 2 types of conductor, a large number of different types of insulation exist for wire. Gauge refers to only to the size of the conductor, so many variations of the same gauge wire may exist. Some of the more common insulators include:

  • Poly-Vinyl Chloride (PVC)
  • Teflon
  • Silicone
  • Other Plastics

Most standard wires you see are either PVC or a similar material. PVC is non-corrosive, somewhat flexible, impermeable to oil an water, and is suitable for most applications. The other materials serve special purpose. For example, Silicone wires are very flexible and good in rough environments. Teflon coating is usually thin and gives an overall smaller outside diameter.

When selecting parts that connect to wire, such as crimp pins or insulation displacement connectors, pay attention to the maximum (and minimum) outside diameter called for by the part. When wire diameters match what parts ask for, cables or other wire assemblies go together much more smoothly.

Wire Strippers

Matching wire strippers to wire

The most obvious criteria for selecting a wire stripper is wire gauge. Most wire strippers fit into two categories, thin gauge and thick gauge strippers. For example, compare these two sets wire strippers

They are almost identical, except for different hole sizes for the different gauge wire. As a side note, the two sets of wire strippers above are excellent inexpensive general purpose wire strippers, which I obviously recommend.

The Different Styles and Additional Features

A good set of general purpose wire strippers like the ones above will fulfill most people's wire stripping needs. Depending on your needs, however, you might find some of the other styles of wire strippers useful. Here is a rundown of the different type of wire strippers I am familiar with.

Adjustable wire strippers


With 2 sets of 2 blades, this style wire stripper works well with most insulation types. To use these wire strippers, you select the wire gauge with a small wheel near the cutting blades. Then, you select the length of insulation you wish to strip via the small sliding block on the inside of the strippers. You then insert a wire into the end of the strippers until the end hits the block, squeeze both sides (in this case the yellow levers) and pull your wire out, now with a bare end.

Automatic Strippers


If you want a cheap versatile and handy set of wire strippers, get these. The set pictures is designed for coax, but would probably also work for medium gauge wire. These wire strippers automatically close the blades, grip the wire, and pull off the trimmed insulation in a single squeeze. You can get a set of these at your local hardware store for around $25 dollars.


Self Adjusting, Automatic Strippers


These are perhaps my favorite wire strippers. The strippers surprise people when when they see them in action. These strippers automatically adjust for the gauge of the wire. The automatic adjusting can be fine tuned via a sliding mechanism on the top of the strippers. Another useful feature is a sliding adjustable stop for adjusting the length of insulation to be stripped. Not to be outdone by general purpose cheap-o strippers, these also have a wire cutter underneath the stripping mechanism. Using these strippers is as simple as inserting the wire end into the end of the strippers, squeezing, and you're done.

These strippers also have different types of cutting blades, specific for different types of insulation. You can get 2 different cutting blades for it. The general purpose blade

only has 2 separate blades that can strip most wire. As an additional feature, this particular blade can strip multiple wires at the same time. If you need to strip thin insulation, such as Teflon, you need the replacement blade specifically for it, as pictured below.


The major drawback to these wire strippers is price. To get the strippers and the extra blade, you are looking at spending around $100.

Thermal Strippers


Thermal wire strippers cut by melting the insulation down to the conductor. Thermal strippers are clunky, take time to heat up, have a cord, and cost a lot. They don't work with every kind of insulation. Why would you ever want one? Because they will never nick or damage your conductor. The single feature, of a guaranteed perfectly stripped wire, make thermal wire strippers one of the best options for someone that makes a lot of cables, and needs reliability.

Thursday, February 11, 2010

XBee and USB to Serial FTDI latency and dropped packets

You would think that the USB board provided with the XBee dev kit right would work perfectly right out of the box. Unfortunately, you may experience problems depending on your application.

The Problem - Buffering


USB works quite different than RS232, or any serial type communication. A USB client is polled by the host. This means that the client must sit on any data it has until the host asks for it. In a USB to serial converter, the FTDI chip buffers data it receives until either the buffer is full, or until an idle timer triggers the buffer to flush because no data has come on the serial port for a configured amount of time.

The Ugly Side of Buffering


Buffering the data can cause two things to happen. If the data comes in at just the right speed, the buffer will slowly fill, but the timer will not time out. The default timeout for the FTDI driver is 16ms. It takes 62 bytes coming from the serial port to reset the timer. If the FTDI chip receives 62 bytes every 16ms, a timeout will never occur, and the USB block request buffer will slowly fill. The FTDI chip will then only send data out once the USB block request is full. You can figure out the time it will take the buffer to fill with the following equation, given the default block request buffer size is 4096 bytes.

time = 16ms*(size of ftdi buffer)/(62 serial bytes + 2 status bytes)

Worst case,

16ms*4096B/64B = 1.024 seconds

This 4k of data will come in bursts every 1 second. In computing time, this is eternity. Additionally, when the data does come, it comes in bursts of 4kB and at full blast. There is no delay between bytes. If the program or hardware receiving the data from the FTDI over the virtual serial port doesn't service the data fast enough, data will be lost and packets dropped.

The Dropped Packet Solution - Flow Control


To solve the problem of lost data, use flow control. Flow control might not be required on a physical RS232 interface with the same throughput and delays, but on the virtual port it is almost requisite. Enabling flow control is a simple thing to do, especially on the USB board that comes with the XBee dev kit. Any device connected to the FTDI chip should use flow control of some sort.

The Latency Solutions - Block Request Size and Latency Timer


There are 2 ways to fix the latency issues. Fist, you can change the block request size from 4kB down to a smaller value. The second method is to decrease the latency timer value from 16ms to a smaller value. According to FTDI, the preferred method is to change the block request size. In reality a balance of the two methods will yield the best performance per application.

To change the block request size and latency timer settings in windows, open the device manager. In the device manager, find the virtual serial port under 'Ports'. Open up the properties. Under 'Advanced' options on the 'Port Settings' tab, you can change both block request size and latency timer settings.

More information can be found here.