Professional Documents
Culture Documents
Abstract—In previous works we introduced optical encoders of photodetectors located at the head, which generates a
based on non-diffractive beams (NDB) and showed that they pair of electrical signals that codifies the movement [4]–
extend the mechanical tolerance limits beyond the marks of [6]. Non-diffractive beam (NDB) optical encoders (Fig. 1)
the optical encoders technologies currently in use. However,
in order to make it suitable for commercial fabrication, present a remarkable performance [7]–[9] by means of using
the alignment of the light sensor with the NDB should be a special detection geometry with an ad-hoc detectivity
automatized. In this work we present a new design for function, consisting of a set of concentric annular pixels
the pixels and an algorithm implemented in an FPGA that with a programmable gain [10]–[13], as it is shown in Fig.
finds the center of the beam. This algorithm is the first 1. The scale is a typical Ronchi grating used in standard
step to automatically align the sensor and is validated using
commercial simulation tools. optical encoders. In order to work properly, the NDB has to
be centered with the photodetector. This is not a trivial issue,
Resumen— En trabajos anteriores presentamos los because the beam size is just a few micrometers. In order to
codificadores ópticos basados en haces no difractivos y automatize the alignment of the photodetector, we propose
mostramos que extienden los lı́mites de tolerancia mecánica a new sensor that it is able to execute an auto-alignment
más allá de las tecnologı́as de los codificadores ópticos
actuales. Sin embargo, con el fin de hacerlo adecuado para algorithm. To reach this goal, the proposed sensor consists
fabricación comercial, la alinieación del sensor de luz con of a photodetector array made of hexagonal configurable
el haz no difractivo debe ser automatizada. En este trabajo pixels (see Fig. 1), that are driven by an IP-core. In this way,
presentamos un nuevo diseño de pixeles y un algoritmo que once the beam impinges on the sensor, the system is able
encuentra el centro del haz, implementado en FPGA. Este to find the center of the beam and configure the detection
algoritmo es el primer paso para alinear automáticamente
el sensor y es validado usando herramientas de simulación pattern around it.
comerciales. FPGAs are increasingly being used in image sensor appli-
cations such as image processing, due to its reconfiguration
I. I NTRODUCTION capability and the possibility of processing the information
Optical encoders are displacement and rotation sensors in parallel hardware architectures. They provide a much
that are used in a broad variety of equipments and appli- more flexible and faster design capabilities that a standard
cations [1]. For example, they are used in domestic appli- processor. Some examples of this are the usage of FPGA for
cations like home printers, in the automotive industry for object tracking [14], [15], target recognition [16], real time
the measurement system, in industrial equipment’s motion stereo vision applications [17] or optical flow algorithms
control and factory automation, in medicine for imaging [18]. However, all these applications work with information
systems, or in high technology equipments such as radars or provided by the sensor, but do not modify the internal
robotics [2], [3]. Typically, optical encoders are composed sensor configuration. Instead, we introduce a CMOS pixel
by a moving head and a fixed scale, such that the head photodetector array that can be externally configured in
movement produces light intensity variations over a set order to obtain a particular detection geometry and a detector
pattern associated. The FPGA is used to program the sensor
behavior and not just to process the information it provides.
In this work, we describe the specifications of the system
configuration and the implementation of the algorithm to
find the center of the beam. The paper is organized as
follows: in section II the proposed detector is introduced,
in section III the design to be implemented in the FPGA is
presented, which is described in detail in section IV. Finally,
in section V the conclusions are presented.
Fig. 1. Diagram of an NDB encoder, along with the desired detector Fig. 3. Diagram of the pixel interconnection system and how it looks into
geometry and its implementation by using hexagonal pixels. an array, with a bitline connection register.
(a) (b)
Fig. 4. Diagram of the connections for the reading operation of the sensor.
(c) (d)
more illuminated vertical stripe is saved. At the end of this
procedure the zone of 5x5 pixels that contains the center of Fig. 6. Illustration of the first search. (a) Search of the horizontal
the beam is identified. It can be seen in the figure that the stripe more illuminated (Vertical Search). (b) Search of the vertical stripe
more illuminated (Horizontal Search). (c) Brighter zone. (d) Pixel more
current reading value of the stripe that contains the center illuminated. The numbers on the BL represent the reading values.
of the beam is bigger than the others.
The images shown in Fig. 6 are illustrative, in order to
show the process described above. The size of the pixels
logic in the SoC were simulated. How this simulation was
and the width of the stripes not represent the real ones. In
performed is explained in section IV-B.
order to show quantitative results, a more realistic simulation
was made. The results are showed in Fig. 7. The histogram The IP-core that configures the sensor has been developed
shows the sum of the currents of each stripe that is read by using VHDL and ISE software, the Xilinx synthesys tool
the corresponding bitline, in arbitrary units (AU). It can be for Xilinx FPGAs. A Xilinx Spartan 3E FPGA XC3S500E
seen that the current obtained from the stripe that contains model, has been used for the synthesis and implementation
the center of the beam is clearly higher than the others. of the IP-core. From the Xilinx ISE software reports, some
metrics related to the design, have been extracted. Regarding
After this ”brighter zone” is found, a pixel-by-pixel search
the timing parameters, the minimum period that can be used
is made. First just one pixel, the one that has connection
for the clock (maximum delay) is 9.084ns, which means
to the bit-line, is read and its value is stored. Then, the
that the implementation can work at a Maximum Frequency
contiguous pixel is connected and the value of the bit-line
of 110.084MHz. Although this frequency implies that the
is read again. The new reading, that corresponds to the
sensor can be configured very quickly, this is not the more
sum of the two connected pixels, is stored. Both values are
remarkable feature, because it is only performed during
subtracted in order to obtain the current of the last pixel. The
the sensor initialization, just once every time the sensor
coordinates and the reading value of the higher current pixel
is powered on. Table I shows other important parameters
are stored. This procedure is repeated with the 25 pixels of
involved in the use of the IP-core.
the area of interest, connecting one more pixel each time.
At the end of the process the value and coordinates of the As it can also be seen in the table, the occupation area
more illuminated pixel are known. of the IP-core is extremely low (2%), so that a bottleneck
of the design, if there is one, could reside in the number
IV. I MPLEMENTATION
A. Architecture
Fig. 8(a) shows a diagram of a System on Chip (SoC) im-
plementation: the light sensor plus de IP-core. In this work
the IP-core was implemented in an FPGA to be interfaced to
the photodector array. The proposed architecture is shown in
8(b). The pixels array and the ADC as well as the remaining
(a) (b)
Fig. 7. Histogram that shows the sum of the currents over the stripes
Fig. 5. Representation of the NDB used. (a) Profile. (b) Bidimensional formed in the horizontal and vertical search when the NDB impinges the
representation. Units in microns. photodetector array.
Fig. 9. Data exchange interface between C emulated sensor and VHDL
IP-core.
(b) C. Simulations
Fig. 8. Diagrams of the architecture of the design. (a) IP-core SoC Simulations were made using ISIM, the simulation tool
implementation (b) Hardware implementation aimed for this work. of the ISE software package [20]. The search algorithm
was emulated by using different sensor values and con-
figurations. As it was explained in section III, after this
of IOs needed, that depends on the size of the sensor (i.e. initialization process, the center of the beam is found and
the number of needed bitlines). This issue can be sorted out the more illuminated pixel is identified. Fig. 11 shows the
by using a Serial-Parallel interface, what would increment state of some relevant variables at the end of the search for
the execution time of the algorithm. However, this would an arbitrary array representation. The internal variables br x
not be a problem, because it will only be executed once and br y, marked in red, indicates the x and y coordinates
at the beginning, as a starting routine. The low area occu- of the brighter pixel in the pixel array. This information
pation also make the design particularly suitable for SoC remains available for the final configuration of the chip. The
implementations. The best solution is a trade off between state register status indicates that the system is ready for the
occupation area and performance. next stage, called sensor mode (sm, blue mark in Fig. 11)
For the evaluation of the system functionality, many con-
B. Testbench figurations of light intensities distributions were analyzed.
A C program that emulates the photodetector array be- Fig. 12 illustrates the more relevant cases. Figs. 12(a)
havior was written, with the purpose of being used during and 12(b) show the case of a distribution that represent
the IP-core testbenching. Also, a VHDL module has been a non-diffractive beam (NDB) centered an non centered,
developed to represent the sensor, and interfaces with the
TABLE I
D EVICE UTILIZATION SUMMARY