Drive an Ultrasonic Liquid Flow Transducer

Hello,

I would like to use the US0078-000 ultrasonic liquid flow transducer from Audiowell (specification sheet below [1]) to measure the density of liquids based on the time-of-flight (TOF) of acoustic signals and then identify their type. In particular, I am interested in differentiating between gasoline and diesel. Check the paper below [2] if you would like to learn more about the application.

I was wondering if an Arduino board is capable of generating a 2 MHz square excitation signal to drive the transducer. If so, how can I connect the transducer and program the Arduino to drive it, read the echo, and measure the TOF?

[1] Audiowell US0078-000 Datasheet
[2] The Innovative Approach to Real-Time Detection of Fuel Types Based on Ultrasonic Sensor and Machine Learning | Arabian Journal for Science and Engineering

Thanks.

1 Like

An Arduino board can easily generate a 2 MHz square wave. The details depend on the board chosen.

However, no microcontroller can drive the transducer directly, which requires an amplifier of some sort with 50 Ohms output impedance. In the data sheet example, the driving signal is 20 pulses of 0 to 2V.

1 Like

Thank you, @jremington. Could you propose the necessary circuitry and code to accomplish that?

Are you interested in learning about how to implement the technique, or just want someone to do the work for you?

If the latter, use the flag button (lower right) to ask a moderator to move the post to the Jobs and Paid Consultancy forum section.

I am interested in learning how to implement the technique.

Thanks.

Great!

If you happen to choose an Arduino Uno R3 (or similar like Pro Mini or Classic Nano), then one place to start is to study this excellent tutorial, which explains how to program one of the built in timers to output a given frequency to an output pin.

2 Likes

That is useful. What about the signal amplification? Do you have any suggestions for the electrical circuitry? In other words, where should I connect the transducer and the amplifier?

Sorry if my questions seem very basic, as I am new to this type of application.

Thank you for understanding and your help.

Figure 1 of the transducer data sheet suggests that a circuit like this voltage divider followed by an emitter follower impedance converter would work to drive the transmit sensor. The transducer is modeled as capacitor C1, which it is only a very rough approximation.

PWM is a 0 to 5V timer output square wave.

2 Likes

@jremington: Would Q1 be any NPN transistor?

No, the transistor must be chosen to handle the required current, at the required switching frequency.

1 Like

Sure but the ASIC or FPGA you use to do the TOF can probably generate the excitation signal, so why bother with an Arduino.

@jim-p: Can't one compute the TOF with an Arduino?

Thank you for your contribution.

That question has been asked many times on the forum and I have never seen anyone answer yes. It usually requires measuring very short time periods in the few nanosecond range and it seem that most arduinos are just not fast enough to provide any kind of reasonable precision.

1 Like

If the OP is attempting to duplicate the system in the Arabian Journal article (linked in the OP's first post), then the times of flight are on the order of 70 microseconds for a 10 cm round trip. See snip. That's obviously not a problem for an Arduino to measure.

1 Like

Maybe consider trying a DS1603L. If the "depth" of liquid is known, then you could also use that sensor to "measure" the depth, and the difference between the known and measured depths would vary depending on the fluid type.

How to read serial data from Non-contact Ultrasonic liquid level sensor - Other Hardware / Sensors - Arduino Forum

1 Like

The data sheet for the transducer describes a setup with a path length in liquid of 120 mm.

The velocity of sound in kerosene is 1324 m/s, so the one way TOF is 90.6 microseconds, which is not a problem for an Arduino to measure.

The OP seems to be unaware that the receiver is more complicated than the transmitter, and I wonder if the plastic case of the transducer tolerates exposure to gasoline.

1 Like

Yes, I pointed that out in my post #15. I guess you meant to reply to @jim-p, who thought the times of flight were on the order of nanoseconds.

@jremington: I would also like to learn how the receiver should be connected.

Thanks.

If you are considering using just one transducer as the transmit and receive element, you may get some ideas from the schematic for the ubiquitous JSN-SR04T:

JSN-SR04T (distance sensor) Reliability Issue Fix? | MySensors Forum

However, since you are...

...I suspect you are in very deep over your head.

If that's true, if I were you, I'd try the DS1603L. With that non-contact sensor, you don't have to design the transmit and receive circuitry, there's no worry about whether the case can tolerate exposure to gasoline (your transducer's datasheet is silent about that), and you don't have to design a gasoline-proof fitting to hold the transducer in contact with gasoline.

Also, I hope you are familiar with the safety requirements for using electrical devices in hazardous (explosive) environments. If words like "intrinsically safe" and NEMA ratings (or your country's equivalent) don't mean anything to you, then you should not be doing this project.

1 Like

Thank you, @DaveEvans, for the recommendations.

I am aware of the HazLoc requirements, and I do have a background in electrical engineering, but I still need help with electronic circuit design.

I would like to use two transducers, one as a transmitter and one as a receiver to avoid the complexity of using one transducer as a transceiver. Please note that the transducers, separated by 120 mm, will be mounted on a housing case and submerged in a metallic pipe where the liquid flows. I will deal with HazLoc requirements and transducer/liquid interaction later as I'm still in the stage of building a proof of concept.

My question now is, can any Arduino board handle the TOF calculation? If so, how can I connect the transducers and program the Arduino to drive one, read the echo, and measure the TOF?

Thanks.