In order to detect the presence of a pwm signal using a microcontroller from an external sensor (an interrupt), say the sensor is a hall sensor rotary encoder that is used to count the number of rotations and the direction of rotation of a motor shaft using a magnet attached to the shaft, what is the most trivial way to accomplish the task?

  • \$\begingroup\$ Modified according to the suggestion. Now please shed some light. Thanks 😊 \$\endgroup\$ – Nikeboy Mar 11 at 22:41
  • \$\begingroup\$ most trivial way is opinion based ... hardware person will choose hardware solution ... software person will choose software solution ... opinion based questions are off topic here \$\endgroup\$ – jsotola Mar 11 at 22:43
  • \$\begingroup\$ Feed pwm to RC and sense Vc if delays are acceptable. Or sense pwm directly with uController and set some maximum alowable timeout when pwm disapear. \$\endgroup\$ – Michal Podmanický Mar 11 at 23:59
  • \$\begingroup\$ If you only want to detect the presence of such a signal.... AC-couple, rectifier, peak-detect, LED \$\endgroup\$ – Pete W Mar 12 at 0:06
  • 1
    \$\begingroup\$ like I said before, questions asking for opinions are off topic here ... it is up to you to attempt a solution and post a specific question if you get stuck \$\endgroup\$ – jsotola Mar 12 at 5:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.