Added: 11 months ago
From: sciguy14
Views: 29,497
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (61)

Sign In or Sign Up now to post a comment!
  • Great videos, thank you for making them all I've learnt a lot.

  • It's a bad design practice to put a switch across a capacitor without a small discharge resistor in the path. That's because i = c * dv/dt. Hence, the current is infinite when the switch is shorted and the switch life will be shortened as a result. A small value (able to take the power and not drop too much voltage in the case where the switch is enabled) resistor should do the job.

  • what camera do you use?

  • Can you elaborate on why "else if" is more efficient than starting a new "if" block?

  • What program did you used for the schematics?

  • @Pagweb He mentioned in another video he was using EagleCad, which is free and open source.

  • Shouldn't you have another 10k resistor in series with the switch? As drawn, when you push the switch the capacitor leads are connected with 0 ohms, so your RC time constant calculation doesn't apply here. Your debounce appeared to work for the few times you tried it only because the time spent bouncing slowed down the cap discharge enough. You should actually add a 10k between the switch and one of the cap leads. Or am I seeing it wrong? Thanks for your help.

  • "we could use an else if, same some processing time" no, you MUST use an else if, otherwise it will change the value to red, then check if its red, then change it to yellow, then check if its yellow, then change it to green. so the function will always end with the value being green. you disapoint me sir.

  • @123456789robbie It looks like his program ran as expected.

  • Y U NO CREATE LED ARRAY?!

  • 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?

  • 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)

  • what software are you using for the circuit diagrams?

    thanks

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

  • Could you use something like an Op-amp instead of a Smitt trigger? Of course that wouldn't invert the signal.. but would convert the signal to a square wave right?

  • you have a dog barking at about 10 minutes.

    Your tutorial series have really helped me do a high school project.

  • Your hardware debounce is nice but isn't it possible to call detachInterrupt() as first thing in your interrupt function and then, after a delay, attach it again to the pin?

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

  • @sciguy14 Oh yes, you're right. I even remember that delay() and delayMicroseconds() don't work inside an ISR. But you can do those things: detachInterrupt() (maybe in c to be faster), flip your variable and then store the time inside another global variable. So later on in the loop() you could check how much time has passed and attach the interrupt again to the pin. Not the best but in lack of place (schmitt trigger and cap are'nt that small) it's okay for a manually pushed buttton i think.

  • Is pin 1 on the trigger connected to the yellow wire and pin 2 connected to PWM 2?

  • @CIPHERJAY correct.

  • @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(swi­tchPin));

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

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

  • Hey, does anyone know where to get the Schmitt trigger chip from a UK based seller? Thanks!

  • @CIPHERJAY You can make this work without the trigger. You just need to invert your logic in software.

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

  • can you post your code?

  • @redhotdaddy Link in description. It's on my site.

  • 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?

  • @sh3r1ly That shouldn't happen unless you're disabling interrupts in your while loop. What are you doing in the loop?

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

  • This is great. Thanks a lot!

  • please make more soooooon!!

  • awesome! this is why i subscribe to you, keep up the good work, im learning so much

  • @glennlopez :D thanks!

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

  • Great tutorial. Thanks.

  • Great video, learned a lot, What's the name of the program you used to draw the schematics?

  • @MitchDC2 eaglecad

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

  • Great tutorials, thank you.

    Looking forward to see more.

    All the best in your studies.

  • @WakkoXtreme Yes, sparkfun makes an SPI matrix that is well suited for that.

  • Brilliant tutorials, thoroughly enjoyed every one. Informative and interesting! Will definitely be missing these every Monday! Good luck with your studies!

  • Absolutely amazing, I watched through all of your tutorials and was impressed by the clarity of the explanations on how the circuits worked. That is very hard to find in tutorials and you did a stunning job. It was perfect gateway for a programmer like me who wants to get into hardware.

  • @iluvme162 So glad you liked them!

  • awesome tutorial,i will be looking forward for your next tutorial on arduino.Thanks it has been a great help.

  • Yep, Really good video's guy, I have found them very very useful to me, just like to say thanks,

    Thom in Scotland.

  • I know you said this was your last but please make more in the future. these have been a tremendous help. thanks!

  • @jakebrickhouse Not last, forever! I'm hoping there will be more soon.

  • i suggest you start a series like onsholders blogs latest dogbot project. Take a big project and divide in to episode.

  • And this would have been great if it had been a RGB LED!!!!!!

  • Inverting schmitt trigger is just a NOT gate right?

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

  • @sciguy14

    @raghuntin

    They have an inherent hysteresis so that the output is effectively damped for a short period.Check out the symbol for a schmitt trigger for a visual clue.

    @sciguy14

    Great vids. Thankyou

  • love the series, come back soon and make more!

  • aw i just started watch the series

  • ok buddy thanks again!

  • when will you return? great series till now though. these episodes have been really very informative. Thankyou!

  • @MrAAK95 I'm *hoping* to film more episodes over spring break - so hopefully I'll return soon.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more