Main concept for STM

A project log for Moto_oiler

Trying to build my own chain lubrication system with blackjack&etc.

zaksignuzaksignu 02/19/2019 at 12:370 Comments

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          
        |||||||||||||||            |||||||||||||||||     

Thereis 7 status mode: 

so green-red led has different flashing modes with different states.