Bookmark and Share Printer-friendly version Email to a Friend

Acquire Images with a Sensor and a Microcontroller

( 01 Dec 2010 )

By Ioan Ciascai, Technical University of Cluj-Napoca, Romania, and Liliana Ciascai, Babes-Boylai University, Cluj-Napoca, Romania


The TAOS (Texas Advanced Optoelectronic Solutions) TSL1412S image sensor, IC2, can acquire a linear image of 1536×1 pixels, or 400 dpi (Figure 1). It uses a single voltage supply, and you can control it with just a few digital signals. Thus, you can design an image-acquisition system that uses the sensor and an AVR ATmega328 microcontroller, IC1.


Figure 1


Figure 1 shows how you can connect the sensor to the microcontroller. You program the microcontroller to generate the control signals for the sensor. The design uses a 16-MHz clock frequency. The microcontroller’s 8-bit Timer 2 generates the command signals. In Mode 2, the timer generates hard clock signals CLK1 and CLK2 and soft strobe signals SI1, HOLD1, and HOLD2. The TSL1412S uses serial connections. The SO2 signal connects to the ICP input of TSL1412S when you activate flag ICF1.

Timer 2 generates a handler interrupt, which ensures the correct phase of the clock signal, generates the strobe signal, and acquires and saves the TSL1412S’s output analog data. You can see a model for the interrupt subroutine here. The code sets the microcontroller’s stack, register, ADC, Timer 2, and interrupt functions. To save image data, you must set the T bit in SREG to 1 and set pointer X=0×0200. You can do these settings in the last clock of time integration (R25, R24=0×0001).

By modifying the data from the register, you can set the sensor’s integration time at 2.5 to 50ms, or 100ms with the prescaler of T2. Knowing that the sensor acquired the data in the previous cycle, you can perform a data-acquisition design using the microcontroller’s internal ADC. The integration time must be greater than 50ms.

The conversion time for a 16-MHz-frequency clock is approximately 16μs, which corresponds to an integration time of approximately 25ms. Because the conversion frequency is 1MHz—higher than that of IC1’s recommended frequency of 200kHz—you reduce the ADC’s precision from 10 bits to 8 bits. The microcontroller saves a byte for each pixel, which lets you save the data to the microcontroller’s internal memory for one frame. The rest of the microcontroller’s 2kB memory performs stack and data-acquisition tasks.

The system quickly processes the sensor’s analog output signal through the analog comparator of the microcontroller’s internal schematic. You can make a comparison with a fixed voltage using an internal voltage reference of 1.25V and a resistive divider or a variable voltage you can obtain from a DAC or a PWM (pulse-width-modulated) signal the microcontroller’s timer generates.

 
Printer-friendly version Email to a Friend
 
Article Rating 
Average Rate: No rating yet
 
Poor Quite Good Good Very Good Excellent
 
 
ADVERTISEMENT
 
Related Content 
 
 
ON-DEMAND WEBCASTS


 
 
Highest Rated  
Feedback Loop  

ADS BY GOOGLE 
 
 
 
ADVERTISEMENT
Press Release 
 
TECHNOLOGY NEWS
 
 
 
PRODUCT NEWS
 
FEATURED SPONSORS
 
 
 
DESIGN CENTERS
 
ADVERTISEMENT
     
Reference Designs 
   
     
 
 
 
 

 

RSS
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   

POLL
What type of environmental regulation do you think will be most beneficial for the tech industry?
Proper recycling and disposal
Push for power efficiency and energy conservation
Chemical/lead regulation
View results


 
     
 
Power Technology E-newsletter 
Power.org Releases Power Architecture 32-bit Application Binary Interface Supplement
EDNA, May 11
POL Regulators Designed for Energy-efficient Computing
EDNA, March 11
Fairchild Revolutionizes Power Savings
EDNA, January 11
Lattice Transforms Board Power and Digital Management
EDNA, November 10
 
Analog E-newsletter 
12V Dual-channel Synchronous Buck Converter Features Integrated FETs
EDNA, February 10
Power MOSFETs features reduced top-side thermal impedanc
EDNA, January 10
 
     
 
KNOWLEDGE CENTER
 
Texas Instruments: DaVinci™ Technology
 
Texas Instruments: Safe Bet Series
 
 
INDUSTRY LINKS
 
Photonics Association (Singapore)
Singapore Industrial Automation Association (SIAA)
Taiwan Semiconductor Industry Association (TSIA)
 
 
OUR SPONSORS
 






Keithley Instruments
With more than 60 years of measurement expertise, Keithley Instruments has become a world leader in advanced electrical test instruments and systems from DC to RF (radio frequency). Our products solve emerging measurement needs in production testing, process monitoring, product development, and research...
 
 
 
     
 

EDN India | EDN Taiwan | EDN Korea | EDN Japan | EDN China | EDN | EDN Europe

 
ABOUT EDN Asia | CONTACT US
   
© 2012 EDN Asia All rights reserved.