I am interested in measuring fluctuations in rotational speed of a Stirling engine during the course of a single revolution. The no load speed of the engine is between 700 and 1000 RPM. I was thinking along the lines of printing a disk with 200 radial black lines marked on the edge of the disk (and possibly a second ring of lines with a single mark to identify top dead centre). The disk would be fixed to the engine's flywheel. Two reflective IR sensors would be set to detect the passing of a dark line. I have used a similar set up but with a single sensor and one mark to measure the RPM of the engine with some success.
The data I want would be the time that each bar crossed the sensor and whether or not the single crank indicator bar was present at the instant that the time was recorded. Ideally I would like to get the data into a spreadsheet to analyse 'off-line'
My initial thought would be to set in interrupt to be triggered by the rising edge of the output of the sensor applied to an interrupt pin and then to write the time to a SD card. It would be helpful to also record the state of the crank position sensor to know if the engine was at top dead centre or not. (This would give me a way to check that no pulses had been missed)
A quick calculation gives a pulse rate of 3000 pulses per second when the engine is running at 1000 RPM. Is it wildly optimistic to expect an arduino or esp32 system to capture data at this rate?
I have also considered a two channel digital storage oscilloscope to do the job.
If you put a bar magnet across the axis of rotation with magnet center on the axis, a linear Hall Effect Sensor (Allegra is one maker) gives analog magnetic field strength along one axis. The Hall Sensor should be put just over the magnet center. An Uno can read that and do something 4 to 8 times a ms depending on the something.
Would sampling the angle of rotation 4 or 5 times per ms and determining speed be close enough? The ADC is 10-bit with some tolerance to cover half a circle as 0 to 1023. Store a table of pre-calculated value for each read in flash/PROGMEM and fetch answers in less than a microsecond (lookup tables are gold).
Suppose you measure angles in integer arc-seconds, in half a circle there are 10800. You don't need sign, Arduino word is unsigned int in 4 letters, 16 bits per entry for 0 to 1023 store how many arc-seconds and the fetch takes 6 cycles.
And what to do about logging/processing arc-seconds reads taken every 200 or 250 micros()? Looking for differences, ranges? Keep averages up on LCD or Serial Monitor? Take care to not ever overload a serial output buffer! It is EASY.
I believe you will get in trouble with the SD card because of the time it takes to write a byte. You could use RAM then when done sampling save it on a SC card. If you do not have enough RAM you could use FRAM, it operates at memory speed.
With an ESP32-S3 you can have up to 8MB of PSRAM. So, you can store the values in memory and save it to the SD card at the end, or when the buffer is full.
Instead of SD card you could also send it via serial connection to the computer, if it can be connected when taking the measures.
I did look at low cost logic analysers but bad feedback from people who purchased the analyser put me off. The problem they reported was poor driver support for Windows 10 and 11 and lack of documentation and support. Have you experience of the model you suggest in your post?
I have considered the using an AS5600 magnetic angle encoder in another Stirling engine project. I was thinking of driving the displacer using a stepper motor in response to the crank angle (The idea is quite old dating back to the sixties I think but it had problems maintaining synchronisation between the working piston and the displacer because there was no coupling between the two parts of the engine) My idea was to have a look up table to find the desired displacer position for any crank angle and then user the stepper to driver the displacer to that position. Most existing Stirling engines use a mechanical linkage between the power piston and the displacer so the displacer usually has a sinusoidal motion, but there is no a-priory reason to think this is optimal.
You could also attach a magnet to the rotating axis, or magnetize the axis itself, and put a wire coil around, without contact.
This would produce a sine wave that you could sample with the MCU ADC, maybe a bit amplified.
You can get angular data and cook it is one thing where past fails is another dufferent thing. Don't X-Y yourself into a search for expensive "solutions".
Yes, I purchased one of the kind linked. I've had no issues installing and running on Win10 with the Saleae software Logic 2.
On support I asked a question and got a prompt reply. I didn't get the answer I was hoping for but that wasn't a problem with the product. There's enough documentation for my small need. I haven't tried anything advanced, just observing waveforms. As can be expected there are YT videos, which may or may not help you.