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

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

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

  • @Nono-hk3is
    @Nono-hk3is 4 года назад +72

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

    • @ELECTRONOOBS
      @ELECTRONOOBS  4 года назад +5

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

    • @fernandohood5542
      @fernandohood5542 4 года назад +1

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

    • @dr.n0n082
      @dr.n0n082 4 года назад

      @@fernandohood5542 I'm also asking this question

    • @alfadex50
      @alfadex50 4 года назад

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

    • @lexander9686
      @lexander9686 4 года назад

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

  • @revealingfacts4all
    @revealingfacts4all 4 года назад +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  4 года назад

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

  • @palliyil
    @palliyil 4 года назад +3

    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

  • @rgmtb
    @rgmtb 4 года назад +1

    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 4 года назад +6

    I hav always been waiting for this

  • @aleksandarjakimov6830
    @aleksandarjakimov6830 4 года назад +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.

  • @revealingfacts4all
    @revealingfacts4all 4 года назад +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  4 года назад +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 :)

  • @tilaksai420
    @tilaksai420 4 года назад +2

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

  • @50Hz
    @50Hz 4 года назад +8

    Good stuff you got here, well done

  • @Jose-tw9bl
    @Jose-tw9bl 4 года назад +1

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

  • @himanshujangra2599
    @himanshujangra2599 4 года назад +2

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

  • @surajmate8047
    @surajmate8047 4 года назад

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

  • @raagamparmar179
    @raagamparmar179 4 года назад +1

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

  • @electronic7979
    @electronic7979 4 года назад +1

    Helpful video

  • @surajsurya1928
    @surajsurya1928 4 года назад +2

    Wow!!! This was a useful tutorial.

  • @shivamovatt3984
    @shivamovatt3984 4 года назад

    Love from India Mumbai

  • @harshalshambharkar4432
    @harshalshambharkar4432 4 года назад

    good work with graphic we love to see more

  • @walidkhier
    @walidkhier 8 месяцев назад

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

  • @lander1591
    @lander1591 4 года назад

    Instructions unclear, cyborg Banana now threatens Tokyo...

  • @MarcoPolo-zv1ft
    @MarcoPolo-zv1ft 4 года назад +1

    amazing presentation
    !!

  • @Dhruv.Wadhwa
    @Dhruv.Wadhwa 4 года назад

    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😊

  • @dancollins1012
    @dancollins1012 4 года назад

    Great to see some advanced content

  • @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!

  • @puriap250
    @puriap250 4 года назад

    Nice. I didn't know about this.

  • @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.

  • @rohitchaturvedi2271
    @rohitchaturvedi2271 4 года назад

    Yes, more videos of arduino internals.

  • @NBL00D
    @NBL00D 4 года назад

    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

  • @TheRainHarvester
    @TheRainHarvester 4 года назад

    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  4 года назад +1

      Thank you so much for all these tips :)

    • @josefaschwanden1502
      @josefaschwanden1502 4 года назад

      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 4 года назад

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

    • @josefaschwanden1502
      @josefaschwanden1502 4 года назад

      @@TheRainHarvester dunno i dont use arduno

    • @Brian_Of_Melbourne
      @Brian_Of_Melbourne 4 года назад

      @@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.

  • @machinemaker2248
    @machinemaker2248 4 года назад

    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.

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

    Nice video, but you made a mistake, which confused me extremly: 7:43, here you have written the ADEN Bit to one schematically. May consider to change this!

  • @ticktock8751
    @ticktock8751 4 года назад

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

  • @reinaldohurtado3514
    @reinaldohurtado3514 4 года назад

    excelente trabajo, saludos desde venezuela!

  • @kabhath
    @kabhath 4 года назад

    Super helpful thanks

  • @anonymoususer900
    @anonymoususer900 4 года назад

    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  4 года назад

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

    • @anonymoususer900
      @anonymoususer900 4 года назад

      @@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.

  • @dr.n0n082
    @dr.n0n082 4 года назад +6

    What's the software you're using

    • @MrGenia1991
      @MrGenia1991 4 года назад +2

      arduino ide

    • @dr.n0n082
      @dr.n0n082 4 года назад +2

      @@MrGenia1991 I know arduino ide i new that animating software to explain

  • @arunbaalaji5589
    @arunbaalaji5589 4 года назад

    Nice want more video in digital electronics

  • @MegaScience
    @MegaScience 4 года назад +1

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

  • @MyMcMichael
    @MyMcMichael 4 года назад

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

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

    Bestest video

  • @fatihyildirim8498
    @fatihyildirim8498 4 года назад

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

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

    1:55 start of tutorial

  • @kluisx6417
    @kluisx6417 4 года назад

    Wow this video is very helpful 👍

  • @yacineyaker7485
    @yacineyaker7485 4 года назад

    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

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

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

  • @dilshankasthuriarachchi4737
    @dilshankasthuriarachchi4737 4 года назад

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

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

    Thank you very much

  • @surajmate8047
    @surajmate8047 4 года назад

    Ones again thank you so much sir

  • @ShammoThePro
    @ShammoThePro 4 года назад

    Awesome tutorial bro 👌👌👍👍

  • @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.

  • @techieelectro
    @techieelectro 4 года назад

    Awesome tutorial 👍👍

  • @thearchetype9829
    @thearchetype9829 4 года назад

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

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

    Hi sir,Can you share ESC V3 code and schematic,please?

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

    Can you please give link for the code for better understanding ?

  • @YTadwait
    @YTadwait 4 года назад

    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.

  • @sachink1789
    @sachink1789 4 года назад

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

  • @MELVIN_RIJOHN_T
    @MELVIN_RIJOHN_T 4 года назад +1

    Since I don't have any oscilloscope I need something to measure frequecy

    • @zazugee
      @zazugee 4 года назад +1

      build one with the arduino xD

  • @AnzeDodic
    @AnzeDodic 4 года назад +1

    Can we use internal comperator (interrupt) and analog read (interrupt) at the same time?

    • @ELECTRONOOBS
      @ELECTRONOOBS  4 года назад +2

      Yes and no. Not exactly at the same time. This here is from the datasheet: With bit ADEN: Writing this bit to one enables the ADC. By writing it to zero, the ADC is turned off. Turning the ADC off while a conversion is
      in progress, will terminate this conversion. So, you could for example, after each comparator conversion, enable the ADC, take a measurement and then disble back the ADC in order to make another conversion of the comaprator. Of course, this might give timming problems...

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

      @@ELECTRONOOBS you mean I can't use the ACD and the comparator at the same time?
      Do I must use each one alone?

  • @SumitSharma-do8ye
    @SumitSharma-do8ye 4 года назад

    Sir i try your transmitter and reciver . But sketch not compile . It show multiple libraries were found
    Exit status1

    • @ELECTRONOOBS
      @ELECTRONOOBS  4 года назад

      You have to install those libraries. In that tutorial I also share the libraries!

  • @Josuedosawe
    @Josuedosawe 4 года назад

    En español tambien por favor
    ELECTRONOOBS
    !

  • @vladimirmalic
    @vladimirmalic 4 года назад

    Excellent.

  • @RickSanchez-vn8lj
    @RickSanchez-vn8lj 2 месяца назад

    Danke!

  • @jaishankarm5920
    @jaishankarm5920 4 года назад

    Nice 👌 Video, add Join option in ur channel

  • @Excalibur32
    @Excalibur32 4 года назад

    Another great video! Do you edit your videos yourself?

    • @ELECTRONOOBS
      @ELECTRONOOBS  4 года назад +1

      Thank you. And yes, I do!

    • @Excalibur32
      @Excalibur32 4 года назад

      @@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  4 года назад +1

      @@Excalibur32 Adobe After Effects

  • @siddharthmali5841
    @siddharthmali5841 4 года назад

    Excellent

  • @youssefahourri3245
    @youssefahourri3245 4 года назад

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

    • @ELECTRONOOBS
      @ELECTRONOOBS  4 года назад

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

  • @d3vastat0r89
    @d3vastat0r89 4 года назад

    Holy crap, dude. I don't understand anything here (not your fault), but I did notice something. You make all these animations? D:

  • @MELVIN_RIJOHN_T
    @MELVIN_RIJOHN_T 4 года назад

    Can you please make a video related to frequency counter using arduino with detailed explanation

  • @theawt
    @theawt 4 года назад

    me before: full tutorial in 10 minutes? This is rubbish.
    me after: wow I have to learn to explain things from this guy: this IS a full tutoral

  • @EasyOne
    @EasyOne 4 года назад

    perfect

  • @_munna_
    @_munna_ 4 года назад +1

    👌👌👌👌👌

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

    Okay but what's max input rating of comparator?

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

      Same as the Arduino, max 5.5V but max 5V is recomended.

  • @kashif8704
    @kashif8704 4 года назад

    Can the output of comparetor be connected to hardware pin........???

    • @ELECTRONOOBS
      @ELECTRONOOBS  4 года назад

      Not by hardware I think. But you could email a digital port to the value of the ACO bit so each time the output of the comparator changes the digital pin will also change....

  • @varn4591
    @varn4591 4 года назад +1

    cool~

  • @markgreco1962
    @markgreco1962 4 года назад

    Wow

  • @mmawad100
    @mmawad100 4 года назад

    thanks (y)

  • @SuperLeoSG
    @SuperLeoSG 4 года назад

    Interrupts, not interruptions

  • @adrie9236
    @adrie9236 4 года назад

    5 episodes later... today I will show you how to delete the arduino ide and use the command line interface instead

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

    👍

  • @dr.n0n082
    @dr.n0n082 4 года назад

    For explaining video

  • @kishoreksm8366
    @kishoreksm8366 4 года назад

    Ok

  • @incxxxx
    @incxxxx 10 месяцев назад

    Instead - if(ACSR & B00100010) //If we are into falling edge
    you should have - if(( ACSR & B00000011) == B00000010 )//If we are into falling edge
    And similarly:
    instead - if(ACSR & B00100011) //if we are into rising edge
    shoul be - if( ( ACSR & B00000011) == B00000011 ) //if we are into rising edge
    Otherwise it will not work correctly.

  • @MrGenia1991
    @MrGenia1991 4 года назад

    cool but difficult for me :(

  • @dragonexecutioner1715
    @dragonexecutioner1715 4 года назад

    798th viewer

  • @mohamedanbaj7997
    @mohamedanbaj7997 4 года назад

    I'm speek Arabic 😢😌😌😌, no speak English

  • @dlaemex2688
    @dlaemex2688 4 года назад +1

    dude i'm still confused at this point of esc

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

    i think people would be grateful if you programs would work! it's just science fiction movie! first of all in the video you have one program and in the description you have another one! nice try!

  • @ELECTRONOOBS
    @ELECTRONOOBS  4 года назад +8

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

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

    wtf the title says 101. you obviously dont understand the meaning of 101. it refers to the begging of a subject. the basics. the first unit in a 4 year long uni course. you are talking about comparator and multiplexs. this is not 101.

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

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

  • @andymouse
    @andymouse 4 года назад +9

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

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

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

  • @sciencetechwithkhan9073
    @sciencetechwithkhan9073 4 года назад

    Wow

  • @lavinarodriguess5349
    @lavinarodriguess5349 3 года назад +3

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

  • @hadrienberthet2575
    @hadrienberthet2575 3 года назад +1

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

  • @fredstratford5104
    @fredstratford5104 4 года назад +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!

  • @mrfrozen97-despicable
    @mrfrozen97-despicable 4 года назад +3

    As always , Thank you))))).

  • @uwezimmermann5427
    @uwezimmermann5427 4 года назад +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...

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

    void setup() {
    pinMode(4, OUTPUT);

    ACSR |= B00010000; // Clear flag comparator interrupt (ACI bit to 1)
    ACSR &= B11011111; // Set ACBG, to be equal to "0"
    ADCSRA = (0 && ADEN); // Disable the ADC module because
    ADCSRB = (1 && ACME); // Enable the MUX selector for negative input of comparator
    ADMUX = 0; // Select A0 as comparator negative input
    ACSR |= B00000011; // Set interrupt on rising edge
    }
    void loop() {
    digitalWrite(4,LOW);
    delay(100);
    }
    // Interrumption vector for the Analog comparator
    ISR (ANALOG_COMP_vect) {
    digitalWrite(4,HIGH);
    delay(100);
    }
    I copied the code according to the instructions and added a led to detect interrupts. Why is it not working? Can you help me?

  • @wodowiesel
    @wodowiesel 9 месяцев назад

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

  • @ankitnegi2524
    @ankitnegi2524 4 года назад +1

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

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

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