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!!!!
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
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!
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.
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 :)
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!
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)
@@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.
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.
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!
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 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.
Great work Electronoobs ,, मेरे प्यारो मित्रो ,, मैं भी इसी तरह का RUclipsr हूँ l Mega Science मेरा channel है l कभी हमे भी मौका दीजिये सेवा करने का 👍👍🦾🦿🚀👩🏭👩🔧🛸🔎
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
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.
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...
@@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?
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....
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.
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!
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.
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!
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...
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?
Once again I am deeply impressed with your use if graphics and animations to illustrate complicated topics.
I'm glad you say that. Thank you :)
@@ELECTRONOOBS What tools do you use to accomplish such advance graphics and animations?
@@fernandohood5542 I'm also asking this question
@@fernandohood5542 he has reply many time to this question, you better watch his Q&A
@@fernandohood5542 im sure he will tell if you asked him on the electronoobs form
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!!!!
Thank you very much. Yes, animations take me a lot of time but I'm glad you guys like it.
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
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!
Thank you so much :)))))
I hav always been waiting for this
I'm glad. Thanks!
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.
Ha! Looks like you took viewer feedback to heart. Love this kind of video. The graphics overlays on the video are just so good!
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 :)
Your videos deserve much more views than it is receiving currently, I guess youtube algorithm is getting worse...
Good stuff you got here, well done
thank you! i am really intrested in microcontrolles in general and your explanations are great!
Can you continue this series to tell us more about atmega328p and its features
Thank you sir you cover all my doubts about ESC programming
Actually, I have written a whole book on your ESC programming
wow :O Nice!
HOW DID I MISS THIS!!!!! Great Video!!!! :D
Helpful video
Wow!!! This was a useful tutorial.
Love from India Mumbai
good work with graphic we love to see more
Excellent.
One question, however: why don't you compare with the battery negative (GND) instead of creating a virtual zero?
Instructions unclear, cyborg Banana now threatens Tokyo...
amazing presentation
!!
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😊
Great to see some advanced content
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!
Nice. I didn't know about this.
Bro, can you please make a video on how to read a reciever using interrupt vector.
Please do reply with your opinion.
Yes, more videos of arduino internals.
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
I'm glad for that. Good luck!
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!
Thank you so much for all these tips :)
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)
@@josefaschwanden1502 How are you able to debug on Arduino? Just curious.
@@TheRainHarvester dunno i dont use arduno
@@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.
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.
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!
why you dont put a dropping resistor with the LED? maybe you have lots of many if you blow the chip
excelente trabajo, saludos desde venezuela!
Super helpful thanks
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......
Sorry you didn't understood the video. Check the text tutorial on Electronoobs as well, maybe that will help more :)
@@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.
What's the software you're using
arduino ide
@@MrGenia1991 I know arduino ide i new that animating software to explain
Nice want more video in digital electronics
Great work Electronoobs ,,
मेरे प्यारो मित्रो ,,
मैं भी इसी तरह का RUclipsr हूँ l
Mega Science मेरा channel है l
कभी हमे भी मौका दीजिये सेवा करने का 👍👍🦾🦿🚀👩🏭👩🔧🛸🔎
Very good video! But i dont realy like to use normal Opamps as comparators.
Bestest video
çok güzel bir video olmuş teşekkür ederim
1:55 start of tutorial
Wow this video is very helpful 👍
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
احتاج الي كود لتشغيل متور دسي ثلاجه بمقابل مادي. ارجو الرد
Dear could you please how to write own arduino project what does kmow in order to write a project?
Thank you very much
Ones again thank you so much sir
Awesome tutorial bro 👌👌👍👍
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.
Awesome tutorial 👍👍
Which software do you use to edit your videos???
Hi sir,Can you share ESC V3 code and schematic,please?
Can you please give link for the code for better understanding ?
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.
Hi, Please upload video related to "coreless miniature motor & drivers.."
Since I don't have any oscilloscope I need something to measure frequecy
build one with the arduino xD
Can we use internal comperator (interrupt) and analog read (interrupt) at the same time?
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...
@@ELECTRONOOBS you mean I can't use the ACD and the comparator at the same time?
Do I must use each one alone?
Sir i try your transmitter and reciver . But sketch not compile . It show multiple libraries were found
Exit status1
You have to install those libraries. In that tutorial I also share the libraries!
En español tambien por favor
ELECTRONOOBS
!
Excellent.
Danke!
Nice 👌 Video, add Join option in ur channel
Another great video! Do you edit your videos yourself?
Thank you. And yes, I do!
@@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?
@@Excalibur32 Adobe After Effects
Excellent
Very impressive, I like the use of amination 💓
Does names like ADEN , ACSR.... Are known by the IDE?
Yes, just take a look at the example code in the description. You could use
Holy crap, dude. I don't understand anything here (not your fault), but I did notice something. You make all these animations? D:
Yes
Can you please make a video related to frequency counter using arduino with detailed explanation
Ok, I'll have that on my to do list!
Thanks
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
perfect
👌👌👌👌👌
Okay but what's max input rating of comparator?
Same as the Arduino, max 5.5V but max 5V is recomended.
Can the output of comparetor be connected to hardware pin........???
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....
cool~
Wow
thanks (y)
Interrupts, not interruptions
5 episodes later... today I will show you how to delete the arduino ide and use the command line interface instead
👍
For explaining video
Replay please
Ok
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.
cool but difficult for me :(
798th viewer
I'm speek Arabic 😢😌😌😌, no speak English
dude i'm still confused at this point of esc
What Don't you understand?
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!
Arduino Course (Spanish): bit.ly/3ldW6kO
Follow me on FACEBOOK for more: facebook.com/Electronoobs
Help me on Patreon: www.patreon.com/ELECTRONOOBS
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.
Can I hire you to review some code as i am trying to learn comparator coding?
I'm gonna need to watch this a few times !
Me too.... but will remember the gist forever
Wow
Wow... I'm impressed by the way you teach, animate, explain.. marvelous ❤️❤️❤️❤️
I think you inverted ADEN and ACME from 7:03 until you show the code.
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!
As always , Thank you))))).
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...
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?
@Electronoobs pretty nice tut! is it possible to combine that with the internal referance via analogReference(INTERNAL) to increase sensivity? thx
I know this video is gonna be interesting ,amaaazzzinggg
now I will watch it hahaha! exited ....
hey buddy you should have split this topic in twice and make the passages more clear ... anyway very good