Skip to main content
This topic has been closed for replies.

3 replies

Andrew2qAuthor
Visitor II
January 17, 2025

Merged from separate thread.


I would like to ask if this device can read input digital and analog signals 5 volts and output 5 volts on and off in milliseconds STM32F412G-DISCO. Who can help create programming code based on information ?
Discovery Development Board, STM32F412ZG, 32bit, ARM Cortex-M4 or any other boards ? Described diagram is available that shows and describes the relation between pulse number and IO pin On/Off

Thanks in advance for your answer !

Super User
January 17, 2025
Super User
January 17, 2025

Please clarify what you're actually asking for?

The article describes the information you need to give in your post when asking a question.

Andrew2qAuthor
Visitor II
January 25, 2025
  1. Input pin 2 is crankshaft position sensor counting pulses.
  2.  Input pin 3 is reference sensor to toggle LED1 at pulse 20 to go LED1 high at pulse 17 till 20.

3) Output pin 9 is LED1

4) Output pin 10 is LED2

 

At start up the engine both LEDs go HIGH every half cycle at pulse 30 till 33 until the system completes 604 cycles = 70064 pulses then reset to zero.

 

Reference sensor toggle LED1 at pulse 20 to set LED1 high in every half cycle and then LED2 high at pulse 75-78 and so on loop.

 

LED2 ON at pulse 75

LED2 ON at pulse 76

LED2 ON at pulse 77

LED2 ON at pulse 78

 

Cycle reset. Starting a new cycle

 

LED1 ON at pulse 17

LED1 ON at pulse 18

LED1 ON at pulse 19

LED1 ON at pulse 20

Then looping continue.

Reluctor wheel has 60-2 teeth = 58 pulses and two missing pulses is the gap. One pulse takes 1.38ms at the engine speed RPM750.