Upload
makers-of-india
View
59
Download
0
Embed Size (px)
Citation preview
INTRODUCTION TO ARDUINO AND ITS PINS
Signal• A signal is a function that conveys information
about one dependent variable with respect to another independent varible (such as time).
• Types of signals– Analog signals– Discrete signals– Digital signals.
Analog signal
• A signal which is continuous both in time as well as amplitude is known as a analog signal.– Ex. Audio signals, Readings from a
thermometer,etc.
Discrete signal
• A signal which is discretized in time domain but is continuous in amplitude domain is a discrete signal.
Digital singal.
• A discrete signal which is represented in zeros and one’s is known as a digital signal.
Introduction to arduino!• Arduino is a programmable device which is a
mixture of both hardware and software • It consists of on board micro-controller and
Memory(RAM && ROM).• Micro-controller used is ATMEGA 328p• We need to program this micro controller in
order for it to perform certain tasks.
• A micro-controller understands only one’s and zeros, so we will have to write programs in high level language such as C and compile them into machine level language.
• This program is then uploaded into the board for it to perform the required task
• This programming is done using Arduino IDE.• A micro-controller has i/o ports and memory• The programs and data which are to be sent
are stored in the memory.• Then data is transferred via the I/O ports
ATMEGA 328p
PIN LAYOUT OF ARDUINO
• Power pins• Your arduino requires power to run!• Power can be given to the arduino in 3 ways:– Using a Battery to coaxial connector.– Using a USB from a laptop– Using the Vin ports of the arduino(Should’nt
exceed 7-12v).
• The function of the voltage regulator is to control the voltage given to the Arduino board and stabilize the DC voltages used by the processor and other elements.
Voltage regulator
Power Output pins• 5v – Gives 5v output at maximum current of
~400 MA.• 3.3v- Gives 3.3V output at a maximum current
of 150 MA.• GND : It is taken as the reference point for all
the voltages measured ie. Any voltage measured is compared to the voltage at this terminal.
Analog pins(input)• The Arduino UNO board has five analog input
pins A0 through A5. These pins can read the signal from an analog sensor like the humidity sensor or temperature sensor and convert it into a digital value that can be read by the microprocessor. They have a 10 bit ADC which converts the analog signal to digital signal. They can be used as digital pins if needed.
Digital I/0 PINS• The Arduino UNO board has 14 digital I/O pins
(of which 6 provide PWM (Pulse Width Modulation) output. These pins can be configured to work as input digital pins to read logic values (0 or 1) or as digital output pins to drive different modules like LEDs, relays, etc. The pins labeled “~” can be used to generate PWM.
Tx/Rx (pin0and1)• These pins are used for serial communication
with other modules such as bluetooth module and gsm module.
• When data is transmitted serially Tx led will be flashing
• When data is received serially Rx led will be flashing
Special Pins• IOREF: Tells the user what voltage level is
considered as logic high. In case of an arduino it will be 5v.
• AREF: If we want the ADC of Analog pins to change the maximum voltage from 5v to less than 5v, we should give that voltage to this pin along with analogReference(Voltage) function.
• RESET: When a logic low pulse is sent at this pin the arduino resets, i.e. the program starts running from the start (similar to what happens when u first upload the sketch).