The TDC1000-TDC7200EVMTDC1000-TDC7200EVM evaluation module has 4 main parts The TDC1000 analog front-end and a pre-programmed MSP430 microcontroller on the board, a 1MHz Piezo Ceramic sensor that plugs into the board and a GUI client for on your PC.
In this blog I measure the concentration of detergent in water. |
Test Setup
The setup is almost the same as for level measurements. The only difference is that the sensor is placed at the side of the container, very close to the bottom of the receptacle.
That's done because that's an ideal location. When there's fluids in the container, the bottom is always going to be filled first, and will stay filled last when emptying.
And the distance of the liquid is also known. You know the distance between the side of the container where the sensor is glued, and the other side.
I've filled the container with tap water, and measured the time that one echo takes to go back and forth through the water. The time for the sonar signal to travel back and forth through the liquid is 79 068 ns.
When I enter this info, and the size of the container (5.8 cm) in a spreadsheet, I get this speed of sound for tap water in Schaarbeek, Belgium:
container width | 5.8 | cm | 0.058 | m |
Distance = 2 * width | 0.116 | m | ||
time of flight | 79068 | ns | 0.000079068 | s |
speed of sound | 1467.091617342 | m/s |
After putting 3 drpops of Ecover dishwasher liquid, and stirring, I get the following time of flight:
That gives me a speed of sound of:
container width | 5.8 | cm | 0.058 | m |
Distance = 2 * width | 0.116 | m | ||
time of flight | 79008 | ns | 0.000079008 | s |
speed of sound | 1468.2057513163 | m/s |
Real World Application
I've shown an example of how to measure the concentration of a liquid diluted in water.
I know that 0 drops of detergent in 13.5 ml (width * width of container * height of water level) of tap water gives a speed of sound of 1467 m/s, and 3 drops of detergent give 1468 m/s.
I can create a formula or a lookup table to derive the amount of detergent, and sample the concentration.
Another use case is to collect the speed of sound of a variety of liquids, and sample what liquid is inside the container without opening it.
I've attached the spreadsheet that I used for the calculations to this blog post.
Top Comments