You are on page 1of 28

Welcome!

Thank you very much for purchasing our AZ-Delivery Microcontroller Board
with ATMega328. On the following pages, we will introduce you to how to use
and setup this handy device.

Have fun!

1
Table of Contents

Introduction 3
Specifications 4
Features 5
Communication interfaces 12
Power pins 13
Voltage limits 14
Voltage Input Limits 14
Voltage limits on I/O pins 15
Current output limits 16
Installation of the Arduino IDE 17
Additional Setup 21
Sketch Examples 22
Application example 25

2
Introduction

This handy microcontroller board is designed for learning electronics or


prototyping and programming. This board is actually a microcontroller,
but assembled in such a way that you don't need any extra components
with it. If you use a single microcontroller, you will need to build a stable
DC power supply, and external programmer, and reset circuit, and many
other things. The most powerful thing about this microcontroller board
compatible is that there is Arduino IDE (Integrated Development
Environment) with endless number of code examples already written for
it in a way that everyone can understand. There is no need for you to
learn the inner workings of the onboard microcontroller in order to
program it. Just connect your microcontroller board via USB cable to your
PC, install and start the Arduino IDE, find and upload the programs you
need to your board and you're ready to go. There are endless examples
of code and libraries already written online, just search for them. There
are also numerous other boards, like shields, or many sensors built in a
way that you can easily connect them to your microcontroller board. Just
search our online store at az-delivery.de and you'll find more than you
need.

3
Specifications

Operating voltage 5V
Input voltage 7-12V
Microcontroller ATmega328P
Digital I/O Pins 14 (6 provide PWM output)
PWM Digital I/O Pins 6
Analog Input Pins 6
DC Current per I/O Pin 20mA
DC Current for 3.3V Pin 50mA
Flash Memory 32KB (0.5KB used by bootloader)
SRAM 2KB (ATmega328P)
EEPROM 1KB (ATmega328P)
Clock Speed 16MHz
Dimensions 70x55x13mm(2.7x2.1x0.5in)

4
Features

This microcontroller board contains the main microcontroller ATMega328P


with 16MHz crystal oscillator. It uses CH340 chip to make communication like
USART serial interface but over USB. The CH340 chip connects the USB port of
the PC with the USART serial port of the microcontroller, allowing the
microcontroller to be programmed via the USB port.

5
The AZ-Delivery microcontroller board has DC voltage regulators for both +5V
and +3.3V. The external DC power supply can be connected to the DC power
socket on the board with a voltage range from 7V to 12V, and the voltage
regulators will lower and stabilise it to the +5V and +3.3V.

6
This microcontroller board is designed to separate the digital I/O pins from the
analogue input pins. So there are 6 analogue input pins and 14 digital I/O pins
separated. 6 of the 14 digital I/O pins can be used as PWM (Pulse Width
Modulation) outputs. These pins are labelled with a tilde sign "~" (D3, D5, D6,
D9, D10 and D11).

Digital I/O pins 0 and 1 are connected to the receive and transmit lines of the
USART serial interface. These digital I/O pins cannot be used as digital inputs or
outputs because the serial interface is used each time a new program is
uploaded to this microcontroller board.

7
Connections for these analogue and digital pins on these boards are made by
female or male headers (as shown in the figure on the previous page).

8
This microcontroller board has an on-board RESET button for the main
microcontroller, an ISCP connector for external programming of the
ATMega328 using another programmer, and four on-board SMD LEDs.
One LED is lit when a connection is established between this board and the
power supply. One LED is connected to digital I/O pin 13 and the other two are
connected to the receive and transmit lines of the USART serial interface and
flash when these lines are in use.

9
The AZ-Delivery microcontroller board has 2 additional pins, SDA and SCL,
which are connected to pins A4 and A5 respectively. These pins (A4 and A5)
are used in I2C interface communication (another name for it is: TWI - Two
Wire Interface).

This handy board also provides 3 additional 4 pin headers. The connectors are
shown in the picture below:

10
11
Communication interfaces

The digital I/O pins D0 and D1 have alternative functions. They are connected
to the receive and transmit lines of the serial interface.
There are two other communication interfaces supported by the ATMega328P
microcontroller, Serial Peripheral Interface - SPI and Inter-Integrated Circuit
Interface - I2C (or TWI - Two Wire Interface).

For SPI interface, digital I/O pins D10, D11, D12 and D13 are used. Their
functions are SS, MOSI, MISO and SCK respectively.

The I2C interface uses the analogue input pins A4 and A5 or two additional pins
SDA and SCL. Their functions are SDA and SCL.

12
Power pins
Power pins from right to left:

VIN - This is the power input pin, it serves as another external power supply for
the main microcontroller when it is not powered from the USB port GND -
GrouND, 0V
GND - GrouND, 0V
5V - voltage output, +5V
3.3V - voltage output, +3.3V
RES - RESET, drive this pin LOW (connect to GND) to reset the main
microcontroller.
5V - This pin is called IOREF and serves as a voltage output, actually it is a
voltage reference pin for external boards (or shields) connected to the
ATmega328p board. It tells shields what logic level the board is working on
(+5V for ATmega328p).
- Last pin has no connection (NC)

13
Voltage limits

Voltage Input Limits

Input Power: To power this microcontroller board, either connect it to a USB


port, or use an input power source from the DC power jack or via the power
pins header going to the VIN pin. When the ATmega328p is powered from the
DC power jack or VIN pin, it has the following input voltage limitations:

Recommended input voltage limits (DC power jack): 7-12V. These input
voltages can be maintained indefinitely.

Absolute voltage limits for powering the microcontroller: 6-20V


Below 7V may cause the 5V levels on the board to waver, fluctuate or sag,
resulting in board instability and less accurate analogue readings when using
analogueRead().

Sustained voltage levels above 12V will cause additional heating of the board's
linear voltage regulator, which may cause it to overheat. Short periods are fine.

14
Voltage limits on I/O pins
If you need to read the voltage on the digital or analogue input pin of this
board, make sure it is between 0 and 5V. If it is outside these limits, the voltage
divider can be used to reduce the voltage. This will scale the input voltage and
allow analogue or digital readings of voltages that would otherwise be out of
range. If the input signal is digital and there is no need to take scaled analogue
readings, another technique is to clip the input voltage rather than scale it.
Since AVR microcontrollers have internal clamping diodes, this can be done by
simply adding a single resistor in series with the pin. By adding a 10kΩ resistor
in series with the input pin (any input pin), input voltages as low as -10.5V or as
high as +15.5V can be achieved.

15
Current output limits

The maximum total current drawn by these boards when powered from a USB
port is 500mA. These boards have a resettable polyfuse to protect your
computer's USB ports from short circuits and overcurrent. The maximum total
current draw when powered from an external power supply is 1A.

Note: When not powered by USB, the total 5V current coming out of the
ATmega328p is limited by the on-board voltage regulator, in this case it cannot
exceed 1A.

The maximum total current per input/output pin is 40mA.

The sum of the currents from ALL input/output pins together is 200mA!

Note: Despite the fact that your board's voltage regulator may allow up to 1A
to be drawn from the 5V and GND pins, the sum of all currents flowing into or
out of the input/output pins (all analogue and digital pins combined) of the
ATMega328P microcontroller itself should not exceed 200mA.

16
Installation of the Arduino IDE

You can download the free Arduino IDE development environment from the
following link: https://www.arduino.cc/en/Main/Software

Windows users should definitely use one of the first two download options for
the Arduino IDE. The "Windows App" version from the Windows Store will
cause connection problems especially when using third party board definitions.

After starting the Arduino IDE installation file "arduino-1.X.X-windows.exe" the


license conditions of the software must be read and accepted:

17
In the next step, different options can be selected for installation.

A brief overview of the different options follows, with a brief explanation of


each option:

Option Erklärung

18
Install Arduino Software Installs the Arduino IDE - This option can not
be deselected
Install USB Driver Installs USB drivers for various other
microcontrollers. These are not required to
use the software with the D1 mini, but we
strongly recommend installing them if you
also use other microcontrollers
Create Start Menu shortcut Creates a shortcut in the Windows Start menu
(optional)

Create Desktop shortcut Creates a shortcut on the workstation


(Optional)

Associate .ino files Creates a filename extension for files with the
extension .ino and links it to the Arduino IDE

Finally, the destination folder must be specified. The installation requires about
500MB of free disk space.

Click "Install" to start the installation.

19
After successful installation, the installation program can be closed via the
"Close" button:

20
Additional Setup

To use the AZ-Delivery microcontroller board with the Arduino IDE, follow a
few simple steps. Before setting up the Arduino IDE, the driver for the USB to
Serial communication chip (CH340) must be installed. If the driver is not
installed automatically, there is a support page that contains the drivers for
Windows/Mac or Linux and can be selected depending on which one you are
using. The drivers can be downloaded from the following link.

21
Sketch Examples

When you open the Arduino IDE, the example is called an empty sketch. A
sketch is a program example in which the code is written. It has two main
parts, setup() function and loop() function, and it can have any number of
other functions as well.

The setup() function is called only once, at the beginning of the programme,
after powering up the board, or when the board is reset. In this function setup
does all the initialisations, for example declaring the state of the digital
input/output pins, or setting up the analogue input pins, or setting up the
serial interface for serial communication, etc.

loop() function runs after setup() and it runs indefinitely, over and over again,
so called endless loop function. In fact, it runs all the time the board is
powered up. This is because programs in electronic devices should never reach
the end, because if that happens, the device is as good as switched off. This is
where the logic is written, the algorithms on which the application for the
ATmega328p board works.

22
When the AZ-Delivery microcontroller board is connected to the PC via USB
cable, the first thing to do in the Arduino IDE is to select the USB port to which
our microcontroller board is connected.

Then select the microcontroller board that is used.

23
24
Application example

Now you can start programming. The Arduino IDE comes with many pre-
written sketch examples that you can use. Here we will use the BLINK sketch
example. Go to File > Examples > 01.Basics > Blink.

25
A new window will open with a new sketch example:

What this sketch does is to turn an on-board LED connected to digital

26
I/O pin 13 (D13) ON for one second and then OFF for one second. This
turning on and off is called flashing, hence the name of the sketch.

When you are finished programming, compile the code and upload it
to your microcontroller board by pressing the upload button.

The onboard LED should then start flashing at one second intervals.

Now it's time to learn and create your own projects. You can do that with the
help of many sample scripts and other tutorials that you can find on the Internet.

27
If you are looking for the high-quality products for Arduino and Raspberry Pi,
AZ-Delivery Vertriebs GmbH is the right place for you. You will receive
numerous application examples, complete installation instructions, eBooks,
libraries and support from our technical experts.

https://az-delivery.de

Have Fun!

Impressum

https://az-delivery.de/pages/about-us

28

You might also like