Compact Optical Image Scanner
The Prototype of the Scanner
Photo 1 gives you a look at the prototype of the scanner.
This invention is intended to replace the pen, the mouse, the keyboard,
and the scanner for the new generation of mobile computers.
The increasing popularity of the mobile computer market
(e.g., palm-top computers, digital organizers, and notebook computers)
has made the input-device alternative to the keyboard not only helpful but essentially important.
In this design, which uses the PIC12C508 microcontroller,
I introduce an innovative and cost-effective way to do data entry
in a way that is perfect for mobile computers.
An outline block diagram of the scanner is given in Figure 1.
outline block diagram of the scanner is given in Figure 1.
Imagine a keyboard and a scanner blended together with a fraction of the cost.
The ever-popular mobile computer market calls for compact, lightweight,
and multifunction accessories.
This product keeps all those functions and affordability in mind.
In this compact image scanner, the PIC12C508 microcontroller can be used
for system management and as a high-speed (57600 bps) data-rate generator.
The system consists of one PIC12C508 microcontroller, one 64-pixel linear optical image sensor,
one comparator, one voltage regulator, and some diodes and passive components.
The design is capable of capturing a single line of printed document or bar code,
and then transferring the image as a black and white bitmap
through an RS-232C interface to any kind of serial device.
The product can be used as an input device for both OCR or bar-code recognition systems.
Because of the low power consumption of PIC12C508, no extra power supply is required.
The code uses XXX locations in program memory.
The system clock is provided by a 3.6864-MHz crystal oscillator.
The algorithm contains two parts that handle the image sensor control and data-rate generation.
The double comparator functions as an image signal converter and CMOS to RS-232C interface.
The cost of the prototype is less than $15.
System Logic Schematic
The system logic schematic is shown in Figure 2.
The power supply comes from the serial port of the host device.
The DTR and RTS signals are always set as 0, which generates +9 to +12 V on the RS232C socket.
Because there is no data output from TX of the host, its output is –9 to –12 V.
A 78L05 regulator converts +9 to +12 V to +5 V to drive the rest of the components.
The intended target (the document) is illuminated by the LED.
After the optosensor gets an SI signal from the microcontroller,
it captures a 64-pixel image frame and sends one pixel each time it gets a CLK pulse.
The information of the pixel sent out by the sensor is an analog value.
The comparator U2A compares the value from the sensor
and a reference voltage and converts it into a digital signal.
The reference voltage can be adjusted by the potential meter W1 to control the luminance.
Because the comparator is using high voltage (+12 V and –12 V),
two diodes are used to force the output into the range of +5 V and 0 V.
CMOS to RS-232C Converter
Another comparator U2B is used as a COMS to RS-232C converter.
Sensor Control and Data-Rate Generation
The microcontroller PIC12C508 uses 3.6864-MHz frequency to generate 57600-bps serial data.
The number of cycles for each bit of the data is: (3.6864MHz x 1,000,000 / 4) / 57600 = 16
Within 16 cycles, the microcontroller needs to send SI and CLK signals to the sensor,
read the data from the comparator, add start and stop bits into the bitstream,
and write the bitstream to the COMS/RS-232C converter.
The program in the 12C508 uses at most 10 cycles to finish the whole procedure.
Some NOP instructions are used to extend the execution period to be 16 cycles.
The flowchart is shown in Figure 3.
For more information on this design, please contact John Luo at John.Luo@esstech.com
|FLAME SENSOR UVTRON R2868|
|지자기 방위계 모듈 CMPS03|