Overview


In order to get the scanner working I had to make a program that could convert light sensor readings into an image. This was done using Visual Basic and spirit.ocx. The program called ScanControl allows you to chose between two different resolution of about 25 dpi and 50 dpi - this means that the scanner head moves with an accuracy of about 0.5 mm. For this purpose I used a very low gearing as seen on the pictures. The downside of using such a low gearing is that scanning a cd cover takes 3-4 hours at 25 dpi. But the results are quite good as you can see...

Pictures and video

Click on image to
download "speed up" video
Front view of the scanner
Front view of the scanner
without paper
Side view of the scanner

Notice the low gearing
using two snails

The scan-head moves
along lego gear racks
Top view of scanner
head
The motor that feeds the paper
also uses two snails
Paper motor


Scanned images


Original

Low resolution (25dpi)

High resolution (50dpi)



Original

Low resolution (25dpi)

High resolution (50dpi)

Scan Coontrol


ScanControl is a small VB program that controls the scanner. With ScanControl you can:
  • Download firmware to the RCX.
  • Compile and download the program used to control the LEGO scanner.
  • Set the width and height of the scan.
  • Chose between two different resolutions.
  • Preview the scanned image while scanning.
  • Save the scanned image.

The way that ScanControl works is actually pretty strait forward. First you will have to download both firmware and the program that controls the RCX. This program consists of three tasks that can be called from the Visual Basic program. The three tasks do the following:

  • Move the scanner head in either direction.
  • Feed the paper.
  • Compensate for gear backlash when the scanner changes direction.

Before the scanning of the image can begin the width and height of the scan have to be adjusted - this is done with a setting wizard. The wizard also lets you chose between two different resolutions as well as adjust the sensor values that corresponds with bright and dark colors. Furthermore the wizard lets you feed the paper and move the scanner head.

To scan the image the program moves the scanner head and the takes a sensor reading. This is then converted into a color. This is repeated until the scanner head reaches the end of the image where the scanner feeds the paper and the scanner head changes direction. All this is then repeated until the scanner has scanned the entire image.

Download

Known issues

When multitasking while scanning the preview image might freeze. This doesn't mean that ScanControl has crashed - you will be able to save the image once the scan has finished.

The download function only allows you to download the file firm0309.lgo and not firm0328.lgo. As far as I know this is an error within spirit.ocx 1.0.