Elektroda.com
Elektroda.com
X

Arduino NANO Every, review, launch, tests, how to, and.... problems

TechEkspert 16578 32
This content has been translated flag-pl » flag-en View the original version here.
  • Arduino NANO Every, review, launch, tests, how to, and.... problems
    New Arduino board NANO Every uses a microcontroller ATMega4809 AVR, compared to the previous version nano where it was used ATmega328 . On the Every version PCB you won't find a quartz resonator, due to the clock signal generator built into the microcontroller up to 20MHz. We get more flash memory - 48KB, more RAM - 6KB, and less EEPROM - 256B, input voltage range 6-21V board. USB communication is provided by ARM ATSAMD11D14A. The NANO Every version works with 5V voltage levels as in the previous nano version. The PCB allows soldering glodpin connectors, or surface mounting (SMT) on a larger board (like many RF modules). Pin descriptions are available on the bottom side of the board, which may not be convenient e.g. on a breadboard. The version 1.8.9 of Arduino environment was used for tests with the module.

    Arduino NANO Every, review, launch, tests, how to, and.... problems
    Arduino NANO Every, review, launch, tests, how to, and.... problems

    To start working with NANO Every, we launch the boards manager:
    Tools-> board-> boards Manager
    We search for "every" and choose the package: Arduino megaAVR Boards by Arduino.

    Arduino NANO Every, review, launch, tests, how to, and.... problems

    In the sketch, we choose the Arduino NANO Every board, and the COM port (emulated on USB), which appeared after connecting the board:
    Arduino NANO Every, review, launch, tests, how to, and.... problems

    We will also find the option of emulating the ATmega328P registers, was it a announcement of possible compatibility problems?
    Arduino NANO Every, review, launch, tests, how to, and.... problems

    At the beginning a simple communication test with the board and test LED flashing - the test was successful:
    Code: c
    Log in, to see the code


    Preliminary tests showed problems with running TimerOne, MsTimer2 libraries, or attempts to manually modify the T0, T1, T2 timer registers known from the Arduino nano version, e.g. the OCR1A register, etc. Personally in Arduino Nano, I got used to timers that allowed deterministic triggering of interrupts , time measurement, pulse counting or waveform generation.

    If you compare iom328p.h and iom4809.h files located in the directory:
    \ Arduino-1.8.9 \ hardware \ tools \ avr \ avr \ include \ avr
    it turns out that in ATMega4809 we have a different set of registers available, including RTC registers:
    http://ww1.microchip.com/downloads/en/AppNotes/TB3213-Getting-Started-with-RTC-90003213A.pdf

    The NANO Every version has 5 PWM outputs (in the previous nano version 6 PWM outputs were available), the difference is for the D11 output - no PWM in the Every version.

    In the NANO Every version we will also find more settings regarding ADC reference voltage:
    https://www.arduino.cc/reference/en/language/functions/analog-io/analogreference/

    Let's try to do something more complicated, get SD card and save samples from the analog input, see if there is any problem with library compatibility. We will use RTC interruptions to collect samples from ADC periodically. We have more RAM available, so we will use two buffers alternately filled with data from the ADC, and then saved to a file on the SD card. In this way, a voltage value recorder at the ADC input will be created, with data saved to a file on the SD card. We will sample the voltage quite slowly, 256 times per second. One of the available reference voltages "INTERNAL4V3" was chosen for the test, so we can record voltages in the range 0-4.3V, with a theoretical resolution of 10b.

    The board works with 5V, so we need an SD card adapter matching voltage levels and providing 3.3V power for the card.
    We connect the SD card pins with the module pins:
    CS - D10
    DI - MOSI
    DO - MISO
    SLCK - SCK

    Arduino NANO Every, review, launch, tests, how to, and.... problems

    Code: c
    Log in, to see the code


    Sine wave voltage 10Hz 4.3Vpp conected to input A0, and the data was stored in the file on the SD card, this can be visualized e.g. in the audio program Audacity. We can import raw data (16bit, big-endian, 1 channel). After standardization you can see a sine wave:

    Arduino NANO Every, review, launch, tests, how to, and.... problems

    A simple system for recording voltage changes works:

    Arduino NANO Every, review, launch, tests, how to, and.... problems

    Built-in RTC encouraged me to connect the ENC28J60 and try to synchronize time via Ethernet using NTP, unfortunately the UIPEthernet library did not want to work with NANO Every board.

    Sumary: an interesting and cheap module using a new microcontroller, which was created after the fusion of Atmel and Microchip. We get new possibilities, but alsocompatibility problems with the previous version of nano. On the PCB we can find a USB<->UART converter, which after changing the firmware can become another HID USB device. The new form of the board allows you to mount module SMT without goldpins. We will see if Arduino environment will be developed to get compatibility of NANO Every with previous nano model, or if new versions of libraries have to be created and we can't transfer the code from nano to NANO Every.

    What do you think of Arduino NANO Every?

    Arduino NANO Every, review, launch, tests, how to, and.... problems
    Do you have a problem with Arduino? Ask question. Visit our forum Arduino.
    About Author
    TechEkspert
    Editor
    Offline 
    TechEkspert wrote 4622 posts with rating 3759, helped 12 times. Been with us since 2014 year.
  • #2
    szymon122
    Level 38  
    TechEkspert wrote:
    Built-in RTC encouraged me to connect ENC28J60 and try to synchronize time via Ethernet using NTP, unfortunately the UIPEthernet library did not want to work with the NANO Every board.

    328 register simulation did not help?
  • #3
    TechEkspert
    Editor
    The problem is that it didn't work, even a little disappointing, but I give this CD a chance, we'll see what time it brings.
    More and more questions about these incompatibilities: https://forum.arduino.cc/index.php?board=137.0
    so there is a chance that something will move ...
  • #4
    khoam
    Level 42  
    It's better to look at NANO 33 BLE. At least there Arbedino HAL is based Mbed OS.
  • #6
    khoam
    Level 42  
    leonow32 wrote:
    And here the board from Microchip with ATmega 4809 and built-in debugger for 19.28 PLN net.

    Additionally, Curiosity Nano Base should be bought at a net price of 86.48 PLN, so that you can use this question sensibly as a test / prototype.
  • #7
    leonow32
    Level 30  
    khoam wrote:
    leonow32 wrote:
    And here the board from Microchip with ATmega 4809 and built-in debugger for 19.28 PLN net.

    Additionally, Curiosity Nano Base should be bought at a net price of 86.48 PLN, so that you can use this question sensibly as a test / prototype.

    What for?
  • #8
    Janusz_kk
    Level 36  
    Well, "khoam" for what? for arduino nano you also buy "base" or stick to contact sheet.
  • #9
    khoam
    Level 42  
    Janusz_kk wrote:
    Well, "khoam" for what? for arduino nano you also buy "base" or stick to contact sheet.

    In the case of Nano, I don't have to add the USB-UART bridge.
    Of course, this note applies to programming in the Arduino environment (which is the subject of this article) and to those who do not use Atmel Studio or Microchip MPLAB.
  • #10
    leonow32
    Level 30  
    but there's a USB-UART in the Microchip board
  • #11
    khoam
    Level 42  
    leonow32 wrote:
    but there's a USB-UART in the Microchip board

    Then write what you need to do to be able to use the serial port monitor, e.g. in the Arduino IDE.
  • #12
    fotomh-s
    Level 24  
    TechEkspert wrote:
    USB communication is provided by ARM ATSAMD11D14A

    So the system that does for the USB UPDI adapter has more computing power than this megi ...

    If they put ARMA there anyway, why do they even make such a record? Isn't it better to make a CD on some ARM and leave AVR? I don't understand this stubborn donkey approach that there must be AVR everywhere, even if it can't do without ARM. It's like making a plane with an APU that outperforms all engines in this machine.
  • #13
    khoam
    Level 42  
    A much more interesting alternative to NANO Every is the tile Teensy 4.0 with NXP iMXRT1062 processor (ARM Cortex-M7).
    This module has good support from popular "arduin" libraries - definitely better than NANO Every.

    @TechEkspert The TimerOne library supports Teensy 4.0 :)

    Arduino NANO Every, review, launch, tests, how to, and.... problems

    Added after 35 [seconds]:

    fotomh-s wrote:
    If they put ARMA there anyway, why do they even make such a record?

    Maybe these ATSAMD11D14A sell poorly? ;)
  • #14
    fotomh-s
    Level 24  
    Teensy 4.0 wastes terribly pins. This circuit has a lot of GPIO from what I orientate, but only part of it is derived from the board.
    This is a bad habit that is becoming more and more popular nowadays.
  • #15
    khoam
    Level 42  
    fotomh-s wrote:
    Teensy 4.0 wastes terribly pins.

    There are additional tiles available from below:

    Arduino NANO Every, review, launch, tests, how to, and.... problems
  • #16
    Janusz_kk
    Level 36  
    fotomh-s wrote:
    If they put ARMA there anyway, why do they even make such a record? Isn't it better to make a CD on some ARM and leave AVR? I don't understand this stubborn donkey approach that there must be AVR everywhere,


    Well, what about the fact that arm-y are better since x-years ago when avr-y came it was expensive and inaccessible. I do not intend to learn the periphery, assembler just because I will have 32 bits at my disposal, because what the new atmega and atxmegi especially offer me is enough for me.
  • #17
    khoam
    Level 42  
    fotomh-s wrote:
    I don't understand this stubborn donkey approach that there must be AVR everywhere, even if it can't do without ARM

    Fortunately, not everywhere. The Nano 33 models have ARMs: nRF 52840 or SAMD21G18A.
  • #18
    Anonymous
    Level 1  
  • #19
    Janusz_kk
    Level 36  
    o_Tadeusz wrote:
    Assembler on ARM? Do you write at ASM at AVR?

    No, sometimes I do insertions in the interrupt, but I mainly check what the compiler spit out, because I had several times that the program did not go as I wanted by over-optimizing the compiler.

    o_Tadeusz wrote:
    More frames, SPI, I2C, RAM, FLASH, DMA often at a lower price than AVR.

    I am not excited about this, atxmegi, new megi also have full grazing.

    o_Tadeusz wrote:
    AVRtiny / mega has different peripherals than Xmega. When you wanted to use Xmega you had to get to know new peripherals, because as you write

    They have no other, only a little differently organized and developed.

    o_Tadeusz wrote:
    What problem now know the peripherals of ARM?

    Because they are even more complicated by this more confusing?
    I watched the pdfs and just starting the clock and connecting the peripherals has already taken away my desire to arm.

    o_Tadeusz wrote:
    On AVRmega and even Xmega, you won't do e.g.

    I do not have to.
  • #20
    Anonymous
    Level 1  
  • #21
    Janusz_kk
    Level 36  
    Chucki have already blocked your account once, don't be aggressive and you become like that, I'm not a professional and I don't need any arms, end of story, I have my years and I'm not going to change anything.
  • #22
    Anonymous
    Level 1  
  • #23
    TechEkspert
    Editor
    @khoam we'll look at NANO 33 BLE :)

    @ leonow32 circuit board https://pl.farnell.com/microchip/dm320115/cur...ano-eval-board-8-bit/dp/2932048?st=atmega4809 very cool, like the ATmega4809 microcontroller, that's why this material appeared. Microcontroller OK, but integration with the Arduino environment seems to be in progress.

    What are the delivery costs of said farnell tile?

    @ Fotomh-s yes ARM ATSAMD11D14A does for USB UART, and you can replace the firmware and get another HID device in it, probably using this system also allowed to reduce the price of the module?

    @khoam this board is interesting https://www.pjrc.com/store/teensy40.html performance in CoreMark - the gap.
  • #24
    tronics
    Level 38  
    Quote:
    yes ARM ATSAMD11D14A does for USB UART, and you can replace the firmware and get another HID device in it, probably using this system also allowed to reduce the price of the module?

    It is possible, for mouser this chip is for ~ 5PLN, CP2102 (from NodeMCU) is a similar price, CH340 / 341 probably cheaper, FT232 much more expensive, similarly to some Cypresses. So this SAM D11 does not significantly increase the price, it does for a more decent USB-UART bridge, and additionally (in addition to its own redundant computing power and I / O if it was needed) it offers debugging (of which the Arduino IDE may not currently use, but alternative IDEs may) .
    Remember colleagues, D10 and D11 are such ARM midges. For 32bit, they have relatively little RAM and FLASH. You can't do miracles on it. But from poverty, he CAN be helpful and take over a few tasks. And yes, 4809 has peripherals similar (structure describing them) to Xmega, not older Atmega, so anyway (if you write close to metal) you would have to learn it again - so nostalgia is just a weak argument, R-MIK / LChucki / o_Tadeusz is right here. Only in Arduino, however, most things are hidden under a certain layer of abstraction. And while the full and fully compatible implementation of functions from the arduino libraries is not important, what is under the hood, whether older AVR, or newer, or ARM from NXP, Nordic, ST or Microchip. Arduino, moreover, is not made for performance, but for simplicity. At most, a faster MCU is taken to cover the performance brake that creates an overhead of the environment itself. Will Every be warmly received? I do not think so. Those who have been used to older AVRs and have found themselves in Arduino will realize that Every offers less than Due etc. and yet some habits need to be changed, some things rewritten. What for? They will stay with the clones of older versions. And if they were to go ahead and take something newer, they would take GD32F103, CS32F103 or STM32F103 from blue pill clones, or Kinetisa from Teensa, or ESP32 ... and Every will bypass the wide arc. Such a life.
  • #25
    Janusz_kk
    Level 36  
    tronics wrote:
    But from poverty, he CAN be helpful and take over a few tasks. And yes, 4809 has periphery similar (structure describing it) to Xmega, not older Atmega so anyway (if you write close to metal) you would have to learn it again - so nostalgia is just a weak argument,

    No exaggeration, everything is in the pdf and in the TMF book which I have and is well described, certainly easier than starting from the beginning again.
    I just bought 3208 and I doubt whether something sensible I will find in the arms for PLN 5 + vat.
  • #26
    khoam
    Level 42  
    Janusz_kk wrote:
    I just bought 3208 and I doubt whether something sensible I will find in the arms for PLN 5 + vat.

    It will be hard to find any 8 bit ARM at all for comparison.
  • #27
    tronics
    Level 38  
    Quote:
    certainly easier than starting from the beginning again

    No, it's not. You only think so, because there are some similarities to older AVRs. But not much. Completely different registry names. Different memory organization. Even stupid pinning is no longer PORTD | = and PORTD & = ^ but simply PORTD.OUTSET = and PORTD.OUTCLR = ... There is, for example, pull-down which is not present in older Atmeges and alternative functions which are not available in older atmegs also not there. Timers are configured differently, ADC similarly, clock distribution, sleep, interrupts ... lots of differences.
    In general, whoever finds himself in xmegs and new atmegs would also easily find themselves in ARM which have significantly, significantly, significantly richer system families and are produced by many manufacturers.
    Quote:
    and I doubt if I can find anything sensible in the arms for PLN 5 + VAT

    Well, I just wrote that this ATSAMD11 from the Every board costs PLN 5 net on the mouse. Similarly in farnell. And although the memory is not enough for 32b, it is usb, 48MHz, DMA, a lot of timers ... STM32F030 is at a similar price and I suspect that some kinetis on CM0 + also. Little things, because little ones, but definitely stronger core and sometimes the periphery.
  • #28
    Anonymous
    Level 1  
  • #29
    Janusz_kk
    Level 36  
    tronics wrote:
    Even stupid pinning is no longer PORTD | = and PORTD & = ^ but simply PORTD.OUTSET = and PORTD.OUTCLR = ... There is, for example, pull-down which is not present in older Atmeges and alternative functions which are not available in older atmegs also not there. Timers are configured differently, ADC similarly, clock distribution, sleep, interrupts ... lots of differences.

    You explain it to me or others, I know it all :)
  • #30
    Anonymous
    Level 1