NUCLEO-F031K6 - Development Board - Review

Table of contents

RoadTest: NUCLEO-F031K6 - Development Board

Author: mconners

Creation date:

Evaluation Type: Evaluation Boards

Did you receive all parts the manufacturer stated would be included in the package?: True

What other parts do you consider comparable to this product?: ESP 8266

What were the biggest problems encountered?: null

Detailed Review:

First off I'd like to thank Element 14 and ST Microelectronics for giving me the opportunity to test this board. The Nucleo-F031K6 is one of the latest in a series of mbed enabled boards developed by ST Microelectronics. If you are not familiar with mbed, it is a development platform for ARM based microcontrollers that features an online editor and compiler, it features many base libraries that are available for a growing number of development boards. It features a standard API that devices must conform to, allowing rapid sharing of libraries and device support. Once you have selected your microcontroller platform, it is a simple matter of looking for user contributed code samples or libraries developed to interface to a wide range of devices. With built in I2C and SPI support it is usually a very simple matter to get you device plugged in and within a few minutes you can be talking to your favorite breakout board that you may have purchased from Element 14 or other vendors such as Adafruit, SparkFun, etc. When you have completed your software development activities, you can hit the compile button in the online IDE and assuming an error free compilation, the binary file will be downloaded to your computer. The methodology for actually installing the binary file to your microcontroller varies from device to device, but the Nucleo-F031K6, when plugged into the USB port of your computer, shows up as a disk drive, programming the device is as simple as dragging the dowloaded binary into the root partition, and waiting for the device to reboot. That's it. It's that simple. No need to worry about additional software to program the device. No need for additional hardware. Just drag and drop. For ARM based microcontrollers it just doesn't get any easier.

 

If you have ever done any development for ARM microcontrollers previous to 5 years ago, you would have found that for each brand of microcontroller you would need to learn a great deal about the architecture of the device you were working with, often you would have to learn a new IDE, you would have to find linker and loader files, learn the device register and port addresses, and often buy additional hardware to be able to actually write your binary executable to the device before you could start the debugging process. ST Microelectronics has been an early adopter of the mbed environment and it has greatly simplified the ability to develop for their microcontrollers and development boards. If rapid prototyping and getting into a platform in the most efficient and inexpensive manner you can achieve is of interest to you, look for the 'ARM mbed enabled' tag on your microcontroller boards.

 

About the board:

 

The Nucleo-F031K6 is a powerful 32 bit ARM Cortex-M0 microcontroller.

It features a 48 MHz max clock frequency

Can run from 2.0 to 3.6 volts

32 KB flash

4 KB SRAM

6 timers, 1 with advanced controls, 5 general purpose

1 SPI/I2S port

1 I2C port

1 USART

1 12 bit ADC with 13 channels

25 GPIO ports with interrupt capability

Built in RTC

Micro USB port for power, programming, and serial I/O

 

That's a lot of capability in a very small package. The form factor of this board was designed to be compatible with the Arduino Nano, so shields and devices designed for the Nano will in most cases work with this Nucleo board.

 

What can I do with it?:

 

Whatever you want. This would be a great choice for the brains of almost any microcontroller project that does not require internet access. With the wide range of I/O ports and support for SPI and I2C, the number of peripherals that can easily be interfaced with is virtually unlimited. Using the online mbed environment greatly reduces the complexity of porting many existing arduino libraries to the ARM platform. This morning I decided to connect a DHT11 Temperature/Humidity Sensor to the device. I created a new project targeting the Nucleo-F031K6, searched the mbed repository and found the DHT11 library, I then added the following code:

 

#include "mbed.h"
#include "DHT11.h"


DigitalOut myled(LED1);
DHT11 d(PB_4);


Serial pc(USBTX, USBRX);
int main()
{
    pc.printf("MBED DHT11 Test\n");
    myled = 0;
    int s;
    while(1) {
        myled = 1; // LED is ON
        wait(1.0); // 1 sec
        s = d.readData();
        if (s != DHT11::OK) {
            pc.printf("Error!\r\n");
        } else {
            int tempC = d.readTemperature();
            int tempF = tempC *9/5 +32;
            pc.printf("T:%dC, %dF, H:%d\r\n", tempC,tempF, d.readHumidity());
        }
        myled = 0; // LED is OFF
        wait(1.0); // 1 sec
    }
}

 

A really simple program. It prints out a welcome message, turns on the built in led, waits one sec, reads the DHT11 and prints the values, then turns off the led for a second, then starts over.

 

image

 

image

 

As you can see, that is a little tiny board. I played around with a few more built in examples in the mbed IDE. There were samples to test the RTC and others. I also interfaced it to a MAX 31855 k-type thermocouple to digital converter via SPI. Everything seemed to work out well.

 

 

Conclusion:

 

This board packs a lot into a small package. At just over $10 US it is a pretty good value for the money. It could definitely benefit from a bit more memory, and the similarly priced ESP8266 has built in wifi, but it lacks the I/O that this board has, plus the resolution of the A/D is not as good.

A very capable board with lots of I/O that can fit into a small place, easily programmable with about as simple an IDE and API that you could ask for by using the mbed environment, and a low price tag, this is a board that can definitely meet your needs.

Anonymous
  • Probably in your clean review you have pointed on (one of) the most important aspects of this board: how easy it is to manage it. Can I suggest to move around a bit more showing us some project? I think that this piece of hardware can deserve interesting surprises.

     

    Well done. Enrico

  • It's amazing how far things have come in just a few years. When I first got into arduino, ARM boards were very expensive and very difficult to work with. When you changed vendors you either had to learn a new IDE, or scour the world looking for linker and loader files. Such a pain. Now, using mbed, there is not much difference between arduino and ARM boards, in price or ease of use. I also agree with your assessment of the esp8266. I use them for a bunch of connected projects around the house.

     

    Mike

  • Nice simple review showing how easy it is.

    I might even have to open the wrapping on mine and try it.

     

    You have to admit that nowdays you get a lot of processor for very little money, and I think we've started getting a bit picky as we're spoilt for choice.

    I think the ESP8266 is going to become the 555 of the micro world when we look back and talk about the 'old days'.

     

    Cheers

    Mark

  • Thanks , glad you found it helpful.

     

     

    Mike

  • Thanks Michael, that's really useful. I accidently acquired a Nucleo-32 board (one based on the L432 processor) but have been putting off doing anything with it. Now you've shown me how easy it is to use mbed, I'll try a simple project with it. (The L4 parts have two 12-bit DACs and an op-amp which I want to try out.)

  • Nice road test Mike.

     

    It looks like an interesting little board.

     

    DAB