WRT54GL MAX232 Serial

From DD-WRT Wiki

Revision as of 02:15, 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.


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 directly from it instead through 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.

The first step is to solder a pin header to the serial pinholes on the board - this will allow us to work easier and without further soldering on the board. The detailed pinout is for a Linksys WRT54GL / WRT54G v4; the pinout for other models is similar, but you'll need to check them out.


(Ignore the black wire there - it's from a SD/MMC mod on the same router)

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:


We'll be using this wire to power our adapter board. What i did here was connecting this wire directly to the two unused pins on the serial header, in orden to keep a tidier wiring. AGAIN: DON'T DO THIS IF YOU'RE NOT COMPLETELY CONFIDENT OF YOUR SOLDERING SKILLS - the unused pins lie between ground and the Rx serial inputs. This means that a bad solder can either fry your serial ports, your power adapter, or the router entirely. Just taking this wire directly to the adapter board will work just as well, even if it's a bit messier.


This wire/pin will provide with atleast 9vdc which we can use to power the MAX232 IC. The adapter schematic is as follows: