It's refreshing to see a coder who spots and fixes his typos as he goes. Shows you know what you're doing. Too many online coding tutorials seem to just be copying from a printed script, then they run it, and spend the next 15 minutes trying to figure out why it didn't work.
@Quiggers198112 жыл бұрын
As an electronic engineer, i have to say, your tutorials are fantastic. Keep up the good work.
@sciguy1413 жыл бұрын
@CIPHERJAY Well it didn't cause it to stop - it's just that's only printing it out in relatively long intervals, so you never see the value change in the terminal window.
@sciguy1414 жыл бұрын
@raghunitin They are a little different, since the trigger has an integrated feedback loop. Think of them like a not gate with a positive feedback loop.
@sciguy1414 жыл бұрын
@MrAAK95 I'm *hoping* to film more episodes over spring break - so hopefully I'll return soon.
@jakebrickhouse14 жыл бұрын
I know you said this was your last but please make more in the future. these have been a tremendous help. thanks!
@markgrass501512 жыл бұрын
The push button will discharge the cap almost immediately. Once discharged by the switch, it will take time to recharge to +5v. Love your tutorials! Awesome job!
@iSolarSunrise12 жыл бұрын
I am not using an arduino, but your tutorials are beyond helpful; it's fantastic!
@123KimKristoffersen9 жыл бұрын
@Jeremy Blum Really miss these videos, they are what got me started with arduino :)
@jsanti198412 жыл бұрын
Wow, thanks for making this series. I bought an Arduino Uno on amazon. I was all excited until I started to see what little understanding I had about the purpose of resistors and capacitors where I would have used a simple circuit. Thanks for demystifying!
@jdga3757 жыл бұрын
Thanks for the video. I really appreciate the constant refresher of explanations you might have gone over in the earlier videos. Its tough to remember it all but you do a great job of refreshing the older material even as you move on.
@sciguy1414 жыл бұрын
@WakkoXtreme Yes, sparkfun makes an SPI matrix that is well suited for that.
@technodaz12 жыл бұрын
After just getting my hands on a Arduino , and well the last time I wrote any code was when I was 6 and that was GW basic .....but your videos make every thing so dam clear and I at least get whats going on ! your the best man love your work
@sciguy1413 жыл бұрын
@sh3r1ly That shouldn't happen unless you're disabling interrupts in your while loop. What are you doing in the loop?
@woodandgears286510 жыл бұрын
Very well done. I'm brand new to the Arduino, and found the ground-up tutorials clear, concise, and inspirational. I will watch more.
@bmonty6514 жыл бұрын
Brilliant tutorials, thoroughly enjoyed every one. Informative and interesting! Will definitely be missing these every Monday! Good luck with your studies!
@HatimThayyil13 жыл бұрын
you have a dog barking at about 10 minutes. Your tutorial series have really helped me do a high school project.
@taehyunbaek72865 жыл бұрын
This tutorial was just what I needed for solving my problem. I need to order some innverting Schmitt triggers. Many thanks!
@KHwellness11 жыл бұрын
I enjoyed your tutorial series, you did a great job explaining what you were doing and why, to a novice like myself. It is inspiring me to get into this. I'll be watching them over again, as well as your other vids. Thank you!
@n204813 жыл бұрын
Hi Jeremey, Really great tuto serie. I had a good time watching them while waiting to my Arduino Mega board. Can't wait to get my board and then it would be time to go over your tuto's again and put in practice what I learned. Hope to see next tuto soon. Keep on your nice job!
@donovanpl10 жыл бұрын
Excellent, Jeremy! Now to get an Arduino and view the series again.
@sciguy1413 жыл бұрын
@theblackfluid That sounds reasonable, but it goes against common practice for an interrupt anyways. All other system functions are suspended within an interrupt, so even if you could do a delay, you shouldn't. You should enter the interrupt, do something simple (like flip a global variable) then get out as fast as possible.
@sciguy1413 жыл бұрын
@CIPHERJAY You can make this work without the trigger. You just need to invert your logic in software.
@sciguy1414 жыл бұрын
@iluvme162 So glad you liked them!
@shyamsundar20007 жыл бұрын
I put a 750K ohm resistor in series to the first input of the switch from the 5V power supply. The first input also connects to the D2 pin (INTERRUPT Pin) of the arduino. The second input of the switch connects to GND. Finally I put a 1uF Capacitor across the D2 pin and ground. Now set the trigger mode to 'RISING' in the code. Thats it! Worked like a charm. OPTIONALLY: You could put a 22pF ceramic cap across the switches for even better stability.
@nunogarcia94465 жыл бұрын
A eight year old video full of relevant information. Thanks!
@swiz74714 жыл бұрын
love the series, come back soon and make more!
@suhailmall988 жыл бұрын
Did you forget to out the background on the monitor this video? ;D Also, great video; this tutorial series has been really helpful for newcomers like myself and really gives some general direction to those who don't know where to start. Thanks!
@CrazyBite20074 күн бұрын
Great information! Thank you for your efforts! Old video, new reaction. I am looking for guides how to connect and use a low side mosfet gate driver ic with the arduino to drive 4 solenoids with two buttons using PWM signals from arduino. There are simply no videos on this topic or I just can't find them so I'm unsure what IC to pick (there are hundreds of them)
@abdullah-ahsan-khan14 жыл бұрын
when will you return? great series till now though. these episodes have been really very informative. Thankyou!
@sciguy1413 жыл бұрын
@redhotdaddy Link in description. It's on my site.
@CIPHERJAY13 жыл бұрын
@sciguy14 I have a problem. Basically i noticed that there was a slight change in the code in that you have included the two serial lines. I went back to tutorial 2 and to my surprise the line: Serial.println(digitalRead(switchPin)); caused the bouncing of the signal to stop. I would like to understand why this is the case. Also, erroneous reading are still occurring now that I deleted that line from the code..
@EvolveAirbrush11 жыл бұрын
i've seen all your 10 tutorials, you're great!
@skizgrzl13 жыл бұрын
I'm also curious if you would be able to treat the characters you're reading in from the SD card as strings, then append or concatenate them into one big string in a variable, then convert that to an integer instead of the power of tens style method you used?
@shanteacontrols11 жыл бұрын
Really helpful, thank you. Is it possible to debounce rotary encoder the same way as you debounced those switches? I was thinking of connecting HDD motor to comparator (LM324) and then apply the technique you used here.
@NeonblueIndustries7 жыл бұрын
Excellent Vid Tutorial!! Exactly the help I needed on iterupts, my circuit should work with less code and less power due to the Arduino only doing a function when it's triggered by a certain interupt instead of pollong and looking for it once per void loop. I hope you become a teacher that Inspires many kids to make this world a better place with their new ideas. Kick ass man! Thank you!
@ImaginationToForm12 жыл бұрын
Hi. Learning alot of stuff from you videos. I've finally gotten an Ardiuno to play with. I only had a 74HC04 available to attempt this circuit but still having some debouncing trouble. I see the Schmitt version is listed as high speed, is that the difference? Well I'm playing a bit with the resistor and capacitor to increase that rc value and see if that might help till I can order more parts.
@mikeskitt11 жыл бұрын
Superb series of tutorials. Many thanks, you have taught me an enormous amount in these.
@sciguy1414 жыл бұрын
@jakebrickhouse Not last, forever! I'm hoping there will be more soon.
@xxang113 жыл бұрын
Hey, my interrupt will trigger on the rising edge (as programmed) which is what I wanted. However, as soon as I inserted some codes to enable my motors in the main loop, the interrupt signal from my photo interrupter tends to interrupt far more times than it should. It is supposed to interrupt when the infra-red is being blocked by an object once at 0-1 rising edge, but it is triggering like 100+ times when i run a paper to block the infra-red on the photo interrupter.
@CrazyBite20073 күн бұрын
I have a question about the capacitor 10 microferrite. how many volts is it rated for? does it matter much? I have found various 10 microferrite capacitors rated at different voltages. An arduino button gets 5 volts, but I could not find a 10 microferrite 5 volts. (closest I could find is 10 microferrite at 16volts.) again does it matter for buttons?
@voice4voicelessKrzysiek4 жыл бұрын
Great tutorial, I enjoyed it a lot; had to slow down the player to 0.75, lol! I have the comment, though. It's never a good idea to put a mechanical switch in parallel to a capacitor because due to the very low internal resistance of the cap and the switch there will be a huge momentary current flowing through the switch contacts which will, in turn, wear off the contacts and cause some problems after many cycles of being pressed. It's preferable to put a switch in series with a resistor, on top of the cap and use 2 Schmitt inverters, instead.
@CNKayutube11 жыл бұрын
Thanks Jeremy, helped out a lot in my situation. i used with interrupt 0 pin2 with switch/case programming style for random effects with switch hit while still running main loop. Take care.
@PrimeTime41611 жыл бұрын
Another great vid, thanks Jeremy; to Robert Sisco point, shorting the cap is rough on the switch, also your rc timing waveform should show a rapid discharge and integration on the rising edge.
@FatBird13 жыл бұрын
Hey Jeremy, I'm having trouble using interrupts with while-loops. My ISR stops interrupting when my while loop is working; it seems like the ISR is waiting for the while-loop to finish. Do you have any advice on how to fix this problem?
@25Aditya259 жыл бұрын
Does the interrupt takes only digital values?i.e.the value that changes should be either high or low or I can use it for analog values also.I want to use Interrupts while receiving analog signals from the IR remote using ir sensor.
@milobard12 жыл бұрын
I've heard of people using interrupts to access signals from accelerometers faster. Do you think this debouncing concept would be necessary for applications with accelerometers?
@donovanpl10 жыл бұрын
Actually,@6:17 if the button were to be pressed the voltage would fall immediately to 0 (ignoring switch bounce), and therefore the decay that Jeremy spoke about would be non existent.
@001marselle10 жыл бұрын
he is right , the curve is To , which the time for charging the capacitor = RC while R is the resistance , and C is the capacitance , when the button in release mode the capacitor start charging till Vin , since the button is pushed the capacitor will release the charge in RC delay also , so here chmit trigger is used for 2 purposes the first like inverter and secondly is to make a square wave pulse from the RC curve .
@AdiCherryson3 жыл бұрын
@Donovan Lym So someone did noticed it. This is depressing though how many is still convinced that this is correct.
@AdiCherryson3 жыл бұрын
@@001marselle No he is not right and he does not have the RC circuit. This is as simple as to lookup an RC circuit in wikipedia or even just search for hardware debouncing. This is plain wrong what the author is doing.
@VideoNOLA12 жыл бұрын
Q: I noticed that the interrupt function 'swap' is not only of type void (i.e. doesn't return a value), but it also is never declared to accept values. Is that mandatory for functions attached to Interrupts? Or is it just good programming protocol? (I'm not really a programmer, so often get caught up on minor details like this...thx) Note: Perhaps I should also learn more about the 'variable scope' permitted inside such functions...
@TheWiserkuo12 жыл бұрын
Hi !! I had read ur clip and implement the schmitt circuit . but i have another problem. I use the arduino to drive a 24vdc motor via a power-mosfet, and connect to a wheel encoder(opto-interrupter) with an interrupt pin of arduino. I wanna to read the dc motor's actual position from the encoder value.(like servo) . When I complete the circuit of these two application on one arduino and test .
@sciguy1413 жыл бұрын
@CIPHERJAY correct.
@MahmoudAlzaibaqCC14 жыл бұрын
Great tutorials, thank you. Looking forward to see more. All the best in your studies.
@RandyLott11 жыл бұрын
Hi Jeremy. Is it possible to blink a LED until an average analog value is acquired on another pin? This does not work: while (average < 100) { blink routine }
@skizgrzl13 жыл бұрын
could this have been done without interrupts using loops? like a while loop to loop while the button is in the open state? just curious, I'm sure it's much less efficient doing it that way (if it's actually possible)
@Neverforget713245 ай бұрын
Nice tutorial. Personally I would've opted for a (much) smaller (1-10 nF) capacitor... but that choice is driven somewhat by the application (manual switch vs. rotary encoder, for instance).Also would've been good to explain why exactly we want that fast transition coming out of the Schmitt trigger.
@TheOleHermit2 жыл бұрын
Thanks! Just what I needed to know for using a multi-level RGB backlit keypad & multi-level RGB backlit rotary encoders, with LED brightness indicating gain settings. That covers ~25% of the functionality of my MIDI laser control desk (excluding the associated functions and the L&R 7" Nextion Intelligent touchscreens). 😎
@1717171713 жыл бұрын
Will the Arduino still set the interrupt flag if the interrupt is tripped while detached? Or do I have to clear the flag before reattaching to prevent the ISR from running right away? Thanks!
@jonathans121212 жыл бұрын
im running a really long loop with 10 modes mode 10 is a huge loop and takes about a minute to complete i got the same inverters and hooked them up the same. when i hit the button the mode changes until it gets to 10 then it stops and it wont change any help would be nice
@ecrosm3 жыл бұрын
As shown at the figure 13.2 from the atmega328 datasheet, the digital inputs of the microcontroller have their own Schmitt triggers. I wonder if they are not enough?
@Neverforget713245 ай бұрын
Try using un un-debounced switch and you will find out soon enough (I've done it...). Point is that if you don't prevent the signal from going through the lower and upper logic limits several times, the Schmitt trigger will happily switch high/low several times, in unison with the switch... What is not mentioned in the video is that the rise / fall time ALSO needs to be fast enough (I believe less than 2 microseconds for Arduino) to ensure the triggering works properly. The Schmitt trigger's MAIN function in this circuit is to ensure a quick enough transition. Having said that, I have just used the resistor / cap approach WITHOUT the Schmitt trigger in a lot of applications without any issues, but maybe I just got lucky.
@dztronic16168 жыл бұрын
thank you for the video...I was asking could we use interrupts for an analog input instead of digital one...cuz that's what I need?
@SharonFSmith-gq5es8 жыл бұрын
+Dztronic *ARDUINO MICROCONTROLLER GUIDE 2016. Download Here, step by step how to make arduino programming. CLICK HERE* plus.google.com/116428027560638976608/posts/96r9KFpBur9
@dztronic16168 жыл бұрын
+Sharon F.Smith I tried to download but it says "Sorry, there are no offers in your region at this time". could you please send me the document at my email: issamokh@hotmail.fr. Thanks I appreciate.
@BigyanChap7 жыл бұрын
I wish I could use software debouncing with hardware ISR. Is that possible?
@heckyes13 жыл бұрын
@contrist0 I agree. Does the language that Arduino uses support Switch statements?
@BartdeBoisblanc10 жыл бұрын
Very clear example of how interrupts work on an Arduino. I need an Interrupt to halt the main code to turn off several relays and turn one on for about a second then off. Can this be done with either INT0 or INT1? I am using an UNO with a Relay Shield. Thanks
@001marselle10 жыл бұрын
yes it can be done , you just have to define the interruption pin , and the make separate function for each interruption , and make separate interrupt in attach command .
@youcef39395 жыл бұрын
please help, I made a machine based on Arduino, but I had a problem with noise, sometimes Arduino receives a signal from one of the buttons that is connected to them, although they didn’t press this button, I thought if I built low-signal filters and connected it in series with every pin of Arduino's entrance he will remove this noise. I wanted to hear your opinion and advice on this matter. Thanks in advance .
@thefangoth9 жыл бұрын
Thanks for the tutorial. But although I built the circuit just as described, I still get some debounce every now and again. I was just wondering if the switch being used, changes things slightly or not?
@MitchDC214 жыл бұрын
Great video, learned a lot, What's the name of the program you used to draw the schematics?
@tysieve13 жыл бұрын
So would a typical 74XX04 hex inverter not work? i feel like it more or less has the same characteristics: once you reach logic HIGH output is LOW and vice versa. Where logic High and Low are specifically defined.
@chandararanget787910 жыл бұрын
thank for all your best try to share me a good explanation. I have question , what int 0 do beside the Raising interrupt ? I really confuse about this two. Thank u again
@001marselle10 жыл бұрын
when he said int0 mean this is the first interruption in the chip , remember micro-controller has 0 index , so always you start counting from 0.
@JoaoFerreira-bi8wt10 жыл бұрын
At 9:30, don't you mean pins 11, 10 and 9?
@alextrezvy68897 жыл бұрын
11:32: Did you hear something about arrays and loops?
@beforebefore11 жыл бұрын
One small caution here... You're discharging that fairly substantial electrolytic capacitor through the contacts of a tiny switch that's means strictly for very low currents. Each time you hit that button, you get current spikes probably approaching a few Amps... toasting those contacts. The simple solution, use a 1k resistor in series with the switch. This limits the current to 5mA, and still pulls the charge out of the cap down to 0.5V... plenty low to keep things working as planned. :-)
@NicklausJ9 жыл бұрын
Thank you, very helpful information! I didn't had an schmitt-trigger so i used only the 10µF capacitor and seems to work fine...
@TheWiserkuo12 жыл бұрын
there is a serious problem, when i use the attach interrupt to read a switch as an encoder ,and Serial println on the monitor. I found that the ISR is keep counting the encoder when i drive the motor ruuning. I had tried to drive the motor in different way between digialWrite (full speed) and analogWrite (PWM). The ISR's encoder value alway keep counting when motor is running. I dont know why?? Seems like electric bug, not the software problem . If u can help . I will appreciate that.
@stevenmejia65759 жыл бұрын
what is the part number od the inverter schmitt trigger ? and why he uses an inverter ? and not a normal schmitt trigger (non inverter)? or they dont exists ?
@humanmissile11 жыл бұрын
do you have any videos about pneumatic control like solenoids/relays?
@seditiousmonkeyart6 жыл бұрын
I've watched a couple of your videos now and you provide a lot of good information. However from an instructional point of view there is a couple of things you need to look at. First, you are speaking too fast and moving from one point to the next without giving a slight pause. Pauses in speech let the listener know you are shifting points and gives them a moment to take in what you have said. Second, don't block the view of your visual aids, eg by waving your pen in front of what you are discussing. I hope these tips help and I look forward to more videos.
@tanbirulquadirchoudhury48188 жыл бұрын
Informative tutorial. Can you please say that after doing the ISR in an interrupt, does it ( the computing) go back to the original loop. Is it possible to call a function from within an ISR. Say I want a "delay(1000) "; , where can I put this
@MartyM.8 жыл бұрын
Calling a function from within an interrupt service routine (ISR), unless it's very brief, won't work in the case of the Arduino as other interrupts (timing) are blocked while you're in that. You could simply set a flag in the ISR to be checked in the main loop and call the delay/whatever if it's set.
@lylebutkowski144812 жыл бұрын
Yeh! more vids on the auduino!!!!!!!!! You are great mr Blum
@danielsmith68957 жыл бұрын
Thanks Jeremy. Great tutorials. I am a true nube, don't even have an Arduino board yet. I will keep watching and gathering info to store and study.
@mibrahim96547 жыл бұрын
you can use Fritzing to simulate Arduino projects it is a great software
@m0gga8 жыл бұрын
Thanks for sharing Jeremy, very informative. I wonder if you can help me with a particular problem that I have. I want the Arduino to monitor the state of an input, high or low, and if it is low to operate a relay on and off with a 500ms duty cycle. The input is a 5 volt signal from my CNC controller and all the relay does is flash an illuminated button on my CNC control panel. The problem I have is this, when the signal goes high again the routine driving the relay on and off continues for couple of seconds and I cant find a way of coding it so that the relay stops instantly when the signal goes high. I think I know why this is happening, but I cant find a software solution to it.
@noormuhammadmalik24828 жыл бұрын
I guess you could monitor your input inside the interrupt routine itself also. That way, you can generate the 500ms duty cycle flipping of the LED on panel while checking for a change in the input itself, as soon as u read that high signal again. The control should go back to your main program and start looking for the low signal to run the routine again. And so on..
@siscok5lyt11 жыл бұрын
Shorting the capacitor with the switch will cause the switch to wear out due to the instantaneous high current flow. A better solution would be a op amp integrator circuit using say a TL084 chip. The TL084 can be used with a single 5V supply, if the + Input is biased to 2.5V, with two resistors.
@CIPHERJAY13 жыл бұрын
Is pin 1 on the trigger connected to the yellow wire and pin 2 connected to PWM 2?
@jorgemsp12 жыл бұрын
Which circuits design software is that one, you use in the video? (I know it's just to draw, for simulation I already have)?
@jharrison678211 жыл бұрын
Many thanks for all the time and effort you have put in.
@christopherotani646110 жыл бұрын
I want to do build a car tachometer using a 12V square wave ignition signal. Can I use an inverting schmitt trigger to accomplish this if I scale the voltage down to 5V with a divider. I'm a little confused on how to wire it so it's a 5V input rather than a switch pulled to ground instead.
@thisissoeasy10 жыл бұрын
Absolutely brilliant explanation! Now, it all makes sense... Thank you very much for your time...
@MisterWestbam10 жыл бұрын
These tutorials are awesome, you explain well and clear, learning cozz of you, many many thanks!! :)
@nithintamilsong12 жыл бұрын
hi i tried this project wit arduino uno and 15xh-w gps (4800).. No responce in serial monitor.. if i simply read n print the gps output i am getting a sequence of numerical output repeatedly.. eg 246..... 165. i didt get NMEA protocol format. but the same gps gives accurate positions in UART connection with pc in its interface software.. Am sure my gps working good. i tried all codes regard arduino gps. pls help me am in middle of my academic project..
@Mr1234kaki12 жыл бұрын
Hi guys im trying to make the hardware interupt, but i still get the debouncing problem, every components are the same as jeremy's , except that im using a different inverter schmitt trigger, im using 74HC14N and another one is MC14106BCPG, any helps? thanks!
@maxchaikengdee75943 жыл бұрын
Why is the schmitt trigger part necessary? Doesn't the arduino have that same kind of functionality on its digital pins, seeing anything above or below a certain threshhold as high or low respectively?
@ecrosm3 жыл бұрын
As shown at the figure 13.2 from the atmega328 datasheet, the digital inputs of the microcontroller have their own Schmitt triggers. I wonder if they are not enough?
@fuelban14 жыл бұрын
Yep, Really good video's guy, I have found them very very useful to me, just like to say thanks, Thom in Scotland.
@totallynotabot1519 жыл бұрын
Old video, but just to summarize the issues: short circuiting the capacitor with a switch (and without a resistor) is a bad idea. There is also no need for an external Schmitt trigger since the Atmega8U2 used in the Arduino boards already has Schmitt triggers built into each IO pin.
@VictorRivarola0074 жыл бұрын
10:46 Do you know what would be even cooler? And you can do it with the exact same software you are using right now, and with the removal of 3 hardware pieces to your circuit and the addition of 1? Control of an RGB LED!
@heckyes13 жыл бұрын
Can you elaborate on why "else if" is more efficient than starting a new "if" block?
@gerldmell11 жыл бұрын
im just wondering.. are you familiar with hm 2007 voice recognition?? how is it programmed with arduino?? need help..
@wdjgalvao11 жыл бұрын
HEY GUYS! I got a small question what if I use a transistor pnp or npn could that do the work? Thaks!
@218nicci7 жыл бұрын
Jeremy I would like to be your friend. :D You seem pretty cool. I'm a student from TU Berlin, studying mechanical engineering and your videos are helping me a lot to learn about Arduino, electical ciruits and coding. Thanks a lot.
@contrist013 жыл бұрын
@contrist0 Say you had if (selectedLED == red) slectedLED = yellow; if (selectedLED == yellow) selectedLED = green; without using else if, you would never have control over the Yellow led as right when selected changes to yellow the next if changes it to green. I have carpel tunnel and on major painkillers so if this is not clear let me know and I would be happy to write demo for you in a C# windows form :-)
@maryamkaveshgar81112 жыл бұрын
First of all, thank you very much for your videos, they are very useful. I have faced a problem with my LCD. My LCD displays some wiered character, They are shifting but they look like Japanese letters!!!!! I had problem with Codevision and have decided to check Arduino, but here also LCD is not working. I wonder if you could help me, Thank you.
@gricka3113 жыл бұрын
what software are you using for the circuit diagrams? thanks