Familiarization With Arduino Board and IDE.
Familiarization With Arduino Board and IDE.
Objectives:
Software Requirement:
1.Arduino,
2. Proteus
a. Arduino (arduino Uno R3),
b. LED(Red),
c. Connecting wires,
d. Ground.
1. DC Power Jack and USB connector: Every Arduino board needs a way to be connected to a
power source. The Arduino UNO can be powered from a USB cable coming from your computer
or a wall power supply that is terminated in a barrel jack.
2. Pins (5V, 3.3V, GND, Analog, Digital, PWM, AREF): The pins on your Arduino are the
places where you connect wires to construct a circuit (probably in conjunction with a breadboard
and some wire. They usually have black plastic „headers‟ that allow you to just plug a wire right
into the board. The Arduino has several different kinds of pins, each of which is labeled on the
board and used for different functions.
3. Reset Button: Just like the original Nintendo, the Arduino has a reset button. Pushing it will
temporarily connect the reset pin to ground and restart any code that is loaded on the Arduino.
This can be very useful if your code does not repeat, but you want to test it multiple times.
4. Power LED indicator: Just beneath and to the right of the word “UNO” on your circuit
board, there is a tiny LED next to the word „ON‟. This LED should light up whenever you plug
your Arduino into a power source. If this light does not turn on, there is a good chance something
is wrong. Time to re-check your circuit.
5. TX RX LEDs: TX is short for transmit, RX is short for receive. These markings appear quite
a bit in electronics to indicate the pins responsible for serial communication. In our case, there
are two places on the Arduino UNO where TX and RX appear – once by digital pins 0 and 1, and
a second time next to the TX and RX indicator LEDs.
6. Main IC:
The black thing with all the metal legs is an IC, or Integrated Circuit. Think of it as the brains of
our Arduino. The main IC on the Arduino is slightly different from board type to board type but
is usually from the At mega line of IC’s from the ATMEL company.
7. Voltage Regulator:
The voltage regulator is not actually something you can (or should) interact with on the Arduino.
But it is potentially useful to know that it is there and what it’s for. The voltage regulator does
exactly what it says – it controls the amount of voltage that is let into the Arduino board. Think
of it as a kind of gatekeeper; it will turn away an extra voltage that might harm the circuit. Of
course, it has its limits, so do not hook up your Arduino to anything greater than 20 volts.
CODE for LED blinking Circuit:
int pinNumber=12;
int blinkCount=0;
void setup() {
// put your setup code here, to run once:
pinMode (pinNumber,OUTPUT);
void loop() {
// put your main code here, to run repeatedly:
digitalWrite(pinNumber,HIGH);
delay(9000);
digitalWrite(pinNumber,LOW);
delay(9000);
blinkCount++;
if(blinkCount>=9){
while(9==9)
}
}
Circuit Diagram (Proteus):
Discussion:
A DC motor can be very simply rotated both ways in clockwise as well as in anticlockwise
directions by flipping the supply inputs of the circuit. In Fig(a), The direction of rotation of the
DC motor is in the clockwise direction. Here, the negative side of the DC battery is connected to
the positive side of the DC motor and then the positive side of the DC battery is connected to the
negative side of the DC motor. Again, to get reverse/anticlockwise direction requires flipping of
both of its wire polarity with the connected supply which shows in Fig(b).
In Fig(c), the red(+) point of DC motor is connected to the red(+) point of DC battery and the
direction of rotation of the DC motor is in the clockwise direction. In Fig(d), the red(+) point of
DC motor is connected to the black(-) point of DC battery and the black(-) point of DC motor is
connected to the red(+) point of DC battery and the direction of rotation of the DC motor is in
the clockwise direction.