T1 A/B Switch – Arduino Rocks!

The Problem

TAG T1 AB Switch

In our organization, we have an Asterisk based phone system. Because we are a 24X7 365 operation, and because our business must react quickly to customer demands, we actually have a completely redundant Asterisk system idling in standby mode. When we have to transfer over to the redundant system most of the operation takes only seconds, with one exception. Some of our inbound and outbound call traffic is carried over old school, plain ol’ telephone service (POTS) via physical T1 data circuits. In order to move these T1 circuits to the failover server, one of our engineers had to physically move the patch cables from one server to another.

Our engineers have tried a number of failover options, including converting the T1s into VoIP traffic so we could just change the packet routing when we needed to swing the calls to the failover system. However, the hardware and the software we’ve found, so far, does not meet our quality of service needs.

The Solution

t1 switch failover

Open Source Hardware to the rescue! I’ve been a long time fan of the Arduino platform and the community that surrounds it. I’ve seen some individuals create some elegant and amazing solutions. If the Arduino can be used to control unmanned aerial vehicles (UAV), then there’s no doubt I could use it to move 8 wires from connection A to connection B. So, I made this T1 A/B switch as my very first Arduino project. I am thrilled how easy it was, once I learned to solder in such a way as not to cook the small relays, to build and program this solution.



  • An Arduino Microcontroller – I used an Arduino Diecemilia, but the most recent model, the Uno, should do nicely(~$30.00).
  • An Arduino Ethernet Shield – The Wiznet 5100 based Ethernet Shield is preferred as the Webduino library, mentioned in software is already compatible with this control library (~$45.00)
  • 4 Pole, Double Throw, non-latching (4PDT) Relays – I used the Panasonic TQ4-5V (Digikey: 255-1013-5-ND $22 ea) IC relays, but shop around as these can be just about any commodity relay. Also note, you only really need 1 4PDT relay per T1 Circuit as only 2 pairs are used in a Cat5 patch cable (typically wires 4,5,7 & 8). However, I wanted to be able to test and use this deivce on gigabit ethernet and serial connections, so I used 2 4PDT relays per circuit in order to swing all 8 wires in a Cat5 patch cable.
  • Cat 5 jacks and Cat 5 wire – Ethernet has become so common place today that you can get this wiring, connectors, and punch-down tools in the electrical section at Home Depot or Lowes (~$30.00).
  • Bread board and project box – There will be quite a few patch cables in the enclosure. You want to give yourself enough room to gracefully bend these cables so that there are no kinks in the wiring. I used a 4.5″ x 7″ x 2.5″ enclosure from Fry’s Electronics (~$12.00).


  • Arduino IDE and a PC with a USB port – Arduino IDE is available from the website and is compatible with Mac, Windows, & Linux.
  • Webduino HTTP libraryWebduino is a really cool web server library written by Ben Combee (1) for a class at NYCResistor. I started with the Buzz demo application as my base and hacked it to fit the A/B switch needs.

Wiring Diagram

Assembly Photos

[slickr-flickr search=sets set=”72157626062477276″]

Source Code

Here are my Arduino PDE project files and wiring diagrams in a Zip Archive. If you have any questions about this project please contact me using one of the methods detailed here.


One Reply to “T1 A/B Switch – Arduino Rocks!”

  1. Pingback: Smart Garage

Comments are closed.