Monday 22 December 2014

ARDUINO TUTORIAL FOR BEGINNERS - 2



  Hello,
            
              In the last post we have answered some of the most common Frequently asked Questions(FAQ's) about Arduino's.Hope that now you are ready with the basic setup for starting arduino,lets have a quick look at the requirements

  1. ARDUINO SOFTWARE IDE
  2. ARDUINO BOARD
  3. MOST IMP "SOME INNOVATIVE IDEAS IN YOUR MIND"
   Now that you are ready,Lets get started.

  1.  Open the Arduino IDE on the desktop 
Now lets get into the command icons that you can see on the top left corner of the desktop

      
     COMPILE :If you have done some kind of programming ever than you must have heard this word some where ,a compiler converts the HIGH LEVEL language code into the MACHINE LANGUAGE(HEX file)  which the arduino can understand

You can have a more knowledge on compiler and interpreter from the following link

     UPLOAD :This is used to transfer the code from the PC to the Arduino Board.So the upload is actually two step process in which the code is COMPILED first into the machine language and then BURNED onto the Arduino MCU(by the way arduino UNO uses the ATMEL AVR 328P-PU Micro controller )

rest of the command are self explanatory.




     2.   Now lets Start learning the Arduino "SYNTAX"

Open the "BLINK" example in Arduino the best one to start with!!!!



Lets see what the code has?????



The definition and significance of each line has been explained in the figure above

     3.  Let us list down the important Functions and Key words used in the above code:

  1. "int" :It is a type of variable 
  2. "void" : It is the type of function return,when ever we define a function in any language we need to define the type of value it gives to the output.if the function does give any value in return we name the return type as "VOID" 
  3. "setup":It is the function of Non-return type which runs for one time whenever the arduino is reset or powered.Thus it contains the intinitialization of all the things used in the code.
  4. "pinMode":This is a function which is used to define the behavior of a pin ,the pin can act as either INPUT or OUTPUT.
  5. "loop":This function is operated after the setup function has been run once and then continues to run for infinite time or until the arduino is reset or switched off. Thus it is similar to a while loop in "C"
  6. "digitalWrite":This is a function used to write a digital value (HIGH or LOW and 0 or 1) to any pin initialized in the setup as OUTPUT.    
  7. "delay()": This function is used to produce a delay in the execution of code,this is required when taking input from a sensor in order to provide settling time to the sensor and give new reading.

     4.  Practice Question:

Write a code to blink the LED connected at pin number 3 of Arduino uno and with a ON time of  700 ms and OFF time of 200 ms ?



After you have all of this please watch this video to get the things much more clear.

Tutorial 01 and 02





Saturday 20 December 2014

ARDUINO TUTORIALS FOR BEGINNERS-I




I have been working with Arduino's for some two years now and have completed many interesting projects using this simple micro-controller Board ,so before i start posting my projects here i would like to post a series of arduino tutorials for those new to the world of this magical device.


"ARDUINO-FAQ'S"

So the first question that many people ask me when they hear about arduino.

 1) What is this ARDUINO????

so the answer is simple---wikipedia says this.
  1. "Arduino is a family of single-board micro controllers, intended to make it easier to build interactive objects or environments. The hardware consists of an open-source hardware board designed around an 8-bit Atmel AVR micro controller or a 32-bit Atmel ARM".
so putting this in simple words,Arduino is a "MICRO-CONTROLLER" that has a Programming Environment (IDE)  provided by the arduino people which is so simple to use that you will never forget it.


So now lets get started!!!

2) What do you require to begin learning arduino?????

  • ARDUINO software ----->get it on the following link                                       http://arduino.cc/en/Main/Software
 
  • A ARDUINO BOARD-----> you can search for store nearby or even order it online arduino is easily available,because it is very much popular and used among developers because of its simplicity.
  • A COMPUTER

  • Very important---"Some innovative ideas in your mind"
That is it,this is all that you need for learning arduino

3) Which Arduino to select??????

      If you are Beginner than the best to start up with is arduino "UNO" it is sufficient for beginners and can be used for complex task as well because this is what i used for most of my project's and the second reason it is "CHEAP" as compared to other arduino boards so not a big issue if yu fry up your new arduino "UNO" 

 
4) What is the Difference between a Micro controller and a Micro processor?????

BRAIN POWER:

    So putting it in simple word's for beginners, A micro controller has low processing power which means it cant process large and complex tasks e.g processing a image, but a micro processor can do very much complex task with ease.

MUSCLE POWER:

      BUT the micro processor  does not sufficient power to drive external devices that is it cant control external devices easily but the micro-controller can do so and thus is named a controller while a processor is called so because of its high processing power.

So your Arduino is a  Micro controller and can drive external devices like a LED,Transistor,MOSFET, and even servo motor but a processor cant.

So in simple words a micro controller has muscle power but has low brain power while a processor is sharp at brain but has low muscle power 
the following video may clear it furthur.


Hope that most of your questions as regards to arduino are solved now and in the next post we will go through the arduino IDE and learn the simple arduino programming SYNTAX.

Friday 5 December 2014

PRINT YOUR EAGLE PCB ON A PAPER.

EAGLE PCB DESIGNING TUTORIALS FOR  BEGINNERS-3 

PRINTING IT ON THE PAPER:

In the Previous segment of this series of eagle post we had come uptil the eagle board file of the circuit, Now in this post we will go through the steps to be followed before we transfer this .brd file on a actual board.

  1)  open the board file we have designed and now we need to do some settings before we actually print this on a paper.

2)   Your .brd file would  look something like  this.
But if we take the print directly the components that are visible will also get printed on the paper and thus will cause unnecessary shorts in the circuit.To prevent this we need to eliminate the components from the brd file how do we do this???????
             


    ANSWER:
      {   I hope you remember the "LAYER" command i had explained in earlier post ,if not just scroll up and read it out for your reference.}
   
     Now open Layer command and then click on "none" and then "apply" Now you would see that the entire brd has become empty.
Now select the following layers by clicking on the number adjacent to them,the selected layer will be highlighted with a blue colour.
  • TOP
  • BOTTOM
  • PADS
  • VIAS 

When you are done the final brd should look like this.
{don't worry about the warning i closed my schematic by mistake so the annotation is not allowed,you may get it sometime so don't worry about it and again open the schematic}

 3)  Now there are two printing methods:

            1)Single PCB:

                                In this method we directly take the print of the file and thus have only a single PCB on a page. 
   ------->click on "file" then click "print"
and then select the following options:
  •  BLACK
  • SOLID
don't select other options and keep all other field as in the photo.

 {Remember to set the paper to A4 size and the scaling factor to 1 other wise the component wont fit on the PCB.}
   
             2) Multiple PCB on single PAPER 

                        In this method we can actually get multiple images on a paper of the same circuit or even two different circuit this will be useful when you are printing a number of circuit as it will save the number of pages required .

follow the below steps:
  1.  EXPORT
  2. IMAGE
  3. GIVE A NAME AND SET THE RESOLUTION AND SELECT MONOCHROME


{Before exporting the image set the background to white so that you don't get a inverted image,To do this follow this steps:
"option"--->"user-interface"--->"Background"--->"White" }

Now open your image
 4) Now copy this image into a word file then set the paper to A4 size by placing a A4 size paper o the screen and then resize the image to required dimension.While resizing see to it that the IC base is fitting or not by just placing it on the screen.

5)Now then Copy the image and then paste it as many time you want.


{Remember the following steps:
  • Set paper size to A4 by placing the A4 paper on the screen
  • resize the image until it matches the component size}
 Now you are ready just go and take a print.

Hope this helps you.

Wednesday 3 December 2014

EAGLE PCB DESIGNING TUTORIALS FOR  BEGINNERS-2(6-STEPS)

   In the previous post we had gone through the basic of designing a circuit in eagle basically schematic,now we will learn a more interesting part in eagle that is actually designing the "BOARD". Your board file actually determines the way your circuit will look.


     Hope you have eagle installed and have made a simple schematic of any circuit that may be yours or from the internet ,now we will learn how to convert this simple schematic into a aPCB.

     1)  Open the .sch file that you have created using EAGLE.
 
     2)  Now click on FILE and then click on "Switch to Board" it will ask whether to create a new .brd file        then click on yes it will we saved in the same folder as the schematic(.sch) file.

     3)  The following window will appear.It will have all the components placed outside the board shown     with withe line.

    
     4) Using the group and move commands move all the components inside the board(the board is shown with a white rectangle on the screen).


GROUP THE COMPONENTS

RIGHT CLICK AND SELECT MOVE GROUP


    
DONE!!!
    
   5) Arrange the components as required on the board.





      Let us now have a look at  some important commands that would be useful further.

  •   LAYER:   This icon contains the list of all the layers and there colour on the board ,the layer can be either made visible or invisible by selecting them. A blue mark on the side indicates the layer is visible.This is usefull while printing ,in which we don't want all the layers but only three layers are required like TOP,PADS VIAS and BOTTOM if you have any text or dual sided PCB                           

             
  •     AUTOROUTE: This is the command you would love to use because it does most of the designing work for us but sometimes not all the work.This command tries all the possible combination of connecting the terminals and find a optimum path for us. 
      what do you think about this!!!!!!

          
          Auto-Route worked for me this time!!!!!!!!!!!


  •      RATSNEST: This command tells us if there are any air wires in the circuit.Air wires are the wire that are not routed in the board file.
  •     ERC(Electrical rule check): This shows all the electrical errors that are there in the circuit like clearance between two paths and drill size etc.
          Now lets get back to work

   6)    We had come up-to the 5th step i.e Our componets are now arranged on the board now lets try "ROUTING" them. Routing is nothing but as the name suggest a route or path of copper between two terminals which are to be connected to each other.So since in our circuit we have many terminals there are many routes as well, Thus as the size of the circuit increases the number of route increases,increasing the complexity of the circuit so what comes handy at such situations is the "AUTO ROUTING" command which has been discussed and hope you are familiar with it now.
So now lets AUTO-ROUTE:


You may think it is done but no it is not.It still requires some finishing because while printing the circuit there are some physical constraints.you should move the adjacent wires apart and maintain a safe distance between them and see to it that while printing they are not very close to each other.

  can you see the changes i have made??? just use the move command and move the wires as you want.


So finally you have designed your own customized PCB.

In the next post i will take you through the process of printing this PCB on the screen to actual paper with proper "DIMENSIONS"

HOPE THIS HELPS.

 THANK-YOU