Laser Distance Sensor and ADC DelSig

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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!

0 Likes
1 Solution
Anonymous
Not applicable

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!

View solution in original post

0 Likes
3 Replies