自己制作激光扫描传感器(英文)
作者:Mlicitra   文章来源: http://www.eng.buffalo.edu/ubr/ff03laser.php    更新时间:2006年05月06日   打印此文    浏览数:

Electronics

Download the schematics

 

The video signal with a short range object. Top is video, bottom is sync

Interfacing to the image sensor is specific to the actual sensor you have. I will discuss the PVS sensor although others will be similar. This sensor has several inputs, some for clocks and some to configure the operating mode of the device. I hard wired the mode to be "DPR Mode, previous pixel reset" which basically means that each pixel integrates for one frame, is read and reset to integrate again. Because the clock speed applied to the sensors input is important for obtaining valid data, i could not have the clock start and stop whenever convenient, rather it had to be free running. I used a 4047 multivibrator for the job, set to 100 - 130 khz. Its speed is not horribly important which is good because it is not a horribly accurate device. Depending on the temperature of the capacitor in its RC circuit the frequency varies by around 5 khz. This speed is limited to about 130 khz because of the speed of the ADC which usually takes 5 microseconds to make a conversion, but could take 8 or 10 at times. The way i see it, 100 readings per second is much faster than most other sensors available to hobbyists and is much more data then the robots software can deal with anyway.

 

Sampling the signal 70% through. Top is pixel clock, bottom is ADC clock

The output of the sensor is an analog voltage relative to the intensity of the light striking a given pixel. Each time the clock input is cycled, a new voltage is outputted representing the next pixel. The SYNC line is asserted to signal the first pixel. The data sheet recommends to sample the output at least 60% through the clock cycle to avoid sampling noise caused by the next pixel being selected. I used two NAND gates and both outputs of the oscillator to create some kind of combinational logic to sample about 70% through. That signal is fed to the analog to digital converter, which will then start the conversion and assert its INT line when done, which is usually within 5 microseconds.

At the start of each frame the sensor asserts its SYNC line for 1 clock cycle. When the microcontoller wants to acquire a new measurement it will wait for this signal. Once asserted it will watch for the ADC to signal a conversion is complete. Once complete the microcontroller can load in the data through the parallel connection. The microcontroller keeps track of the first pixel over a certain threshold and the last pixel over that threshold to be used in calculations later.

Processing

A closeup of the video signal. Notice the steps which are the individual pixels.

Once the edges of the peak are found we can begin calculating the real distance. From the edges the center of the point is calculated. I just picked the point in the middle of the edges but could have played around with a weighted average.

There are a few things you have to know to convert a pixel to a distance. Firstly, you need to know the base side of your right triangle. Measure from the center of the laser to the center of your image sensor's lens. Next you need to know how many pixels are spanned per degree of incoming light. To find this you can play with some right triangles. Measure the distance to an object and do the trig to find the angle at the sensor. Move the object and do it again. Take the difference in raw readings and divide by the difference in degrees.

You also need to know the smallest raw reading you can get, representing the closest distance you can measure, and the angle at that distance. Just play with holding things up to the sensor until it doesn't see it and measure that distance and work out the angle.

Basically distance = base * tan(angle) to convert the raw reading to angle i used: angle = ((raw reading - smallest raw reading) / pixels per degree) + smallest degree

Simple as that... download this spreadsheet to try your results. I tweaked the constants with this sheet to minimize overall error. Pixels per degree is the most important number and only needs to be changed by a few thousands to effect accuracy.


首页 上一页 1 2 3 下一页 尾页 跳转到

转载声明:凡文章出处为www.RoboticFan.com的,系本站的原创文章。其它媒体在注明出处为RoboticFan.com并给出原始链接后可以自由转载,否则将视为侵权!

上一篇:Behavior-Based Robotics 下一篇:美军明年将举行机器人参与的演习

最近更新
  • 世嘉玩具与孩之宝将上市音乐机器人
  • Vstone携手KumoTek推出KT-X类人机器人系列
  • iRobot军用机器人最新杰作:“金属风暴”
  • 机器人工具包开始预定
  • 迪士尼与WowWee联手打造Wall-E系列产品
  • Arduino-目前为止最容易开发的控制板
  • 微软发布Robotics Developer Studio 2008 CTP
  • roBlocks——“块状”机器人
  • 后AIBO时代的机器狗——G-dog
  • 机器恐龙Pleo升级战

  • 相关文章

    推荐新闻

    赞助商广告