Project 002 - Modem Monitor

Updated: 27/04/12

DISCLAIMER: This design is experimental, so if you decide to build one yourself then you are on your own, I can't be held responsible for any problems/issues/damage/injury that may occur if you decide to follow this build and make one yourself.

INTRO

IanJohnston.com is hosted at home on a couple of DSL lines, and doing the important part of DSL, routing web traffic & emails to my servers is a Draytek 2820n modem/router.

The Draytek has been working reasonably well but not good enough to give it top marks. The problem is that lately it has been re-booting or locking up approx. once per day, and if you google the problem it's actually quite rife! Some folks will suffer terribly, whilst others never seem to experience the problem at all.
Draytek are aware of the issue and are working on it, meantime it is something of a pain. So, with the basis of an idea prompted from a work colleague (cheers Dave!), I sought to see if I could design & build it from bits n bobs I had lying around.

So, after just a day which included writing the code from scratch and putting together the hardware based on an Arduino & Ethernet Shield the Modem Monitor was done. Basically, the device ping's the router and if it doesn't get a response then it will cycle the DC power to it.

In detail: On power up the Monitor passes power to Router, then after 60secs (to give the router time to boot) IP monitoring starts.
The monitor pings the Router every 15secs and if it gets no response it'll then drop the power to router for 4secs.
Once power is resumed then IP monitoring won't start again for 60secs, just like power up.

To make things a little more user friendly there's an LCD to display the following:
- Monitor Status
- Current Ping Time
- Output Power Status
- No. of resets recorded
- Minutes since last two resets
- Timing indicator (seconds)

So far it's working fine, the first day I had it running it gave me 3 recycles.............but hopefully Draytek will come through and fix their firmware, but I guess it won't harm things leaving this running as a backup to any dropouts/lockups however they might be caused.

 

HARDWARE

1 * Arduino Uno
1 * Arduino Ethernet Shield
1 * 4x20 backlit LCD with a ByVacLCD I2C adaptor board (BV4218)
1 * ABS enclosure
1 * ZVN3306A FET (used to drive relay)
1 * 10k resistor
1 * PB switch, momentary N.O.
1 * 12vdc Relay (I used a 185ohm coil) c/w pcb base. N.C. contact is used
1 * Small piece of vero board
1 * Pcb terminals (1off 2-way, 1off 3-way)
1Lot * Misc. spacers for mounting the Arduino Uno & relay pcb.

 

SOFTWARE

Download - here.

NOTES:
Only compiles under Arduino 0023 and below (not Arduino 1.0).
Any necessary libraries outside the original IDE install are provided ( LCD, network ping and the software timer).

 

WIRING/SCHEMATIC

 

PHOTOS

The internals of the monitor:
4*20 LCD, Arduino Uno, Ethernet Shield & relay.
Connections are DC power in, DC power out (to modem), Ethernet & USB.

Note: With the Arduino Uno powered from 12vdc (within spec.) the on-board regulator on the Uno gets hot to touch so I've drilled a few large holes around the enclosure to allow it to breath.

 

Here's the LCD when the monitor is up & running and the modem is responding.
At the right side you can see the last two resets logged (bothing showing zero, i.e. no resets so far).
At the top right is an actvity counter showing the 15 seconds between ping's.

 

Here's the Monitor installed in my server cupboard next to the Draytek modem/router.