You are here

Laser Distance Sensor and ADC DelSig | Cypress Semiconductor

Laser Distance Sensor and ADC DelSig

Summary: 3 Replies, Latest post by alexanderadavid_1703136 on 09 Sep 2016 01:49 PM PDT
Verified Answers: 1
Last post
Log in to post new comments.

Hello,

I'm new to the psoc and I'm trying to get decent values from this laser distance sensor: https://www.pololu.com/product/2476

I'm trying to get the ADC to operate within the proper voltage range listed on the site (3.6 V at 10 cm to 0.6 V at 150 cm) but can't figure it out. I've tried using the -Input +/- Vref function to get that exact voltage range but something is wrong. If I use the Single Ended option and play around with the "Input Options" and "Reference" sections of the ADC I can get a little closer but at this point I'm just changing around parameters that I don't understand and hoping that I get what I need.

I need some direction, any help is much appreciated.

Thanks!

user_242978793's picture
User
1455 posts

Post your project so we can check it.

user_242978793's picture
User
1455 posts

Here is a sample program that my help.

Thanks for your help,

I figured it out. I turns out I should have kept it simple with Vssa to Vdda. Also linearized it with the proper function.

For anyone else that stumbles across this thread, the best linearization function is:  

linearizedDistance = (pow(ADC_Read16(), -1.51));

Thanks again!

Log in to post new comments.