User Tools

Site Tools


Sidebar

Modtronix.com
Sitemap

products:nz-stm32:nz32-sc151

NZ32-SC151

This Wiki page contains additional information for the Modtronix NZ32-SC151 board. Please feel free to register and improve this page - user contributions are greatly appreciated!

This small board is designed for very low power applications. It is assembled with a STM32L151RC Microcontroller. It has an on board battery charger for a 3.7V Li-Ion or Li-Polymer battery. System 3.3V is generated via an on board 3.3V regulator with very low current consumption. This regulator provides 3.3V at 800mA which is available for any custom circuitry.

This board has 3 iMod ports for adding Modtronix iMod modules. A common use for this module is to add a LoRa SX1276/SX1278 Wireless iMod module for battery powered, low power wireless applications.

Board can be powered via USB connector, external battery(plugged into JST PH 2.0mm connector) or external 5V provided via pin headers. If higher voltage is required, the pm35SS-5 iMod module can be added, allowing up to 28V supply. This can for example be connected to solar panels to power and charge the battery. See power section below.

We are in the process of adding this board to available platforms on mbed.org. This will enable creating and building your project online using the free mbed compiler. Additionally online projects can be exported an built on a local computer using free IDE(CoIDE, Eclipse, System Workbench, EmBitz, ….) and free GNU GCC ARM C/C++ compiler.

Features

nz32-sc151_side_300.jpg

  • STM32L151RC Ultra low power CPU, optimized for low power applications (compatible with other STM32L151 and STM32L152 chips).
  • 256K Flash, 32K RAM, 8K EEPROM.
  • 3 x UART/USART ports, 2 x I2C ports, 3 x SPI ports.
  • 1 x Micro B USB Port.
  • Reset and Boot button.
  • 2 LEDs - one for indicating when battery is charging, and a user LED.
  • Firmware upgradable via USB port. If boot button is pressed at power up(reset), board goes into bootloader mode.
  • Very low power 5V to 3.3V switch mode regulator with 16uA operating, and 0.01uA standby current.
  • Switch mode regulator can be disabled by CPU, resulting in ultra low 0.01uA supply current. CPU wakes via low voltage interrupt and enables regulator at programmed voltage.
  • On board 3.7V LiPo (lithium polymer) or Li-Ion(Lithium-Ion) battery charger, and standard 2.0mm JST PH connector (many LiPo batteries have this connector). LED indicates when battery is charged. Can be charged from USB or 5V pin headers.
  • Hardware for monitoring input and battery voltage.
  • Additional regulator output capacitors to allow board to run for longer when switch mode is in standby mode (ultra low power 0.01uA operation).
  • Standard 2.54mm (0.1“) pin headers.
  • Compact size 25.5 x 47.1mm

Software Development

We provide a free template download with integrated mbed API, using the free System Workbench for STM32 or CoIDE IDEs(integrated development environment). Both these IDEs use the free GNU ARM GCC C/C++ compilers. This download has the mbed API and STM32CubeL1 Drivers integrated, meaning any of the large number of mbed or STM32Cube example programs can be used.

For details on mbed, see [http://mbed.org|mbed.org]].
For details on ST Microelectronics STMCube, click here.

Following are some examples using mbed. To use any of these examples, simply replace the main.cpp file in our free template download with the example main.cpp.

Documentation

Datasheets

This board has the STM32L151RC microcontroller assembled. This datasheet for this MCU can be downloaded here. The details reference manual can be downloaded here.

Schematics

The PDF schematics for this board is available here. A picture of the top PCB layout can be downloaded here.

Pinout Diagram

For a DETAILED Pinout Diagram, see ”Detailed Pinout Diagram“ section below.

Programming and Debugging

This board can be programmed using the following methods:

  • Using the Modtronix PGM-NUCLEO programmer and debugger. Programming is via ST-LINK/V2-1 or Drag and drop. Additionally a USB virtual com port is provided for debugging.
  • Using the STM32 built in USB or UART bootloader.

PGM-NUCLEO

The Modtronix PGM-NUCLEO can be connected to this board to provide programming and debugging. When plugged into the USB port of a PC, it creates the following USB interfaces:

  • ST-LINK/V2-1 Programmer and Debugger
  • A USB MSD(Mass Storage Device) drive for Drag and Drop programming
  • A USB Virtual Com Port (virtual serial port) connected to PB10 and PB11 of STM32 MCU.

The ST-LINK/V2-1 interface is used by most IDEs (CoIDE, System Workbench, TrueSTUDIO, uVision, ….) for programming and debugging STM32 MCUs. The USB MSD enables drag and drop programming. The PGM-NUCLEO also creates a Virtual com port (CDC interface) that enables communication via UART3 located on the PB10 and PB11 ports of the MCU. A standard serial terminal application (like HyperTerminal for example) can be used on the computer to connect to this victual com port.

For details, see the PGM-NUCLEO Wiki page.

USB Bootloader

The STM32 chip used on this board has a bootloader programmed into ROM, meaning it is always available! To enter bootloader mode, the “BOOT” button must be pressed down during power up or reset(toggle reset button). After this, the firmware can be upgraded by using a DFU USB programmer. To program the board via USB using the DFU programmer, the HEX or BIN file must first be converted to a DFU file. This resulting DFU file is then used to program the STM32 board.

Required Software

Download and install the ST Microelectronics DFU Bootloader (STSW-STM32080). Ensure to use V3.0.5 or later, seeing that V3.0.4 had a serious bug! At the time of writing this, it was located here.

Convert HEX or BIN file to DFU file

  • Start the “DFU File Manager” application.
  • Open HEX file, and click “Generate” button. This will generate a DFU file.

Program STM32 board with generated DFU file

  • Start the “DfuSe Demonstration” application.
  • Power up the NZ32-SC151 while holding the “BOOT” button down. The “DfuSeDemo” application should now show a device in “Available DFU Devices” box.
  • Click “Choose” button, and select the *.dfu file. Do NOT use the “Choose” button in “Upload Action” section!
  • Click “Upgrade” button, and upgrade firmware.

Power

The board can be powered via USB connector, external battery(plugged into JST PH 2.0mm connector) or external 5V provided via pin headers. If higher voltage is required, the pm35SS-5 iMod module can be added, allowing up to 28V supply. This can for example be connected to solar panels to power and charge the battery.

USB Power

A USB connector allows the board to be powered via a standard Micro B USB connector. The USB cable can be connected to an USB port on a PC, a USB charger (like standard phone charger for example), or any other device supplying 5V via a USB connector.

When powering via USB, the USB supply voltage(after protection diode) can be made available on the 5V pins (pins 11, 12, 57 and 58) by making solder jumper J11 on the back of the board. This jumper is NOT made by default. Special care must be taken when J11 is made to not supply voltage to the 5V pins, but ONLY use it for obtaining the USB 5V supply. The USB 5V supply available on the 5V pins will be slightly lower than the USB voltage, seeing that it passes through a schottky protection diode that drops the voltage by about 0.3V.

When J11 is not made, power can be supplied via the 5V pins, USB, or both. Protection diodes will automatically select the source with the highest voltage.

External Power

5V power can also be supplied via the 5V pins 11, 12, 57 and 58. If power is currently supplied via USB, and 5V is applied to the 5V pins, the supply with the highest voltage will be used. The supply from USB and 5V are diode protected, protecting against reverse polarity, and allowing power to be supplied from both sources without damage.

Battery Power and Charging

This board can be power via a 3.7V Lithium Ion or LiPo(Lithium Polymer) rechargeable battery, like our 1000mAh LiPo for example. When no external voltage is supplied (via USB or 5V pins) power will be taken from the battery. When external power is provided, it will be use and the battery charged. The charge LED will light up, and stay on as long as the battery is charging. The LED goes off once charging is done.

The battery can be charged via a charger with standard Micro B USB cable, or by applying 5V to the 5V pin headers(11, 12, 57 and 58). The regulator used on this board is a very low power 3.3V DC/DC switch mode regulator, with 16uA supply and 0.01uA standby current. Note that there is NO reverse battery protection! Applying the battery the wrong way round will damage the board! The battery connector(JST PH type) can however only be plugged in the correct way. It is impossible plugging it in wrong. So, if a battery with correct polarity connector is used, it is not possible damaging the board.

By default the charging current is 100mA, but can be increased to 500mA by setting the Microcontroller port A14 to 0. Charging current is 100mA when port A14 is high impedance(configured as input - default after reset). By default, the USB specification only allows 100mA to be taken from the USB bus, so to get fast charging is actually quite complicated. An USB device(this board) is supposed to request 500mA high power from the host via the USB protocol. This will require USB firmware to be implemented on this board. But it seems to never be a problem to take 500mA from a USB port without requested higher power. In addition, microcontroller port PC4 (analog input) can be used to monitor the USB voltage. It should be around 5V in normal circumstances. If it drops lots below 5V, we can assume that we are drawing too much power, and change back to 100mA charging. When connecting to an USB charger, no negotiation is required, and we can always enable 500mA charging.

Enabling fast charging also requires solder jumper J13 to be made. It is located on the back of board, and labeled “Fast Charge”. It is made by default.

Vin pins

The Vin pins 1, 2 and 67 and connected together. They are not connected to any circuitry on the board. These pins are the Vin(Vaux) pins of iMod ports, and could possibly be used if multiple iMod modules are assembled on this board.

Compiler, IDE and mbed.org

We are in the process of adding this board to available platforms on mbed.org. This will enable creating and building your project online using the free mbed compiler. Additionally online projects can be exported an built on a local computer using free IDE(CoIDE, Eclipse, System Workbench for STM32, EmBitz, ….) and free GNU GCC ARM C/C++ compiler.

For creating code offline, we recommend using the free System Workbench for STM32(SW4STM32) or CoIDE. They are both Eclipse based, and use the free GNU ARM GCC C/C++ compiler. CoIDE is much simpler, and many of the Eclipse menus and options have been removed. If you are used to the complexity and power of Eclise, we recommend using SW4STm32, else use CoIDE.

System Workbench for STM32

Many Modtronix example and source code downloads can be built and debugged offline using the System Workbench for STM32(SW4STM32) IDE. Online mbed project can also be exported. SW4STM32 is an Eclipse based IDE using the free GNU GCC ARM C/C++ compiler. For details, see this section of our Wiki.

CooCox CoIDE

Another offline IDE option using the free GNU GCC compiler is CoIDE. It can be used with projects supplied by Modtronix or exported from mbed. It is also an Eclipse based IDE using the free GNU GCC ARM C/C++ compiler. Click here for details.

Prototyping & Expansion

The PT4NZ base board can be used to mount this board on. It routes the signals from this board to 4 iMod ports, allowing any of our available iMod modules to be added. The DEVKIT-SC151 is an assembled version of the PT4NZ board. It is very well suited for prototyping. It has female sockets soldered on all iMod ports, allowing iMod modules to be plugged in for testing different hardware combinations.

I2C Ports

The recommended I2C port is I2C Port 1, which is located on “Port Pins” 33 and 35(See Pinout Diagram). They are connected to the Microcontroller ports PB8 and PB9, and have 4.7kOhm pull-up resistors assembled. For high noise environments it might be required to add additional pull-up resistors, for example 2.2 or 1kOhm.

Alternatively I2C port 2 can also be used. It is available on “Port Pins” 51 and 55(See Pinout Diagram). They are connected to the Microcontroller ports PB10 and PB11, and also have 4.7kOhm pull-up resistors assembled. Note that PB10 and PB11 are also used for programming if connecting this board to a programmer! They free when programming this board via the USB bootloader.

iMod ports

This board has 3 iMod ports for adding Modtronix iMod modules. A common use for this module is to add a LoRa SX1276/SX1278 Wireless iMod module for battery powered, low power wireless applications.

Wireless Interface

This board has 3 Modtronix iMod ports. This enables a wireless interface to be added to the board, like WiFi, Bluetooth or SX1276/SX1278 LoRa Wireless module. The SX1276 incorporates Semtech's LoRa technology, making very long range communication (over 10km) possible at low power! The photos below shows the NZ32-SC151 with an inAir SX1276/SX1278 LoRa iMod assembled. The inAir modules are available in 433MHz, 868MHz and 915MHz.

Detailed Pinout Diagram

The PDF schematics for this board is available here. A picture of the top PCB layout can be downloaded here.

nz32-sc151-r1_pinout_diagram_782.jpg

products/nz-stm32/nz32-sc151.txt · Last modified: 2016/04/04 20:26 by modtronix