4-20ma pressure transducer, compression tester application

Hello Everyone.

This is my first email on Arduino Forum so please be forgiving :slight_smile:

I need some help regarding compression tester for rotary engine.

Below I've attached small gif showing rotary engine working cycle ( 1 full cycle = 3 chambers)

Typical Mazda original compression tester displays 3 values of pressure ( one for each of the chambers ) + RPM value.

There is/was on the market custom compression tester which displays exactly the same thing using standard 16x02 LCD.

Hardware is not a problem , I have a 4-20ma pressure transducer (working range 0-10bar, operating voltage 8,5-36V connected with 250ohm resistor. Output voltage calculation with linear characteristic of the sensor is piece of cake.

Software is my problem.....

Could anybody advice what is the easiest or best way to "save" in Arduino all three values of pressure and then display it on LCD?

I can imagine the signal will go:

1st chamber --> "high" then "low"
2nd chamber --> "high" then "low"
3rd chamber --> "high" then "low"

Correct me if I'm wrong but low signal after each chamber should be used as trigger to "store" the voltage (pressure) value in the memory and then display it on LCD.

Any ideas about RPM would be also welcome.

Thank You in advance.

custom tester.JPG

Correct me if I'm wrong but low signal after each chamber should be used as trigger to "store" the voltage (pressure) value in the memory and then display it on LCD.

Any ideas about RPM would be also welcome.

As I understand it, you have to monitor the pressure for its maximum value, and stop (end cycle) at some lower value indicating expansion phase and exhaust. The maximum value IMO will be reached at or near the beginning of an cycle (steep increase), followed by a slower fall (immediate expansion, instead of increase after ignition). If you have problems in catching just the peak value, you can add some circuitry to hold the maximum value. You may spend separate analogue inputs for the current and peak values, and use the current (unfiltered) value for the detection of the cycles. A digital input may be sufficient as well, provided that the signal properly switches the digital pin between high and low level.

Then store the peak value in a 3 element array, increment the index for the next chamber, reset (discharge) the peak value circuit and wait for the next chamber passing. When the index is reset to zero, after 3 cycles, you can take the time for a single turn and compute the RPM from it.

You can combine multiple readings for each chamber, either by average, median or peak values. Dunno which method gives the best results.

Take care that you don't miss cycles, or you may risk moving patterns and wrong RPM displayed. You can monitor the time for a single turn (3 cycles), in order to find turns of approximately the same time, and display values only after the RPM has settled to almost constant values.


Below I've attached a screen shot. This is a compression reading from a single rotor.

Hardware-wise it's 4-20 mA sensor connected to oscilloscope-similar device.

Each cycle there are three peak values 1,2,3 and three low values 1a,2a,3a.

As You can see the same peak numbers eg, 1-1-1-1 have always same/similar level

Looking at this graph and a "nature" of this signal could You advise please:

a) is it better to use analog or digital inputs ?
b) how to store peak values - 1,2,3 ? which command ? detect maximum value ?
c) how to use 1a,2a,3a as the trigger points for incoming peaks to be stored ? commands ?
d) hot to take values e.g. point 1 from let's say four cycles and calculate average ?
e) how to setup a timer between characteristic points to calculate RPM ?

Could You or anybody indicate way, direction I should go please (useful commands, programming approach,variables...etc...) ?

Thank You in advance.

According to your questions I'd suggest that you learn how to use the C language, the special Arduino (I/O) functions, and how to do calculations. Look at the supplied programming examples, how various tasks can be accomplished. Then come back to your project, and apply what you've learned.