arduino due pinout,arduino due pins,arduino due adc,arduino due dac pins

Arduino DUE for Beginners Leave a comment

[otw_is sidebar=otw-sidebar-1]arduino due pinout,arduino due pins,arduino due adc,arduino due dac pinsIn this post I will discuss about the Arduino DUE for Beginners.which is a very unique Arduino microcontroller development board among the family of the Arduino boards. In the previous articles I have discussed about the Arduino UNO, MEGA, NANO, PRO MINI, MICRO and others. Each Arduino development board has something unique but also shares a lot of features. Arduino DUE is quite unique in its specifications.

After reading this article the reader will be able to learn about the basics of the Arduino DUE, hardware and schematics design of DUE, applications and specifications of the Arduino DUE. So sit back, keep reading and enjoy the show.

[otw_is sidebar=otw-sidebar-2]

Arduino DUE:

Arduino Due like other Arduino microcontroller boards is the open-source microcontroller development board which is based on Atmel SAM3X8E ARM Cortex-M3 microcontroller. SAM3X8E is a member of a family Flash microcontroller based on the 32-bit ARM Cortex M3 RISC processor. Arduino Due is the first Arduino microcontroller development based on the 32-bit ARM core microcontroller. Arduino DUE resembles in structure to the Arduino MEGA and also shares some of the features but of course is unique as development boards are based on different microcontrollers. Arduino DUE has 54 digital input / output pins out of which 12 are PWM (Pulse Width Modulation) enabled. It has 4 UARTS (Universal Asynchronous Receiver Transmitter), 2 I2C (Inter-Integrated Circuit) computer buses and 4 SPI (Serial Peripheral Interfaces) computer buses. Arduino DUE has 12 analog inputs which are actually the inputs of the ADC (Analog-to-Digital Converter) inside the microcontroller. One interesting feature of the Arduino DUE which makes it stand apart among other Arduino microcontroller boards is the frequency at which it operates. The Arduino DUE operates at the surprising clock frequency of 84 Mega Hertz. Another important feature to note is that the microcontroller on which the Arduino DUE is based has built in USB and Ethernet MAC interface which eliminates the need of additional chip or hardware for USB and Ethernet based communication. However one needs to connect the Ethernet PHY (Physical Layer) to the Arduino DUE before setting the network Ethernet communication. The discussion on the Ethernet PHY is out of the scope of this post but I will come to this point later in my next post. The Arduino DUE looks like the one in the following image:

[otw_is sidebar=otw-sidebar-3]

 

Arduino DUE Board,Arduino DUE pinout,Arduino DUE pins,Arduino DUE port

Arduino DUE for Beginners:

 

Note from the above image that the Arduino DUE has two USB ports mounted on board. One of the USB port mentioned as programming USB port is used for uploading the code into the Arduino DUE microcontroller and the other USB port mentioned as Native USB port is used for serial communication. With the help of this Native USB port the Arduino DUE can act as the USB host. The detailed discussion on this point will follow later in the article.

Arduino Integrated Development Environment (IDE):

[otw_is sidebar=otw-sidebar-3]

In the post on the Arduino UNO we learned that the Arduino UNO can easily be programmed using the Arduino IDE. The Arduino DUE can also be programmed in the similar way; that is the programming of the Arduino DUE is not different from that of the Arduino UNO, however it should be kept in mind that Arduino DUE has different number of pins and different pin configuration. The care should be taken while configuring the Arduino DUE pins. As most of you might have known that in order to program a microcontroller one need to write the code in the editor, and then compile that code in the compiler after which you get the HEX file of that code and later upload that HEX file in the microcontroller IC using another program. In case of Arduino all these steps are performed in single software which is called the Arduino IDE. By integrated Development Environment it means that all the steps that editor, compiler, burner are integrated in the same software. In short Arduino DUE is quite easy to program it is just a matter of few clicks. It is important to note here that the board type should be selected before uploading the code that is before uploading the code from Arduino IDE one need to select the board to which he / she is intended to burn the program. From tools select board as Arduino DUE otherwise the error will occur and your board would not get programmed. One last thing worth noting here is that one should use the Programming USB port one that is closer to the Power for uploading the code in the Arduino DUE as it is the recommended port. Although the Arduino DUE can also be programmed with the help of the native port but you stick to the Programming port. I will go through in detail about how to write a code and upload it in Arduino DUE later in the post.

 

Arduino DUE Features:

Let us now learn some of the common specifications of the Arduino DUE microcontroller development board.

  • Microcontroller IC:                        AT91SAM3X8E.
  • Operating Voltage:                        3.3 Volts
  • Input Voltage:                                 6 to 16 volts.
  • Digital I/O Pins:                               54 (of which 12 provide PWM (Pulse Width Modulation) output).
  • Analog Input Pins:                         12
  • Analog Output Pins:                      2 (DAC, Digital to Analog Convetrer)
  • Total DC Current on all I/O Pin:    130 mA.
  • DC Current for 3.3V Pin:                800mA.
  • DC Current for 5V Pin:                  800 mA
  • Flash Memory:                               512 kilo Bytes all available for user applications.
  • SRAM:                                             96 kilo Bytes (two banks: 64Kilo Bytes and 32 Kilo Bytes).
  • Clock Speed:                                   84 Mega Hertz.

Note from the specifications that Arduino DUE differs a lot from the Arduino MEGA.

 

 

Arduino DUE Pinout:

Let us now dive into the discussion about the pinout of the Arduino DUE. As described earlier that the Arduino DUE is based on the AT91SAM3X8E microcontroller IC so it follows that the pinout of the Arduino DUE is simply that of the AT91SAM3X8E microcontroller but note here that the Arduino DUE has its own nomenclature for its pins and here I will use the nomenclature used by the Arduino DUE for pin reference.

arduino due pinout,arduino due pins,arduino due adc,arduino due dac pins

As pointed out earlier that the Arduino DUE has total 54 Digital Input / Output pins. The digital Input / Output pins can receive a digital signal or transfer a digital signal. Out of these 54 Digital Input / Output pins 12 are PWM (Pulse Width Modulation) enabled, the PWM phenomenon and its applications will be discussed later in the post and some digital pins can also be configured as SPI (Serial Peripheral Interface) computer bus. The Arduino DUE also has four UART with Rx and Tx signals on pin number 0, 15, 17,19   and 1, 14, 16 ,18 respectively that are used for serial communication. There are two I2C (Inter-Integrated Circuit) interfaces. The headers on the other side of the Arduino DUE bear the voltage pins and the Analog pins. There are total 12 analog pins on the Arduino DUE. Unlike Digital pins these pins can just act as Input pins that is these pins can only receive analog signal and cannot provide signal or voltages that is why they are called Analog inputs. These analog inputs are actually the inputs of the Analog to Digital Converter inside the ATMEGA 328 microcontroller. These pins can be connected to the output of the analog sensors. Six different analog sensors can be connected to the Arduino DUE simultaneously.

[otw_is sidebar=otw-sidebar-2]

  • Arduino DUE spi pins
  • Arduino DUE i2c pins
  • Arduino DUE dac
  • Arduino DUE led pin
  • Arduino Due Interrupt Pins

 

The third header of the Arduino DUE bears the voltage pins that are used to power up the Arduino DUE board, these pins are also used to deliver power from the Arduino DUE board to other peripheral devices or the sensors attached to the Arduino DUE microcontroller development board.

Let us now discuss in detail the digital Input / Output pins, Analog input pins and Voltage pins of the Arduino DUE.

Arduino DUE Digital Input / Output Pins:

As described in the previous section that the Arduino DUE has total 54 digital input / output pins out of which 12 input / output pins are PWM enabled. Some of these Digital Input / Output pins can also serve as the SPI (Serial Peripheral Interface) computer bus. The detailed description is shown in the following figure:

The function that the digital input / output pins perform depends upon the coding of the Arduino DUE. The Arduino DUE has a separate header bearing the SPI (Serial Peripheral Interface) bus signals. It is also important to note here that the Digital Input / Output pins are called as Input / Output because either they can be used as Input in which case they are intended to receive the signals from sensor or transducer (digital) or they can be used as Output in which case they drive the actuators such as relays.

Arduino Due vs Mega

 

The functionality of the Digital Input / Output pins as either Input or Output is determined by the code also. It is important to realize here that digital input / output pins can only supply a limited amount of current which is not sufficient to drive the motors or relays therefore we need to use drivers such as stepper motor driver or L298 DC motor driver. I will come to the coding of the Arduino DUE later in this post. Another point worth mentioning is that 12 out of the 54 digital input / output pins are PWM enabled pins that are these pins can provide PWM (Pulse Width Modulation) signal as output. These PWM pins find applications in which we need to regulate something for example the speed of the motor or brightness of the lamp.

Before concluding this section it is important to note that SPI interface is present on the ICSP header and has no connection on the Digital Input / Output pins as in the case of the Arduino UNO. Another important thing to mention here is that the Digital Input / Output pins of the Arduino DUE can operate at 3v3 thus any voltage higher than this can damage your DUE and also note from the features of the Arduino DUE that the DC current available per pin is far less then as compared to other Arduino microcontroller development boards.

[otw_is sidebar=otw-sidebar-3]

Arduino DUE Analog Pins:

As pointed earlier that the Arduino DUE has 12 analog pins which are actually the inputs of the ADC (analog to digital converter). These analog pins are input only that is they can only be used to read the analog signal or voltage and cannot drive the signal outwards. With the help of these pins the Arduino DUE can read analog signals from six different analog sensors. A variety of analog sensors are available in the markets which are used to measure different physical phenomenon for example LDR (Light Dependent resistor), Flex sensor etcetera.

Arduino DUE PWM Pins:

Let us now discuss the PWM pins of the Arduino Ethernet in some detail. As mentioned in the previous section that the Arduino DUE has 12 PWM pins which are numbered as 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 and 13. These digital pins can deliver the PWM signal as output. The PWM is the abbreviation of the Pulse Width Modulation and it is a phenomenon in which we adjust the width of the pulse according to the requirement of the applications. For example if one needs to regulate the speed of the motor or the brightness of the lamp this can be achieved by varying the width of the PWM signal. The power delivered by the PWM signal is the average of the signal for which it is zero and for which it is maximum. If the width of the PWM signal for which the signal remains HIGH is greater than more power will be delivered and thus reducing the width will cause the reduction in the power delivered. The width of the PWM signal for which the signal remains HIGH during its time period is referred to as the Duty Cycle of the PWM signal. The PWM pins are also used to control the angular position of the Servo motors.

Arduino DUE Schematics:

[otw_is sidebar=otw-sidebar-3]

The schematic design of the Arduino DUE is comparatively complex as compared to other Arduino microcontroller development boards and also differs a lot from them. The complete schematic of the Arduino DUE is as shown in the following figure:

Arduino DUE Schematics,Arduino DUE circuit diagram

 

Arduino DUE Schematics smdLet us come to the point of two USB ports. Note from the schematics that the programming USB port is actually due to the ATMEGA16u2 controller which acts as the bridge between the USB and Serial Port that is UART of the microcontroller. Whereas the Native USB port is basically the USB port built in the microcontroller IC.

Arduino DUE Applications:

Before discussing the programming language of the Arduino DUE let us first know the applications of the Arduino DUE for motivation.  So basically the Arduino DUE can be used in any system that requires the microcontroller. Some of the embedded systems in which the Arduino DUE can be used are listed below:

  • IR remote based Home Automation System.
  • Bluetooth controlled Home Automation System.
  • IoT enabled Home Automation System.
  • Auto Intensity Control of Street Lights.
  • Mobile lifter.
  • Hurdle Avoiding Vehicle.
  • Wall climbing vehicle.
  • Autonomous vehicle.
  • Robotic arm.
  • Parking lot Counter System.
  • Emergency Lighting.

Arduino DUE programming language:

One of the perks that make Arduino DUE quite popular among the hobbyists and beginners is it’s easy to use programming language and programming. The programming language used by the Arduino DUE is the C++. The Arduino DUE IDE has a well-defined function for each task that is easy to remember. As an example the function that specifies the Arduino DUE digital Input / Output pin to work as input is:

pinMode(12,INPUT);

Here in this function there are two arguments. First argument is the pin number which we want to make input or output and second argument specifies the property that is input or output to the pin number used. The detailed discussion on programming the Arduino DUE will come later in the next posts.

That is all for now I hope this post would be helpful for you. In the next post I will come up with more interesting topics. Till then stay connected, keep reading and enjoy learning.

 

Leave a Reply

Your email address will not be published. Required fields are marked *