I'm a 50 year old technician that went to tech school before PC's were popular. Maybe it's the fact that I'm mature now and have a greater attention span but I think you are just a kind soul and it translates to a good teaching style. You are definitely taking the apprehension I had in learning Arduino and the associated programming to a manageable level. I've thoroughly enjoyed your lessons and look forward to learning more.
Hi Paul. Yes understood PWM. Your teaching is great! I've seen so many poor teaching videos and read some poor books on the subject, that I'd given up. Your tutorials have me looking forward to what you're going to teach us next! As a 73 year old ex I. T. trainer that's praise indeed
Great lesson. I finally understand pulse with modulation. Showing the O scope and what you call rambling (which helped me associate previous knowledge with this lessons knowledge) was perfect. Keep the rambling!!! And thank you!!!
You sir have a gift for teaching. I have bought your kit and have been enjoying every lesson. Who ever said you can't teach and old dog new tricks has not met you. Thank you very much!!!
I know these videos are 3 years old, but I've been listening to them while working, and then I do the lesiones at home. And I do try to do the homework before moving on.
It reminds me of a microwave oven or an induction stove. At full power it is on all the time but at lower powers it alternates between being on and being off. I love these videos
You nailed PWM, I had no problem, the Cap addition lost me a bit, but I then duplicated your setup with Tinkercad's simulator which has an Arduino and an Oscilloscope, once I did that, I could play along and duplicate what you were doing. This is going very well.
I was stuck on a project for my Make Course at USF for a couple of days. After reviewing your video I understood the way in which a capacitor is able to help when smoothing out the curve and giving a steady voltage. Thank you sooo much and you definitely saved my grade!
I'm just getting into the Arduino as I have many projects in mind. I'm an High Voltage technician so have most of the basics of electrical/electronic engineering but what a gem of information that the Analogue output is really just PWM. That can make such a difference depending on the project. Thanks for the great videos and keep up the good work. I also watch the adverts to make sure that you get rewarded for your efforts.
Squaring things up? I have a friend with a framed picture of the leaning tower of Pisa. Every time the trains go past, her picture moves off level and presents the tower vertically... I straighten the picture and then - the tower's back on the hur. Drives me nuts! When I was diagnosed OCD I changed that to CDO - all alphabetically correct and shipshape! Excellent videos, Paul - thank you.
Hi Paul. loving the videos and looking forward to each one. only thing I noticed is your scope was set to 0.5mS per division and the period was 4.2 divisions. that to me is just a fraction over 2mSec not as you said 4mS. just me being eagle eyed. but loving it. when you getting onto inputting via switches or sensors?. keep up the excellent videos and not tried the ice coffee yet...
@@paulmcwhorter actually you read the period from the screen and the msec/division scaling correctly, you just made a mistake when you used the calculator. You might want to put an overlay of the video at that point with the correct period of 2.1 msec rather than 4.2 msec.
Hi Paul, fully understood how PWM works with the arduino, managed to get the led to go from very dim to full brightness, using the analogwrite command.
Hello Paul I agree with you in keeping things neat and in order. I often use Blu Tack to prevent the boards from moving around and creating disarray :)
You are a great teacher Paul. I watched your series on the Raspberrry PI, and have hooked my Arduino to it. Just waiting post surgery for eyes to settle to do these sessions.
You explained it very well. I didn't know it was all about the speed of the 5 volts being either ON or OFF. The 5 volts was constant and just regulated by the amount of time in milliseconds it was either ON or OFF. You weren't rambling on, if anything I was very interested
Really, really loving the lessons on the fundamentals behind the work you are teaching us. It helps solidify the lesson in my mind much more than just learning what to code and then hitting download, allowing me to recall the lesson much better in the future. (41yo manager in mining technology wanting to learn more about what my contractors do for me).
Hi Paul, you were very clear to me again. Very nice, how you are using the scope to explain PWM, and having all the pictures all together in the screen. Very educational. Thanks!
This makes sense... it's a digital version of an analogue voltage. I presume the capacitors ability to store a charge has something to do with its ability to replicate the analogue more closely. Would like a little more on this please. Perhaps a short playlist explaining components. I'm in my 50s, completing homework making 5-LED binary counters and hoping to pass this on to my home-educated sons. Who'd have thought it? Thanks again Paul. 😁
hey just started watching your videos... u are truly the bob ross of electronics...regarding todays tutorial, could u explain again about how PWM works??
I think you explained pulse width modulation to be a rapid readout of 2 milliseconds or so, of the arduino LED's voltage, displayed with a high-low readout system, which if averaged, will equal the near exact voltage. Also thanks for the amazing video, the readouts where very fun to see, and very intuitive.
Paul ,.I really appreciate your work. Keep it up Sir ! I am completely novice to electronics and I am able to understand your concepts. PWM...My question to you will be why would you be using analogue signal when digital.current is available..?
From what I understand when you give a analogWrite command and give a value for example of 127 the Arduino board doesn't truly output a signal of 2.5 volts but is rapidly switching the signal from 0-5 volts in a way that the signal then averages out 2.5 volts and if you truly want an analog signal you would incorporate a capacitor in the circuit and the capacitor would smooth out the signal and truly provide ~ 2.5 volts constantly instead of switching the signal rapidly from 0-5 volts, i understand you can do this with other values i just used 127/2.5 volts as an example to explain
Mr McWhorter, Isn't the PWM on Digital Pins and the analog pins put out an analog voltage (with out using capacitors for rectification)? Your tutorials are the best, Thank you for the time and effort you put into them!
No, you did not ramble, you explained in depth. I am an old E tech and I call this a refresher course. I do not share your need for squareness on a breadboard but I sure do when I am building something. I guess I was trained that bread boarding is to be a method of creating and testing logic, not a neatness issue.
My wife thinks I'm OCD about how I have to have things "in order" and kept in it's place, and on a grid... and it drives me nuts to do otherwise. lol Thank you Paul for these tutorials, I am a "nut's and bolt's" kind of guy, so yes... I'm just like you in that sense. ;) Your an awesome teacher, I am grateful for the instuction, really enjoying these tutorials and the presentation. I'll drop the sugar from my coffee as well. lol :)
Paul look up field dependency in psychology. Your adjusting things to see they are squared off is probably a good thing, and a good trait for an engineer. Love your channel, long retired, a bit slower, but your method of teaching, and realizing that it just doesn't click for some people until you have said it four times is significant. good show ...literally and figuratively.
Paul, please forgive me for commenting twice on the same video Tutorial, but I felt it could be important to some of your Students. Firstly, I must commend you for utilizing the Oscilloscope as a learning tool. Nothing wrong with that. BUT, do you suppose that some of the less experienced electronics students might have become temporarily lost with the "Graticule" counting and use of a calculator to determine period and voltage and time base measurements. If on a future update of this lesson , one of the newer Digital LCD Scopes (which happen to be very reasonably priced these days) were utilized, those parameters are provided by the instrument "On Screen". That, coupled with a hand drawn graph or two showing the Width of the Pulse might solidify the concept for the student, with less confusion for those new to the game. Otherwise, Paul, a great lesson. Thanks.
You said that for analog it stays on for some time period and off for the remaining time , I added a loop for this analogWrite to keep increasing the brightness till full , so did the next brightness iteration command execute after 1 cycle is completed for the previous brightness setting or the command executes at any random time rapidly in between the cycle.
Great series! You make learning fun and easy. Still curious if you use cubes made from coffee or water. HOT coffee here in Maine in January! (at least until lunch). Try dedicating and Arduino and breadboard to a small piece of plywood with standoffs to keep everything square. I'd like to make a breadboard set up like "Mr. Carlson's Lab" has with four boards, banana receptacles and built in power supply. (current limiting of coarse). Can't wait for the next lesson, so here we go! Thanks.
You aren't "rambling" at all. You are way too self-conscious about that aspect. I understood your tutorial perfectly, and I duplicated it on my own (cheaper) oscilloscope, so I know that it works and I know how it works. Good job. BTW I know that I am almost 2 years behind and now you are on Lesson 46 of Python or some such, but I am a big fan of your teaching style.
Very good video. The VWM was explained very clearly. Many thanks. Question: will one as an amateur, wit the arduino as a hobby eventually need to purchase a scope? if so, would you recomment one for amateurs? And yes, I also need to have my work bench neatly organized, everything at 90 degrees, not stuff cutting across.
"Pulse Width Modulation is is the average of higher value of signal and lower value of signal over a constant time period which produces our desire in between signal".
That's great, but I didn't understand the point of adding the capacitor. It appears to filter out the high frequency stuff to produce a more uniform wave?
Hi Paul,,,,, curious as to the different applications for analogWrite with and without the capacitor? I'm really enjoying your series. Best regards,,,,Dennis
Hmmm. Hey Paul. Big fan here, following since lesson one. I used a For loop to increase value "x" from 0 to 255 within a delay of 10 milliseconds and the LED increased from 0 to 255 within PWM as expected. When you mentioned that PWM works within a gap of 4 milliseconds, I just had to test that within my delay. 4 = Still no problems, just faster oscillations. However when I set it to 3... Your explanation implies that it shouldn't have had enough time to complete the wave gap and therefore shouldn't have turned my LED on at all... Yet it did 😅Any explanation as to why?
I am the same way of having everything "Straight" so everything looks organized. I went on Thingiverse and downloaded a holder for my Arduino and a small breadboard together.
Thank you Paul. Could you please create a tutorial on DIGITAL pins (variable, and fixed numbers), ANALOG pins, and when to use digitalRead vs analogRead (and digitalWrite vs analogWrite)? This would immensely helpful as although I think I get most of it by just doing, it's still somewhat confusing; and I'm sure most of your students would love to learn about it properly. ADDITIONAL REQUEST: could you please do some project(s) with capacitors and explain their purpose? My kit has tons of them and haven't found use for them yet. Many TIA!
In this example, think of a glass you fill with water from a tap, though the glass has a hole on the side . You fill the glas but when it reaches the hole, the water will flow out. So, now you open the tap a little more. More water comes in the glass then the amount that flows out through that hole. Now sudden close the tap. No water comes in but still water runs out through that hole until the water comes below the hole. Do you open the tap before the water reaches that hole, you will see that the waterflow through the hole doesn't stop. Other the when you just open and close the tap without that glass For the capacitor here works simular, power comes in( on the scope HIGH), the capacitor gets loaded, once the incoming power disappears ( on the scope LOW), the capacitor will unload, the power going low will because of this not sudden go down but slower since the capacitor is unloading it's power.It is a returning event, before the capacitor is fully unloaded, the power goes HIGH again, capacitor will load again and so on. You will now see that the turning point from high to low AND low to high, will take some time, therefore the power will get an average value as it never reaches that 0V anymore. Once power stops and capacitor starts unloading the power returns. Maybe this explains the capacitor function in this example.
I understand the PWM, but it would be nice if I understood an application for it before the explanation. Then I would be seeing the "what good it is" motivation. thanks.
int redPin=9; int n=0; int m=(n+m); int bright=255; void setup() { // put your setup code here, to run once: pinMode(redPin,OUTPUT); } void loop() { // put your main code here, to run repeatedly: analogWrite(redPin,n); delay(500); analogWrite(redPin,m); m=(m+16); if (n=bright,n=0); delay(500); }
So check I've got this right, an LED can't actually run at 127 by itself, instead it goes from 255 to in order to create the illusion of 127 right? Only way to actually reduce the voltage is to use the capacitor? Have I got that right?
So, if PWM effectively toggles between 0 and 5 V in an on-off fashion, why is this not the same as just turning power on and off fast (but proportionately)? Why does the LED dim instead of flicker?
I really don't know what the capacitor just did. It dropped the voltage crest peak and raised the floor peak off of 0 volts. I assume the wavy line was a smooth sine wave centered around the average voltage.
hey paul i had a question, what do mean by smoothening it out, and how does a capacitor helps us i mean without the capacitor also we were getting all the different variations of brightness in the led.
how voltage reduced (in CRO screen) after connecting capacitor ....earlier it was showing 5 v for some time of the total time period remaining was 0v ..isn't the capacitor is supposed to be smoothing that break instead of reducing the voltage..??? and the voltage level is again reducing by shorter value of bright...how is that possible???