Hacking The Edge

20150214       TerraHertz       http://everist.org

Modifying a common cheap document scanner into a book edge scanner

For several years I've been using the Canon LIDE 20 at left for all my document scanning.

It's USB, small, light, and can be put away on a shelf easily when not in use. It even fits in my laptop bag if I want to take it with me. Overall a great improvement on the larger, clunkier parallel port and SCSI interfaced scanners I'd owned in the past.

Those had been quite expensive at the time, but this LIDE 20 was free. I'd found it in an abandonment — a building that was going to be demolished soon. The scanner was left among general trash one of the tennants had left when vacating. It didn't have a drivers disk, cable or any documentation. No matter! All available for free elsewhere. When I tried it at home it worked fine.

Its major flaw is that like most scanners, you cannot scan the pages of thick books, since the book spine prevents pressing the entire page flat against the scanner glass.

As you can see this scanner has significant margins, in the form of plastic bezels to either side of the glass scanning area.

The edge bezels are also the cause of another problem.
When scanning sheets of paper larger than the A4 glass area of this scanner, you can't press the sheet flat against the glass right up to the glass edges, due to the plastic edge bezels being 2.4mm thick. With sheets so large they have to extend over two edges of a corner, pressing the sheet down with weights is impossible without deforming the paper. And it's usually the case that such a sheet is too precious to risk damaging; such as an old electronics schematic, obtained at considerable expense and effort, and maybe even significantly rare and irreplacable.

The solution to that thick-spined book problem is something called a book edge scanner. With those the scanned area extends very nearly to the case side edge of the scanner, allowing the book to be draped half-open over the side of the scanner.

You'd think this would be an obvious and simple capability to include in all scanners, but no. "Not if our profits have anything to do with it. You're not getting a feature like that for nothing!" I can imagine the scanner manufacturers saying.

Or rather I don't have to imagine, I can just google "book edge scanner" and look at the prices in adverts like this one.

This is typical. Bearing in mind there's nothing different at all with an edge scanner, other than making the case edge as close as possible to the end of the optical sensor.

I wonder if the price rises exponentially to infinity, as the edge margin approaches zero?

The topic of capturing old/rare books and documents to digital form is one I've been interested in for a while. I'm accumulating quite a stack of books and manuals I want to scan, but had encountered some technical issues related to screened printed images that prevented me getting the quality of digital representation I felt the material deserved. As part of the process of solving those problems there's another writeup in progress for this noblog, about the techniques of scanning documents. That will be a while yet.

In the meantime, I also need a solution to the book spine problem. Other than using a digital camera setup (which introduces some resolution, scaling and perspective issues that I don't find acceptable) the only way is with an edge scanner. And it doesn't look like I'm going to find such a thing for free.

Then late in 2014 I happened to find another Canon LIDE 20 in a street toss near my home. This one had perhaps been left in a car on a hot day, as the dark plastic lid was badly warped by heat. When I tried this scanner, it worked fine apart from the lid not closing properly. Presumably the warped lid was why they threw it out.

I'd decided to keep it as spare parts for my primary scanner.

Just recently it occured to me — could this scanner be hacked to achieve a flat top plane (no raised lips around the glass face), and scanning very close to an edge? I checked on ebay, and there are plenty of these old model scanners available second hand for around $30, so there's no great need to keep this warped-lid one functional as it is.

I decided to try hacking it.

Turns out it disassembles very easily.

As a first (optional) step, that will make things easier later, connect it via USB to the PC and your scanning utility. Tell the scanner to do a preview scan, and once the carriage has moved down to around the middle of the scan area, pull the USB cable out to de-power it. This lets you get at the front spring easily.

You can't tell the carriage to move later, since one of the bezels you'll remove has the calibration black-white edge, without which the driver software gets an error and won't operate the scanner.

The two long-side plastic edge trim strips are only held on with double sided sticky tape. I levered up the front ends with a blade, then carefully peeled them off.

That frees the glass top — just slide it to the rear, which frees the front edge. Then use anything pointy at the two sides of the glass to lift up the front edge above the case, and slide forward again to remove it.

Yep, for these photos I hadn't done the carriage-move thing beforehand. I found out later.

CAUTION: Don't manually force the carriage to move. The 'teeth' on the cord are formed of a delicate spiral of plastic around the cord, and you could strip it off by forcing the carriage.

CAUTION: Once the glass is removed, three small parts on the sensor carriage can fall out and get lost. Don't turn the scanner upside down at the moment. There's a small spring under one end, and two little low-friction runners at the carriage ends, that press against the underside of the glass face. Those just drop into their mount holes. It's best to remove all these now and keep them safe in a ziplock bag or something.

Removing the carriage

At the rear of the case there's a small oval blanking sticker. Lift it off with a scalpel point. Underneath is the carriage drive cord end mount point. The cable has a small ball on the end, that rests in the dimple at the end of the narrow slot.

Inside the case at the rear, grab the cable and pull it a few mm towards the rear. A tension spring provides the give, so don't pull it further than necessary or you'll stretch the spring.
This releases the end ball on the cord from its recess. Slide it sideways to the larger hole in the mount point to free it.

With the cable now loose, inside the front of the case you can lift the cord tensioning spring free from its clip.

The carriage just sits on the guide rail, and can be lifted off.

The cord unloops easily from the pulleys and drive gear. There's no 'calibration' to be lost, the scanner uses an end sensor to get an absolute positioning reference.

If you didn't already, remove that small spring (see below) and put it somewhere safe.

Carefully pull the white flat cable from it's socket on the scanner carriage. Don't put any stress on the folds or it will tear. So that's the carriage free of the case.

Those ferrite EMI suppressing flat beads on the flexible ribbon cable are thin, brittle and well glued in. They would probably break if you tried to lever them out. There's no need to, so leave them and the cable there.

Next unclip the lid from the body of the scanner. Your intentions may vary, but I won't be using that lid again, even if it wasn't warped. The whole point of this exercise is to make a book scanner, and for books a light plastic lid is useless. Won't fit over most books anyway.

The right hand side hinge stud on the lid is the shorter, so lever that side out.

Seeking the true edge

The general aim is to modify the case and carriage, to remove as much as possible beyond the edge of optical sensing. But where is that?

Interestingly, both the illumination strip and the visible sensor strip extend a little way under the RH side plastic edge bezel. And they don't end at exactly the same point. So the question was, where exactly is the actual maximum optical sensing edge?

Another thing that occured to me, was the faint possibility that the silicon sensor might run further than the software drivers were saying it did. Maybe they used a standard sensor, and just cropped the data to match the plastic case edge? Is there any potential for improving it? (I wish!)

So I needed two things:

  1. A mark on the carriage where the scan border really is.
  2. Check whether that point coincides with the end of the physical sensor silicon.
Naturally, this required reassembling the scanner. Oh well, it's quick and easy.

Finding the scan border is simple — just scan a ruler, aligned with a known reference point on the carriage. For the reference I stuck a post-it note on the carriage. I'd set its edge 100mm from the end of the illuminator strip. Then put the glass on. For a high contrast ruler I cut a piece off an old measuring tape roll. Placed that weighted down on the scanner. The mark on the back of the tape is at the '300' point, and is aligned to the post-it note edge. Then I tried to run the scanner. (Pic 2)

Ha ha... Nope, it's not going to run. The carriage seeks to the rest position, moves back and forth a bit with the illuminator on, then the drivers complain "Can't communicate with scanner".

Oh great, did I break it already?

It seemed strange that for something which 'couldn't communicate' it had no trouble commanding carriage movement and illuminator on/off. Perhaps I didn't have the ribbon cable plugged in properly? Something else wrong?

After some minutes of mystification, it occured to me that the only thing missing that it could possibly know about, was the front bezel. Ah! I'd previously noticed that had a black and white strip on its underside, and thought nothing of it. Now I get it — it's a calibration reference (Pics 3 & 4) and the scanner drivers insist on seeing it or they get in a snit.

With that and the ruler in place again, this time the scanner runs.

The original image is 5104 pixels horizontal, scanned at 600 dpi. That's 8.507" = 216.08mm.
On the tape we see 393 - 177 mm = 216mm. A good match.

The image here is scaled down to 1000 pixels. It's blurry because the tape isn't flattened against the glass, and it's streaky because I didn't tell the scanner to do a full calibration cycle, and the drivers last saw the other scanner, so the sensor compensation data is wrong for this one. Also I've probably got dust on the optics since I'm not bothering to 'clean room handle' this. I'm planning to clean it once just before final reassembly. Oh, and the postit note is partially covering the illuminator around the middle of the carriage.

Pics 1 & 2 show the true scan border (tape mark at 393), relative to the mechanics.
It's 9 mm short of the end of the carriage, and 18 mm from the outside edge of the scanner case.
There's plenty of room for improvement! Even if I can't modify the carriage at all.

Next question: how much can the carriage be cut back? There are four separate components that have to be evaluated:

  1. The black plastic body carrying the optics. It's made of GRP, and needs to retain structural function. Critical points: The hinge and spring mount have to remain intact.
    Also the low-friction spacer bumps between this structure and the glass have to be near the new carriage end, and not able to fall off.
  2. The clear plastic illuminator light pipe. No problem physically cutting it short, but will this affect the illumination linearity near the edge?
  3. The 'dot pipes array'. A narrow strip of (apparently) optical fibers embedded in black plastic. Should present no problems, since (presumably) the light fibers don't interact, and being near the end should not matter.
  4. The actual sensor. This is the one that will be difficult, perhaps impossible. But I won't know till I actually see it.
The most critical component is the sensor. In pic 5 above you can see the back of it. It's a long thin slab of alumina, held in place in the plastic frame by melted-down tabs of the plastic. Getting it out without breaking it will have to be done very, very carefully! Also it will eventually need to be put back in, and remain secure. So just cutting the melt-tabs off flush is not ideal, as then the thing would have to be glued in, which would mean it could probably never be removed again without breaking it.

Easy things first! Pic 3 is the illuminator light pipe removed. It was secured by three small dabs of something like hot-melt glue, that separated cleanly from the plastics with light prying via a scalpel point. In Pic 4 the white thing is a carrier holding the RGB LEDs that direct light into the end of the light pipe.

The light pipe is a remarkably complex bit of optical plastic. I'm not even going to try to photograph it, since it's difficult to see directly with the eyes, even under a magnifier. Too many curved and finely serrated surfaces, tiny slits, and so on. It's like a jewel. But an easy one to cut the end off.

The dot pipes array... Under a microscope this one is quite remarkable too. I'm sorry I don't yet have a microscope with a camera, so you could see it. The 'pipes' are actually cylinders of a glassy substance, that seems to only transmit light that's well aligned with the axis of the cylinder. At each end of the strip there's an optically unused length in the mounting, so I could test (mash) one with a scalpel point. They shatter like glass, and the matrix holding them together is GRP. So there should be no trouble cutting this thing short.

Well, those all seem possible; what about the sensor?


To remove it, I cut all the melt-tabs back with a scalpel, leaving as much of the tabs as possible. Hopefully I can use hot-melt glue when rebuilding it, and the remaining tab body will hold the glue well.

For removal, it had to be completely free. Levering out a long, very thin piece of ceramic is just begging for it to break.

It came out intact!

To reveal that it's even more delicate than expected. Under a microscope the silicon sensors are 11 long, amazingly thin slivers, mounted to the alumina and butted up end to end. They would probably fracture if you looked at them wrong. Then there are the microscopic bonding wires from the silicon to pads on the alumina, which is a single sided printed circuit. You can see the bonding wires, because the silicon and wires are encapsulated in an optically clear substance. Which just so this thing is even more incredibly delicate, is soft and rubbery. Pushing on it would break the bonding wires. Also the optical surface is easily damaged, and picks up dust. Terrific.

Incidentally that total image width of 5104 pixels (at 600 dpi) divided by 11 is 464. Whether the cells per piece of silicon is that, or a multiple, I can't tell. Not going to try counting.

In pic 2, the black pen marks towards the right are the measured 'edge of scan area'. Which turn out to coincide very well with the end of the silicon sensor. So no, there isn't any unused resolution.

On first glance it looked like the sensor substrate could not be cut shorter either, since there are tracks and a couple of components out near the end. But on consideration, it should be possible. Those are capacitors, and it appears they are just decoupling caps on two supply rails, to a common (probably ground.)
Also, the resist layer isn't ceramic, and can be scraped off the tracks, hence allowing soldering.

So this is the plan:

If that was the only piece of thin alumina I had, and the first try at cutting it had to work perfectly, I'd give up now.

But it isn't. Years ago I came across several cubic feet of surplus alumina circuit substrates in a junk yard, and was able to buy them all for about $10. (I used them as an art material.) Still plenty left, so I can experiment with ways of getting a clean cut.

Like this:

That was scored lightly with a diamond-tipped glass cutter, then snapped by pressing over a small height 'edge' (one thickness of electrical tape.) Unfortunately that won't work for the scanner sensor, since the diamond cutter body is far too thick to use right next to the soft plastic lens.

Meanwhile, better get the sensor unit ready to cut (assuming I can figure out how.)
First thing is to take off the two capacitors. They are very tiny! For this it's binocular microscope time. Pic 1 is the setup. The best solution I could improvise to clamp the sensor involved two small engineer's vices, some blobs of blutak, and a book selected for having the right thickness.

In Pic 2 the caps are removed. Fortunately the plastic lens blob is a silicone material, so not harmed by hot air solder melting operation right next to it.

Pic 3 is after a fair bit more buggering around, cleaning off the solder bumps left from the caps. Solder wick and a flux pen got most of the way there, but in the end I had to resort to scraping with a scalpel. This end bit of the sensor substrate will need to be pressed very evenly during the 'snap it off' stage, so the surface must be flat. The pads that look black are actually shiny solder colour; just not reflecting light towards the camera.

Pic 4 shows the piece of lens material sliced off from the substrate section I want to remove. Now you can see why that glass cutter won't work — I want the break in the alumina directly under the cut edge of the lens.

I was surprised how tough that silicone material is. Takes a fair amount of force even to cut such a tiny piece, with a brand new razor blade. The scary part was, since it was so tough it deformed under the blade, which was only about 1mm from the last bond wire from the chip to the substrate. I could see the tiny gold wire flexing with the lens material. Urrgh! How strong are the wire to silicon chip bonds? Curiously, that final bond wire doesn't seem to have any signal function. It goes to an isolated pad on the substrate. I've no idea why. Did they need to add a tiny bit of capacitance to that IC pad?
Anyway there's another bond wire right next to it, and that one is used. So pushing the clear silicone around must be avoided.