ADC LV-maxsonar Ez1 range finder o/p voltage
hi friends,
please have a look at the following specs and help me out!
specs: The LV-MaxSonar detects objects from 0-inches to 254-inches (6.45-meters) and provides sonar range information from 6-inches out to 254-inches with 1-inch resolution.
when using the analogue pin:
AN –
please have a look at the following specs and help me out!
specs: The LV-MaxSonar detects objects from 0-inches to 254-inches (6.45-meters) and provides sonar range information from 6-inches out to 254-inches with 1-inch resolution.
when using the analogue pin:
AN –
Outputs analog voltage with a scaling factor of (Vcc/512) per inch. A supply of 5V yields ~9.8mV/in. and 3.3V yields ~6.4mV/in. The output is buffered and corresponds to the most recent range data.
the output voltage at a range of 10 inches = 98 mV. Am using an 8-bit ADC and when using the formula X= ( Vin/Vf.s) * 2^n - 1, at 254 inches the digital output is 127!! shouldn't it be 255?? i mean 5V --> 254 inches (full range) --> 255 (n=8bits)..
so if i use it as it is, taking the output at 10 inches, X = (98mV/5) * 255 = 4.998=5.. what will be the consequence?? should the output be amplified?
the microcontroller being used is PIC 16F877A.
the microcontroller being used is PIC 16F877A.
please reply soon!
thanks,
thanks,
satanas
0