## Volts range

Post your VB and VBA discussions here
gtfa
User
Posts: 3
Joined: Fri Jan 16, 2009 5:27 pm

### Volts range

Hello,
I have an ADC-100 and I'm using Windows XP with Visual Basic 6 SP6. I'm developing a program to measure the sound tension using a digital decibilimeter with a microphone connected to the ADC-100. I would like to have the tension in Volts but the manual just tell me how to convert the values in mili-Volts. So, do any of you know any procedure that converts the tension to Volts instead of mili-Volts?

Thanks!

gruntman
Posts: 109
Joined: Thu Sep 28, 2006 3:50 pm
gtfa,

The ADC-100 has a 12 bit ADC inside of it. The driver outputs the counts from this ADC with values ranging from 0-4095. 0 would be the farthest negative value and 4095 would be the farthest positive. So if you are on the Â±20V scale 0 would be -20V and 4095 would be +20V. To convert the ADC counts to volts you would use the following formula.
(ADC Count -2048) X Selected Voltage Range / 2048 = Voltage Reading.

So, if on the Â±20V scale and a ADC reading of 1233 the formula would look like this:
(1233 - 2048) X 20 / 2048 = -7.958984375V

To ensure accuracy of your experiment I would leave the trailing numbers intact in your program. If however you still wish to have only voltage values and not the trailing numbers simply use Visual Basics round function to round the number up to the next whole number.

Regards,

Richard Boyd
Crag Technologies, Inc
http://www.pc-oscilloscopes.com

gtfa
User
Posts: 3
Joined: Fri Jan 16, 2009 5:27 pm
Thanks Richard! I'll try this one!
But I've been thinking here, and the program PicoFull has the option Auto range so it adjusts the volts range automatically according to the signal you're inputting. Is there anyway to use that procedure in a VB or VBA program? If so, how can I do that?
Thanks again!

gruntman