Temperature compensated densitometer

Distiller

New Member
I need some help with precision measurement of ethanol and water mixtures. I have located a fairly precise digital densitometer that produces values between 0 and 5 VDC depending on density. What I want to do is create a percentage output (ABV-alcohol by volume) that is corrected for temperature variations above/below 60 degrees F. An example would be a mixture that measures 45% ABV at 60 degrees F.....the temperature compensation solution would also produce the same 45% ABV if this same mixture was now at 54 degrees F.

Has anyone an approach for this problem?

Regards,

Brian
 

hippy

Technical Support
Staff member
Should be fdoable if you can find a temperature sensor which can be used in the liquid without problems or otherwise obtain its temperature. The densitometer can be read using READADC10 although it may need a fairly accurate power supply and preferably a means of calibrating the analogue input against power supply. Depends on how accurate you want your measurements to be.

Temperature can be read the same way, or with READTEMP12 if using a DS18B20.

After that it's a matter of maths. The PICAXE only handles integer, positive numbers but there are tricks to work round that. How complex it gets depends on how complicated the compensation maths is. I have no idea.
 

Distiller

New Member
Should be fdoable if you can find a temperature sensor which can be used in the liquid without problems or otherwise obtain its temperature. The densitometer can be read using READADC10 although it may need a fairly accurate power supply and preferably a means of calibrating the analogue input against power supply. Depends on how accurate you want your measurements to be.

Temperature can be read the same way, or with READTEMP12 if using a DS18B20.

After that it's a matter of maths. The PICAXE only handles integer, positive numbers but there are tricks to work round that. How complex it gets depends on how complicated the compensation maths is. I have no idea.
1) How would I go about creating a 2 point calibration for the density probe. These would be high and low densities which would include the densities that would actually be used.

2) If I have a matrix of 1500 four digit numbers with a decimal place. How could I access this table given the limited memory available?
 

leftyretro

New Member
1) How would I go about creating a 2 point calibration for the density probe. These would be high and low densities which would include the densities that would actually be used.

2) If I have a matrix of 1500 four digit numbers with a decimal place. How could I access this table given the limited memory available?

1) Either with hardware with an external op amp between the density probe and the Picaxe A/D input. The op amp would have a gain and offset pots to set your 2 point calibration points. Or, you could just have a software calibration routine in the Picaxe to scale/compensate the A/D values to your 2 calibration points.


PS: As Hippy said I think you can use the Picaxe Integer math to work around your decimal point requirement as 4 digit numbers aren't too hard to deal with. There is a cool I2C floating point processor chip avalible for around $20 that can do real FPM if you need it.

2) I think an external I2C EEPROM would be the cheapest and simplest way to store your look-up table. An 8K byte chip is only a couple of dollars.

Lefty
 
Last edited:

Cruiser

Member
Brian,

You could certainly do the hardware using a PICAXE 08M with your densitometer connected to an ADC input and a DS18B20 connected to an I/O port. I've done a bit (lot) of work on this myself and I can tell you the formula for temperature correcting density readings is not trivial and would not fit in a PICAXE. My setup sends the data back to a laptop PC and even then, this particular calculation is done using lookup tables.

You would need quite a large lookup table which would have to be on external memory. Remember the PICAXE only knows integer numbers but you can work around that by multiplying by 10 or 100 etc. but accuracy can suffer due to the size of integers allowed.

I also use a different method of calculating ABV which I'm willing to share offline. It involves using an 08M as an interface but most of the calculations are done on the laptop. Send me a private mail if you want more info but I think you'll need to get a few more posts in before you can do that. I would like to hear about your densitometer though. I also recommend you check out http://www.homedistiller.org/ and http://www.homedistiller.org/forum/index.php if you haven't already.

Cruiser.
 
Top