Arduino 74HC595 Interfacing: Increase Output Pins

Hello friends, I hope you all are doing great. In today's tutorial, I am going to show you Arduino 74HC595 Interfacing and we will have a loook at How to Increase Arduino Output Pins with 74HC595. Suppose you are working on some project where you need to control 20 LEDs with Arduino UNO and you know we will 12 digital Pins so we can't control all of these 20 LEDs with Arduino UNO. We can use Arduino Mega as well but if we wanna stick to Arduino UNO then we need to increase its Output Pins and we will use 74HC595 for that purpose. You should read this basic Introduction to 74HC595, it will help you to better understand this shift register. It's a Serial In Parallel Out Shift register and we will give it value serially from single Pin of Arduino and it will output that data to 8 output pins. Moreover, we can also connect these registers in parallel to increase the output pins even further. So, let's have a look at Arduino 74HC595 Interfacing:

Arduino 74HC595 Interfacing

  • As I told earlier 74HC595 is a serial In Parallel Out Shift Register and is used to increase the output pins of Arduino.
  • I am gonna use Proteus software and we will design its simulation and then will check out How it works.
  • So, design a simple circuit as shown in below figure:
  • As you can see in above figure, I have done the following connections between Arduino and HC595:
    • Pin # 5 of Arduino ==> ST_CP
    • Pin # 6 of Arduino ==> DS
    • Pin # 7 of Arduino ==> SH_CP
    • All output pins of 74HC595 are connected to LEDs.
  • Now upload the below Arduino code and get your hex file.
int RCLK = 5;
int SER = 6;
int SRCLK = 7;

#define TotalIC 1
#define TotalICPins TotalIC * 8

boolean Data[TotalICPins];

void setup()
{
  pinMode(SER, OUTPUT);
  pinMode(RCLK, OUTPUT);
  pinMode(SRCLK, OUTPUT);

  ClearBuffer();
}              


void loop()
{
   for(int i = TotalICPins - 1; i >=  0; i--)
   {
      Data[i] = HIGH;
      UpdateData();
      delay(300);
      ClearBuffer();
   }

   for(int i = 1;i < TotalICPins - 1;  i++)
   {
      Data[i] = HIGH;
      UpdateData();
      delay(300);
      ClearBuffer();
   }
   
}

void ClearBuffer()
{
    for(int i = TotalICPins - 1; i >=  0; i--)
    {
       Data[i] = LOW;
    }
    UpdateData();
} 

void UpdateData()
{
   digitalWrite(RCLK, LOW);
   for(int i = TotalICPins - 1; i >=  0; i--)
   {
        digitalWrite(SRCLK, LOW);   
        digitalWrite(SER, Data[i]);
        digitalWrite(SRCLK, HIGH);

  }
  digitalWrite(RCLK, HIGH);
}
  • The code is quite simple but let me explain it a bit.
  • First of all we have given names to our 3 Pins connected to Arduino UNO.
  • After that we have made all those 3 Pins as OUTPUT as we are gonna send the data.
  • We are using single chip of 74HC595 that's why I have made it 1.
  • In the UpdateData function, you can see we have to make RCLK Low and after that we have sent our data.
  • But for sending each bit of Data we have to make SRCLK from LOW to High.
  • SER is our Serial IN from Arduino to 74HC595.
  • So, in loop section, I am simply sending HIGH from first Pin to Last and then from last Pin to first and we are getting below results:
  • Now let's have a look at How to connect two 74HC595 chips in parallel to increase the output pins to 16.
  • I have also given these Proteus simulations for download at the end of this tutorial but I would recommend you to design them on your own so that you got better understanding of this shift register.
Arduino 74HC595 Interfacing: 2 Chips in Parallel
  • Now we are gonna place two shift registers in parallel and we will be able to control 16 outputs from single Arduino Pin.
  • Although we are using 3 Arduino Pins but the data is sent through Pin # 6 of Arduino and Pin # 5 and 7 are CLK Pins.
  • Now design a circuit as shown in below figure:
  • Now in Arduino Code, you just need to change the TotalIC to 2 and as you have seen we have already multiplied it with 8 so now our for loop will move from 0 to 15.
  • Pin # 5 and 7 will simply connected to same pins of second shift register but DS will be connected to Q7' of first shift register.
  • Now get your hex file from Arduino software and if everything goes fine then you will get something as shown in below figure:
  • Now let's make it a bit more complex by adding 4 shift registers in parallel.
  • So, design a Proteus Simulation as shown in below figure:
  • We have followed the same principal, Q7' of second chip is connected to DS to 3rd chip and goes on.
  • I have placed these default Pins instead of connecting the wires, it works the same.
  • If this image is not clear then open it in new tab and zoom out to check the connections.
  • Now in your Arduino code, you need to change the TotalIC to 4, as now we are using four chips.
  • Get your Hex File and run Proteus simulation and if everything goes fine then you will get similar results:
  • So, that's How you can quite easily do the Arduino 74HC595 Interfacing and can increase Arduino outputs as much as you want.
  • You can download these Proteus Simulations along with code by clicking the below button:

[dt_default_button link="https://www.theengineeringprojects.com/ArduinoProjects/Arduino 74HC595 Interfacing.rar" button_alignment="default" animation="fadeIn" size="medium" default_btn_bg_color="" bg_hover_color="" text_color="" text_hover_color="" icon="fa fa-chevron-circle-right" icon_align="left"]Download Proteus Simulation & Arduino Code[/dt_default_button]

  • I have also designed this YouTube video to give you a better understanding of Arduino 74HC595 Interfacing:
So, that was all for today. I hope you have enjoyed this Arduino 74Hc595 Interfacing. If you have any questions, then ask in comments and I will try my best to resolve them. In my coming tutorial, I will show you How to increase the Arduino Input Pins. So stay tuned and have fun. :)

Sound Sensor Library for Proteus

Update: We have created a new version of this library, which you can check here: Sound Detector Library for Proteus V2.0.
Hello friends, I hope you all are doing great. In today's tutorial, I am going to share a new Sound Sensor Library for Proteus. We are presenting this library for the first time and I would give the credit to our team, without their support it won't be possible. Proteus doesn't have this module in its library and it is used in a lot of Engineering Projects these days. This sound sensor is used to detect the sound in the surroundings and is normally known as the Sound Detector sensor. It won't recognize the sound. As we can't produce the sound in Proteus, that's why we have placed a TestPin. When this TestPin is HIGH, that means we have sound in the surroundings and if it's LOW then there's silence. Analog sound detector sensors are also available but our sensor is a digital one. So, now let's have a look at How to download & simulate this Sound Sensor Library for Proteus:
Where To Buy?
No.ComponentsDistributorLink To Buy
1Arduino UnoAmazonBuy Now

Sound Sensor Library for Proteus

  • First of all, download the Library files for the sound detector sensor by clicking the below button:
Sound Sensor Library for Proteus
  • Open this downloaded zip file, and extract below three library files:
    • SoundSensorLibraryTEP.LIB
    • SoundSensorLibraryTEP.DLL
    • SoundSensorLibraryTEP.HEX
  • Place these three files in the Library folder of your Proteus software.
Note:
  • Now restart your Proteus ISIS software and in the components section, make a search for sound sensor, as shown in the below figure:
  • As you can see in the above figure, we now have 3 sound sensors in the Proteus database.
  • So, now I am gonna place all of them in my Proteus workspace and here's how they look like:
  • They are all similar in operation, I just changed the base color as there are different versions available.
  • Now in order to make them work, we have to add the hex file.
  • Double click the sensor to open its Properties panel and in the Program File section browse to SoundSensorLibraryTEP.HEX file.
  • We have placed this hex file in the Library folder, here's the screenshot:
  • Now click OK and our sound detector sensor is ready for simulation.
  • So, let's design a simple circuit to test it out, as shown in the below figure:
  • When the TestPin will get HIGH, that means we have sound in the surroundings. In that case OUT Pin will also go HIGH.
  • In case of silence, OUT Pin will remain LOW.
  • Let's run our simulation and test it out as shown in the below figure:
  • So you can see in the above figure that LED is ON when the TestPin is HIGH and its OFF when the TestPin is LOW.
  • So that's how you can detect sound in Proteus.
  • I have also created this video which will give you a better understanding of How to download and use this Sound Sensor Proteus Library.
I hope you will like this Proteus Library. If you have any suggestions regarding this Proteus Library then ask in the comments and we will try our best to resolve them. Thanks for reading. :)

Introduction to Arduino Duemilanove

Hey Fellas! Hope you are doing well. I feel pleasure to have you on this platform. Today, I'll discuss the detailed Introduction to Arduino Duemilanove which is a Microcontroller Board, introduced by Arduino.cc and is based on ATmega168 or ATmega328. It comes with 14 pins that can be used both ways: Input or Output. Duemilanove means "2009" in Italian. Arduino boards have always been a good pick for hobbyists and students who intend to design projects that are mainly related to embedded system and automation. These boards are similar to microcontrollers, with little advantage over them as they come with some built-in peripheral features, setting you free from buying external components to employ automation in your project. If we focus on Arduino Duemilanove, it incorporates an ICSP header, a power jack, a reset button, and USB connection. A 16 MHz crystal is added on the device, aiming to produce clock pulses with regular intervals. In this post, I'll try to cover each and everything related this Arduino Board i.e. main features, pinout, pin description, software used and applications. Let's jump right in.

Introduction to Arduino Duemilanove

Arduino Duemilanove is a Microcontroller Board that is based on ATmega168 or ATmega328.
  • It comes with 14 I/O pins, out of which 6 are used as a PWM output Pins.
This board is useful where low speed and memory space is required. You can not compare it with Arduino Mega that proves to an ideal choice for high-speed applications. Still, if you aim to produce a project with simple functions, Arduino Duemilanove comes handy and stands fit for your technical requirements. It is a most recent version of the board housing USB connection and can operate at 5V with an Input voltage ranging between 6 to 20 V, however, it is advised to keep the voltage range from 7 to 12 V.
  • The Flash Memory is different depending on the microcontroller incorporated into the board: 16 KB for ATmega168 and 32 KB for ATmega 328. Out of this total flash memory, 2 KB is reserved for a bootloader. 
Similarly, SRAM featured on the device is 1 KB  while using ATmega168 and 2 KB for ATmega328. 
  • This board can be powered up both ways: connecting with a computer using USB cable or using DC adopter.
A reset button is added on the device that helps in resetting the module in case there comes a glitch in a running program and module requires instant reset that brings it back to the initial condition.
  • There is a built-in LED connected to digital pin 13, toggling between ON and OFF as you send HIGH and LOW respectively.

1. Arduino Duemilanove Features

Features of any device help you make a final decision before buying it for your project. Following table shows the main features of Arduino Duemilanove.
Microcontroller ATmega168 or ATmega328
CPU 32-Bit ARM Chip
Digital I/O Pins 14
PWM Output 6 (out of 14 I/O pins)
Analog Input 6
Flash Memory (Program Memory) 16 KB for ATmega168 and 32 KB for ATmega 328
SRAM 1 KB  for ATmega168 and 2 KB for ATmega328
EEPROM 512 bytes for ATmega168 and 1 KB for ATmega328
Input Voltage 7-12 V
Operating Voltage 5 V
Oscillator up to 16 MHz
Software Used Arduino IDE
Reset Button Yes
ICSP Header Yes
USB Port 1
UART (Serial Communication) Yes
SPI Protocol Yes
I2C Protocol Yes
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
  • Three communication protocols available on the board will help in connecting the module with external devices.
  • There is a slight difference in the memory used in the module based on the controller incorporated on the board. Before you intend to buy the module, make sure your technical requirements are quite in line with the memory space available on the board.

2. Arduino Duemilanove Pinout

Following figure shows the pinout of this Arduino Board.
  • There are total 28 physical pins on the board and six pins are available on the ICSP header. Four female headers are available covering all physical pins for the connection with the external devices.

3. Arduino Duemilanove Pin Configuration

In the previous section, you have got a brief overview of the Arduino module pinout. Now, we will highlight the major functions associated with each pin, so you can anticipate what each pin is capable to perform, helping you use the relevant pin for your project.
Digital I/O Pins
There are 14 digital I/O pins on the board that can be used as an input or output based on requirement. If you are working with sensors, these pins can be made as an input to accept the digital input from the sensor, similarly, if you are aiming to control the motor, these pins are used as an output for writing the required command to control the motors.
Analog Pins
There are 6 analog pins available on the board. These pins can accept any value, unlike digital signals that are designed to deal with only two values: HIGH and LOW. The following figure shows the location of analog pins on the board.
PWM Pins
There are six PWM pins (out of 14 digital I/O pins) incorporated on the board. PWM (pulse width modulation) is a process for getting analog results with digital means. These pins appear on the right side of the board as you place the board with power jack pointing upward.  Following figure shows the placement of these pins on the board.
ICSP Header
ICSP (In-Circuit Serial Programming) header is added that help to connect the board with computer and upload a sketch in case USB port is not available.  This feature is mainly used to program Arduino with another Arduino.
Power Source Pins
There are four main voltage sources i.e. Vin, 5V, 3.3V, AREF, available on the board. The Vin is the input voltage that ranges between +7 to +12 V and comes from the external power source. The board operates at 5V while 3.3V is the operating voltage of each pin. There are four ground pins on the board where one is reserved for AREF and another for ICSP header while remaining two are available for the board. The AREF is an Analogue reference voltage, used for analog pins. The following figure shows the power source pins.
Communication Protocols

Common communication protocols like SPI, UART and I2C are available on the board. It is important to note that SPI communication is available on both: digital I/O pins and ICSP header pins.

Serial Peripheral Interface (SPI) is commonly used to send data between microcontrollers and small peripherals such as sensors, shift registers, and SD cards. It comes with separate clock and data lines, layered with a select line to choose the device for communication.

Similarly, I2C is a two-wire interface that contains two main lines known as SDA and SCL where former is s serial data line that carries the data and later is serial clock line that is used to synchronize all data transfers over the I2C bus.

4. Programming and Communication

Almost all modules falling under the Arduino family are programmed using  Arduino IDE - Official software introduced by Arduino.cc for programming Arduino Modules. This software is compatible with common operating systems like Windows, Linux or MAC.
  • You need to take care before installing the software version for your system i.e. if you want to download Arduino IDE App version, you must have Windows 10 installed in your system as app version is not compatible with Windows 7 or 8.1.
The software is very easy to use and is readily available on the Arduino Website. It is an open source software i.e. you can use it freely and modify your Arduino Board as per your requirements. Some basic codes are already available on the software, you just need to connect the board with the computer and upload the required program and start playing with your board right away.
  • Arduino never fails to keep your budget at the bare minimum as no external burner is required to burn the code inside the module due to Module's built-in bootloader, however, if you aim to insert a new controller on the module, you have to install the bootloader again using IDE software.
Arduino IDE comes with a number of options to select the required Arduino Board, simply go to Tools Menu and click Board section and select the board you are working on.
  • Software comes with a compilation option that allows you to see the code compilation on the bottom of the screen as you upload the code, generating a code hex file which then is transferred to the board.
The physical pin 0 and 1 are used for UART communication and FTDI  chip on the board sets a pathway to bridge the serial communication between FTDI drivers and USB. As you send the data using FTDI chip and USB connection, the RX and TX will flash, indicating information is being transferred to the computer.

5. Arduino Duemilanove Projects and Applications

Arduino Duemilanove comes with a wide range of applications and features a number of peripheral features. Following are some major applications it can be used for:
  • Student Projects
  • Industrial Automation
  • Health and Security Systems
  • Embedded Systems
  • Motor and Sensor Control
That’s all for today. I hope I have given you everything you needed to know about Arduino Duemilanove. However, if you are unsure or have any question you can comment in the section below. I’d love to help you in any way I can. You are most welcome to keep us updated with your valuable feedback and suggestions, they help us provide you quality work as per your needs and requirements. Thanks for reading the article.

Introduction to Arduino Leonardo

Hi Guys! Hope you are getting along with life pretty well. I always strive to keep you updated with most valuable information related to engineering and technology. Today, I'll discuss the detailed Introduction to Arduino Leonardo. It is a microcontroller board based on the ATmega32U4 and comes with 23 digital input/output pins. It is developed by Arduino.cc, aiming to provide easy to use interface with the ability to perform a number of functions on a single chip. It incorporates everything required to drive the automation in the relevant project. Simply connect this device with the USB cable or power it up using DC adapter and start playing with it In this post, I'll try to cover each and everything related to Arduino Leonardo, so you don't need to wrestle your mind browsing the whole internet and find all the information in one place. Let's dive right in and get down to the nitty-gritty of this tiny module.

Introduction to Arduino Leonardo

  • Arduino Leonardo is a microcontroller board developed by Arduino.cc. It is based on the ATmega32U4 and comes with 23 digital input/output pins that are enough to connect with external devices and turn your innovation into reality.
  • The Microcontroller on the board incorporates a built-in USB communication, setting you free from the use of a secondary processor. The USB communication helps Leonardo disguise the mouse or keyboard when it is connected to a computer.
  • The module supports the crystal oscillator with the frequency up to 16 MHz that is enough to generate clock pulses with decent pace required for the synchronization of all the internal operations.
In-circuit programming header is added in the device that gives you the flexibility to tweak the already written code after its installation in the relevant project.
  • This board supports common communication protocol like UART, SPI, and I2C. The UART is a serial communication protocol mainly used for transferring and receiving serial data using two pins called TX and RX.
While I2C is a two-wire interface that involves two main lines known as SDA and SCL where former is s serial data line that carries the data and later is serial clock line that is used to synchronize all data transfers over the I2C bus.
  • Serial Peripheral Interface (SPI) is a third communication protocol added on the board that is commonly used to send data between microcontrollers and small peripherals such as sensors, shift registers, and SD cards using separate clock and data lines, layered with a select line to pick the device for communication.

1. Arduino Leonardo Features

If you aim to work on your desired project, you must know the common features this device holds in order to avoid any hassle in future, getting you a clear idea if the ratings of the device are quite in line and stand fit for your project. Following table shows the main features of the Arduino Leonardo.
Microcontroller ATmega32U4
CPU 8-Bit
Digital I/O Pins 23
PWM Output 7
Analog Input 12
Flash Memory (Program Memory) 32 KB (Out of which 4 KB is used by bootloader)
SRAM 2.5 KB
EEPROM 1 KB
Input Voltage 7-12 V
Operating Voltage 5 V
Oscillator up to 16 MHz
Software Used Arduino Software (IDE)
Reset Button Yes
ICSP Header Yes
USB Port 1
UART (Serial Communication) Yes

2. Arduino Leonardo Pinout

Following figure shows the pinout of Arduino Leonardo.
  • USB jack, Power Jack and Reset button are quite in line with each other and are surfaced on one side of the board. Nonetheless, all components and pins on the board are designed in a regular pattern, giving a compact and symmetrical interface.

3. Arduino Leonardo Pin Description

You have got a clear idea about some of the basic functions of this Arduino Module. In this section, we will break down pinout of the board with different images and describe them in terms of pin description of the board. Let's get started.
Analog Pins
There are 12 analog pins added on the board. As per the nature of these pins, they can utilize any number of values, unlike digital signals that are designed to deal with only two values: HIGH and LOW. The following figure shows the placement of these analog pins on the board.
PWM Output
There are seven PWM pins available on the board. If you place the board with power jack pointing upward, these pins appear on the right side of the board. PWM is a process for getting analog results with digital means. You can see these pins in the figure below.
Communication Protocols

Three communication protocols including SPI, UART and I2C are incorporated on the board. You can see them on the figure below. It is important to note that SPI communication is not available on the digital I/O pins like other boards instead, it houses in the ICSP header as shown in the figure below.

Power Source
Difference power sources are available for a variety of purpose. Mainly, the board operates at 5V while 3.3V is the operating voltage of each pin. The Vin is the input voltage that ranges between +7 to +12 V. This voltage comes from the external power source. There are two ground pins on the board. The AREF is an Analogue reference voltage, mainly used for analog pins. The IOREF is useful for powering and developing a compatibility between this board and Arduino Shields. As the shield is connected with this pin, it (shield) wears the I/O voltage provided by the Board. The Shield using IOREF pin will be compatible with both 3V3 and 5V. You can see the power source in the figure below.
ICSP Header
ICPS stands for In-Circuit Serial Programming – A feature used for programming Arduino with another Arduino. ICSP header is added that helps in connecting the board with a computer for uploading a sketch in case USB port is not available.

4. Programming

  • Arduino.cc has introduced its own official software, called Arduino IDE, for programming the Arduino module. This software supports common operating systems like Windows, Linux or MAC. Before you download this software, make sure the required software version is compatible with your system i.e. if you aim to download App version, you must have Windows 10 installed in your system as app version is not compatible with Windows 7 or 8.1.
You are ready to use the software as you install it. Some simple LED programs are already available on the software, giving you the flexibility to start working on the board in due course.
  • No external burner is required to burn the code inside the module as it comes with a built-in bootloader. Having said that, if you intend to insert a new controller on the module, you need to install the bootloader again using IDE software.
The Serial Monitor is added in Arduino Software, that helps you see the code working in real time as you verify and upload the code.
  • Arduino IDE comes with a compilation option that allows you to see the code compilation on the bottom of the screen as you upload the code. It generates hex file of the code which then is transferred into the board.

5. Difference between Arduino Leonardo and Arduino Uno

There is a slight difference between these two boards in terms of controller used, number of digital pins, PWM pins, and the pins reserved for SPI communication.
  • Arduino Uno incorporates ATmega328 while Arduino Leonardo comes with ATmega32U4.
Similarly, Uno has 20 digital I/O pins, out of them 6 are analog input pins and Leo has 23 digital I/O pins, out of which 12 are analog input pins.
  • There are 7 PWM output pins available on the Leonardo and 6 are added on the Uno board.
Uno comes with SPI protocol on the digital I/O pins while Leonardo contains SPI communication on the ICSP header pins.

6. Arduino Leonardo Projects and Applications

You can not write off the importance of Arduino Modules if you are working on a project that comes with a remote connection with automation. Arduino Leonardo comes with a wide range of applications and incorporates a number of peripherals, setting you free from the hassle of spending too much for buying external components. Following are some major applications Arduino can be used for:
  • Industrial Automation
  • Health and Security Systems
  • Creating wireless keyboard
  • Automatic Pill Dispenser
  • Embedded Systems
  • Student Projects
  • USB Trackpad
  • Water Level Meter
That’s all for today. I hope you have got a lot of information regarding Arduino Leonardo. However, if you are unsure or have any question you can approach me in the comment section below. I’d love to help you the best way I can. You are most welcome to keep us updated with your valuable feedback and suggestions, they help us provide you quality work that resonates with your needs and requirements. Thanks for reading the article.

Introduction to Arduino IDE

Hey Guys! Hope you are doing well. Today, I'll discuss the detailed Introduction to Arduino IDE, where IDE stands for Integrated Development Environment - An official software introduced by Arduino.cc, that is mainly used for writing, compiling and uploading the code in almost all Arduino modules/boards. Arduino IDE is open-source software and is easily available to download & install from Arduino's Official Site.

In this post, I'll take you through the brief Introduction of the Software, how you can install it, and make it ready for your required Arduino module. Let's dive in and get down to the nitty-gritty of this Software.

Where To Buy?
No.ComponentsDistributorLink To Buy
1Arduino UnoAmazonBuy Now

Introduction to Arduino IDE

  • Arduino IDE is an open-source software, designed by Arduino.cc and mainly used for writing, compiling & uploading code to almost all Arduino Modules.
  • It is an official Arduino software, making code compilation too easy that even a common person with no prior technical knowledge can get their feet wet with the learning process.
  • It is available for all operating systems i.e. MAC, Windows, Linux and runs on the Java Platform that comes with inbuilt functions and commands that play a vital role in debugging, editing and compiling the code.
  • A range of Arduino modules available including Arduino Uno, Arduino Mega, Arduino Leonardo, Arduino Micro and many more.
  • Each of them contains a microcontroller on the board that is actually programmed and accepts the information in the form of code.
  • The main code, also known as a sketch, created on the IDE platform will ultimately generate a Hex File which is then transferred and uploaded in the controller on the board.
  • The IDE environment mainly contains two basic parts: Editor and Compiler where former is used for writing the required code and later is used for compiling and uploading the code into the given Arduino Module.
  • This environment supports both C and C++ languages.

How to Download Arduino IDE

You can download the Software from Arduino main website. As I said earlier, the software is available for common operating systems like Linux, Windows, and MAX, so make sure you are downloading the correct software version that is easily compatible with your operating system.

  • If you aim to download the Windows app version, make sure you have Windows 8.1 or Windows 10, as the app version is not compatible with Windows 7 or older version of this operating system.
  • You can download the latest version of Arduino IDE for Windows (Non-Admin standalone version), by clicking below button:
Download Arduino IDE

The IDE environment is mainly distributed into three sections

  1. Menu Bar
  2. Text Editor
  3. Output Pane

As you download and open the IDE software, it will appear like an image below:

The bar appearing on the top is called Menu Bar that comes with five different options as follow

  • File - You can open a new window for writing the code or open an existing one. The following table shows the number of further subdivisions the file option is categorized into.
  • As you go to the preference section and check the compilation section, the Output Pane will show the code compilation as you click the upload button.
  • And at the end of the compilation, it will show you the hex file it has generated for the recent sketch that will send to the Arduino Board for the specific task you aim to achieve.
  • Edit - Used for copying and pasting the code with further modification for font
  • Sketch - For compiling and programming
  • Tools - Mainly used for testing projects. The Programmer section in this panel is used for burning a bootloader to the new microcontroller.
  • Help - In case you are feeling skeptical about software, complete help is available from getting started to troubleshooting.

The Six Buttons appearing under the Menu tab are connected with the running program as follows.

  • The checkmark appearing in the circular button is used to verify the code. Click this once you have written your code.
  • The arrow key will upload and transfer the required code to the Arduino board.
  • The dotted paper is used for creating a new file.
  • The upward arrow is reserved for opening an existing Arduino project.
  • The downward arrow is used to save the current running code.
  • The button appearing on the top right corner is a Serial Monitor - A separate pop-up window that acts as an independent terminal and plays a vital role in sending and receiving the Serial Data. You can also go to the Tools panel and select Serial Monitor, or pressing Ctrl+Shift+M all at once will open it instantly. The Serial Monitor will actually help to debug the written Sketches where you can get a hold of how your program is operating. Your Arduino Module should be connected to your computer by USB cable in order to activate the Serial Monitor.
  • You need to select the baud rate of the Arduino Board you are using right now. For my Arduino Uno Baud Rate is 9600, as you write the following code and click the Serial Monitor, the output will show as the image below.
  • The main screen below the Menu bard is known as a simple text editor used for writing the required code.
  • The bottom of the main screen is described as an Output Pane that mainly highlights the compilation status of the running code: the memory used by the code, and errors that occurred in the program. You need to fix those errors before you intend to upload the hex file into your Arduino Module.
  • More or less, Arduino C language works similar to the regular C language used for any embedded system microcontroller, however, there are some dedicated libraries used for calling and executing specific functions on the board.

Arduino Libraries

  • Libraries are very useful for adding extra functionality into the Arduino Module.
  • There is a list of libraries you can check by clicking the Sketch button in the menu bar and going to Include Library.
  • As you click the Include Library and Add the respective library it will be on the top of the sketch with a #include sign. Suppose, I Include the EEPROM library, it will appear on the text editor as

#include <EEPROM.h>

  • Most of the libraries are preinstalled and come with the Arduino software. However, you can also download them from external sources.

Making Pins Input or Output

The digitalRead and digitalWrite commands are used for addressing and making the Arduino pins as an input and output respectively.

These commands are text sensitive i.e. you need to write them down the exact way they are given like digitalWrite starting with small "d" and write with capital "W". Writing it down with Digitalwrite or digitalwrite won't be calling or addressing any function.

How to Select the Board

  • In order to upload the sketch, you need to select the relevant board you are using and the ports for that operating system.
  • As you click the Tools on the menu, it will open like the figure below:
  • Just go to the "Board" section and select the board you aim to work on. Similarly, COM1, COM2, COM4, COM5, COM7 or higher are reserved for the serial and USB board. You can look for the USB serial device in the ports section of the Windows Device Manager.
  • The following figure shows the COM4 that I have used for my project, indicating the Arduino Uno with the COM4 port at the right bottom corner of the screen.
  • After correct selection of both Board and Serial Port, click the verify and then upload button appearing in the upper left corner of the six-button section or you can go to the Sketch section and press verify/compile and then upload.
  • The sketch is written in the text editor and is then saved with the file extension .ino.

It is important to note that the recent Arduino Modules will reset automatically as you compile and press the upload button the IDE software, however, the older versions may require the physical reset on the board.

  • Once you upload the code, TX and RX LEDs will blink on the board, indicating the desired program is running successfully.
Note: The port selection criteria mentioned above are dedicated to Windows operating system only, you can check this Guide if you are using MAC or Linux.
  • The amazing thing about this software is that no prior arrangement or bulk of the mess is required to install this software, you will be writing your first program within 2 minutes after the installation of the IDE environment.

Arduino Bootloader

  • As you go to the Tools section, you will find a bootloader at the end.
  • It is very helpful to burn the code directly into the controller, setting you free from buying the external burner to burn the required code.

When you buy the new Arduino Module, the bootloader is already installed inside the controller. However, if you intend to buy a controller and put it in the Arduino module, you need to burn the bootloader again inside the controller by going to the Tools section and selecting the burn bootloader.

That's all for today. I hope I have given you everything you needed to know about Arduino IDE. If you are unsure or have any questions, you can ask me in the comment section below. I'd love to help you the best way I can. You are most welcome to keep us updated with your valuable feedback and suggestions, they help us provide you quality work so you keep coming back for what we have to offer. Thanks for reading the article.

Introduction to Arduino Micro

Hey Guys! Hope you are getting along with life pretty well. Welcome you onboard. Today, I'll unlock the details on the Introduction to Arduino Micro. It is a Micro board, based on the ATmega32U4 microcontroller and comes with built-in USB, making it easily compatible with the computer. Arduino Micro, as the name suggests, is the smallest board in the Arduino Community. It is comparable to its counterparts like Arduino Nano and Arduino Promini. In this tutorial, I'll discuss each and everything related to Micro board including its main features, pinout, pin description, the software used and applications. Let's dive in and explore everything you need to know about this tiny board.

Introduction to Arduino Micro

  • Arduino Micro is the smallest board in the Arduino Community and is mainly based on the ATmega32U4 microcontroller.
  • It contains a built-in USB on the tiny easy to integrate interface, that helps in laying out a prompt connection with the computer.
  • Don't get into the illusion of performing complex functions that require more memory space, as this little toy comes with flash memory around 32 KB while EEPROM and SRAM are 2.5 KB and 1 KB respectively, still enough to wet your technical appetite.
  • The maximum length and width of the Micro PCB are 4.8cm and 1.77cm respectively, however, with the attached USB port the dimensions will slightly be larger than the given parameters, exceeding from the edge of the PCB layout.
  • Breadboard compatibility makes this device easy to use for getting a hands-on experience before incorporating it in the relevant project with all prerequisites.
  • You can download Arduino Micro Datasheet by clicking below button:
Download Arduino Micro Datasheet
  • The ATmega32U4 microcontroller available on the board features UART communication with TX and RX pins.
  • The Micro board incorporates resettable poly-fuse that that is mainly used for securing computer's USB ports from shorts and overcurrent by providing an extra layer of protection.
  • If the current escalates from the required value to the USB port, the fuse will jump in and work as an emergency switch, breaking the connection between the board and computer. It is advised to keep the provided current to the USB port under 500mA.

1. Arduino Micro Features

If you are aiming to pick this Arduino module for your relevant project, it is advised to get a hold of its features in order to avoid any hassle in future. The following figure shows the main features of Arduino Micro.
Microcontroller ATmega32U4
CPU 8-Bit
Digital I/O Pins 24
PWM Output 7
Analog Input 12
Flash Memory (Program Memory) 32 KB
SRAM 2.5 KB
EEPROM 1 KB
Input Voltage 7-12 V
Operating Voltage 5 V
Oscillator up to 16 MHz
Software Used Arduino Software (IDE)
Reset Button Yes
ICSP Header Yes
USB Port 1
UART (Serial Communication) Yes
  • Serial communication along with SPI and I2C communications are available on the board. The physical reset button is added that helps to stop the running function and puts the controller in the initial condition from where it takes and implements the stored information from scratch.

2. Arduino Micro Pinout

Following figure shows the Arduino Micro Pinout diagram.
  • You may have heard, at times, tiny things work wonders. Same is true with this module. It is nothing but a technical peripheral device with a number of features laid out and housed in one package.
  • Still, as I have mentioned earlier, it operates perfectly if you plan to design the simple project that requires less memory space. Arduino Due and Arduino Leonardo are preferred to meet your technical needs if your project requirements are complex and require more memory space in order to design and drive automation in the relevant project.
  • The built-in USB communication on the board removes the need for a secondary processor and helps it to appear to a connected computer as a keyboard and mouse, in addition to a virtual (CDC) serial / COM port.

3. Arduino Micro Pin Description

Until now, you have got a brief overview of this device and how this module can be a good fit for your project. In this section, I'll discuss the pin description with images, you can easily grab the idea what are the major functions associated with each pin. Let's get to the point.
Analog Input
There are 12 analog inputs on the board. You can see them in the figure below.
Communication Protocols
Communication protocols like serial, SPI and I2C are incorporated on the board. You can see them highlighted on the figure below.
PWM Output
Seven pins are used for PWM output purpose. It is a process for getting analog results with digital means. You can see PWM in the figure below.
Power Source
The 5V is a voltage at which board operates while 3.3V is the operating voltage of each pin. The Vin is the input voltage that ranges between +7 to +12 V and is a  voltage from the external power source, not from a USB port. There are two ground pins on the board. The AREF predicts the Analogue reference voltage that helps to inject the Arduino a reference voltage from an external power supply. You can see the power source in the figure below.
External Interrupt
PCINT are the external interrupts generated on any digital I/O pin. The following figure shows the pins on which external interpret can be generated.
ICSP Header Pins
ICPS head is added on the board and it stands for In-Circuit Serial Programming - A feature used for programming Arduino with another Arduino. And if USB port is not available, it comes out handy for connecting the board with a computer for uploading a sketch.

4. Programming

  • Arduino Software, called IDE, is mainly used for programming the Arduino module and it works perfectly with common operating systems like Windows, Linux or MAC. You can download it from the Arduino site and it is compatible with all versions in the Arduino family.
  • You are ready to use the software as you install it. Some simple LED programs are already available on the software so you can easily start working on the board and compile the default program with the intention you are getting the results on the fly.
  • Built-in bootloader that comes with the board lets you off the hook from wresting your mind for compiling and burning the code using the external burner.
  • Micro board features a serial peripheral interface (SPI) that is mainly used in the communication between the microcontroller and other peripheral devices such as shift registers and sensors. Two pins are used for SPI communication i.e. MOSI (Master Output Slave Input) and MISO (Master Input Slave Output) - they are used for sending and receiving the data by the microcontroller.
  • The Serial Monitor is added in Arduino Software, that plays a vital role in transmitting textual data to or from the board.
  • The TX and RX pins are used for serial communication where TX pin transmits the serial data while RX receives the serial data.
  • The board is capable to perform I2C communication using two pins called SDA and SCL.

5. Difference between Arduino ProMini and Arduino Micro

  • There is a little difference between Arduino ProMini and Micro board, however, peripherals on these boards are same.  The built-in USB in the Micro board proves to be a candid difference between two modules while Promini requires FTDI cable in order to generate USB power and communication to the board.
  • The USB on Micro board can act as a number of ways: Keyboard or mouse, USB hard drive, USB to serial Converter and MIDI controller.
  • The Arduino Pro Mini incorporates ATmega328 microcontroller while Arduino Micro comes with ATmega32U4. Flash memory is the same on both modules however, SRAM differs slightly with 2KB on the ProMini and 2.5 KB on the Micro board.
  • Last not least, the Arduino Pro Mini features 2 hardware interrupts while the Micro board comes with 5 hardware interrupts.

6. Arduino Micro Projects and Applications

Arduino micro comes with a wide range of applications with the ability to groove in hard to reach places. It offers a high number of connections with a minimum interface. The outstanding ability of this board to disguise keyboard or mouse while connected with a computer makes it an ideal choice for many computer applications. You can use this board for the development of the following projects.
  • USB Joystick
  • Electric Bike
  • Windows PC lock/unlock application
  • Creating wireless keyboard
  • Automatic Pill Dispenser
  • USB Trackpad
  • Water Level Meter
There is a list of projects you can create but I have mentioned a few of them to give you an idea what this tiny thing can help in designing a product ranging from embedded, automation to computer applications. That's all for today. I hope I have given you everything you needed to know about Arduino Micro. However, if you are unsure and consider something is left unsaid, making it difficult for you to grab the basic idea, you can approach me in the comment section below. I'd love to help you the best way I can. Keep your feedback and suggestions coming and help us create a quality content as per your needs and requirements. Thanks for reading the article.

Introduction to Arduino LilyPad

Hi Friends! Hope you are doing well. Today, I'll give you a detailed Introduction to Arduino LilyPad. It is an Arduino Microcontroller Board, based on ATmega168/ATmega328 and is introduced by Leah Buechley and SparkFun Electronics.

This board is mainly developed for e-textiles and wearables projects. As per the designed purpose, it can be attached to fabric, sensors, power supplies, and actuators. You may need a conductive thread for joining this board with the required object.

In this post, I'll try to cover each and everything related to Arduino LilyPad, what is this about and how it is used for the development of desired projects. Let's jump right in and get down to the nitty-gritty of this board.

Where To Buy?
No.ComponentsDistributorLink To Buy
1Arduino LilypadAmazonBuy Now

Introduction to Arduino LilyPad

  • Arduino LilyPad is an Arduino Main Board that is mainly designed for e-textiles and wearables projects and is based on the Atmega168/Atmega328 microcontroller.
  • LilyPad is nothing but an Arduino-programmed microcontroller and works similar to other Arduino boards available.
  • It comes in a round shape unlike other Arduino boards so that it could fit easily in wearables.
  • However, the ability of this board to be sewn down with the fabric or sensor through conductive thread puts it ahead and stands out of the boards available in the Arduino community.
  • There are 22 wide open pin-holes, appear around the edge of the whole rounded shape that is mainly used for the connection with the fabric and sensor through a conductive thread.
  • Out of these 22 pinholes, one is reserved for +5V, and one for ground.
  • The LilyPad Arduino incorporates 6 analog inputs that can also be used as digital I/O. They are marked as A0 through A5 on the board, providing 10 bits of resolution. It is important to note that, the analog inputs measure from ground to 5 volts, however, the upper end of their range can be modified using the analogReference() function.
  • The board contains 14 digital pins that can be employed as an input or output, using pinMode(), digitalWrite(), and digitalRead() functions.
  • Like other boards in the Arduino, this Pad is programmed by Arduino IDE - an official software mainly used for programming the Arduino Boards, that is developed by Arduino.cc
  • The board comes with a wide voltage range and operates anywhere between 2.7 V to 5.5 V. The pins on the board come with the ability to control and handle the input or output of the attached device.
  • There are two ways to keep your Pad null and void: increase the operating voltage above 5.5 V or plug the power in reverse order.
  • As I mentioned earlier bootloader is used for storing the code and burning it on the board, however, you can also bypass the bootloader and program the ATmega328 using ICSP (In-Circuit Serial Programming) header.

Arduino LilyPad Features

Following are the main features of the Arduino LilyPad.
Microcontroller ATmega168 or ATmega328V
Digital I/O Pins 14
Analog Input Channels 6
PWM Channels 6
Crystal Oscillator 8 MHz
Flash Memory 16 KB (of which 2 KB used by bootloader)
Bootloader Memory Out of 16KB in the Flash Memory, 2KB is reserved for Bootloader
SRAM1 KB 1 KB
EEPROM 512 bytes
Operating Voltage 2 to 5 V
DC Current per I/O Pin 40 mA
Internal pull-up resistor 20 kO

Arduino LilyPad Pinout

  • Arduino Lilypad Pinout is shown in the below figure:
  • There is a candid difference between external interrupt pins and PCINT pins. Former is the dedicated hardware pin used for generating the interrupt while later is the interrupt that can be created on any digital I/O pin.
  • There are 6 PWM tabs on the board, shown by the dashed lines on the pinout image above. These PWM pins can also be used as digital I/O pins.

How to program Arduino LilyPad?

You can layout the LilyPad connection by following the given steps.
  • Be careful while connecting the power and ground pins of the board. The +5V power must be connected to the positive tab on the board and the ground tab of the board should be connected to the ground of the power source. The reverse connection can cause severe damage to the board and in a worst-case scenario, your board may stop working all at once.
  • There are two ways to generate a regulated +5V power source: Using a +5V pin of the Mini USB Adapter or employing another 2.7-5.5V power source using a Lithium rechargeable battery.
The following figure shows the LilyPad connection with Mini USB Adapter:
  • You can see the two circular tabs on the board marked as TX and RX that are mainly used in two ways: For uploading new sketches to the board and establishing a serial communication with other devices.
  • Apart from using your own power supply, you can also use Mini USB Adapter or Arduino NG board for connecting the Pad with the computer.

The following figure shows the connection of the Arduino UNO with LilyPad:

Note: Don't forget to remove the ATmega8 or ATmega168 from the NG before connecting it with the LilyPad. You can use alligator clips and jumper wires for connecting the +, -, TX and RX tabs on the LilyPad with the corresponding pins on the NG board.

Applications

  • LilyPad is really very handy for e-textile and wearable products, because of its small size.
  • Arduino Lilypad is used in IoT products and embedded projects as well.
  • The circular tabs covering the whole Pad at the edge are mainly used for the connection between Pad and wearable products.

That's all for today. I hope this read has succeeded in grappling your attention and resonated with your field of interest. If you are feeling dubious in any area of the information related to the Pad that I have left unfolded, you can approach me in the comment section below. I'd love to help you according to the best of my expertise. Keep visiting us for valuable information related to engineering and technology. Thanks for reading the article.

How to use pinMode Arduino Command

Hi Friends! Hope you are doing well. In this post, I'll uncover the details on How to use pinMode Arduino Command. The pinMode defines the Arduino Pins, if they are used as an input or output. The INPUT_PULLUP is another option achieved by pinMode, that is mainly used to place a virtual pull-up resistor to the input pins. We have started Arduino Tutorials for Beginners quite a while now for the newbies, who are really interested to get a hands-on experience with Arduino. Generally, Arduino is known as a Microcontroller, but it is a step ahead of it. The PIC microcontrollers require some basic circuit to start with but Arduino brings revolution in the automation industry by removing the need of developing any basic circuit. Although Atmega328 is the Microcontroller used in Arduino UNO. Also, the burner is required to burn the program in PIC Microcontrollers, while there is no need to connect separate burner with the Arduino - simply plug it with the computer through a USB cable and start playing with it. In this tutorial, we will thoroughly discuss what is pinMode and how to use it in the Arduino module. Let's jump right in and explore what is this about and everything you need to know.

How to use pinMode in Arduino

  • The Arduino Board comes with GPIO (general purpose input output) pins that can be used in two ways i.e. input, output.
  • pinMode Arduino Command is used to define the operation of these Input/output pins, there are three types of modes that can be assigned using this command and are named as:
    • OUTPUT.
    • INPUT.
    • INPUT_PULLUP.
  • There are 14 digital and 6 analog pins in the module that mainly depend on the pinMode for setting up their mode of operation as an input or output.
  • In this post we mainly discuss the Arduino UNO, that is based on ATmega328 microcontroller, however, you can use other modules like Pro Mini, Mega or Leonardo as per your needs and requirements. The pinMode works same in the module no matter what type of Arduino version you are using.
Syntax for pinMode Arduino
Here's the syntax for our pinMode Arduino command:

pinMode(pin#, mode);

where:
  • Pin defines the Arduino pin number used.
  • There are three types of modes that can be assigned to pins of Arduino, which are:
    • OUTPUT
    • INPUT
    • INPUT_PULLUP
Let's use Pin # 8 of Arduino and assign all possible modes to it:

pinMode(8, OUTPUT);

pinMode(8, INPUT);

pinMode(8, INPUT_PULLUP);

Note: 
  • It is important to note that, unlike most of the functions used in the C code for Arduino module, this pinMode doesn't store or return any value.
  • You have to use any one of these three modes at a time.
Modes of pinMode Arduino
  • In the previous section, we have discussed the basic syntax of pinMode, and I hope you have pretty much got the basic idea behind it.
  • The only thing worth mentioning here is the difference between INPUT and INPUT_PULLUP.
  • So, here's a simple code where I have made Pin # 8 as an INPUT and read its status on Serial Monitor.
int Pin = 8;

int Status = 0;

void setup()
{
  Serial.begin(9600);
  pinMode(Pin, INPUT);          
}

void loop()
{
  Status = digitalRead(Pin);       
  
  if(Status == HIGH)
  {
    Serial.println("HIGH");
  }

  if(Status == LOW)
  {
    Serial.println("LOW");
  }
 
}
  • Let's have a look at the Serial Monitor:
  • While taking the above image, Pin # 8 was in open state and we are getting just random values.
  • We are getting these random values i.e. HIGH, LOW because our Pin#8 is neither connected to +5V nor GND.
  • Arduino seems confused here, and we can remove this confusion by simply changing INPUT to INPUT_PULLUP.
  • As we run the Serial Monitor, we will get something shown below:
  • You can see how we are getting HIGH value only, while the pin is still in open state.
  • We can conclude, when we have nothing on our INPUT pin then INPUT_PULLUP will make the pin HIGH.
Difference between Read and Write
There are two ways to send or receive data. You can either define the pin as an input that helps in reading the data from an external device like sensors. Or you can define pin as an output that helps in writing and sending a command to LEDs, motors or actuators for executing the desired functions. That's all for today. I hope you have found this post informative as per your needs and requirements and can easily use this pinMode Arduino Command. If you are feeling skeptical or have any question, you can ask me in the comment section below. I'll try and help you according to the best of my expertise. Thanks for reading the article.

Introduction to Arduino Due

Hey Fellas! I am back to give you a daily dose of useful information. Today, I'll uncover the details on the Introduction to Arduino Due. It is a microcontroller board based on Atmel SAM3X8E, 32-Bit ARM microcontroller. It is developed by Arcuino.cc with the intention to provide an easy pathway for the beginners to get a hands-on experience with the module without any prior technical knowledge. You can just plug the device into the computer through a USB cable and start playing with it right away. Arduino Modules are a step ahead of a single microcontroller. If your project is mainly based on a microcontroller, you need to buy external peripherals and connect them with the controller in order to lay out an automation into your project. Arduino Boards has made things easy more than ever before. Although, more or less, they are known are microcontrollers, they have a leg over them because of built-in peripherals and an ability to perform a number of functions on a single chip. Also, no external burner is required for Arduino, as it comes with a built-in burner. You just have to write and compile the required code into the Arduino Software and burn in the module through a single click on the computer. In this post, I'll cover each and everything related to Arduino Due i.e. its main features, pinout, pin description, compilers used and applications. Let's get down to the nitty-gritty of this tiny module and explore everything you need to know.

Introduction to Arduino Due

  • Arduino Due is a microcontroller board that is mainly based on Atmel SAM3X8E (32-Bit ARM microcontroller). It is a big module as compared to Arduino Nano or Arduino Uno and comes with more number of pins and memory space as compared to them.
  • It contains 54 digital that can work both ways: input or output. Out of these digital pins, 12 can be used to generate PWM outputs.
  • This module contains everything in bulk required for the automation project including 12 analog inputs, and 4 UARTs serial module.
  • I was floored when I came to know this module comes with clock frequency around 84 MHz. Yes, you heard that right. The splendid oscillator will help in processing speed grow skyrocket.
  • Two USB ports are available where one is used as a programming USB Port while other is Native USB Port. Don't you worry, I'll make it clear the difference between them. Just follow along.
  • Most of the Arduino Boards run at 5 V but this module is an exception that operates at 3.3V. The pins incorporated on the cannot withstand voltage higher than this. Doing so can drastically affect the board performance and can make your pins null and void.
  • JTAG is added on the board that is mainly used for testing the physical connection between the onboard pins.
  • The Arduino Due can be programmed using a common Arduino Software (IDE), that is compatible with all Arduino boards and can work both ways: online and offline.
  • This module incorporates 2 DAC (digital to analog), 2 TWI, a power jack (you can power up the device by connecting it with a computer through USB cable or using this power jack), an SPI header reset button, an erase button and reset button. Bunch of functions, making your task easy.
  • As per the voltage constraint, Arduino shields that operate at 5V are not compatible with this Due module. However, the shields that come with Arduino R3 layout work efficiently including Arduino WiFi shield and Ethernet Shield as they operate at 3.3V.

1. Arduino Due Features

You have got a brief overview of the device. I have compiled the main features of this device at one place. Following table shows the main features of Arduino Due.  
Microcontroller Atmel SAM3X8E ARM Cortex-M3
CPU 32-Bit
Digital I/O Pins 54
PWM Output 12
Analog Input 12
Flash Memory (Program Memory) 512 KB
SRAM 96 KB (two banks: 64 KB and 32 KB)
Operating Voltage 3.3V
Input Voltage 7-12 V
Manufacturer Arduino.cc
Oscillator up to 84 MHz
Software Used Arduino Software (IDE)
Reset Button 1
Erase Button 1
DAC (Digital to Analog Converter) 2
UART (Serial Communication) 4
SPI Communication Yes
TWI (I2C Communication) 2
Arduino Shield Compatibility Yes (that operate at 3.3V)
USB (2) Programming USB (1) Native USB (1)
Power Jack 1
JTAG Header 1
DC current for 3.3V 800mA
Total DC output current on all I/O lines 130mA

2. Arduino Due Pinout

Now, you have got a hold of the main features of this module. In this section, I'll highlight the pinout of the chip. Following figure shows the pinout of Arduino Due.  
  • I know it is quite overwhelming and difficult to digest at one glance, but don't you worry I have broken it down in the pin description with images.

3. Arduino Due Pin Description

The function associated with each pin will help you understand the purpose of each pin in the relevant project they can be used for. Following table shows the description of each pin.
Digital I/O Pins 54 There are 54 digital I/O pins, out of which 12 can be used as PWM outputs.
Analog Pins A0 to A11 These pins are used for an analog pins on the board. They are 12 in numbers.
Digital to Analog Converter DAC0, DAC1 Two digital to analog converter with 12bit resolution.
Erase Button 1 Erases the information by holding down this button
Reset Button 1 Resets the board
External Interrupts Digital I/O Pins All 54 pins can be used for generating an external interrupt
UART 4 Board comes with 4 pairs of TX and RX serial pins for laying out serial communication. These pins include (A9,A8), (D4,D5), (A13,A12), (A11,A10)
SPI Serial Peripheral Communication (MOSI, MISO, SCK, RESET) Pin used (A26, A25, A27, Reset)
TWI Two Wire Interface (2 module) There are two I2C communication incorporated on the board with pins at A18, A17, B13, B12
CAN Interface 2 CAN (Controller Area Network) Interface is used for communication between controllers. Pins include
Power Source +5V, +3.3V, GND and Vin +5V- Connected to 5V +3.3V (Operating Voltage) Vin- Input Voltage - Connected to +7V to +12V (recommended) GND - Connected to Ground
  You have got clear about the functions associated with each pin. Now, I'll highlight the functions of each pin with images, making it easy for you to look at the information without much hassle.
Digital I/O Pins
Arduino Due comes with four ports named PORTA, PORTB, PORTC, and PORTD. There are 54 digitals I/O pins. The pins with PINK color on the pinout mention above are used as digital I/O pins.
Analog Pins
There are 12 analog pins on the board. They are a part of PORTA and PORTB and appear on the board as follow.  
USB Ports and Power Jack
There are two USB ports available on the board where one is programming USB port and other is native USB port. Both ports can be used for programming purpose, however, the native port also acts as a USB host for connected peripherals like keyboards and smartphones. There is one power jack on the board for powering up the device.
UART
There are four UART channels added on the board. They are used for the serial communication with the external devices where TX is the Serial Transmit Pin while RX is the Serial Receive Pin. They appear on the board as follow.
TWI
There are two TWI (Two Wire Interface) modules incorporated on the board, also known as the I2C protocol, and are used to establish the communication between low-speed devices like ADC and DAC converters and microcontrollers. It is a two wire communication and comes with two lines: Serial Clock (SCL) and Serial Data (SDA). The former is a clock signal that is used to synchronize the data transfer between the devices while the later is used to hold the desired data.
PWM Output
Out of 54 digital pins, 12 are used for PWM output. They appear on the board as follow.
JTAG Header
JTAG header is a remarkable addition in the board that most of the board lack in the Arduino Community. It is a common hardware interface that sets a pathway to communicate directly with external chips on a board. It was introduced by the Joint (European) Test Access Group with the intention of testing the physical connections between pins on a chip. It comes with fours pins known as TCK, TMS, TDI, and TDO. This header incorporates on the board as follows.
Reset and Erase button
There is one reset and one erase button is added on the device. Former is used to reset the controller while later is used to erase the stored information on the board. They appear on the board as follow.
Power Source
There are four power sources mentioned as 5V, 3.3V, Vin and Ground. The 3.3V is the operating voltage of each pin while Vin is the input voltage with the recommended voltage range of 7V to 12V. You can power the controller with Vin or 5V. These voltage sources appear on the board as follow.
4. Programming and Communication
  • Almost all Arduino Boards can be programmed by Arduino Software called IDE. It is easy to use and a common person with no prior technical can learn the software without much difficulty. It is readily available, just download the software and select the board you aim to work on. As I mentioned earlier, no external burner is required to burn the code into the controller. Arduino software works perfectly with common operating systems like Windows, Linux or MAC.
  • This module comes with a bunch of communication protocols to communicate with external devices. The UART is useful for setting up a serial communication. One serial module is okay, right? Wrong. There are four of them, giving you the flexibility to establish serial communication with more than one devices. Serial library in the software is mainly used for the serial communication between board and external devices.
  • The Serial Monitor is a remarkable addition in Arduino Software, mainly used for transmitting textual data to or from the board.
  • The TX and RX pins incorporate an LED on each pin that flashes as the data is transmitted.
  • Two Wire Interface is also included in the device that comes with two lines SDA and SCL. There are two TWI channels available on the board. Arduino Software Wire Libary is used to access the TWI bus.
  • Arduino Due comes with a serial peripheral interface (SPI) that plays a vital role in the communication between the microcontroller and other peripheral devices such as shift registers and sensors. There are two pins used for SPI communication i.e. MOSI (Master Output Slave Input) and MISO (Master Input Slave Output). The former is used for receiving the data while later helps in sending data by the microcontroller.

5. Difference between Arduino Due and Arduino Mega

There is a vital difference between both modules in terms of operating voltage, memory space, number of pins and processing speed. Arduino Due can perform the functions with greater pace as compared to Arduino Mega. More powerful built-in peripherals and more memory space put Arduino Due ahead of Mega. However, there are some limitations. Arduino Due is not compatible with the 3.3V devices, also, SAM3Xchip provides a complex and intimidating interface that can scare the hell of the person who is practicing this module very first time. It is advised to work with a smaller module like Arduino Uno in the start, and as you get a solid grip on the module, you can move to the complex interface.

6. Arduino Due Applications

Arduino Due is a little bit bulky, covers large space and is used in a wide range of applications where fast processing speed is the end result. Following are the main applications of the board.
  • Industrial Automation
  • Home and Security Systems
  • Virtual Reality Applications
  • Android Applications
  • GSM Based Projects
  • Embedded System
That's all for today. I hope I have given you everything you needed to get started with this module. If you are still living in doubt, you can approach me in the comment section below. I'll guide you the best way I can. Your feedback and suggestions are the piece of nuggets for us, on which we generate and shape our content - so keep that coming. Thanks for reading the article.

Rain Sensor Library for Proteus

Hello friends, I hope you all are doing great. In today's tutorial, I am going to share a new Rain Sensor Library for Proteus. I have got a lot of requests for designing this sensor. So finally it has been designed by our team and is ready to use in your Proteus Simulations. Rain Sensor, as the name shows, is used for detection of rain and is common sensor used in Embedded Systems Projects. Both analog and digital rain sensors are available these days but we have only designed the digital Rain Sensor. It will give digital output and its output will be HIGH when there's rain and will remain LOW if it won't detect any rain. As Proteus is a simulation software and we can't actually bring the rain so that's why I have placed a TestPin. If you apply HIGH to this TestPin then that's means there's rain and if TestPin is LOW then it will give LOW output and will show there's no rain. So, now let's have a look at How to download and use this Rain Sensor Library for Proteus:

Rain Sensor Library for Proteus

  • First of all, download this Rain Sensor Library for Proteus, by clicking the below button:
Rain Sensor Library for Proteus
  • You will get a zip file so extract it and you will find these three Library Files in it:
    • RainSensorsTEP.LIB
    • RainSensorsTEP.IDX
    • RainSensorsTEP.HEX
  • Now place these Library files in the Library folder of your Proteus software.
Note:
  • Now restart your Proteus software if its already open.
  • In the components search box, make a search for rain sensor as shown in below figure:
  • I have designed these two rain sensors so now place both of them in your workspace.
  • If everything goes fine then you will get something as shown in below figure:
  • So now we have to add the hex file in our sensor, so I am gonna use the Rain Sensor Blue and will double click it to open its Properties Panel.
  • In the Properties Panel, you have to find the Program File section.
  • In the Program File, browse to RainSensorsTEP.HEX File and select it.
  • We have download this file and placed it in the Library folder of our Proteus software.
  • Here's the screenshot of my Properties Panel of Rain Sensor:
  • Now after adding the Hex file, click OK to close the Properties Panel.
  • Your rain sensor is now ready to be used in your Proteus Simulation.
  • So, let's design a simple circuit to have a look at How this Rain Sensor works in Proteus.
  • Here's the screenshot of my simple Rain Sensor simulation in Proteus:
  • I have attached LogicState to TestPin and LED on the output.
  • As I have explained earlier that we can't bring rain in the Proteus software, that's why I have placed a TestPin.
  • So, now when TestPin is LOW that means there's no rain and when you change the TestPin to HIGH then sensor will detect rain.
  • I have run my simulation and here's the output:
So that was all for today. If you got into any trouble then ask in comments and I will help you out. Thanks for reading. Take care. :)
Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir