Main concept for STM.
There are 2 timers - TIM 2, and TIM4. Period of TIM2 approximately 0.5ms, period of TIM4 approximately 0.25ms. TIM 2 is using for controling MOSFETS, obtaining parameters ( flow status, wet status, oil level) and status updating. TIM4 is using for indicating ( green - red led).
Period of led indicating is 5 TIM4.
0 1 2 3 4
|250мс|250мс|250мс|250мс|250мс|
------------------------------------------------------
||||||||||||||| |||||||||||||||||
Thereis 7 status mode:
- max oil ( its normal state)
- medium oil ( its normal state)
- a little oil ( its normal state)
- flow state ( it is special state)
- no current state ( its not normal state)
- overcurrent state ( its not normal state)
- start state ( first run)
so green-red led has different flashing modes with different states.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.