Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrouch authored Nov 29, 2024
1 parent 3ad5929 commit c2addea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bbn_m5atomS3_lite_alternator_freq_to_RPM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,14 @@ Output to esp32:

## ESP32 code

### Interrupt counting

Attach an interrupt handler function in RISING edge to analog input pin.

Add logic to debounce interrupt. IF you do not know what 'debouncing of interrupt' you can google it.

### Debouncing interrupts

Debounce timeout. Let's say your engine RPM gauge goes to 5000 RPM and alternalor has N-poles.
And "transfer number" on an alternator belt (makes alernator RPM differ from engine RPM).
The ratio between alternator RPM and engine RPM is usually 2.5 to 1.
Expand All @@ -53,6 +57,8 @@ Let's say there are 12 poles on alternator N = 12, R = 1.

So debouncing time of 200 microseconds should be reasonable.

### Critical section of pulse counting

On esp32 there has to be added some synchronization code on the critical section of interrupts (pulses) counting.


0 comments on commit c2addea

Please sign in to comment.