Upgrade a HP Scanjet5 network scanner with a min-itx system and GNU/Linux in order to gain faster processing speed and add more utility such as document management and file storage and server.
Step 1: Prepare to hackThe scanner is built in 2 main parts: the scanner, which is a standard SCSI flatbed with a 50 page sheet feeder on top; and the PC, which is a AMD 486-dx 66Mhz system with an IDE drive, on board scsi for the scanner, and 2 ISA slots, one for network, one for video when troubleshooting (you have to supply your own ISA video card). For those that would like to run Linux on the stock hardware with little in the way of extra features, http://berklix.com/scanjet/ has some great info, and even a complete FreeBSD installer for the device. This is where I got my start on hacking this device.My main motivation for the mini-itx upgrade was that the power supply exploded a capacitor and damaged too much of the PSU to be easily repairable, and I also had a EPIA 800 board sitting around waiting for a home.tools and parts you'll need:- soldering iron- #1 and #2 phillips screw drivers- needle nose pliers- wire snips and stripper- IDE hard disk of your choice- 50-pin SCSI card (I used an older Tekram)- PCI right angle riser, "A" side, 5Volt. I used a 1.03 height from risercardshop.com, only US site I could find with that height.- mini-itx, or smaller, mainboard. I used an EPIA 800, low enough heat and more than enough power.- 1U rackmount power supply (135 Watt seem to work)- 24 Volt 1.7 amp power supply (I used a 1.9 amp, little more doesn't hurt, also be sure to read the summary at the end)- sacraficial AT/X PSU and molex to 3 wire fans plugs for extra plugs and wires or willingness to cut up an expensive PSU to splice wiresMost of this stuff I had laying around (I'm a bit of a packrat) so this project only cost me about $30 out of pocket.
Step 2: Gut the scanner
Sorry i didn't have a camera handy when i did most of this, but it's realy fairly simple stuff so pictures would merely be interesting not helpfull at this point. http://www.dvs1.informatik.tu-darmstadt.de/staff/haul/scanjet/Project__Network_Scanjet_Repair.html has some great pictures of the guts.On the back of the scanner there are 2 screws, marked with arrows, to remove and the PC part of the scanner will slide out. The case design has an interesting latch/friction design that makes it kind of odd to slide out. Just use steady force and trweak it a bit and it will come out easily enough.Be sure to take care of the wires, a square power plug and the scsi cables will have to be unpluged in order to completely remove the tray.Now the fun part! remove everything from the tray, yes, everything! you can probably leave the fan in place, but the rest has to come out, including the divider between the PSU area and the main board area, it'll need some cutting work.Once everything is out, you'll need to remove the block where the ISA network mounts on the back, it will be in the way of the ITX board. I guess you could modify it, but removeing it seemed easier to me. You'll also need to remove 2 of the main board mounts. 2 will line up on the ITX, 2 won't. I used plastic standoff's from my old-parts box in place of the removed ones. If the unit has to survive shipping you might want to tap a couple holes and add real stand offs.Now for the divider, you'll need to cut a hole for the PSU as it's too long otherwise, I made the mistake of not leaving a enough material to be able to use teh PSU's mouning holes, wish I had. Also tap holes for standoffs for the 24V PSU. (the scanner requires 24V, in case you were wondering)
Step 3: Time to solderthis can get a bit tricky, and I didn't write down much so you'll need to pay atention to your kit. The old PSU was my reference, it has the voltages marked on the board so you can follow a wire form the plug to the board to figure out what you need.
I have not yet tried powering the "panel" with -12v, didn't want to tap in on the atx power plug until I knew the system works, I may do this in the furture. it apears to be standard RS232, though i could certaily be wrong.
Ok, wiring harnes making time. First I clipped the square scanner power plug from the old PSU after taking note of what colors had what voltages. I clipped a AT power plug to plug into the 24V psu, had to trim some tabs for a clean fit. Then I clipped a female Molex off an old case fan passthrough power harness for the 5 volts it needs to be leached from the ATX via n HDD molex. When soldered it all up I used a ground from ATX PSU next to the 5V and ground from teh 24V next to the 24V. Yeah yeah, 2 different PSU's on one device, bad bad, I know. In the end, they share a power switch and ground, and they are both switching power supplies, so all danger here is really minimal.
For power, I clipped the bracket off the original PSU sheild and mounted the original plug and switch on the case (see 2nd picture). I sacraficed a power cord for the ATX PSU and soldered it to the case plug. For the 24V's 120v side I found a plug from inside a dead monitor (don't ask) that fit perfect, no idea what else might work, other than soldering right to the poles.
For the fan, instead of splicing in the original plug (I was sick of soldering at this point), I used a 3-pin fan plug to 4 pin HDD molex adaptor and removed a pin and the plastic "key" so it would plug into the fan's stock plug.
Step 4: Shoehorn it all in there
bolt everything up! I use double sided tape to secure the ATX psu, in hindsight I should have cut the hole different so i could use it's mounting screws. it all fits quite snug and I have not had a heat issue, been running for almost a solid week now.
see little boxes on photo for parts ID
Step 5: Configure systemI choose Ubuntu, but pretty much any linux distro should work just as well. Had to add "sg" to /etc/modules in order to have scsi scanner support on boot, everything else worked right out of the box!Installed Sane to make the scanner work, Samba for file sevices, and Apache and "PHP Sane Frontend" for a simple document archival system. I'll leave the config of these up the respective projects as they are all quite well documented and mirrored.Once I get around to using the panel and LCD, I'll use the bash script from http://berklix.com/scanjet/ and maybe mod it a bit for local file storage and such. Until then, I'm using a Genovation serial keypad device from an old project as a macro frontend, looks very ghetto (no, i won't take a picture of it:P). I wrote a ruby script and a php script (which I'll eventualy port to ruby when i learn it better, sending email without an MTA seemed way to hard in ruby) to handle actual functionality like scanning to a network share or email address. The ruby script handles the keypad, and the php shell script handles the scanning and emailing and smb storage. I've attached the scripts, enjoy!
Step 6: ConclusionWell, all in all I'm pretty happy with this. This is by far the most complex hardware project I've ever done and it was a blast! I definatly plan on doing more!
Things I'd do different:
- First off, I'd go for a single switching PSU than can provide all the different voltages I need and power everything from it. Making a custom ATX plug will not be low on the pain scale, but it will end up much cleaner in the end.
- spend more time with Ruby. it's damned powerfull scripting lang. takes a bit to wrap your head around, but syntax is much cleaner than perl.
- use a laptop disk, or boot from Compact Flash and have RAM drive for a working area. This of course means storage would be limited, but it would be near silent and a bit faster.
So was it worth it? hell yeah! we regularly scan batches of 40-50 pages to PDF for digital archiving, compared to the FreeBSD distro on the 486 with 8Meg ram this is a whole new device! batches used to take up to 20 minutes to convert and sometimes ran out of RAM and just failed, now even 50 pages takes less than a minute to make the PDF.