C.A.ST.L.E.: A MODULAR ROBOTICS PLATFORM M. Branciforte and F. La Rosa

C.A.ST.L.E.: A MODULAR ROBOTICS PLATFORM
M. Branciforte1and F. La Rosa1
STMicroelectronics – IMS Systems Lab & Technical Marketing Group, Catania, Italy
1
ABSTRACT
This paper deals with a new robotic modular platform called
C.A.ST.L.E. (Control & Automation ST Ladder Electronics). The
platform is composed by an existing commercial evaluation board
based on STM32 microcontroller and some brand-new boards
having dedicated functions focused on robotic applications. The
aim is to provide a complete automated platform, compact and
flexible, easy to manage and cost effective, suitable to be
introduced as a powerful evaluation tool to spread the diffusion of
Robotics.
Moreover, a dedicated firmware is under development: the
libraries are all based on open source code and a free Real Time
Operative System. In this way it is easier to upgrade or add new
functions and features.
TECHNOLOGICAL PLATFORM DESCRIPTION
The basic architecture is shown in Fig.2: it is constituted by
the main blocks and the related communication peripherals.
INTRODUCTION
A smart approach to Robotics, thanks to a new modular
platform, is becoming increasingly important for its innovative
potential and for the impact it is creating in various sectors such as
electronics, automation, control, computer science and
mechatronics.
Our program aims to take a more challenging and targeted
approach through a set of evaluation boards that should broaden
young people's horizons and encourage them to explore beyond
formal education by engaging them in the world of robotics. These
boards, characterized by ease of use, simple features as
compactness and flexibility, reliability and cost effectiveness, may
be used both as independent evaluation board, and as modular
assembled structures. They are also named as C.A.ST.L.E., and
represent a galaxy of solutions with specific robotic functionalities
and features, all rotating around an already exiting platform, called
STM32VLDISCOVERY, working as the coordinator.
In general a robotic system may be thought as the
development of three main actions: sense, think and move. In the
C.A.ST.L.E. platform the STM32VLDISCOVERY represents the
think action, while the remaining two actions have been identified
and will be completed with the next developments.
Each C.A.ST.L.E. robotic module has peculiar capabilities
(motor driver, sensors, external communications, etc.), and may be
connected to the STM32VLDISCOVERY through a common
communication bus, as shown in Fig.1.
Figure 2: CASTLE platform block scheme.
In this system approach, STM32VLDISCOVERY is used as
master board and is connected by two different SPI bus to two
slave boards, respectively representing the sense action and the
move action. The master operates only on high level, controlling
the main application and monitoring the activities of the slave
boards. According to this strategy, each slave board is able to
control the typical assigned tasks (i.e. for motor driver board, a
possible task may be the motor speed control). Thus, the block
diagram of each slave board, both for sense and move, is similar.
Single slave board architecture has shown in the Fig.3.
Figure 3: General schematic of a slave board.
Figure 1: Modular approach for the CASTLE galaxy.
In each slave board, the main elements are:
the STM32F103 ARM® Cortex™-M3 microcontroller,
that carries on the main tasks scheduled in the library
firmware;
the power management, designed to be flexible in order
to manage the supply for the single board or the entire
ladder structure;
the main driver or sensor, depending on the absolved
robotic function;
the connectors JTAG/SWD and USB;
some specific user pins, both digital and analog;
the connectors to plug the slave board to the modular
platform.
Presently, two slave boards prototypes have been developed:
a stepper motor controller based on the dSPIN L6470 (STEVALIFN006V1[14]), and a DC motor controller based on the
PowerSPIN L6226Q (STEVAL-IFN006V2[14]).
In the following sub-paragraphs, the currently developed
boards are described, while in the next paragraph the firmware
architecture is shown.
a)
STM32VLDISCOVERY
Figure 4: STM32VLDISCOVERY evaluation board.
[1]
The STM32VLDISCOVERY
is a cost-effective board
based on the STM32F100 ARM® Cortex™-M3 microcontroller[2],
suitable to discover the STM32 value line microcontrollers.
The STM32F100 is a 32-bit microcontroller with 128 KB
Flash, 8 KB RAM in 64-pin LQFP package, perfect fit for control
applications: it has up to seven PWM 16-bit timers including
advanced control timer for a total of 26 channels. It supports
extensive connectivity capability with CEC, 400 kHz I²C, up to12
Mbit/s master and slave SPI, up to 3 Mbit/s USART[5].
STM32VLDISCOVERY board is equipped with on-board
ST-Link, a programmer tool for STM32 family, dedicated for
uploading specific firmware[3][6]. This feature allows the selection
mode switching in order to use the kit also as a stand-alone STLink (with SWD connector).
STM32VLDISCOVERY has been designed to be powered by
USB or an external supply of 5 V or 3.3 V, and can supply target
application with 5 V and 3 V source pins.
Two user LEDs (green and blue) and one user push button are
embedded in the platform for implementing peripheral control
functions.
Two extension headers, linked to all QFP64 I/Os, have been
used to connect the DISCOVERY to the other CASTLE
constituting platforms.
b)
STEVAL-IFN006V1
The STEVAL-IFN006V1 is a stepper motor controller
demonstration board based on the dSPIN L6470[8] and
STM32F103 microcontroller[4], suitable for use in the development
of applications using two low-to-mid power stepper motors and
four servo motors.
The STEVAL-IFN006V1 board has been designed to be
managed in two main configurations:
• Stand-alone configuration is used to demonstrate the L6470
performance managed by the STM32F103 32-bit microcontroller
• Stacked configuration allows multiple controllers to be
remotely coordinated from a host board (such as the STM32VLDiscovery microcontroller board), to which dedicated firmware
can be uploaded.
The L6470 is the core device of this platform. The device is
designed using analog mixed signal technology, and represents an
advanced fully-integrated solution suitable for driving two-phase
bipolar stepper motors with micro-stepping[8].
The L6470 integrates a dual low RDSON DMOS full bridge
with all of the power switches equipped with accurate on-chip
current sensing circuitry suitable for non-dissipative current
control and overcurrent protection. Thanks to its unique control
system, true 1/128-step resolution is achieved. The digital control
core can generate user-defined motion profiles with acceleration,
deceleration, speed or target position easily programmable through
a dedicated set of registers. All commands and data registers,
including those used to set analog values, are sent through a
standard 5Mbit/s SPI[9] [10] [11] [12].
The
STEVAL-IFN006V1
board
embeds
also
a
STM32F103RET microcontroller[4], based on ARM® Cortex™-M3
32-bit RISC core, operating at a 72 MHz frequency, with
embedded high-speed memories and a wide range of peripherals
and functions. The STM32F103RET is capable of controlling
stepper motors driven by the L6470, to read the output signals
from the motor encoders, monitor the operating currents, and
manage the diagnostic signals from the L6470.
The stepper motor controller is also able to control up to four
servo motors independently.
Figure 5: the STEVAL-IFN006V1 stepper motor controller
demonstration board
The STEVAL-IFN006V1 board embeds specific connector
for uploading demo or user firmware (standard JTAG connector),
several user pins, both for digital I/Os and for analog inputs. In
particular, the analog inputs have been provided by buffers to
scaling the input voltages in the MCU ADCs range, and to protect
the MCU input pins.
A mini-USB connector provides the possibility of power
supplying and the main communication to PC. Two user LEDs are
also integrated in the board to monitor the board behavior.
The STEVAL-IFN006V1 is provided with a specific
demonstration firmware able to drive two low-to-mid power
stepper motors and four servo motors. The basic firmware has been
conceived to manage all the main peripherals integrated in the
board, and supports a dedicated communication protocol suitable
to be integrated in the complete modular platform containing the
STM32VLDISCOVERY as the system master.
c)
STEVAL-IFN006V2
The STEVAL-IFN006V2 is a DC motor controller
demonstration board based on the L6226Q PowerSPIN DMOS
dual full bridge driver[13], and the STM32F103 microcontroller.
The board provides a platform for developing applications using
two low-to-mid power DC motors.
Also this board has been designed for two main
configurations:
• Stand-alone configuration is used to demonstrate the
L6226Q performance managed by the microcontroller
• Stacked configuration allows multiple controllers to be
remotely coordinated from a host board (such as the STM32VLDiscovery microcontroller board), to which dedicated firmware
can be uploaded.
The core device of this platform is the L6226Q, a DMOS dual
full bridge driver designed for motor control applications. The
L6226Q is developed using BCD multi-power technology, which
combines isolated DMOS power transistors with CMOS and
bipolar circuits on the same chip. The L6226Q features thermal
shutdown and non-dissipative overcurrent detection on the high
side power MOSFETs, plus a diagnostic output that can be readily
used to implement overcurrent protection.
As the previous stepper motor control board, the
STM32F103RET is the brain of the application architecture. The
microcontroller is capable of controlling up to two DC motors
driven by the L6226Q, to read the output signals from the motor
encoders, monitor the operating currents, and manage the
diagnostic signals from the L6226Q.
Figure 6: the STEVAL-IFN006V2 DC motor controller
demonstration board.
As the previous board, the STEVAL-IFN006V2 embeds
standard JTAG connector for firmware uploading, several digital
I/Os and for analog inputs pins, a mini-USB connector for power
supplying and communication to PC, and two user LEDs.
Also the STEVAL-IFN006V2 is provided with a specific
demonstration firmware to manage all the main peripherals
integrated in the board, and supports the same dedicated
communication protocol suitable to complete the modular platform
configuration.
C.A.ST.L.E. FIRMWARE[14] ARCHITECTURE
To manage the complete platform capabilities, it’s been
necessary to implement a firmware architecture having the
following characteristics:
•
ease of upgrading;
•
quick integration of new user functions;
•
multi-tasking operability;
•
based on Open Source code.
For this reason the FreeRTOS real-time operative system[7]
has been identified as the best choice to fit these demands.
FreeRTOS supports the multitasking operability and well operates
with ARM® Cortex™-M3 core based microcontroller: C-code
libraries may be easily integrated in it, together with the motor
controllers functionalities, avoiding to waste huge size of memory
because the operative system kernel is very limited. Finally,
FreeRTOS is free, open source based and distributed to a large
range of users.
Starting by this first level, a firmware library has been
developed to provide a complete set of basic pre-implemented
functions that allows an easy integration of these ones in the final
application. The main functions designed for this aim, are
characteristic for each board and inserted in a common context: for
example, for the DC motor controller, major developed tasks are
parametric speed control, position control, etc…
At higher level, a dedicated communication protocol has been
developed to connect the several physical layers of the platform
(i.e. the master board level to the slave boards layers). As
previously described in Fig.2, the communication bus used for this
task is the SPI: based on this communication protocol, a specific
frame has been designed to integrate a large set of commands. A
standard frame is shown in the Fig.7.
[12] STM32F1xx motor-control firmware for dSPIN - Quick
Guide - STMicroelectronics
[13] L6226 - Datasheet - STMicroelectronics
[14] STEVAL-IFN006V1, STEVAL-IFN006V2 boards prototypes
and C.A.ST.L.E. firmware are available on request. Contact
ST Sales Offices for further details.
Figure 7: the communication protocol frame (a) and the first
byte exploited in detail (b).
The two major tasks are common in all boards: the first one is
the Gatekeeper Task that manages the interrupt service routine
data, sending data to the other task or to the transmission channels;
the second is the Parser Task that remain in waiting mode on the
data queue, verifying input data and executing the commands.
According to this architecture, empty template tasks have
been added in order to be filled by the final user to implement the
specific features on the application platform.
CONCLUSIONS
A new robotic modular platform called C.A.ST.L.E. (Control
& Automation ST Ladder Electronics) has been introduced. The
platform is mainly based on a master board, able to control the
main application, and several slave boards devoted to manage the
low level specific tasks. The first two slave boards developed up to
now are able to control DC motors, steppers motors and servos.
Firmware architecture has been developed in order to use the
operative system to schedule specific tasks and to enable main
communication between the several boards.
Next step will be the integration of sensorial slave boards in
the final modular platform, exploiting the same philosophy under
the hardware and firmware aspects.
REFERENCES
[1] UM0919 - STM32VLDISCOVERY - User Manual STMicroelectronics
[2] STM32F100x4,
STM32F100x6,
STM32F100x8,
STM32F100xB - Datasheet - STMicroelectronics.
[3] STM32VLDISCOVERY firmware package - Application
Note - STMicroelectronics.
[4] STM32F103xC STM32F103xD STM32F103xE – Datasheet STMicroelectronics
[5] STM32F101xx,
STM32F102xx,
STM32F103xx,
STM32F105xx and STM32F107xx advanced ARM-based 32bit MCUs, page 597/1093 - Reference Manual STMicroelectronics
[6] ARM-based 32-bit MCU STM32F101xx and STM32F103xx
firmware library - Firmware Library User Manual STMicroelectronics
[7] FREERTOS: http://www.freertos.org/
[8] L6470 - Datasheet - STMicroelectronics
[9] AN3103: Fully integrated micro-stepping motor driver using
the L6470 - Application Note - STMicroelectronics
[10] AN3980: STM32 firmware library for dSPIN L6470 Application Note - STMicroelectronics
[11] AN3103: Fully integrated micro-stepping motor driver using
the L6470 - Application Note - STMicroelectronics
.