Time Measurement via Arduino Timer (part 2)

Поделиться
HTML-код
  • Опубликовано: 22 дек 2024

Комментарии • 12

  • @incxxxx
    @incxxxx Год назад

    What for in your program is instruction: analogReference(INTERNAL) ???

  • @MatejBaša-v9e
    @MatejBaša-v9e Год назад

    Hi, I'm new to electronics so I don't understand the entire circuit you provided in the video. Therefore, I would like to know if you can attach the entire electrical connection.

  • @حقائق-ق7ص
    @حقائق-ق7ص Год назад

    Hello Anas, how can we calculate the pulse width time instead of the time difference between two rising pulses?

  • @ayazkhan9054
    @ayazkhan9054 3 года назад

    excellent explaination but i could not the formula that use for calculating total number of count

  • @BaronRosenhein
    @BaronRosenhein 3 года назад

    Another excellent demonstration. I was just thinking have you ever tried to measure rotation speed (RPM) from a variable reluctance sensor? I was applying a similar technique to measure crankshaft RPM with 12-3 tooth reluctor/timing wheel and VR sensor. The idea I used was to count teeth. Measure time between tooth 1 and 3 to work out the time difference and calculate RPM. Restart tooth count after 9th tooth is captured. I was getting some funny results where the frequency would jump from say 400 measured to say 3800 and back again every so often. I couldn't explain it but now after seeing your demonstrations, I think I can improve my implementation. Thank you once again.

    • @AnasKuzechie
      @AnasKuzechie  3 года назад

      The best thing for me is getting useful feedbacks. Thanks you.

  • @ivolol
    @ivolol Год назад

    I believe your calculation could be slightly simpler by factoring out one 65536.
    timer1Counts = C2 - C1 + (ovfCountC2 - ovfCountC1) * 65536;
    This also makes a lot more sense to me, since the calculation represents that we take the difference of the 2nd and 1st pulses, and then simply add the number of overflow counts as well.
    Another option is to reset the overflow count to 0 upon capturing C1, increment it in the overflow ISR, and then record the number that occurred when capturing C2 or in the main loop.

  • @dionv2929
    @dionv2929 2 года назад

    Great series of videos. Do you have link to the code?

    • @AnasKuzechie
      @AnasKuzechie  2 года назад +1

      I’ll add the code as soon as I can. Thanks for your feedback

  • @yasi4011
    @yasi4011 3 года назад

    CooL