Skip to main content

Posts

Showing posts from May, 2017

FADING ON A NON-PWM PIN OF ARDUINO

Hi guys! Probably, we all have seen that fade program in the standard examples of arduino IDE that creates cool light fading effect .If you haven't , I suggest you go watch it right now(Go here :File---> Examples---> Basic ---> Fade), who knows it may strike some nice project to your mind like creating elegant colour effects with RGB,making a disco light or something new which your mind can come up with .But , here is the catch, you can't fade an led on every digital I/O pin that arduino owns.There are some special pins called the PWM pins,which are meant to vary the voltage on the I/O pins and hence vary the intensity of light. In this image above , do you see the little dash next to the pins 11, 10, 9, 6, 5 and 3? This dash is the symbol for pwm. So, we have 6 of these pins that give pwm output in uno. PWM makes it possible to control the voltage output of the pin as per our wish . In a standard fade program we first decrease voltage out

PWM AND HOW TO DO IT IN ARDUINO

Hey guys ! In this tutorial we will learn about Pulse Width Modulation and how arduino makes it possible.Basically, PWM is a technique or a digital mechanism to control net voltage output of certain I/O pin in arduino.In other words , it tweaks the voltage levels of a digital pin and fakes it almost like an analog pin.You might be wondering how does pwm perform this magic trick! So, let's explore the secret! To understand it , you must first be familiar with the term duty cycle. Duty  cycle is defined as the measure of that time of the TIME PERIOD of a periodic pulse for which the pulse is "high". Usually it is expressed in percentage form. Let's see how our arduino brings about that cool stuff? In normal output operation it sends stable dc voltage of 5 volts.But in this special case, instead of sending a stable dc voltage it sends a continuous pulse of a fixed time period.It is like rapidly switching   the supply  "on" and "off".

HOW NOT TO FRY YOUR ARDUINO

After waiting for days,which seem like years for a hardcore hobbyst like you guys, for the home delivery of your precious arduino, the last thing you want is to fry it on the first day.So, here i come to save the king arduino from being electrocuted! This post guides you through some common mistakes that eventually fry up arduino. 1. Do not ever place arduino directly over metallic surface and work.Trust my word , it's fatal for arduino .   For robotics hobbysts, if you do not have any other chassis but just the metallic ones take it easy.Just insulate the surface first and you are good to go. 2. Never short 5v to Gnd or Vin to Gnd. For a fact , the maximum current an I/O pin can provide or sink is 40 mA .When you short them , a current large enough to damage your arduino flows.Be extra careful ! with the Vin pin when powering up the arduino using 12v adapter because if shorting 5v and Gnd is Pearl Harbour attack, then shorting Vin and Gnd is attack on Hiroshim