How to use Optocoupler sensor module as RPM meter (Tachometer)

Sdílet
Vložit
  • čas přidán 25. 06. 2024
  • In this video, I'll explain how the optocoupler sensor works, how to read the signal, read the holes, and find a fun way to use it as an rpm counter or Tachometer.
    So we make a DIY tachometer with arduino.
    Join this channel to support me or to get access to perks:
    / @miliohm
    Code on the video :
    miliohm.com/build-tachometer-...
  • Věda a technologie

Komentáře • 37

  • @mohamedaitmouali895
    @mohamedaitmouali895 Před 5 dny

    Very well expleined thank you from Morocco

  • @alexindustries44
    @alexindustries44 Před rokem

    Very well expleined thank you

  • @INNOVATORM3A06
    @INNOVATORM3A06 Před 7 měsíci

    Merci beaucoup "from France"

  • @Amperekaefer
    @Amperekaefer Před 2 lety +1

    Interessantes Video, *danke* .

  • @MikeM.-vx9uy
    @MikeM.-vx9uy Před 8 měsíci

    Hi there, thanks for your very performative video, Can I ask how to add 2 outputs to control the motor speed base on rpm reading and rpm setting to maintain the desired speed?

  • @arnoudmedendorp991
    @arnoudmedendorp991 Před 2 lety

    Hi there, thanks for your clear explanation about this setup. I got it working because of your video! But what if I want to have a second RPM reading on the 16x2 display with a second Optocoupler sensor? How do I adapt the code for this situation?

    • @miliohm
      @miliohm  Před 2 lety

      you need to make a second counter function with different variables, and don't forget to attach interrupt on digital pin 3 since arduino like UNO or NANO only has interrupt pin on pin 2 and 3. Then print the second value on a different LCD coordinate (assuming use 1 LCD).

  • @abdessamadchaatouf2691
    @abdessamadchaatouf2691 Před 5 měsíci

    please sir could you tell me what the knd of motor you have used here ?

  • @taherrad153
    @taherrad153 Před 2 lety

    Thank You so much.That was Very Useful!!!
    Can one do this with Arduino Nano?

    • @miliohm
      @miliohm  Před 2 lety

      Sure, you can do with any arduino

  • @francescoguerrini5559
    @francescoguerrini5559 Před 11 měsíci +1

    How much will this be affected by EMI noise?

  • @kitonepluswong7889
    @kitonepluswong7889 Před rokem

    Thank you for your help.
    To ,my case
    km/h = 5.97 * rpm *0.001885;

    • @miliohm
      @miliohm  Před rokem

      Glad to hear that. What's the diameter of your encoder?

  • @jumbo999614
    @jumbo999614 Před měsícem

    I'm going to use this with ESP8266 so I can show RPM value in webpage. Can I use 3.3v to supply power to this module? what output voltage from this module?

  • @naufalfadurahman7109
    @naufalfadurahman7109 Před 2 lety

    Hello. Can you help me how to attach my servo with RPM meter? So when the RPM is below the specified, the servo will automatically rotate and stop when RPM become normali again

    • @miliohm
      @miliohm  Před 2 lety

      Tambahin library servo aja mas, kayak di file example. Abis itu bikin if else sederhana. If (RPM < batas) { servo.write(sudut yang diinginkan) else {servo.write(sudut lain) }

  • @Dancopymus
    @Dancopymus Před 8 měsíci

    Hello friend, my Optocoupler is one of those used in printers, which has 4 wires, two for power and two for signal, so how can I use it in your code, given that yours only has one signal pin... (attachInterrupt(digitalPinToInterrupt(2))? Thanks

    • @miliohm
      @miliohm  Před 8 měsíci

      Find the digital output, and use that pin.

  • @peopleofman
    @peopleofman Před rokem

    hii bro, how to convert rpm to km/h??

  • @ragamotomotif1770
    @ragamotomotif1770 Před rokem

    keren

  • @reykambey8748
    @reykambey8748 Před 2 lety

    Hi miliohm, after I verify the code in arduino, a warning appears "count was not declared in this scope". Can you help me how to fix that?

    • @miliohm
      @miliohm  Před 2 lety

      make sure you copy the whole code. Sometimes it caused by lack of curly bracket

  • @koekie7003
    @koekie7003 Před rokem

    hey bro, my interupt triggers way too much giving too high reading, could it be the wheel is too thin? also the wheel is slightly warped could this affect it?

    • @miliohm
      @miliohm  Před rokem

      Try to turn wheel slowly. Does it only add count every passing hole?

    • @koekie7003
      @koekie7003 Před rokem

      @@miliohm no by the time it passes around 10 holes, it has picked up more than 100 holes

    • @miliohm
      @miliohm  Před rokem +1

      @@koekie7003 try to paint your wheel. If it 3D printed sometimes it still can be penetrated by the infrared.

    • @koekie7003
      @koekie7003 Před rokem

      @@miliohm I will try it thank you

  • @KelingValo
    @KelingValo Před 2 lety

    Can u share 3d file disk holes sir ?

    • @miliohm
      @miliohm  Před 2 lety

      Maaf mas lupa udah ga kesimpen

    • @KelingValo
      @KelingValo Před rokem

      @@miliohm Min, saya coba pakai 3 sensor sekaligus kok gabisa ya min, hanya 2 yang terbaca, link code : docs.google.com/document/d/1oplEGC5c2bkIwytJGbhDr7774dQVk9IvONfAX6AsZ08/edit?usp=sharing

    • @miliohm
      @miliohm  Před rokem

      @@KelingValo kalau arduino uno memang interrupt nya hanya 2. Harus pake mikro lain

  • @LeninJoshua
    @LeninJoshua Před 2 lety

    Can I get the circuit

    • @miliohm
      @miliohm  Před 2 lety

      Link in the description

    • @LeninJoshua
      @LeninJoshua Před 2 lety

      @@miliohm what if I use 20 hole propeller instead of 12..what are all the alternations needed in the program

    • @miliohm
      @miliohm  Před 2 lety

      @@LeninJoshua you need to watch the entire video

  • @mubasirkhafid9582
    @mubasirkhafid9582 Před 10 měsíci

    Hallo mr

  • @mekimr9736
    @mekimr9736 Před rokem

    Hi very good thank you), it possible to write you in privat please?