measure 2000 letter tank with 1 letter resolution?
Moderator: Benj
measure 2000 letter tank with 1 letter resolution?
I need to measure 2000 liter water tank level with 1 liter resolution, with using 10bit internal ADC of PIC device. but it give me 2 liter resolution per increment. is there any possible way for it? or i need to use 12bit external ADC?
- Attachments
-
- Flowcode1.fcf
- (8.5 KiB) Downloaded 203 times
Last edited by imtiaz9 on Sun Oct 22, 2017 3:43 pm, edited 1 time in total.
-
- Posts: 315
- Joined: Sun Jun 23, 2013 1:29 pm
- Has thanked: 28 times
- Been thanked: 61 times
- Contact:
Re: measure 2000 letter tank with 1 letter resolution?
Hi
You mean litre! Not letter.
This is not a Flowcode issue necessarily, this is a sensor issue.
When you have researched which type of level gauge you will be using we can help.
Matt
You mean litre! Not letter.
This is not a Flowcode issue necessarily, this is a sensor issue.
When you have researched which type of level gauge you will be using we can help.
Matt
Re: measure 2000 letter tank with 1 letter resolution?
yes this is liter
sensor i use is a liner float sensor give 0 to 5v liner output. A 10k potentiometer rotate with float and it give 0 to 5v on adc pin.
i think sensor is ok the problem is in software. i think a 10bit adc max reading is 1023 and it sense 1 liter every 1.9 liter (2000/1023=1.9). am i right?
sensor i use is a liner float sensor give 0 to 5v liner output. A 10k potentiometer rotate with float and it give 0 to 5v on adc pin.
i think sensor is ok the problem is in software. i think a 10bit adc max reading is 1023 and it sense 1 liter every 1.9 liter (2000/1023=1.9). am i right?
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: measure 2000 letter tank with 1 letter resolution?
Yes your working out sounds correct to me. There are some microcontroller devices with internal 12-bit ADCs available which should help.
Do you need absolute 1 litre accuracy could you not simply drop the decimal point to give the illusion of having 1 litre resolution. Most steps would jump up 2 litres but some would be 1.
1 ADC bit = 1.9 litres
0 = (0 x 1.9) = 0 litres
1 = (1 x 1.9) = 1 litres
2 = (2 x 1.9) = 3 litres
3 = (3 x 1.9) = 5 litres
4 = (4 x 1.9) = 7 litres
Also think about your sensor, how accurate is that?
How have you got rid of the noise in the system? A 10-bit and especially a 12-bit ADC will be very susceptible to noise.
Do you need absolute 1 litre accuracy could you not simply drop the decimal point to give the illusion of having 1 litre resolution. Most steps would jump up 2 litres but some would be 1.
1 ADC bit = 1.9 litres
0 = (0 x 1.9) = 0 litres
1 = (1 x 1.9) = 1 litres
2 = (2 x 1.9) = 3 litres
3 = (3 x 1.9) = 5 litres
4 = (4 x 1.9) = 7 litres
Also think about your sensor, how accurate is that?
How have you got rid of the noise in the system? A 10-bit and especially a 12-bit ADC will be very susceptible to noise.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: measure 2000 letter tank with 1 letter resolution?
The resolution accuracy become more complicated issue if the tank capacity increase i.e. 10000 liter. The main goal is to measure the remaining tank quantity in liters. If a 10bit adc measure for example 10000 or 20000 liter quantity It jumps about 10 liter or 20 liter per increment and this is a big issue for me.
The sensor accuracy is good because it use a multiturn potentiometer to rotate with level and give very accurate reading on adc pin, that’s why I’m not using ultrasonic or etc…
Now plan to using an external 16bit adc (ad7792) to resolve this big resolution gap..
any one use 16bit with with pic device before? any example code??
The sensor accuracy is good because it use a multiturn potentiometer to rotate with level and give very accurate reading on adc pin, that’s why I’m not using ultrasonic or etc…
Now plan to using an external 16bit adc (ad7792) to resolve this big resolution gap..
any one use 16bit with with pic device before? any example code??
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: measure 2000 letter tank with 1 letter resolution?
Looks like it should be simple enough with the 16-bit ADC. I've used the Microchip AD7680 on our EB085 DSP Input board and the code is relatively simple. The AD7792 looks like it has more going on so may need a bit more configuration before you can pull out ADC values but should be simple enough using SPI commands.
For an example look at the Read_ADC macro in this Flowcode project file. You could even export the macro and import it into your own program to save some time replicating the code.
For an example look at the Read_ADC macro in this Flowcode project file. You could even export the macro and import it into your own program to save some time replicating the code.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Steve001
- Valued Contributor
- Posts: 1189
- Joined: Wed Dec 31, 2008 3:37 pm
- Has thanked: 460 times
- Been thanked: 523 times
- Contact:
Re: measure 2000 letter tank with 1 letter resolution?
Hi Imtiaz
What about a pulse output flow meter ?
https://www.omega.co.uk/subsection/flow ... utput.html
or
https://www.omega.co.uk/pptst/FTB4600.html
Steve
What about a pulse output flow meter ?
https://www.omega.co.uk/subsection/flow ... utput.html
or
https://www.omega.co.uk/pptst/FTB4600.html
Steve
Success always occurs in private and failure in full view.