How To Generate Pulse Using Arduino

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ก.ย. 2024

ความคิดเห็น • 43

  • @abhinavsingh9709
    @abhinavsingh9709 3 ปีที่แล้ว +5

    why are we not getting a square pulse with 50% duty cycle?

    • @codingwithalfred
      @codingwithalfred  3 ปีที่แล้ว +4

      Hi Please use 512 instead of 50 to initialize a 50% duty cycle. I made a mistake in the video.

    • @davelowe1977
      @davelowe1977 3 ปีที่แล้ว +2

      This was the first thing I wondered too.

    • @VibeWithAk4747
      @VibeWithAk4747 2 ปีที่แล้ว +1

      @@davelowe1977 I'm getting only straight line why?

  • @VibeWithAk4747
    @VibeWithAk4747 2 ปีที่แล้ว +1

    Any one pls help me i have getting only straight line🥴

  • @brucemclaren-
    @brucemclaren- 11 หลายเดือนก่อน +1

    Hey can the arduino do other tasks whilst generating that pulse.

  • @VibeWithAk4747
    @VibeWithAk4747 2 ปีที่แล้ว +1

    There is timerone no such file or directory found error occurred pls save me

    • @aromaali7175
      @aromaali7175 ปีที่แล้ว

      Write O capital TimerOne.h

    • @adhikansh2439
      @adhikansh2439 3 หลายเดือนก่อน

      same issue

  • @fetiyeozlemonbasoglu6244
    @fetiyeozlemonbasoglu6244 3 ปีที่แล้ว +2

    Thanks a lot Alfred.

    • @codingwithalfred
      @codingwithalfred  3 ปีที่แล้ว

      You are welcome :) Thanks for the support

  • @sandeepbashyal2187
    @sandeepbashyal2187 2 ปีที่แล้ว +1

    lovely

  • @maduforndubuisi1910
    @maduforndubuisi1910 3 ปีที่แล้ว +2

    Nice video. I do have a question. I have a pulse project that needs to be in steps it is called differential pulse. So I was wondering how I can generate such codes in to do what I want . I will deeply appreciate ur assistance .

    • @codingwithalfred
      @codingwithalfred  3 ปีที่แล้ว

      Thanks, do you have an idea of what you pulse profile will look like? What are your steps? Changing amplitude or frequency?

    • @codingwithalfred
      @codingwithalfred  3 ปีที่แล้ว

      Thanks, do you have an idea of what you pulse profile will look like? What are your steps? Changing amplitude or frequency?

    • @maduforndubuisi1910
      @maduforndubuisi1910 3 ปีที่แล้ว

      @@codingwithalfred is it possible I can reach you via email so I can describe properly?

    • @codingwithalfred
      @codingwithalfred  3 ปีที่แล้ว

      @@maduforndubuisi1910 sure email me at hiiasolution@gmail.com

    • @maduforndubuisi1910
      @maduforndubuisi1910 3 ปีที่แล้ว

      @@codingwithalfred thank you Alfred, will be sending u the details.

  • @spudnickuk
    @spudnickuk 3 ปีที่แล้ว +1

    Thank you for demonstrating a pulse,
    can you have two pulses so one pulse can control one item and the other pulse control a 2nd item
    so you can have different pulse settings for each item ,

    • @codingwithalfred
      @codingwithalfred  3 ปีที่แล้ว

      Hi, that's an interesting question. Looking at the code, the answer is yes. You will need to duplicate everything that was done for outPin = 10 variable to another digital pin.

    • @spudnickuk
      @spudnickuk 3 ปีที่แล้ว

      @@codingwithalfred Ok i will have a go at some point,
      Why I ask is I use a different code of mine to control solenoid valves at a high speed,
      That
      open and close 20 x per second
      So I use the On and Off command
      setup with VAR
      do you think i would benefit using Pulse
      Instead.

    • @codingwithalfred
      @codingwithalfred  3 ปีที่แล้ว

      @@spudnickuk I see, pulse will work too. Probable will save you lots of code space. Curious why you need to excesses a solenoid valves ON/OFF 20 times per second? Also i am surprised your valve is able to open/close up to 20 time per seconds. Some of the valves i worked with take close to a second to make a complete rotation to the OFF/ON position.

  • @abhishekgarg1298
    @abhishekgarg1298 2 ปีที่แล้ว

    can you help me to generate another pulse using arduino

  • @seanygh1
    @seanygh1 2 ปีที่แล้ว

    Cool, so how would i modify this so i had an amplitude of 5V, Freq of 700us and delay of 61hz?

    • @codingwithalfred
      @codingwithalfred  2 ปีที่แล้ว

      Hi we are limited by the arduino output. Can you clarify what you mean by Freq: 7000us and delay of 61Hz?

  • @drasv9376
    @drasv9376 2 ปีที่แล้ว

    VERYGOOD.....................

  • @justinbudzien660
    @justinbudzien660 3 ปีที่แล้ว

    Hello, Thanks for the great video. Very nice simple way to accomplish this. Wondering if you may have a similar shortcut way to do a Variable frequency, PWM with set off periods (Gating). I have looked EVERYWHERE...no luck

    • @codingwithalfred
      @codingwithalfred  3 ปีที่แล้ว

      Hi, thank you for your kind words. the Timer1.Initialize function will give you the variable frequency. I am not sure what a "PWM with set off periods (Gating)".

  • @magdinabi7942
    @magdinabi7942 3 ปีที่แล้ว

    nice video, just asking about the amplitude of the signal, when i applied your code i got amplitude of 11, so why is that and how can i change that?
    Thank you

    • @codingwithalfred
      @codingwithalfred  3 ปีที่แล้ว +1

      Hi, Thanks for the question. Do this exercise (always). Use a multi-meter to measure the signal output pin 10 (preferable o-scope if you have one). If you are using Arduino Uno the max. voltage output for a digital pinMode configuration is 5 volts.

    • @codingwithalfred
      @codingwithalfred  3 ปีที่แล้ว +1

      Maybe explain exactly what you are trying to do and the output you are expecting and i will try to make a video of it for you if i can.

    • @magdinabi7942
      @magdinabi7942 3 ปีที่แล้ว

      @@codingwithalfred well, i am using arduino nano, and the voltage from pin 10 is around 4.7 volt using multi meter. my application is, I have a gas meter which has pulse output signal and i want to convert that reading to flow (cubic meter per hour), so i need to read and count the pulses if possible using arduino nano or uno. thanks

    • @codingwithalfred
      @codingwithalfred  3 ปีที่แล้ว +1

      @@magdinabi7942 Ohhh i see. Are you able to count the pulse from the meter already? If so. what is the specification of the gas meter pulse output. for example what is the pulse per cubic meter of the gas meter? If you provide link to the specific gas meter. I should be able to look up the meter's spec. and will be able to come up with a the calculation for flow rate determined from your pulse output.

    • @magdinabi7942
      @magdinabi7942 3 ปีที่แล้ว

      @@codingwithalfred Thanks and this is the data sheet for the sensor,
      www.mwatechnology.com/wp-content/uploads/2015/07/Turbine-Quantometer-Range-CPT1.pdf

  • @saraha2647
    @saraha2647 2 ปีที่แล้ว

    Sir, how can we generate 100kHz PWM signal with 50% duty cycle on a Arduino uno?

  • @mannysilva363
    @mannysilva363 ปีที่แล้ว

    Your dragging to long. Maybe should have tested your program first , then post.