WRT54GL MAX232 Serial

From DD-WRT Wiki

Revision as of 01:46, 29 November 2007 by Lysander (Talk | contribs)
Jump to: navigation, search

Serial port on a Linksys WRT45G/GL router using a MAX232 interface IC

This brief tutorial describes how to add two standard RS-232 serial ports to a Linksys WRT54GL router; the same is applicable to several other models based on the same hardware (WRT54G line et all). The MAX232 is a level conversor IC for serial communications which is cheap and available pretty much anyware.

Technical overview

Most routers of the WRT54G line include two serial ports, complete with pinholes on the circuit board. These operate at 3,3v (TTL) level, so they need a level converter in order to work with a regular RS-232 serial port. This is normally done with a level converter IC, and of all available, MAX232 is the most popular. The problem is that this IC requieres atleast 4v in order to work properly, and the pin header provides 3,3v.

A solution proposed in several sites is to use a compatible device which allows operation at 3,3v (MAX3232, MAX233), but this are normally more expensive and (most important), difficult to find in several parts of the world. This document describes a workarround which allows us to power a MAX232 with 5v within the circuit board, which allows the use of this IC and provides excellent performance.

Details

What we'll do is basically to take power directly from the power connector and convert it to 5vdc. The serial pinout arrangement allows to do this without the need for an aditional cable over the board, but this is NOT RECOMMENDED, as it involves soldering a power wire (directly from the wall adapter!) into the serial header. It can be done, but if you don't feel comfortable doing this i'd reccomend soldering a wire and taking power from it instead from the serial header.

The voltage conversion is done using a 78L05 5vdc voltage regulator, which is cheap, small and does the job nicely. I considered using a simple zenner regulator, but from what i've seen the wall adapter voltage varies wildly between models and even regions, so the 78L05 regulator will do a much better work here.

Now, you need to locate the power input on the board and solder a wire to it - this can be done directly on the underside of the board:

Image:Example.jpg