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 0104b6f commit 56f64a3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions bbn_m5atomS3_lite_alternator_freq_to_RPM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,20 @@ Output to esp32:
- Board 3-pin output terminal GND to esp32 GND
- Board 3-pin output terminal VCC to esp32 +3.3v VCC
- Board 3-pin output terminal OUT to some analog input pin on esp32

## ESP32 code

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.

Debounce timeout. If your engine RPM gauge goes to 5000 RPM and alternalor has N-poles.
Then the frequency of alternator signal can be up to

5000 * N / 60 Hz



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


0 comments on commit 56f64a3

Please sign in to comment.