Pinewood Derby Timing System Using a Line-Scan Camera

652 views

Published on

  • Be the first to comment

  • Be the first to like this

Pinewood Derby Timing System Using a Line-Scan Camera

  1. 1. Pinewood Derby Timing System Using a Line-Scan Camera Rob Ostrye Class of 2006 Prof. Rudko
  2. 2. Project Background <ul><li>System is used to determine time and finish order of cars in a pinewood derby car race </li></ul><ul><li>Accommodates up to 4 lanes </li></ul><ul><li>Easy to use, low cost, and accurate </li></ul><ul><li>Operate from a PC via a USB cable </li></ul><ul><li>Images taken and displayed on the computer </li></ul>
  3. 3. Pinewood Derby Setup Starter Lanes Camera Lens
  4. 4. Timer Implementation <ul><li>Line-Scan CCD camera lens and sensor capable of monitoring up to 4 lanes </li></ul><ul><li>Xilinx FPGA for core logic and component interfacing </li></ul><ul><li>Non-Volatile Memory for start up </li></ul><ul><li>DRAM for holding data </li></ul><ul><li>2 Layer PCB interfacing all components </li></ul>
  5. 5. Components Used <ul><li>Xilinx XC3S250E VQ100 FPGA (link) </li></ul><ul><li>1.2v Switching Power Supply </li></ul><ul><li>2.5v and 3.3v LDO Power Supplies </li></ul><ul><li>TAOS TSL3301 CCD (link) </li></ul><ul><li>M12 CCD Lens </li></ul><ul><li>SPI Flash Memory </li></ul><ul><li>SDRAM </li></ul><ul><li>48 MHz System Clock </li></ul><ul><li>Transient Voltage Suppressor </li></ul><ul><li>External Connectors </li></ul><ul><ul><li>USB </li></ul></ul><ul><ul><li>Trigger </li></ul></ul>
  6. 6. Circuit Board FPGA Power Supplies DRAM 2.5v 1.2v 3.3v 38 5v Image Sensor Flash Memory Clock External Trigger USB
  7. 7. Xilinx Spartan 3E FPGA <ul><li>66 User Input/Outputs accommodates the needs for all of the components chosen </li></ul><ul><li>250k system gates allows for a greater range of functionality </li></ul><ul><li>Small size </li></ul><ul><li>Availability of software tools and libraries for implementation </li></ul>
  8. 8. Power Supplies <ul><li>Switching Supply: 1.2v </li></ul><ul><ul><li>Low power loss </li></ul></ul><ul><ul><li>FPGA Core voltage </li></ul></ul><ul><li>Low Quiescent Current LDO: 3.3v and 2.5v </li></ul><ul><ul><li>Small footprint </li></ul></ul><ul><ul><li>Provide enough current for application </li></ul></ul>
  9. 9. Image Acquisition <ul><li>CCD: </li></ul><ul><ul><li>102x1 Pixels translates to about .17 inches square per pixel when the sensor is placed 13 inches above the trace </li></ul></ul><ul><ul><li>Serial Interface for easier VHDL implementation </li></ul></ul><ul><ul><li>Explicit instructions available to control the sensor </li></ul></ul><ul><ul><li>Fits supply voltage constraints </li></ul></ul><ul><li>M12 Lens: </li></ul><ul><ul><li>Focal length of 8.0mm will accommodate about 4 tracks at about 13 inches above the track </li></ul></ul><ul><ul><li>Fits in an existing part used for the M12 lens </li></ul></ul>
  10. 10. System Memory <ul><li>Synchronous DRAM 4x16 </li></ul><ul><ul><li>64MBit will store high amount of data </li></ul></ul><ul><ul><li>Control module cores are available </li></ul></ul><ul><ul><li>Interface easily with the FPGA </li></ul></ul><ul><li>SPI Flash Memory </li></ul><ul><ul><li>4MBit hold enough data for load instructions </li></ul></ul><ul><ul><li>FPGA has settings for easy implementation </li></ul></ul><ul><ul><li>Readily available chip due to high consumer demands </li></ul></ul>
  11. 11. Programming <ul><li>Interface the sensor with the block RAM within the FPGA </li></ul><ul><li>Enter data from block RAM into DRAM </li></ul><ul><li>Take data from the DRAM and read out over USB </li></ul><ul><li>Use developed cores for: </li></ul><ul><ul><li>USB interface to the computer </li></ul></ul><ul><ul><li>SPI Flash interface </li></ul></ul><ul><ul><li>DRAM reading and writing </li></ul></ul>
  12. 12. Cores around the FPGA DRAM Interface SPI Flash Interface USB Interface Trigger Interface Image Sensor Interface FPGA
  13. 13. Interface between BRAM and Sensor Image sensor receives data serially into an 8 bit register which provides instructions to the sensor. SClock SD SDin Image Sensor Block RAM Image Sensor Interface
  14. 14. ASM for Image Sensor Interface Defaults timer = timer-1 writeEN = 0 SDin = 0 Asynch Reset address = 0 SDin = 0 writeEN = 0 timer = 0 I Reset timer = -32 0 1 timer = 0 0 1 Read BRAM Wait state address = address + 1 SDin = BRAM(address) Write pix = 0x16 0 1 Wait start timer = 0 1 0 1 0 SD address(2:0) = 0 1 0 Write Pixel address = address + 1 writeEN = 1 SDin = 0 timer = 10MHz line rate address = 0 address = 512
  15. 15. Line Acquisition Rate The line scan rate is adjustable based on the timer reset value. 1 line / 630  s ≈ 1600 lines/sec 630  s
  16. 16. Results <ul><li>Custom designed circuit board with working supply voltages and correct component connections </li></ul><ul><li>Image sensor interface modeled and proven to work in simulation </li></ul><ul><li>Adapted to work on a development board </li></ul><ul><li>Available cores analyzed and chosen </li></ul>
  17. 17. Possible Future Development <ul><li>Image acquisition that will read out only the period of time when the cars are under the camera </li></ul><ul><li>Interface logic cores for integrated operation </li></ul><ul><li>Set up the external trigger to start device </li></ul><ul><li>Use SPI flash memory to program the FPGA on startup </li></ul><ul><li>Develop an algorithm for focusing the lens </li></ul>
  18. 18. Resources <ul><li>Birger Engineering, Inc. </li></ul><ul><ul><li>The project was conducted in conjunction with the company. </li></ul></ul><ul><ul><li>Provided technical knowledge with respect to hardware and software development </li></ul></ul><ul><ul><li>Provided software and some of the hardware involved with the project </li></ul></ul><ul><li>Opencores.org </li></ul><ul><ul><li>Open source codes and information pertaining to USB, DRAM, SPI flash elements of the project </li></ul></ul><ul><li>Component Technical Documentation </li></ul><ul><li>Prof. Rudko </li></ul>

×