WRT router mods

From patryk (p4trykx@o2.pl), a full description and circuit diagrams for using the WRT54G router as an owfs server.

Files can be downloaded here

 

Description

 

Router front

This is a modification of the WRT54G v2.2 router. It’s based on http://owfs.org/index.php?page=wireless-router



The device has been upgraded with 1-wire interface and a serial port with RS232(+-voltages) but there is also regular TTL(0-3.3V) output.

 

Motivation

I’m using it to monitor temperatures in my home with DS18B20 sensors, the router collects data from sensors and presents it through web server. I’m running OpenWrt Backfire on it. The router has also SDcard mod to fit owfs software.


Circuit board


Circuit board fits version 2.2 WRT54G router but I think with few tweaks it will fit other WRT54Gs or virtually any router with 2 serial ports, but the you have to use flexible ribbon.


Power supply

Few words about power supply. My WRT54G has 12V power adaptor(it’s actually few volts above 12) some routers have 5V(also few above). In both cases you can steal the power from original adapter. My design uses linear regulator LM7805 it’s not the most efficient way to do it, especially with 12V supply, but 1-wire uses only about 50uA so it’s acceptable. Just remember not to connect hundreds of 1-wire devices.

There is also a place for second voltage regulator in case you need 12V needed for 1-wire memory programming. For temperature and other sensors/switches you do not need it. You just have to put a jumper so both VCC and VPP are connected to 5V.


Serial connector

For serial output I chose mini-din 8 connector because it’s small and relatively easy to buy. It has both RS232 and TTL signals available in stores. The connector has both RS232 signals (positive or negative voltage) and direct connections to router UART. For example you can plug in your older cell phone without an adapter.

In mini-din there is also 5V or 12V output depending on the position of the switch. That’s only available if you choose to solder both voltage regulators and your router has 12 V supply.


No isolation

I decided not to use a voltage converter between the router(3.3V) and the DS2480(5V) because I couldn’t buy it anywhere. Theoretically there should be some kind of isolation between 1-wire and the rest of the router, in case for instance a lightning strikes near your 1-wire cables. However then the power supply should be also separated and the design becomes too complicated and expensive. If you want you can look at Analog Devices iCouplers they seem to be good for this job. http://www.analog.com/en/interface/digital-isolators/products/index.html



Usage

 you use it OpenWrt with 2.4 kernel you just mount owfs like this


mknod /dev/fuse c 10 229  
owfs -d /dev/tts/1 /mnt/owfs/  




Cost of elements :

DS2480B can be purchased from few $ or you can order a free sample from the Maxima

The board is made using toner transfer method (you need laser printer for it http://www.youtube.com/watch?v=urv6jArKp6M ) so it’s about 1$

Other parts cost about 2-3 $

 

Schematics


 

 Board Layout