Learn Electronics with Arduino

Showing posts with label theory. Show all posts
Showing posts with label theory. Show all posts

Feb 25, 2017

What is Arduino?


Before we begin building projects with Arduino, it will be usueful to understand what Arduino is,  the various components on the Arduino Uno board, and different Arduino boards available.

Generally Arduino means both the Arduino board and Arduino software in the form of IDE.  The most common and the most recommended board for beginners is the Arduino Uno Rev3 board. Arduino Uno Rev3 board is a single board micro-controller. It provides an easy interface to the programmable micro-controller and the various input/output pins. The good thing about using the Uno as your first board is that if you do anything wrong you can easily replace the ATmega328P micro-controller.

The Fig. 1 shows the main components on the Arduino Uno R3 board.
Fig 1. Arduino Uno R3 with main components labelled
This board is based on Atmel's ATmega328P programmable micro-controller along with ATMega16U2 which is preloaded with Boot loader and programmed as a USB-to-serial converter.  It has 14 digital input/output pins of which 6 can be used as PWM outputs and 6 analog inputs. Each digital pin provides a maximum of 5V and a minimum of GND. The PWM pins in the Fig 1 is shown by ~ near the pin number. Note that Arduino board does not provide any analog output, however we can use the PWM output as analog output which we will visit later.  The locations of these pins on the board is shown in Fig 1 below.

It also has a USB-B port, a center positive power socket, 16 MHz crystal, ICSP headers for both micro-controllers, and a reset button. The board can also be powered through the USB instead of the power jack.

If you connect the power supply in reverse polarity (center negative) through the power socket, there are components on the board that will resist to sent the current in the opposite direction.  Note that just protection does not exists if you connect the power supply via the power pins and you may end up damaging your board.

Jan 28, 2017

What is voltage?


The fundamental rules on which any circuit works are voltage, current and resistance. There is capacitance and induction, but we will dwell into them later.

Voltage, denoted by V, is the driving force of any circuit. It is the source of power and is available in different forms. The most common forms are the battery or the adapter. Voltage can be better understood by thinking it as a water pump pumping the water through a pipe. Voltage is measure in volts (V)

Fig 1. Voltage analogy
Similar to the water-pump driving the water through the pipes, voltage drives the electron through the circuit.  The movement of electrons through the circuit is called current, indicated I.  Note that though the electrons move from the -ve terminal of the voltage to the positive +ve terminal of the voltage, current is considered as flowing from positive +ve terminal to -ve terminal.  The flow of current through various electronics component causes it to work. Current is measure in amperes (A)

Resistance, as the name suggests, is the barrier to flow of the current. It is indicated by R. A wire has close to zero resistance and air has close to infinite resistance. A thicker wire has relatively less resistance than a thin wire. Resistance is measure in ohms (Ω).

The relation between voltage, current and resistance is explained by the Ohm's law.

$$V  =  IR$$

Consequently, given any two, it is easy to solve the equation for current.  This equation is particularly useful because in most circuits you cannot measure the current. The voltage and the resistance can be measured, so you can calculate the current.

Never connect the voltage in a short circuit. A short circuit means that the resistance is zero.  According to the Ohm's law if the resistance is zero, the current will approach infinity and may burn down everything in the path.