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

4 replies

Andrew2q
Andrew2qAuthor
Associate
Jan 17, 2025 4:38 AM UTC

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 !

Pavel A.
Jan 17, 2025 4:39 AM UTC
Andrew Neil
Super User
Jan 17, 2025 10:08 AM UTC

Please clarify what you're actually asking for?

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

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Andrew2q
Andrew2qAuthor
Associate
Jan 25, 2025 4:42 AM UTC
  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.