Saturday, November 14, 2009

Build a Wi-Fi antenna using household materials

Who'd have thought that a toilet-brush holder, of all things, would turn out to be an excellent Wi-Fi antenna? The lesson is that you can achieve great results for little expense - and half an hour's work.

The range of a WiFi router can be considerably extended simply by connecting a directional antenna.

Standard omni-directional stub antennas are at the lower end of the performance scale, and they quickly come up against their limits when you need to give your own home better coverage, provide your neighbour with DSL, or pick up as many radio networks as possible while war driving.

If the access point is three rooms further on, or even in the house on the other side of the road, you need a directional antenna.

If you have to make a connection to your nearest DSL-equipped acquaintance at the other end of the village street, or to bridge even longer radio links to reach the free radio node in the next block but one, you may even require two directional antennas.

Neighbourhood WiFi routers with omni-directional aerials are in any case the worst sources of interference in a city.

A single block of flats can easily contain over ten wireless networks, all chattering away simultaneously. Mutual interference is inevitable, with the result that range and connection stability are drastically reduced.

Replacing just one of two antennas at the base station can be a way of improving WiFi coverage, for example, down to the bottom of the garden.

The near zone is served by the remaining stub. All current WiFi modules automatically use the most suitable antenna for each client, a process called antenna diversity. Even with models having only one external antenna, it's worth having a look inside the casing.

Usually, a tiny socket for the second antenna is fitted on the WiFi module. Depending on the manufacturer, this type of plug is called U.FL or Ipex.

The connection can easily be led out through a ventilation slot with a short adaptor cable ("pigtail"). On some WiFi notebook cards and USB sticks, there is also an antenna plug, and a look at the data sheet will tell you its type – normally SMA or RPSMA.

The simply made tin-can antenna, with the dimensions given here, is suitable for base stations and for clients who transmit on 2.4 GHz in accordance with the IEEE 802.11b and 802.11g standards. 802.11a uses the 5-GHz band, requiring different antenna dimensions.

The necessary background for a recalculation is given in an article on building tin-can radio antenna (Building a Wi-Fi Antenna Out of a Tin Can)

Very recent base stations that comply with the draft standard 802.11n also use the 2.4 GHz band. But they automatically use a number of methods to combine their antennas for optimal range and speed.

However, this only works if the antennas have the characteristics expected by the WiFi chipset.

Permitted transmitted power levels

A directional antenna is particularly useful to anyone trying to extend the reach of their WiFi because it improves reception quality: it not only strengthens the signal coming in on-axis, it also equally attenuates off-axis signals. This masks out a lot of interference very effectively.

A spatial diagram of the directional characteristic of the tin-can antenna shows a lobe with rotational symmetry and with around 8 dBi gain in the main direction and strong attenuation to the rear.

In the UK Ofcom (The Office of Communications) is responsible for regulating the use of the electromagnetic spectrum.

According to their regulations, in the IEEE 802.11b/g (2.4 GHz) WiFi band, maximum equivalent isotropic radiated power (EIRP) must not exceed 100 mW.

This means that a directional antenna must not radiate more strongly in any direction than a non-directional antenna with a spherical characteristic, fed with 100 mW.

Most WiFi modules only output between 30 and 50 mW, and this is further reduced by losses in the cables going to the antenna.

According to our measurements, a typical directional antenna radiates so well that, with 50 mW at the WiFi module, somewhat more than the permitted power is radiated by the aerial.

Many WiFi routers have a configuration setting that allows a choice of transmit power levels. If you can choose to reduce output power by half, you'll be on the safe side.

Otherwise any interference you might cause could induce the neighbours to complain to Ofcom, who could then send a testing crew around and perhaps charge you with an offence.

The transmitted power can also be reduced with a longer antenna cable, but that also impairs the received signal.

In practice, using a directionally radiating antenna is likely to benefit your neighbours because, since your transmissions are directional, interference is reduced.

Tin can aerial materials

Bild 8 [250 x 153 Pixel @ 19,7 KB]

The cost of the small parts required only amounts to a few pennies: an N-type socket, fixing material, and a bit of copper wire.

If you don't want to dig deep into your wallet for a directional antenna, you can build all kinds of antennas yourself using household materials: instructions for building antenna using CD spindles, aluminium reflectors, polystyrene-foam Yagis and many other home-brewed devices can be found on the internet.

But one of the simplest easy-to-build designs is a tin-can antenna. This consists of a tin can with a coupling pin stuck into it, and a socket for the connecting cable to the router.

In principle, any electrically conductive material is suitable for making a tin-can antenna. It's worth having a look at the household-goods department in your local supermarket, or even at your domestic waste: candidates for recycling include noodle cans, food cans, coffee cans, packaging materials of high-profile spirits, and much else.

The optimal internal diameter for 2.4 GHz WiFi is between 84 and 92 millimetres - or even up to 111 millimetres with slight losses in gain and directivity.

Contrary to what is claimed in many do-it-yourself guides, to our knowledge it's length that counts. Since some trial and error is required for a successful build, we give some typical dimensions in our antenna calculator, below.

The can's length doesn't have to agree precisely: you'll only need to reach for your saw if it's more than two centimetres out.

Antenna calculator: Dimensions for a tin-can antenna

Bild 12 [247 x 161 Pixel @ 2,4 KB]

Input parameters

Operating frequency f in GHz:

Diameter of can D in mm:


Ideal can lengths LD in mm :147, 264, 382, … (In increments of 118)
Radiator length LS in mm :31
Mounting point in front of rear wall Lm in mm :59

As you can't easily take this online calculator to the shops with you, we've put together some typical dimensions in the Table below.
Optimal can dimensions at 2.45 GHz
Can lengths
231, 416, 601,…
194, 350, 506,…
172, 310, 449,…
157, 284, 410,…
146, 264, 382,…
138, 249, 360,…
132, 237, 343,…
126, 227, 329,…
122, 219, 317,…
118, 213, 307,…
115, 207, 299,…
112, 202, 291,…
109, 197, 285,…
all measurements in millimetres

If weatherproofing and durability are required, a can made of stainless steel or aluminium makes a lot of sense.

The sides of the can should be smooth, without the reinforcing ribs that many food tins have. This is particularly important for the bottom of the can, which should be completely flat.

Otherwise scattering and destructive interference will occur, and this will degrade both antenna gain and the associated directional effect.

Holes and slits in the sides of the can are not a problem as long as their size is less than a tenth of the WiFi wavelength – approximately six centimetres for 2.4 GHz.

If you're in any doubt, a layer of aluminium foil and adhesive tape will put things right.

Reinforcing rings or other metal parts that project into the interior space are major sources of interference and should be avoided.

The stainless steel designer toilet brush holders are particularly suitable. For our projects, we shopped at the nearest DIY hypermarket, because that allowed us to check the cans on the spot.

Even without cutting, the dimensions of the holder we found are virtually ideal, with an internal diameter of 91.5 mm and a length of 240 mm.

Stainless steel holders are rust-proof, so they are suitable as antennas for outdoor installations as well. We found these priced around £12 - £15, putting them into the luxury bracket. Similar-looking models can be found on the internet for £10 or so.

Aerial construction

Shopping list

  • N-type connector, 50 ohm, flange mounting
  • 1.5 mm² (cross-sectional area) copper cable, e.g. from a piece of heavy three-wire mains cable
  • countersunk screws, 10 mm long, maximum thread diameter 3 mm
  • four nuts to fit
  • washers, approx. 20
Apart from the router and the antenna cable, which you can find in any good electrical goods shop, the parts required for the tin-can antenna come into the pocket-money range: four securing screws with countersunk heads and matching washers and nuts, the 50 ohm N-type socket (not TNC) with a flange, and left-over cable from an electrical installation.

The insulated wire should be not less than one millimetre in diameter, and it must fit into the sleeve of the N-type socket.

Threaded N-type sockets with large securing nuts are of limited suitability for a tin-can antenna, since by projecting inside the can they interfere with the electromagnetic wave and reduce gain.

Nothing other than the coupling pin should project into the interior of the can. Otherwise, scattering and reflections will cause losses.

This was is why used screws with countersunk heads. Five drilled holes are required for the N-type socket used: four small ones for the screws, and a big one for the coupling.

The latter should correspond as precisely as possible with the external diameter of the white insulator of the N-type socket - ten millimetres for the socket we used - so that the outer metal conductor lies as closely as possible against the metal plate, as shown in the illustration, and projects as little as possible into the can.

Drilling into the thin sheet metal is best done by the boring-out method or using a sheet metal punch: first, punch as precisely as possible the spot where the coupling pin will be positioned.

Take the distance to the bottom inside the can from the. When making the measurement, remember to take account of the breadth of the fold at the bottom of the can.

Drill the first hole with the smallest possible drill (2 mm). You can make this easier by punching the metal with a hammer and nail. If you use a high rotational speed and little pressure, the drill is very unlikely to tear into the thin sheet metal.

Increase the diameter in approximately 2 mm steps until the required size is achieved, or until the bolt size of the metal punch is reached. The last step, if required, is to finish off with a round file.

The copper-wire coupling pin is attached using a soldering iron. It's connected to the inner conductor of the socket, and then cut to the right length.

We used a straightened copper wire from a regular, three-wire electrical installation cable as a coupling pin.

This has to be soldered to the inner conductor of the N-type socket. It's much easier to do the soldering first and then cut the wire to length, instead of cutting it to length to start with.

The length, including the outward projecting part of the internal conductor of the socket, must be a quarter of the wavelength of the operating frequency, in this case 30 millimetres.

The metal collar and the can wall should end on the same level. Two washers ensure the correct distance between the flange and the sheet metal.

Washers on the outside, between the metal of the can and the N-type socket, ensure the correct distance.

The metal cylinder around the white dielectric of the socket should stop precisely at the level of the can metal and not project into the can.

We used two washers on each screw. The four screws also provide additional electrical contact with the antenna can.

If the can is painted, or coated in some other way, remove the coating around the drilled holes to ensure electrical conductivity.

If the coupling hole ends up being too large so that there is insufficient electrical contact with the can, you can rectify things by putting crumpled aluminium foil between the flange of the socket and the can.

Throughout the work, ensure that the can stays round, otherwise the directional effect will be degraded.

Don't put any additional screws through the wall in order to assemble the finished antenna to a holder, because their heads would form internal sources of interference.

For indoor use, it's usually sufficient to fasten the antenna to a shelf or shelf bracket with gaffer tape, adhesive tape or large cable ties.

For outdoor mounting, gutter clamps or coated, corrosion-resistant perforated ribbon are more weather-resistant.

Lightning protection

If the antenna will be positioned on a roof, you also have to think about lightning protection. Only if the mast is correctly connected to the lightning protection system will your insurer pay in the event of damage to the house.

Mounting it on a house wall is less problematic: the antenna need only hang more than two metres below the eaves and a maximum of one metre away from the wall.

This can be easily done using a satellite-dish wall bracket. In many cases, however, it is sufficient to position the antenna indoors at a window, although modern coated windows do degrade performance somewhat.


To determine antenna power and the effect of manufacturing tolerances, we built two versions of the tin-can antenna and had them measured by the Institute of Microwave Engineering at Leibniz University, Hanover.

We drilled one tin-can antenna to a precision of approximately half a millimetre, but gave it a coupling pin that was about two millimetres too long.

In the second tin-can antenna, the coupling pin is not exactly straight and the drilled hole for the exciter is one millimetre too far from the rear wall.

Furthermore, its N-type socket is fastened with only two instead of four screws, which implies poor electrical contact with the can.

The Institutes tests showed that the differences in power of the two antennas, compared with an ideal simulation result, lie in the lower single-digit percentage range and are thus negligible.

This shows that the tin-can antenna has an astonishingly high resistance to manufacturing errors, as long as its diameter lies within the optimum range.

In the marked WLAN area, antennas built with differing parameters (blue, black) diverge only a little from the simulated ideal antenna (red). Values below –10 dB are good.

Heavy attenuation on the rear side with the tin-can antenna shows up particularly clearly. In this area, interfering routers in the vicinity are virtually no longer a problem.

The scattering-parameter diagram – above – shows the differing behaviour of the two antennas in comparison with a simulation result.

It can be seen very clearly that the resonance point of the tin-can antenna with the over-long coupling pin has moved to a little over 2.3 GHz.

This frequency matches a coupling-pin length of approximately 32 millimetres. With the second tin-can antenna, the resonant frequency is correct but reflection on the input side is clearly greater.

These deviations can be explained by a combination of imprecisions in manufacture: a coupling pin that was not straight, an incorrect distance from the rear wall, possible deviation of the can from the ideal cylinder, and poor contact between the N-type socket and the can wall.

The really important thing is that the diameter be correct. Otherwise the proportion of the power reflected back to the sender, and thus not radiated, will rise. This happens with a can in the critical range of the illustration below, with a diameter of less than 84 or more than 111.5 millimetres.

Internal diameter is crucial for a good tin-can antenna.

The green area is optimal, while the yellow area is tolerable, with slight losses.

In the orange area, the characteristic of the constructed antenna is difficult to predict.

Practical testing

The toilet-brush tin-can antenna, too, had to go through a practical test. Under optimal conditions, its net throughput was better than 8 Mbit/s at a distance of one kilometre.

The finished antennas had to prove themselves in a practical test. We selected a radio link one kilometre in length, with line-of-sight contact, and a 30-metre connection within an office building, without line-of-sight contact.

We selected two WiFi routers in the Linksys WRT54G series as our test setup, and we installed OpenWRT 7.07 "Kamikaze" as the router operating system.

Throughput was measured with the iperf network tool: in a measuring window of 128 kilobytes, we took the mean of five half-duplex test runs, each of 20 seconds.

The router and the tin-can antenna were connected to each other via cable three metres long.

With standard stub antennas set up at both ends, no connection was achieved on the longer link. But with a tin-can antenna at just one of the two routers, we received a link.

Iperf determined an average TCP throughput of 2.3 Mbit/s. Using tin-can antennas at both routers raised throughput to 8.5 Mbit/s.

The tin-can antenna was put through its paces at Hanover University. The receiving antenna can be seen on the right. It was rotated around the vertical and longitudinal axes.

It should be remembered that we were testing radio communications under ideal conditions: line-of-sight contact and an almost completely free Fresnel zone; this is the spatial area between two antennas in which the energy is transmitted from the sender to the receiver.

It has the approximate form of a stretched football which, in the case of a WiFi, has a diameter of approximately one-third of the square root of the distance in metres – about ten metres at a range of one kilometre.

If the Fresnel zone is not completely free, say because there are trees or houses too close to the line of sight, considerable losses are to be expected, particularly in rainy weather.

In an office environment, a free Fresnel zone is impossible. Even given the short distance, the existence of several walls ensured that no connection was made with stub antennas, but one tin-can antenna was sufficient to give a connection with a throughput of 3.2 Mbit/s.

With a tin-can antenna at each end, it jumped to 7.1 Mbit/s. Our configuration, particularly the cabling, could be optimised further. Specially made cables, as short as possible, could reduce losses.

1 comment:

  1. Hi,

    Your work on the blog is fantastic. I’m influenced in a positive way.

    Specifically, I got some nice information in this page

    If you are interested, I would like to exchange links by placing a content link in your website. Don’t you think it would be nice for both our sites?

    I’m waiting for your response.