cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC™ 5, 3 & 1

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
rola_264706
Honored Contributor II
        Post your project so we can check it.   
0 Likes
rola_264706
Honored Contributor II

Here is a sample program that my help.

0 Likes
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