In this video, we’re going to take a look
at the latest version of the Arduino Nano,
the Nano every board. We will be taking a
close look at the board so if you’re only
interested in getting up and running with
the Arduino IDE then feel free to skip ahead
to the time shown on screen.–
The Arduino Nano has been a very popular board
for a while now as it balances performance
with a compact form factor. It is based on
the ATmega328P microcontroller which itself
is pretty dated so this refresh has been overdue.
The first thing to note is that the new board
costs less than half of the original board
and at 8 EUROs it would not make much sense
to even buy a clone. The board does have a
lot of components for the price, and we will
be taking a look at these a little later.
Here’s what the box contains and if you
look closely, you will notice that the board
does not have the pin numbers on the top,
like the original board but instead these
are at the bottom. This would certainly be
a problem if you will be soldering the header
pins and using it with a breadboard as you
have no direct reference available while wiring
your projects. I was hoping the box would
include a pinout card like this but sadly,
it doesn’t contain one and you will have
to use the image from the website for now.
The good thing is that the board has no components
on the reverse and this means that you can
solder it directly onto a PCB or even stripboards
like these. Before we take a closer look at
the board, let’s take a look at the specs.
The Nano every uses the ATmega4809 microcontroller
which is the same one contained in the WiFI
version of the UNO. Here’s how it compares
with the Atmega328P. The new board runs faster
at 20MHz, it has more FLASH at 48KB, along
with 3 times the SRAM or static RAM at 6KB.
It does have only 256bytes of EEPROM compared
to the 1KB in the ATMega328P but this should
be OK as most applications that need that
type of storage will tend to use an external
memory chip anyway. Both devices support the
regular SPI, TWI and
USART modules though the Nano every has two
hardware serial ports which we will talk about
later.
The nano every also has a new power supply
that uses a much more efficient DC-DC converter
that can handle inputs upto 21V. As per the release information, it can also
deliver current up to 950mA without generating
excessive heat, that’s definitely a major step up from
the linear, low drop out voltage regulators
that were previously being used.
The new board is pin compatible with the old
one and the team have taken additional steps
to ensure that old sketches work with the
new board as we will see once we take a look
at the IDE. The new microcontroller also has
something called configurable custom logic
or CCL which is pretty interesting as it introduces
you to a bit of hardware programming and logic
as well. I’ve not yet seen any arduino libraries
or examples that show you how to use this,
so please leave a comment if you know of any.
There is an application note released which
talks about this and I have seen an article
which explains how to do this using Atmel
studio, but that’s not going to be useful
in the Arduino ecosystem. This type of programmable
hardware in microcontrollers has been around
for a while and it allows you to carry out
certain functions using hardware instead of
software and this not only saves CPU cycles
but it also allows you to execute the operations
at a much faster rate compared to using software.
Granted, the ATmega4809 has a very limited
scope and the application note simply talks
about creating logic gates etc. Either way,
this will be a nice addition once there’s
more support for it in the Arduino ecosystem.
Before moving on to the IDE, let’s take
a closer look at the board. As always, you
can download the schematic and layout from
the Arduino website if you want to follow
along. It contains a total of 4 layers, which
is not surprising given the single sided design
and size of the board. The board can be powered
through microUSB and we have a chip that consists
of ESD protection diodes. The board uses a
Schottky diode for USB voltage and 5V isolation
so expect a slight drop at the 5V output when
you power it over USB, as seen here.
We then have the main microcontroller the
ATmega4809 which is pretty standard and operates
at 5V. As usual, we have a user LED and a
reset button connected to the microcontroller
along with some passives. The main controller
does not have a clock source and it uses the
internal 20MHz low power oscillator. It uses another microcontroller the
SAMD11 to take care of USB to serial conversion
as well as programming and that’s the next
biggest chip on the board. This too uses an
internal clock source but it operates at 3.3V
which is a bit interesting. Due to the difference
in logic levels, the board uses two MOSFET
chips to take care of level shifting. A total
of 3 signals are shared between the two microcontrollers
– UPDI is used for programming and debugging
while the Tx and Rx pins are used for serial
communication to the host PC. The board also
contains two LEDs that are connected to the
serial communication lines between the microcontrollers
and this will indicate any activity along
those lines.
Lastly, we have the power supply section which
is made up of two chips. First we have the
MPM3610 which is a DC-DC step down or buck
converter that can take an input of upto 21V
and deliver a max current of 1A. This is the
5V power supply that powers the main controller.
The advantage of a DC-DC converter like this
is efficiency and this means that the board
will not generate excessive heat when large
amounts of current are drawn from the 5V power
supply rail. The MPM3610 has a very low external
component count, with most of the capacitors
and inductors contained within which reduces
the design complexity and also saves space.
We then have the AP2112 low drop out regulator
that provides the 3.3V power rail. This is
primarily used for the SAMD11 and can supply
a maximum current of about 600mA. Do keep
in mind that this is still a linear regulator
which means that you would have to worry about
heat if you end up drawing a lot of current
from the 3.3V output. But overall, for a board
that only costs 8 euros, it does contain a
lot of components.
It’s now time to look at the software side
of things and I’m using the latest Arduino
IDE version, that’s version 1.8.10. First
we need to install some software so that the
Arduino IDE has everything it needs to communicate
with the board. If you plug in the board,
you should automatically see a prompt like
this but if not, then simply open up the boards
manager and type in megaAVR to find the relevant
core and install the latest version.
Once this is completed, you should be able
to select the right board and do also make
sure that you have selected the right COM
port.
The tools menu has another option available
that’s call ed the Registers emulator and
here’s why it’s included. As mentioned
before, the Arduino UNO and Nano originally
used the ATmega328 microcontroller which is
different from the one in this new board and
a lot of 3rd party libraries have been developed
which support the older chip. These 3rd party
libraries tend to make use of the low-level
registers contained in the microcontroller.
The registers contained in the new chip are
different compared to the old ones and this
causes a problem. If you were to select the
ATMEGA328 option then the Arduino IDE would
carry out additional tasks to try and support
these older register definitions to make it
compatible with the new microcontroller. In
simple terms, think of it as a bridge that
allows your old sketches to work with the
new board.
This does add a bit of an overhead to
the process, so you might expect some delays
and perhaps some issues with certain libraries
and that’s why it’s recommended that you
turn off the emulation if you don not need
it. Let’s open up the blink example and
upload it to the board. The sketch seems to
upload fine but I do get a warning as seen
here. I’ve looked this up online and apparently,
it appears to be safe to ignore this. Perhaps
this would be taken care in further updates.
Let’s change the delay and make sure we
can still upload the sketch. Rightly so, it
works as expected. Writing sketches for this
new board should otherwise be very similar
to the Arduino boards and we will be using
this one for most of the module interfacing
videos from now on.
Let’s talk about serial ports before we
end this video. The ATmega328P only supported
one hardware serial port and this was used
to communicate to the Arduino IDE as well
as things like GPS modules and sensors. Many
a times this would give rise to issues, particularly
when uploading sketches and it was common
to use a software serial port when needed.
A software serial port is not as efficient
as a hardware serial port but it does help
get the job done when needed.
The ATmega4809 contained in the Nano every
has a total of 4 serial ports as per the datasheet
but only two are currently supported by the
Arduino libraries. I’ve come across this
post which explains how you can use the other
hardware serial ports by modifying some files.
The two serial ports are definitely better
than one and it allows you to communicate
to the PC while also communicating with external
hardware. This means that you can also use
the board as USB to serial converter if you
want to – much like the older FTDI boards.
There’s already an example sketch that will
help you do this and we are going to take
a look at it next.
Head over to the Arduino IDE and open up the
serial passthrough example. This sketch defines
and uses two serial ports – serial and serial1.
Serial is the port that talks to the Arduino
IDE through the USB to serial converter – in
our case, the SAMD11. Serial1 is the second
serial port that is connected to pins 0 and
1 on the board. This sketch takes the data
from one serial port and forwards it across
to the other, hence the reason it is called
pass through. Let’s upload and test this.
We can send data from the serial monitor and
this will pass through the SAMD11, into the
first serial port and then out from the second
serial port. The easiest way for us to confirm
this is by placing a jumper across pins 0
and 1. This way, the data will be sent back
into the second serial port, through the microcontroller,
out of the first serial port, through the
SAMD11 and ultimately makes it’s way back
to the serial monitor over a USB cable. The
message we send will get echoed back as can
be seen here. This is a common loop-back test
that is very useful during troubleshooting.
That’s pretty much it for this video. We
will be using this board in future module
interfacing videos and we will also be reviewing
the three other boards shortly, so do subscribe
to stay notified. Thanks for watching and
I will see you in the next one.
