Internal Comparator | Full Tutorial On How To Use It - Arduino101

Поділитися
Вставка
  • Опубліковано 15 лип 2024
  • $2/5pcs 2Layer & $2/5pcs 4Layer PCBs: jlcpcb.com
    🔥I'm starting a new Arduino series. These videos will have some more difficult Arduino programming. In this video I show you how to set the internal comaprator the Arduino has and how to use it.
    🔀LINKS
    -------------------------------------
    Tutorial Website: electronoobs.com/eng_arduino_...
    Tutorial: electronoobs.io/tutorial/190#
    ATmega328p datasheet: bit.ly/3csU1i6
    Get Arduino UNO: www.banggood.com/custlink/mvv...
    Like share and subscribe to motivate me. Thank you
    #Arduino
    #tutorial
    #programming
  • Наука та технологія

КОМЕНТАРІ • 182

  • @Nono-hk3is
    @Nono-hk3is 3 роки тому +70

    Once again I am deeply impressed with your use if graphics and animations to illustrate complicated topics.

    • @ELECTRONOOBS
      @ELECTRONOOBS  3 роки тому +5

      I'm glad you say that. Thank you :)

    • @fernandohood5542
      @fernandohood5542 3 роки тому +1

      @@ELECTRONOOBS What tools do you use to accomplish such advance graphics and animations?

    • @dr.n0n082
      @dr.n0n082 3 роки тому

      @@fernandohood5542 I'm also asking this question

    • @alfadex50
      @alfadex50 3 роки тому

      @@fernandohood5542 he has reply many time to this question, you better watch his Q&A

    • @lexander9686
      @lexander9686 3 роки тому

      @@fernandohood5542 im sure he will tell if you asked him on the electronoobs form

  • @aleksandarjakimov6830
    @aleksandarjakimov6830 3 роки тому +18

    Absolutely fantastic!!!
    Animation and theory are, hmmm, what to say, I can't find a word.
    This is what the channel need. More Arduino advanced stuff easily explained.

  • @palliyil
    @palliyil 3 роки тому +4

    These kinds of videos are what I had originally subscribed to your channel for. Glad to see some real clever less evident uses of the Arduino, instead of more 3d printing stuff! Please keep making videos of this type. There are too many beginner level Arduino videos everywhere. But rarely any intermediate level ones. This caters to my needs perfectly. And I'm sure there are tons of others like me who would appreciate it too

  • @andymouse
    @andymouse 3 роки тому +9

    I'm gonna need to watch this a few times !

    • @rikvermeer1325
      @rikvermeer1325 3 роки тому

      Me too.... but will remember the gist forever

  • @revealingfacts4all
    @revealingfacts4all 3 роки тому +5

    Boy, i must say, the animations are at a whole new level. I can tell you spent a lot of time on the video editing (at least it looks like you did) and this is just awesome!!!!

    • @ELECTRONOOBS
      @ELECTRONOOBS  3 роки тому

      Thank you very much. Yes, animations take me a lot of time but I'm glad you guys like it.

  • @lavinarodriguess5349
    @lavinarodriguess5349 3 роки тому +3

    Wow... I'm impressed by the way you teach, animate, explain.. marvelous ❤️❤️❤️❤️

  • @Jose-tw9bl
    @Jose-tw9bl 3 роки тому +1

    thank you! i am really intrested in microcontrolles in general and your explanations are great!

  • @rgmtb
    @rgmtb 3 роки тому +2

    Wow this is WAY over my head but I wanted to give you a thumbs up for all the time you put into this video. There was a lot of work put into this and I appreciate what you do for the community!

  • @swan4959
    @swan4959 3 роки тому +6

    I hav always been waiting for this

  • @fredstratford5104
    @fredstratford5104 3 роки тому +2

    Good job on tackling one the hobby's biggest obstacles - unreasonable fear of the data sheets. Data sheets for the Atmel AVR micro-controller family typically run to hundreds of pages and at first glance look fearsome. It has the look of a snapping book with sharp teeth - a monster. However tackling data sheets is key to gaining more than a superficial understanding. Showing that they can not only be tackled, but exploited, is a good way to reduce data sheet phobia and help others into them. Data sheets can be transformed from scary monsters to docile helpful pets just by taking the time to read them. Your example is complicated but shows that by understanding how the micro-controller works you can exploit the capability and reduce the complexity. Keep up the good work and put more datasheets to the front in full view!

  • @revealingfacts4all
    @revealingfacts4all 3 роки тому +2

    Ha! Looks like you took viewer feedback to heart. Love this kind of video. The graphics overlays on the video are just so good!

    • @ELECTRONOOBS
      @ELECTRONOOBS  3 роки тому +1

      Thank you. I always take note of the feedback but I'm not always able to make a video right away, because sometimes I'm already in progress with a few projects, so I can't just leave those away and start a new one till I don't finish those. Have a nice day :)

  • @raagamparmar179
    @raagamparmar179 3 роки тому +1

    HOW DID I MISS THIS!!!!! Great Video!!!! :D

  • @myhobbies5965
    @myhobbies5965 3 роки тому

    Yes, such type of learning videos are welcomed.

  • @andreiciora2765
    @andreiciora2765 3 роки тому

    Se pare ca concursul sa încheiat. Super tare electronoobs a fost distractiv

  • @surajsurya1928
    @surajsurya1928 3 роки тому +2

    Wow!!! This was a useful tutorial.

  • @Johennessy
    @Johennessy 3 роки тому

    Bro! Honestly I love u! I built a two phase motor with permanent magnets and I was just about to get into the topic of controlling it via the back emf signal and u just posted that video. Awesome u saved me a lot of time. Keep up the great work! Kind regards Johannes

  • @RinksRides
    @RinksRides 3 роки тому

    This could be a great series!

  • @dancollins1012
    @dancollins1012 3 роки тому

    Great to see some advanced content

  • @mrfrozen97-despicable
    @mrfrozen97-despicable 3 роки тому +3

    As always , Thank you))))).

  • @ankitnegi2524
    @ankitnegi2524 3 роки тому +1

    I know this video is gonna be interesting ,amaaazzzinggg
    now I will watch it hahaha! exited ....

  • @MarcoPolo-zv1ft
    @MarcoPolo-zv1ft 3 роки тому +1

    amazing presentation
    !!

  • @Comment-fy5jf
    @Comment-fy5jf 3 роки тому

    Your videos are amazing and informative .Thank you sir

  • @harshalshambharkar4432
    @harshalshambharkar4432 3 роки тому

    good work with graphic we love to see more

  • @uwezimmermann5427
    @uwezimmermann5427 3 роки тому +1

    nice introduction and a nice first step away from the limits of the Arduino language. Around 09:00 I was a bit skeptical at first, it is a bit brutal to only set the MUX-bits in the ADMUX register, but since you are not using the ADC itself it is of course ok...

  • @puriap250
    @puriap250 3 роки тому

    Nice. I didn't know about this.

  • @ELECTRONOOBS
    @ELECTRONOOBS  3 роки тому +8

    Arduino Course (Spanish): bit.ly/3ldW6kO
    Follow me on FACEBOOK for more: facebook.com/Electronoobs
    Help me on Patreon: www.patreon.com/ELECTRONOOBS

  • @reinaldohurtado3514
    @reinaldohurtado3514 3 роки тому

    excelente trabajo, saludos desde venezuela!

  • @komalgnaik
    @komalgnaik 3 роки тому

    Great tutorial 👍🏻👍🏻

  • @jmatosjr
    @jmatosjr 3 роки тому

    Amazing and easy explanation

  • @kluisx6417
    @kluisx6417 3 роки тому

    Wow this video is very helpful 👍

  • @ShubhamSharma-oq4ru
    @ShubhamSharma-oq4ru 3 роки тому

    Great information .... I'm waiting for more videos

  • @NullPointer
    @NullPointer 3 роки тому +1

    This is really a great video! Covering these kind of unknown topics in a beginners level is really useful (i hate to see beginners code where all they use is if and else), having a language as potent as C++ and using it that way breaks my heart haha

    • @ELECTRONOOBS
      @ELECTRONOOBS  3 роки тому +2

      The idea is to make a series on Arduino but at C level, registers, ports, vectors etc... :)

  • @techieelectro
    @techieelectro 3 роки тому

    Awesome tutorial 👍👍

  • @rohitchaturvedi2271
    @rohitchaturvedi2271 3 роки тому

    Yes, more videos of arduino internals.

  • @surajmate8047
    @surajmate8047 3 роки тому

    Ones again thank you so much sir

  • @kabhath
    @kabhath 3 роки тому

    Super helpful thanks

  • @50Hz
    @50Hz 3 роки тому +8

    Good stuff you got here, well done

  • @fatihyildirim8498
    @fatihyildirim8498 3 роки тому

    çok güzel bir video olmuş teşekkür ederim

  • @electronic7979
    @electronic7979 3 роки тому +1

    Helpful video

  • @Dhruv.Wadhwa
    @Dhruv.Wadhwa 3 роки тому

    U know you are very gud at explaining and sooo muchh better than great scott (No offence). Thank you sooo muchh i learnt alot from you😊

  • @ahmadmaaz2566
    @ahmadmaaz2566 3 роки тому

    Bestest video

  • @ShammoThePro
    @ShammoThePro 3 роки тому

    Awesome tutorial bro 👌👌👍👍

  • @ssaccount9101
    @ssaccount9101 3 роки тому

    Thank you very much

  • @arunbaalaji5589
    @arunbaalaji5589 3 роки тому

    Nice want more video in digital electronics

  • @surajmate8047
    @surajmate8047 3 роки тому

    Thank you sir you cover all my doubts about ESC programming
    Actually, I have written a whole book on your ESC programming

  • @shivamovatt3984
    @shivamovatt3984 3 роки тому

    Love from India Mumbai

  • @rafaelqsb
    @rafaelqsb 3 роки тому

    I'm a researcher and your explanation about the use of internal comparators are so deep inside the work that i do in my thesis. Thank you for your help , so.... Whats up my frend, wellcome back!!!

    • @ELECTRONOOBS
      @ELECTRONOOBS  3 роки тому +1

      That's such a great thing to hear! :)))

  • @amnesie6615
    @amnesie6615 3 роки тому

    Finally Arduino!!!

  • @vladimirmalic
    @vladimirmalic 3 роки тому

    Excellent.

  • @ShammoThePro
    @ShammoThePro 3 роки тому

    Super nice bro 👌👌👌

  • @siddharthmali5841
    @siddharthmali5841 3 роки тому

    Excellent

  • @Avionics1958
    @Avionics1958 3 роки тому

    Bravo 👏👍

  • @harikamalakarreddydarapu7410
    @harikamalakarreddydarapu7410 3 роки тому

    You are awesome

  • @EasyOne
    @EasyOne 3 роки тому

    perfect

  • @yogeshitaliya473
    @yogeshitaliya473 3 роки тому

    Nice one

  • @stefano.a
    @stefano.a 3 роки тому

    Very good video. Thanks. For this kind of work, have you ever tried to use a PSoC 5LP board as the CY8CKIT-059?

  • @himanshujangra2599
    @himanshujangra2599 3 роки тому +2

    Can you continue this series to tell us more about atmega328p and its features

  • @varn4591
    @varn4591 3 роки тому +1

    cool~

  • @NBL00D
    @NBL00D 3 роки тому

    Nice vídeo, i have try explore the comparator of Arduino to make SMC for dc-dc converter but i give up. Your vídeo inspire me to try again. Thanks you

  • @tilaksai420
    @tilaksai420 3 роки тому +2

    Your videos deserve much more views than it is receiving currently, I guess youtube algorithm is getting worse...

  • @mmawad100
    @mmawad100 3 роки тому

    thanks (y)

  • @markgreco1962
    @markgreco1962 3 роки тому

    Wow

  • @wodowiesel
    @wodowiesel 6 місяців тому

    @Electronoobs pretty nice tut! is it possible to combine that with the internal referance via analogReference(INTERNAL) to increase sensivity? thx

  • @lmif3187
    @lmif3187 3 роки тому

    What's the difference between if else statement, and internal comparator ? Thanks for your great video.

  • @_munna_
    @_munna_ 3 роки тому +1

    👌👌👌👌👌

  • @himanshujangra2599
    @himanshujangra2599 3 роки тому

    Can you make a similar video about setting up timers, timer interrupts, etc

  • @MyMcMichael
    @MyMcMichael 3 роки тому

    Very good video! But i dont realy like to use normal Opamps as comparators.

  • @sachink1789
    @sachink1789 3 роки тому

    Hi, Please upload video related to "coreless miniature motor & drivers.."

  • @walidkhier
    @walidkhier 5 місяців тому

    Excellent.
    One question, however: why don't you compare with the battery negative (GND) instead of creating a virtual zero?

  • @jaishankarm5920
    @jaishankarm5920 3 роки тому

    Nice 👌 Video, add Join option in ur channel

  • @gokulkrish7256
    @gokulkrish7256 2 роки тому

    Bro, can you please make a video on how to read a reciever using interrupt vector.
    Please do reply with your opinion.

  • @YTadwait
    @YTadwait 3 роки тому

    Can you make a static switch using zero crossing to automatically bypass load from one inverter (UPS) to another (ups) incase of failure of the first one.

  • @gacherumburu9958
    @gacherumburu9958 3 роки тому

    👍

  • @sarathkc6563
    @sarathkc6563 3 роки тому

    Hi,is it safe to apply sine wave (1v rms) having -ve peak to arduino comparator input pin.planning to make a zero crossing detector.

  • @TheRainHarvester
    @TheRainHarvester 3 роки тому

    Some possible speed ups:
    Use macros instead of the void functions. No calling overhead.
    (Compiler might not do this automatically, not sure).
    Instead of if-checks in the interrupt handler, set the interrupt vector to a different function from within the interrupt to handle the next step in the sequence of the brushless motor (setting a new interrupt function might go faster than those if-checks).
    It would be interesting to hear if this made the brushless motor run smoother/quieter or allowed faster speeds. Maybe you already have reached the speed limit due to The power switching MOSFets.
    Great video!I never explored the use of the comparator. I'm going to make a cnc EDM machine to cut small gears, and this comparator could sense the spark length...stay tuned!

    • @ELECTRONOOBS
      @ELECTRONOOBS  3 роки тому +1

      Thank you so much for all these tips :)

    • @josefaschwanden1502
      @josefaschwanden1502 3 роки тому

      Dont use macros for functions, makes it hard to debug and has loads of other disadvantages, use inline instead(dunno if arduino supports it but >=c99 and c++ supports it)

    • @TheRainHarvester
      @TheRainHarvester 3 роки тому

      @@josefaschwanden1502 How are you able to debug on Arduino? Just curious.

    • @josefaschwanden1502
      @josefaschwanden1502 3 роки тому

      @@TheRainHarvester dunno i dont use arduno

    • @Brian_Of_Melbourne
      @Brian_Of_Melbourne 3 роки тому

      @@josefaschwanden1502 @TheRainHarvester I would suggest that in this particular situation there's no great advantage (or disadvantage) to using macros or functions. That's because this is a void situation - so no type checking either way. However using when using functions in situations like this it is appropriate to make them inline. Google 'inline functions arduino' for more info. The bottom line would appear to be use the attribute always_inline to get the compiler to bend to your will.
      With functions that take or return arguments the balance tips towards using functions rather than macros although, as usual, it is not a simple decision if there are scope, speed, or size considerations.

  • @Josuedosawe
    @Josuedosawe 3 роки тому

    En español tambien por favor
    ELECTRONOOBS
    !

  • @jenniferw8963
    @jenniferw8963 Рік тому

    1:55 start of tutorial

  • @lander1591
    @lander1591 3 роки тому

    Instructions unclear, cyborg Banana now threatens Tokyo...

  • @viswanath7168
    @viswanath7168 3 роки тому +1

    Make an wall maze solver robot (micromouse) please

  • @machinemaker2248
    @machinemaker2248 3 роки тому

    I didn't even know uno had a comparator. Can it compare to a programmed voltage? I would like to use it to get logic out from photosensor, and programmatically change sensitivity for changing ambient light.

  • @onurolce
    @onurolce 3 роки тому

    A bit complicated. I've another question. I have a circuit right now which includes an Opamp IC and PIC microcontroller. Opamp IC amplifies mV signals to around +2V and gives Voltage to PIC ADC input. My question is can I use PIC's analog comparator as an Opamp and do same job without Opamp IC ?

  • @weijunzhang6855
    @weijunzhang6855 Рік тому

    On time 7:04, should the ADEN=0 in order to set the negative input with the ADC Multiplexer output. In the video, it shows ADEN=1. Thnaks!

  • @thearchetype9829
    @thearchetype9829 3 роки тому

    Which software do you use to edit your videos???

  • @youssefahourri3245
    @youssefahourri3245 3 роки тому

    Very impressive, I like the use of amination 💓
    Does names like ADEN , ACSR.... Are known by the IDE?

    • @ELECTRONOOBS
      @ELECTRONOOBS  3 роки тому

      Yes, just take a look at the example code in the description. You could use

  • @gudimetlakowshik3617
    @gudimetlakowshik3617 3 роки тому

    great video...can I know what software are you using to create the animation?

  • @yacineyaker7485
    @yacineyaker7485 3 роки тому

    I suggest u do it with atmel studio it's was more better than arduino ide and u can still upload the code with the same way as arduino ide just with associating atmel studio with avrdude u get when installing arduino ide and just click the button it's upload

  • @dilshankasthuriarachchi4737
    @dilshankasthuriarachchi4737 3 роки тому

    Dear could you please how to write own arduino project what does kmow in order to write a project?

  • @Excalibur32
    @Excalibur32 3 роки тому

    Another great video! Do you edit your videos yourself?

    • @ELECTRONOOBS
      @ELECTRONOOBS  3 роки тому +1

      Thank you. And yes, I do!

    • @Excalibur32
      @Excalibur32 3 роки тому

      @@ELECTRONOOBS That's awesome! I like how the text labels in the video track the objects. I'm learning how to edit videos myself. Can you tell me which video editing software you use?

    • @ELECTRONOOBS
      @ELECTRONOOBS  3 роки тому +1

      @@Excalibur32 Adobe After Effects

  • @ELCspeed
    @ELCspeed 3 роки тому

    Please make video watchdog timer

  • @ticktock8751
    @ticktock8751 3 роки тому

    why you dont put a dropping resistor with the LED? maybe you have lots of many if you blow the chip

  • @anonymoususer900
    @anonymoususer900 3 роки тому

    I have done arduino and coding to a pretty decent level. I have made many awesome projects at home as well. I didnt know very much about this concept so i tried learning it but i couldnt understand anything from this video. So i m not sure how others did. So if u are accepting advices, mine would be that you either stick with making projects that are nice and useful or make more deatiled tutorials with explained coding. One i would really appreciate is 'MULTIPLEXING'. Again just an advice......

    • @ELECTRONOOBS
      @ELECTRONOOBS  3 роки тому

      Sorry you didn't understood the video. Check the text tutorial on Electronoobs as well, maybe that will help more :)

    • @anonymoususer900
      @anonymoususer900 3 роки тому

      @@ELECTRONOOBS No problem bro. Sure i will wait for your next video. Also bro dont get me wrong as i wasnt trying to spread hate. what i was trying to do was suggesting and informing you.

  • @user-gp4vu7ox3y
    @user-gp4vu7ox3y 2 роки тому

    Please what is the name of the software(logiciel) you used for simulation .

  • @matteorossi5128
    @matteorossi5128 3 роки тому

    hey buddy you should have split this topic in twice and make the passages more clear ... anyway very good

  • @harys6382
    @harys6382 3 роки тому

    bro can we make 4 in 1 out time division multiplexer using aurduino plz help me 🙏

  • @dr.n0n082
    @dr.n0n082 3 роки тому

    For explaining video

  • @mahershhab3824
    @mahershhab3824 10 місяців тому

    احتاج الي كود لتشغيل متور دسي ثلاجه بمقابل مادي. ارجو الرد

  • @MegaScience
    @MegaScience 3 роки тому +1

    Great work Electronoobs ,,
    मेरे प्यारो मित्रो ,,
    मैं भी इसी तरह का UA-camr हूँ l
    Mega Science मेरा channel है l
    कभी हमे भी मौका दीजिये सेवा करने का 👍👍🦾🦿🚀👩‍🏭👩‍🔧🛸🔎

  • @parvprobots797
    @parvprobots797 3 роки тому

    plz make mini high amp motor driver or brushed esc

  • @SensiiNips_
    @SensiiNips_ 3 роки тому

    Can I hire you to review some code as i am trying to learn comparator coding?

  • @hadrienberthet2575
    @hadrienberthet2575 3 роки тому +1

    I think you inverted ADEN and ACME from 7:03 until you show the code.