Ever since I've started using Linux I've been obsessed with doing custom routers and trying to cram as much functionality in the less amount of space possible. 'Space' so far being hard drive space, so I set out to build me a new router to substitute the old P5-233 Dell that was working as my firewall. Like pretty much every other hardware project I've done, planning was absent in the process as I prefer to do things Mc Guiver-style and surprise myself.

Step 1: Let the Games Begin!

I usually try to spend as little money as possible in projects, as such you can always find a good amount of "spare parts" in boxes in my garage. I already had a single board computer that was removed from a controller box, probably used in manufacturing. The power requirements were a bit troublesome for a SBC, but scavenging around found a power supply from a text terminal that would match the board perfectly (in terms of voltages at least).

Step 2: Giving It a Body

The computer turned on ok and seems to be in working order. I left it on a few hours to make sure the power supply would not overheat. With that out of the way it was time to build a case. While looking for a power supply I came across a damaged APC UPS and noticed it's dimensions matched that of the computer and power supply. So I set out to gut out the UPS and try to fit the components inside it. It was a rather simple although tiresome process of bending, ripping and filing plastic. One hour later the motherboard and the power supply were mounted in the case.

Step 3: The Operating System

I already use Linux for desktops, severs and router, so it was the obvious choice. I installed Debian Etch in a hard disk, but I wasn't able to make it fit anyway inside the case. I didn't had a spare laptop hard drive in hand but did have a compact flash memory and IDE adapter from a previous project. The CF memory was a bit small (256 MB) to fit a standard install so googling around a bit found Vadim Berkgaut's Debian router distribution. It's a stripped down Debian sarge install generated using debootstrap, a custom kernel and supporting scripts. Once installed in a CF the distribution copies itself to a ramdisk during boot, this means that it works fast, won't wear down the flash device and can be turned off without shutting it down. As it is a standard Debian distribution it can use natives packages (.deb) and the packages handling system (dpkg, apt) so it can be expanded and modified later on. Changes can them be written to flash with a simple command or just reboot to go back to the previous state. All in all an excellent piece of work.

Step 4: Finishing It Up

With most of it done, I cut out a piece of cardboard to avoid any part of the power supply and motherboard from shorting each other out. Since this motherboard didn't had a network adapter, I figured I could plug a USB hub and a couple of USB network adapters. I routed the USB port to the outside where the phone line surge protection plug was.

Step 5: Updates

During the process of writing this instructable a couple of things came up: The whole things was heating up too much, having WIFI capabilities would be awesome, a power led would be useful :). Having a working system I set out to improve some things about it. Adding a power led was just a matter or removing if from the front panel of another computer and gluing it to the place where the original power led was located. I also removed the power switch as I didn't want to keep cutting extra hole in the case and I could just pull the plug as this system tolerates that just fine. To lower the temperature of the system was just a matter of cutting some extra pieces of plastic from the original vent and adding a small fan, the fan already had a motherboard style power connector, so wiring it was a snap. Before the fan, the system was running at 60 degrees Celsius, triggering the temperature alarm of the motherboard, now the temperature reads a much cooler 48 degrees.

Step 6: WiFi!

Wireless networking has become pretty much like Google, I can't remember how life was without it. Since this board didn't had a network connection much less a PCMCIA or a mini-PCI slot, an USB WiFi adapter was my only choice. Getting an USB card in the remaining space was a bit of a challenge. The card is question is a Belkin F5D6050U, old, ugly, poor performer, but it was all I had. Proceeded to strip it to the bare minimum, and upon closer inspection realized I could de solder the antennas and solder a new pigtail for an external antenna for improved performance. The pigtail donor was a failed project which in turn got it from a damaged Senao radio. The TNC connector fitted perfectly where the original power button of the UPS was located. Added a second USB cable for the card, and enclosed it in case of a DAT DDS tape.

Step 7: The Final Product

The whole thing is just L12"xW8"xH3", weights just over 2 pounds and fits inside a laptop bag nicely. The CPU is a Celeron 366 Mhz, but since it is a Medocino core with L2 cache has fairly good power and with 256MB of RAM, the system boots up and works very fast. For connectivity an USB NIC works just fine, I thought about fitting the USB NIC inside the case and making simple RJ45-Keystone dongle, but having the USB port externally available proved better when I wanted to copy a file from a Pen drive. At the beginning I just wanted a small linux router, at the end I got a case-mod-embedded-portable-stealth router-access-point what more could a computer geek ask for? Hmmm... maybe installing TinyX, Fluxbox and an USB sound card and expand it as a portable desktop too :)

Step 8: More Updates! - Power Outlets

Since posting the article I've got a lot of mail and some pretty good suggestions, so I went ahead at implemented some. Because of space constraints the power outlets of the ups had to be remove, however upon closer inspection it seemed possible to create just enough space to accommodate two or three power outlets.

Since now we are talking about moving 120 volts just next to low voltage DC parts I though I would be safer to go with UL electrical grade parts. Once again going to thru the recycle bin found another dead UPS and removed, a set of the power plugs. These were not going to work as the power connectors run horizontally and the slots on the UPS-PC ran vertically. So I had to forget about UL compliance and stuff, and just hack together anything that could moved current from one place to another. Another visit later to the computer cemetery produced a Y power splitter. This would work as the end parts could be mounted flush inside the UPS. To allow for greater cable flexibility the outer jacked was removed and as much of the plastic was removed from the "face" of the plugs. Got them glued to the plastic, aligned with the slots and connected to the power plug of the UPS in parallel fashion, green to green (ground), white to white (neutral) and black to black (line). Next, to add a permanent network card.

Step 9: More Updates! - Network, USB and Multimedia Ports.

The other recommendation that I though could be implemented was the addition of a network card. At first I didn't add this because I knew it meant having to get an USB hub inside the case and with so many interconnections (PC -> USB header -> USB cable -> USB hub -> USB cable -> Network card) which could cause a voltage drop and the insides of the case were already crammed enough. The solution was to eliminate as many cables and connections as possible and wire everything together. So first up the 4-port USB hub, dismantled it, and de soldered 3 of the female USB-A connectors. One would be used for the network card, two would be made into external ports, the other would remain internal for future expansion (maybe a sound card). Next the network card, dismantled it and de soldered the USB-A male port and soldered 4 cables directly from the USB hub to the USB network card, finally glued the card and the hub together. Then prepared a network extension cable by taking a length of network cable (about 6") cimped a male RJ-45 connector on one end (for the network card) and put a female RJ-45 on the other side. Glued the female RJ-45 connector to the motherboard and cut out and access slot in the "front" of the UPS the same shape as the connector. In the future the male RJ-45 could be eliminated and the cable soldered directly to the network card to get a better electrical connection.

To make the headers for the other two USB ports was just a matter of de soldering them from and old board like the modem shown and solder them back to the USB hub. After the headers were soldered, took a small board with 2 external USB port and 2 jack ports from another computers front panel. Connected the external ports to the USB hub headers, and placed the external ports in the opening previously used for the other USB connector. Again liberal use of hot glue was required, as this part receives some torque when plugging or removing USB devices and cables. Close everything up and the UPS-PC now has a permanent network adapter, two external USB port, 2 functional power slots and provisions to add multimedia capabilities in the future.
I'd be interested to see what you could do with a compute stick.
awesome hack
Could You fit a Laptop Battery in this? You could make a portable web server with this if you know how. I plan to write an instructable on making a portable server.
Actually only if I can figure it out.
you can make the computer run at low power and use voltage regulators connected to a 24v battery (rechargeable of course) to run your various peripherals<br>
Regarding the OS, ever heard of DSL - Damned Small Linux? Fits in 50 MB. I am running it smoothly on an old Sony Vaio 505 using it for uC programming.<br/><br/>virtuPIC<br/>--<br/>Airspace V - international hangar flying!<br/><a rel="nofollow" href="http://www.airspace-v.com">http://www.airspace-v.com</a><br/>
<a rel="nofollow" href="http://www.slitaz.org/en/">http://www.slitaz.org/en/</a><br/><br/>Even smaller, I believe it said 25mb when I downloaded it last week.<br/>
Damn, that beats Windows 95 as far as size.
My personal favorite is Tinycore. It sits at just 10meg. It has everything and after my experience of using both DSL and Tinycore, I have to say tinycore just has a better feel to it. &quot;Tiny Core Linux is a very small (10 MB) minimal Linux GUI Desktop. It is based on Linux 2.6 kernel, Busybox, Tiny X, and Fltk. The core runs entirely in ram and boots very quickly. Also offered is Micro Core a 6 MB image that is the console based engine of Tiny Core. CLI versions of Tiny Core's program allows the same functionality of Tiny Core's extensions only starting with a console based system.&quot; If needed, there Microcore, a 6meg command line version. Just means no mouse cursor outside of programs.
holy shoot! those OSes are getting smaller! i won't be surprised if i can find an OS in the future that runs on 1kb
This is what i call ... STEALTH .<br>But some people might just mistake it for a real UPS , and plug their crap in .<br>And complain there's no power ...
there are some usb network adapters
One idea I had was to add a keyboard from a laptop to the top of the case.
But then you loost stealth like apperence. Also siloraptor, have you concidered small slits to cover your usb/vga/ps2mouse/keyboard extras?
TIny speaker and you have yourself a fully fledged attempt at a desktop linux pc.
Darn, for some reason the large pictures don't show up for me in this instructable. I get thumbnails but that's not enough to figure out the details... Oh well, I'll have to haxor it if I ever come to do this myself.<br /> <br /> The idea sounds good!
Would be great for a car<br />
be better if it had compersit video out or s-video out to a 7&quot; screen<br />
I Finally someone else using a CF card for a Hard drive....sweet! That's awesome that you found a unique power supply too, I've never seen someone use one of those. So I was looking around Instructables and found a few more people doing these kind of projects, so I ended up making a group that's called &quot;<a href="../../../group/smallformfactor/">Small Form Factor</a> &quot;. It's a group devoted to sharing info. on small DIY&nbsp;computer projects/concepts. Please Join if you are interested. I forgot to mention that I've added your instructable to the group along with a bunch of others. I hope you don't mind.
Wow i would buy this if you made more than one
<em>With some practice you can get it on the first try?</em> ROFLOL that's hilarious! I know what you meant, but that's still kind of funny! Sorry, just couldn't resist.<br/>
Great stuff, this would be perfect in my setup.
Very cool project! Reminds me of the computer I built into an old Dewalt tool box, which fit a full sized ATX motherboard just fine, just had to do some dremel work to cut out all the plastic dividers.
well done i like thiss a lot<sup>guess what i have the same f!@#ing ups hahahahaha</sup><br/>
THAT IS THE SICKEST THING IV'E EVER SEEN :D. All u need is a mini screen that tells you who is on the network lol. Nice ible
windows sideshow--- a secondary display in some new vista laptops
or because its running linux not vista it could have a HD44780/HD44100 display and it could use <a rel="nofollow" href="http://lcdproc.org/">lcdproc</a><br/>
the other more important question is how to do this for either os...<br/>the sideshow wiki has some good info -- <a rel="nofollow" href="http://en.wikipedia.org/wiki/Windows_SideShow">SIDESHOW</a><br/>i figure the best way to this is to use a bluetooth connection and an old phone for this --- easy power (usb), easy connect (bluetooth)<br/>easy use (we all use cell phones)<br/><br/>but like i said, the question is how -- it might need some sort of extra internal hardware<br/>
basically if you used a HD44780/HD44100 compliant display you can wire it up directly to your parallel port and then control it with lcdproc in either windows or linux
you could use a serial one and wire it to the serial port as well.
really? well i didnt get the idea of the link in your last coment, but i was still streaming for a color display and how that is done with sideshow
man you did a really wonderful job with this one, I never thought of modding a UPS before, looks like a good mod!
Thanks, while not really stealthy it gets a good laugh a everybody who sees it :)
Ah yeah defiantly, I am currently in the middle of making a ps2 pc mod with a small mini itx via mobo, but the problem with it is I still cant find a good slim dvd drive but i will keep looking. I will make an instructable when its finished.
why not use the dvd drive of the ps2?
because (i think) it doesnt use a ide connector or a sata connector. (i think thats the case anyway altho i cant remember because its been a long time since i've opened one up)
As an electrician...I'm just gonna pretend I don't see that. Talk about major fire hazard! Nice job though! Thought of using a different mobo? A mini or nano-itx form factor instead? Give you more room in there too!
It is not a major fire hazard. Pretty hard to get a fire at 46 degrees and if it did catch on fire (not sure how) it would have a hard time getting oxygen to burn. Also how about calling it "The Black Box"
Damn, I had a UPS case exactly like that but throw it out because it died.
WOW :o U fit all dat into a UPS case. That is truly AWSOME!
This gave me some pretty good ideas for a server im building from a celeron D 800mhz with 512mb of ram took forever to get windows XP to work on it although it should work fine.
A Few Questions: 1) How is it a router if it only has one Ethernet port? 2) How did you manage the WI-FI access point functionality? 3) How would you make it a fully functional router?
Thanks :D
is any other software required as well as linux to run as a router?
No just linux, as long as the distribution kernel has iptables support enabled. The only constraint is storage space, only a bigger flash drive would be needed to install Squid,Onion router or even Zebra to have a full fledged router. Wifi configuration such as Access point, mesh router & WDS repeater are also posible.
Excellent work! Great Instructable too. +1
Any one know were I could find a SBC that I could use with this project? I was doing a project using wifi to make a portable cd drive, but it didn't work out well enough to be useful. I was thinking maybe to use it with this to make it more practical. I'm having trouble finding the SBC's though, so if anyone knows where i could find some compatible with this it would be great...ebay searched, but know idea which ones work

About This Instructable




More by siloraptor:Upgrading a PC power supply The Stealth Router: How to fit a computer inside an UPS case. 
Add instructable to: