0% found this document useful (0 votes)
36 views147 pages

Programming The Attitude Control of A CubeSat

Uploaded by

paula
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views147 pages

Programming The Attitude Control of A CubeSat

Uploaded by

paula
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 147

Programming the attitude control of a CubeSat

for simulation of LEO orbit space missions

Document:

Report

Author:

Yilmaz, Alev

Director/Co-director:

Gago Barrio, Javier / Lamich Arocas, Manuel

Degree:

Bachelor in Industrial Technology Engineering

Examination session:

Autumn 2022/23
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

Abstract

The project, which is an update of the previous ones, consists of a laboratory prototype for simulations with
hardware in the loop, where the hardware is the CubeSat prototype. This project is developed within the
PLATHON project, directed by Javier Gago, from the Department of Electronics of the UPC ESEIAAT.

The investigation, design, and implementation of an attitude control system for a 1U CubeSat are the main
topics of this thesis. A CubeSat is an orbiting satellite that was developed in response to the need for
ever-smaller spacecraft to be designed, built, and operated. It must be noted that a 1U CubeSat needs three
to five years of labor and costs about 250 000 euros to create and launch into space.

The software used for its implementation was created with the Arduino IDE, the experimental representations
were done in MATLAB, and the new motor driver was programmed in ESCON Studio to collect a portion of
the results.

The final design is geared toward accurately executing three distinct maneuvers: first, accurately measuring
the CubeSat’s orientation; second, assigning current to the motor to enable movement of the reaction wheel
in both directions (CW and CCW); and third, implementing PID controllers, which enable precise orientation
and speed.

This goal has been accomplished through the development of the ADCS hardware, a comprehensive explanation
of the attitude control software, and experimental studies.

The adoption of a new MAXON brand motor in this thesis serves as an enhancement since it offers more
accuracy and stability. The same-brand motor driver being utilized has a current regulator that increases the
results’ precision.

Since the controllers were correctly implemented and a precise orientation was obtained with nearly imper-
ceptible stationary faults, the findings were satisfactory.

Keywords: CubeSat, ADCS, PID Controller, Reaction Wheels

I
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

Resumen

El proyecto, que es una actualización de los anteriores, consiste en un prototipo de laboratorio para simulaciones
con hardware in the loop, donde el hardware es el prototipo CubeSat. Este proyecto se desarrolla dentro del
proyecto PLATHON, dirigido por Javier Gago, del Departamento de Electrónica de la UPC ESEIAAT.

La investigación, diseño e implementación de un sistema de control de actitud para un CubeSat 1U son


los temas principales de esta tesis. Un CubeSat es un satélite en órbita que se desarrolló en respuesta a
la necesidad de diseñar, construir y operar naves espaciales cada vez más pequeñas. Cabe señalar que un
CubeSat 1U necesita de tres a cinco años de mano de obra y cuesta alrededor de 250 000 euros para crear y
lanzar al espacio.

El software utilizado para su implementación se creó con Arduino IDE, las representaciones experimentales
se realizaron en MATLAB y el nuevo controlador de motor se programó en ESCON Studio para recopilar
una parte de los resultados.

El diseño final está orientado a ejecutar con precisión tres maniobras distintas: primero, medir con precisión
la orientación del CubeSat; segundo, asignar corriente al motor para permitir el movimiento de la rueda de
reacción en ambas direcciones (CW y CCW); y tercero, implementar controladores PID, que permiten una
orientación y velocidad precisas.

Este objetivo se ha logrado mediante el desarrollo del hardware ADCS, una explicación completa del software
de control de actitud y estudios experimentales.

La adopción de un nuevo motor de la marca MAXON en esta tesis sirve como una mejora ya que ofrece más
precisión y estabilidad. El controlador de motor de la misma marca que se está utilizando tiene un regulador
de corriente que aumenta la precisión de los resultados.

Dado que los controladores se implementaron correctamente y se obtuvo una orientación precisa con errores
estacionarias casi imperceptibles, los resultados fueron satisfactorios.

Palabras clave: CubeSat, ADCS, Controlador PID, Ruedas de Inercia

II
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

Contents

1 Introduction 1
1.1 Aim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Justification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 State of the art 5


2.1 CubeSats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 Attitude Determination and Control System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.1 Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.2 Attitude Actuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.3 ADCS Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2.4 ADCS Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3 Hardware Prototype of the ADCS 11


3.1 MAXON Motor Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 IMU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2.1 MPU9250 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.2.2 DMP Calibration Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.3 Communication Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.4 Blue Pill Microcontroller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.5 Final Hardware Wiring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

4 Software Control of the ADCS 29


4.1 Mode 1: Actual Orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.2 Mode 2: Assigning current to RW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.3 Mode 3: Positioning RW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.3.1 Previous Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.3.2 PID Controller Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.4 Flowchart of the Main Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

III
CONTENTS CONTENTS

5 Experimental Results 41
5.1 Mode 1: Actual Orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
5.2 Mode 2: Assigning current to RW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.2.1 Mode 2: Experiment 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
5.2.2 Mode 2: Experiment 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
5.2.3 Mode 2: Experiment 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.3 Summary of the Experimental Results of Mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . 44
5.4 Mode 3: Positioning RW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

6 Budget summary 48

7 Environmental Analysis 49

8 Conclusions 50
8.1 Further Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

References 52

A MPU Calibration Code 54

B Bluetooth Module Configuration Code 60

C ADCS Arduino Code 61

D Datasheets 73
D.1 Motor Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
D.2 MAXON Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
D.3 Flex-Print Connector to PCB-screw clamps . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

IV
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

List of Figures

2.1 A set of three CubeSats. (Source: NASA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5


2.2 NanoRacks CubeSat Deployer (NRCSD) (Source: [8]) . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Alodined P-POD (Source: [9]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.4 ADCS Subsystems (Source: [10]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.5 Star Sensor, TDP 6 of Alphasat (Source: [12]) . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3.1 Module 24/2, Servo Controller, P/N 466023 (Source: [14]) . . . . . . . . . . . . . . . . . . . . 11


3.2 EC 20 flat Ø20 mm, brushless, 5 Watt, with Hall sensors (Source: [16]) . . . . . . . . . . . . 12
3.3 Current Control Mode (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4 Digital Inputs and Outputs (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5 Digital Input 1: Setpoint value (PWM) (Source: Own) . . . . . . . . . . . . . . . . . . . . . . 14
3.6 Digital Input 2: Enable (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.7 Adapter 11-pole flexprint connector to 8-pole screw terminal (Source: [18]) . . . . . . . . . . 15
3.8 Wiring between motor driver and MAXON motor (Source: Own) . . . . . . . . . . . . . . . . 15
3.9 MPU9250 9-Axis 9 DOF (Source: [20]) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.10 Wiring for DMP calibration (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.11 IMU calibration results. (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.12 HC-05 Bluetooth Module, ZS040 Model (Source: [23]) . . . . . . . . . . . . . . . . . . . . . . 19
3.13 Wiring for Bluetooth module configuration (Source: Own) . . . . . . . . . . . . . . . . . . . . 20
3.14 Blue Pill STM32 microcontroller. (Source: [26]) . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.15 Programming the Blue Pill with the Arduino IDE. (Source: [27]) . . . . . . . . . . . . . . . . 22
3.16 The Generic STM32F103 Pinout Diagram. (Source: [28]) . . . . . . . . . . . . . . . . . . . . 23
3.17 Wiring to test devices (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.18 PWM Duty Cycle Waveforms. (Source: [30]) . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.19 MP2307 Converter (Source: AliExpress) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.20 Final Hardware Wiring (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.21 Actual Photograph of the Prototype (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . 27

4.1 Software Structure (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29


4.2 Flowchart of the Software (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

V
LIST OF FIGURES LIST OF FIGURES

4.3 Flowchart of the First Mode (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33


4.4 Flowchart of the Second Mode (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.5 Positioning modes identification (Source: [3]) . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.6 Block diagram of a PID controller in a feedback loop. (Source: [32]) . . . . . . . . . . . . . . 36
4.7 Block diagram structure for a cascaded control (Source: [4]) . . . . . . . . . . . . . . . . . . . 37
4.8 Block diagram structure for the angular speed inner control loop (Source: [4]) . . . . . . . . . 38
4.9 Block diagram structure adding the position outer control loop (Source: [4]) . . . . . . . . . . 38
4.10 Block diagram structure for the position controller adding torque disturbances (Source: [4]) . 39
4.11 Flowchart of the main mode (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

5.1 Experimental Result of Mode 1, Orientation of the CubeSat (Source: Own) . . . . . . . . . . 41


5.2 Test 1 of Mode 2: 20% of current in both directions, Current Variations (Source: Own) . . . 42
5.3 Test 1 of Mode 2: 20% of current in both directions, Speed Variations (Source: Own) . . . . 42
5.4 Test 2 of Mode 2: 50% of current in both directions, Current Variations (Source: Own) . . . 43
5.5 Test 2 of Mode 2: 50% of current in both directions, Speed Variations (Source: Own) . . . . 43
5.6 Test 3 of Mode 2: 100% of current in both directions, Current Variations (Source: Own) . . . 44
5.7 Test 3 of Mode 2: 100% of current in both directions, Speed Variations (Source: Own) . . . . 44
5.8 Test 1 of Mode 3 (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.9 Test 6 of Mode 3 (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
5.10 Test 15 of Mode 3 (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

VI
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

List of Tables

3.1 Wiring between motor driver and MAXON motor (Source: Own) . . . . . . . . . . . . . . . . 16
3.2 Wiring between MPU9250 and Arduino, Calibration (Source: Own) . . . . . . . . . . . . . . 19
3.3 Wiring for Bluetooth module configuration (Source: Own) . . . . . . . . . . . . . . . . . . . . 20
3.4 Wiring to test devices (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.5 Wiring between motor driver and MAXON motor (Source: Own) . . . . . . . . . . . . . . . . 28

4.1 Summary of the Software Modes (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . 32


4.2 Controllers parameters (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

5.1 Summary of the Experiment 2 (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . 45


5.2 Controllers parameters, Test 1 (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
5.3 Controllers parameters, Test 6 (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.4 Controllers parameters, Test 15 (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . 47

6.1 Budget Summary (Source: Own) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

VII
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

List of abbreviations

ADCS: Attitude Determination and Control System

LEO: Low Earth Orbit.

PID: Proportional-Integral-Derivative

IMU: Inertial Measurement Unit

CPU: Central Processing Unit

MPU: Microprocessor Unit

CalPoly: California Polytecnic State University

NRCSD: Nanoracks CubeSat Deployer

P-POD: Poly Picosat Orbital Deployer

ISS: International Space Station

JEM: Japanese Experiment Module

PCM: Pressurized Cargo Module

GPS Receivers: Global Positioning System Receivers

IRU: Inertial Reference Unit

CMG: Control Moment Gyros

OBC: On Board Computer

EPS: Electrical Power Supply

TCS: Telecomunications System

CMG: Control Moment Gyros

PV: Photovoltaic Panel

BAT: Battery

PCC: Power Control Circuit

VIII
LIST OF TABLES LIST OF TABLES

PLATHON: PLATform of Optical communications in Nanosatellites

DoF: Degrees of Freedom

PWM: Pulse Width Modulation

USB: Universal Serial Bus

PC: Personal Computer

EC: Electronically Commutated

DC: Direct Current

VDC: Voltage Direct Current

AC: Alternating Current

I/O: Input/Output

FPC: Flexible Printed Circuit

PCB: Printed Circuit Board

I2C: Inter-Integrated Circuit.

SPI: Serial Peripheral Interface

DMP: Digital Motion Processor

SDA: Serial Data Pin

SCL: Serial Clock Pin

TXD: Transmit Data

RXD: Received Data

AT Mode: AT commands mode

ADC: Analog to Digital Converter

CW: Clock Wise

CCW: Counter Clock Wise

UART: Universal Asynchronous Receiver/Transmitter

PV: Process Variable

SP: SetPoint

MV: Manipulated Variable

RW: Reaction Wheels

IX
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

Chapter 1

Introduction

1.1 Aim
Primarily, this work is part of the PLATHON project, which is an integrated simulation platform with
hardware in the loop of space missions for communications between ground stations and nanosatellites, where
these missions can be designed, analyzed, and evaluated by a constellation of CubeSats in LEO orbits.

This project is centered on the implementation of a 1DoF attitude control of a CubeSat laboratory prototype
based on a reaction wheel from a certain angle transmitted wirelessly to an electronic board based on the
STM32 microcontroller, in particular, a development board known as Blue Pill.

It should be noted that this work is based on Daniel Castillo Bonillo’s [1], Adrià Pérez Fernández’s [2],
Yi Qiang Ji Zhang’s [3], and Joan Serrano’s [4] previous work. This project’s major goal is to add new
innovations, such as a new motor to drive the wheel more steadily, precisely, and with less vibration. This
goal requires a new motor driver as well as the development of new control algorithms.

1
1.2. SCOPE CHAPTER 1. INTRODUCTION

1.2 Scope
In order to adequately justify and document the prototype electronic advancements, the project’s scope is
based on the delivery of the following documents:

• Final Project Report: In this document, the CubeSat mechanism’s structure is discussed, and each step
that was taken is supported. Additionally, the required electronic system documentation, including
the technical files and all the references and sources utilized, may be seen. Along with the precise
requirements, the project’s timetable for completion (schedule), thorough budget, and conclusion drawn
from everything described previously will all be followed.

• Assembly of the new ADCS board with MAXON motor in the perfboard: This document will provide
detailed descriptions of all the electrical connections made as well as diagrams of them. The importance
of this document lies in the prospect of using wired connections in the future if a hardware connection
has to be changed, as well as in making wired connections easier to understand.

• Code implemented for the attitude control system: Because of the new motor driver, the offered code
will be an improvement over previous works and will include new algorithms. This code is implemented
for the attitude control system. The lines of code will be annotated as much as possible for the reader’s
benefit.

• Instructions for setting the Bluetooth module: In order to use the HC06 module’s properties, the HC05
Bluetooth module has to be set up first. Therefore, it will be feasible to comprehend the Bluetooth
connection for configuration as well as the many AT modes in this part.

On the other hand, since the CubeSat’s mechanical components won’t be improved—only its electronics
will—this project won’t include any blueprints for the components and assemblies.

2
1.3. REQUIREMENTS CHAPTER 1. INTRODUCTION

1.3 Requirements
The necessary conditions for the suggested solution to be deemed ideal are listed in the following list:

• The developed code, which includes IMU reading and coarse positioning, is important for future
improvement with the inclusion of fine positioning to achieve improved precision in the attitude control
of the subsystem, which is critical for the CubeSat’s final behavior.

• The final prototype, which must be built with a new MAXON motor, is also required in order to
perform the necessary tests and make the necessary adjustments for continual development.

• The programming language used in this project is Arduino and its various libraries; it should be noted
that it is free software that corresponds to all CubeSat implementations done to date.

• In order to perform significant modifications in this project, it is also necessary to have prior knowledge
of electronics and space, as well as the ability to search for appropriate material in the event of a lack
of knowledge on any subject.

3
1.4. JUSTIFICATION CHAPTER 1. INTRODUCTION

1.4 Justification
As mentioned in the first section, this project, called PLATHON, is part of a hardware simulation project in
the loop of space missions with cube satellites (CubeSats), whose structure is scalable in cubes with a 10 cm
edge and a mass of less than 1.33 kg [5], in which they can design, analyze, and evaluate communication
missions between terrestrial points via a constellation of CubeSats in LEO orbits.

The orbital propagators are available in MATLAB and the NASA OpenSatKit free software package, from
which simulator 42 may be used.

The attitude determination and control subsystem is used in the majority of space missions. Most space
missions have attitude requirements in order to properly operate their payloads; these requirements might
range from a few degrees of pointing precision for low-cost communications missions to a fraction of an
arcsecond for complex research missions [6].

This work seeks to program an attitude control (CubeSat orientation) with a setpoint angle that would
provide an attitude control electronic board based on the STM32 microcontroller to either the MATLAB
simulator or at 42, wirelessly. The plate is a component of the construction of a CubeSat, which will float
and spin freely and without friction on a compressed air platform. As a result, the CubeSat should have to
follow the turns of the setpoint angles suggested by the simulator. Furthermore, the CubeSat must provide
the real orientation data, as measured by an IMU built into the attitude board, to the CPU running the
MATLAB or 42 simulations, so that it may be depicted visually.

However, one of the limitations of this study is that it only considers the azimuthal angle because the project
is in its preliminary phase with a single reaction wheel, but the project is aimed at having three wheels and
three magnetorquers, and for the time being, missions are being simulated in which the elevation angle is
assumed to be perfectly controlled and only azimuthal movements are made.

The angle of inclination will be assumed to always be right relative to the orbit. That is, the CubeSat will
keep the upper and lower faces parallel to the Earth and to the direction of the orbit, while the lateral faces
will be perpendicular to the Earth and to the direction of the orbit, depending on the translation rate of the
CubeSat in orbit. The predicted movements will be in the direction of the azimuth. Because the lower half is
constantly parallel to the Earth, the communication antenna is always correctly aligned. Additionally, the
side faces can vary in such a way that their antennas are confused relative to CubeSats orbiting in the same
orbit and placed directly in front of and behind them.

4
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

Chapter 2

State of the art

2.1 CubeSats
Because of their small size, CubeSats are classified as nanosatellites. These nanosatellites with standard
dimensions of 10cm x 10cm x 10cm are known as CubeSat ”1U”, or CubeSat ”1 Unit”. There have also been
”2U” (20x10x10 cm), ”3U,” and ”6U” CubeSats built and launched. CubeSats have a unit weight of less
than 1.33kg. This nanosatellite is notable for its utility and low cost [7].

Figure 2.1: A set of three CubeSats. (Source: NASA)

CubeSats were created in 1999 by CalPoly (California Polytechnic State University) and Stanford University
to promote and develop the requisite capabilities for the production of small satellites for LEO missions. The
first CubeSats were launched on a Russian Eurockot in June 2003, and by 2008, around 75 CubeSats had
been placed in orbit [5].

Due to their small size and inexpensive cost of launch, CubeSats are frequently utilised in low Earth orbit for
5
2.1. CUBESATS CHAPTER 2. STATE OF THE ART

tasks including data collection of various types, remote sensing, and communications. It orbits the Earth
approximately every 90 minutes in low-Earth orbit, which has a height between 160 km and 2,000 km.

Typically, a Nanoracks CubeSat Deployer (NRCSD) or Poly Picosat Orbital Deployer (P-POD) is used to
launch CubeSats into orbit.

• For small satellites launched from the International Space Station (ISS), NRCSD is a self-contained
CubeSat deployer system. The Japanese Experiment Module (JEM) of the ISS serves as a staging area
for operation of the NRCSD, which launches within the Pressurized Cargo Module (PCM) of ISS cargo
resupply vehicles. Prior to launch, the NRCSD is connected with payloads at a NanoRacks facility and
physically and electrically separates CubeSats from cargo resupply vehicles, the International Space
Station, and its crew [8].

Any combination of 1U, 2U, 3U, 4U, or 5U CubeSats up to a maximum capacity of 6U, or a single 6U
CubeSat in the 1x6x1U configuration, may be accommodated by the NRCSD.

Figure 2.2: NanoRacks CubeSat Deployer (NRCSD) (Source: [8])

• The Poly Picosatellite Orbital Deployer (P-POD), a standardised deployment tool, ensures that all
CubeSat designers follow the same physical requirements. With its tubular form, the P-POD can hold
deployable gear that is up to 340.5mm by 100mm by 100mm in size.

The P-POD, which also serves as a conduit between the CubeSats and the launch vehicle, can carry
three ordinary 1U CubeSats. The P-POD is a rectangular box with an alodined aluminium door and
spring mechanism. Once the release mechanism of the P-POD door is activated, the CubeSats are
deployed by the main spring, sliding on the rails of the P-POD [9].

6
2.2. ATTITUDE DETERMINATION AND CONTROL SYSTEM CHAPTER 2. STATE OF THE ART

Figure 2.3: Alodined P-POD (Source: [9])

2.2 Attitude Determination and Control System


The CubeSat’s orientation (attitude) in orbit is determined and controlled by ADCS and maneuvered into
the desired position using actuators. The four components that compose the ADCS are the sensors, the
attitude actuators, the controller, and the interface.

Figure 2.4: ADCS Subsystems (Source: [10])

7
2.2. ATTITUDE DETERMINATION AND CONTROL SYSTEM CHAPTER 2. STATE OF THE ART

2.2.1 Sensors

Sensors collect data that may be used to detect orientation. Sensors are getting increasingly precise as
technology improves.

• Solar sensors are light detectors that detect visible or infrared light and measure one or two angles
between their mounting base and incident sunlight. The fundamental issue with these sensors is that
they require clear fields of vision, and most low-Earth orbits contain eclipse periods [11].

• Star sensors can function as scanners or trackers. On rotating spacecraft, for example, scanners are
utilised. Light from various stars passes through numerous slits, and the vehicle’s attitude can be
determined after several star crossings.

Star trackers, on the other hand, are employed on three-axis stabilised spacecraft to watch one or more
stars and obtain two- or three-axis attitude data. Using a star catalogue, internal processing generates
a three-axis attitude.

The star cameras, however, may not function correctly if the spacecraft rotates too rapidly. Another
issue is that star sensors are susceptible to being obscured by the Sun, Moon, planets, and so on.
Furthermore, these sensors are too large for CubeSat missions [11].

Figure 2.5: Star Sensor, TDP 6 of Alphasat (Source: [12])

• Horizon sensors, also known as Earth sensors, are infrared devices that detect the difference in
temperature between deep space and the Earth’s atmosphere, showing the direction of the Earth’s
centre by measuring the local horizon line. Typical horizon sensor accuracies range from 0.1 to 0.25
degrees, with certain applications nearing 0.03 degrees [11].

• Magnetometers are sensors that detect the magnitude and direction of the Earth’s magnetic field.
The magnetometer can identify the spacecraft’s attitude in relation to the local magnetic field; this
8
2.2. ATTITUDE DETERMINATION AND CONTROL SYSTEM CHAPTER 2. STATE OF THE ART

information is used with magnetic field models and orbit data to estimate the spacecraft’s attitude in
relation to Earth. Its precision, however, is not as strong as that of star or horizon sensors [11].

• Aside from being utilised as high-precision navigation devices, GPS receivers may also be used to
calculate attitude. The differential signals from the several antennas can be used to estimate attitude if
a spacecraft is large enough to position many antennas far enough apart. Unfortunately, the separation
of the antennas limits its development [11].

• Gyroscopes are inertial sensors that measure and maintain angular velocity and orientation. Gyroscopes
are getting more accurate and lower in mass and size as technology develops. Individual gyroscopes
offer one or two axes of information and are frequently combined as an inertial reference unit (IRU) for
a full three axes and, in certain cases, full redundancy. Moreover, IRUs with additional accelerometers
for position and velocity sensing are referred to as inertial measurement units (IMUs) [11].

2.2.2 Attitude Actuators

The control algorithm’s outputs are the commands to the actuators required to attain or maintain the
reference attitude. Following that, the various actuators that have been employed will be explained.

• Reaction Wheels: When the reaction wheels turn, the satellite rotates in the opposite way. This is
because angular momentum is conserved. These may revolve in either direction and each wheel has one
control axis. The reaction wheels’ nominal operating point is close to zero. If the disturbances have a
secular component, the wheels collect angular momentum. In these instances, the wheel’s turning speed
deviates from its nominal value. When this happens, they must be unloaded from the accumulated
momentum. A second magnetic or propulsive actuator is required to compensate for the impulse
discharge without altering the satellite’s dynamics [13].

• Moment Wheels: Moment wheels, on the other hand, constantly rotate at high speeds and act by
raising or lowering that speed. Two axes of gyroscopic stiffness are provided by impulse, and torque
may be regulated to vary orientation around the axis of rotation [13].

• Control Moment Gyros (CMG): CMGs are gimbale wheels that rotate at a constant speed and can
be single or double. We can generate a large output torque by spinning the gimbale shaft, the magnitude
of which depends on the rotor speed and the gimbale rotation speed. To avoid wheel saturation, CMG
requires sophisticated control rules and precise boost management. Furthermore, they have a shorter
life and are more costly than other actuators. They are utilised when fine control is still necessary for
high torque situations [11].

• Magnetic torques: Magnetic torques are magnetic coils, which are electromagnets intended to create
magnetic dipole moments of a particular magnitude. Three orthogonal torquers deployed on a spacecraft
may generate a magnetic dipole of any direction and magnitude up to the torquers’ strength. The
magnetic dipole can be modified. The torque produced, however, is determined by the magnetic field’s
orientation [11].

9
2.2. ATTITUDE DETERMINATION AND CONTROL SYSTEM CHAPTER 2. STATE OF THE ART

• Thrusters: Due to its dual function for altering orbital parameters, thrusters are arguably the most
commonly flown attitude actuators. They are employed by spacecraft that must conduct orbital
manoeuvres. The thrusters are the most adaptable, but they require fuel to operate, commonly
hydrazine, and once depleted, the mission is over. This approach involves releasing gas at high velocity
in an asymmetric manner to generate momentum but not net thrust [13].

2.2.3 ADCS Controller

The controller’s goals are to take input from sensors and interpret it to identify the orientation, compute the
target’s attitude, and decide the rotations to perform for each axis. The ADCS will then transmit commands
to the actuator to adjust the CubeSat’s attitude if the OBC (On Board Computer) and EPS (Electrical
Power Supply) subsystems allow it [10].

On the one hand, the On Board Computer, or OBC, is the brain of the satellite and performs a variety of
functions, including directing all operations, giving instructions to the various modules, and receiving and
storing data from the CubeSat before sending it to Earth via the TCS (Telecommunications System) error
handling process [10].

On the other hand, the Electrical Power Supply’s or EPS’s, duties include producing, storing, and
distributing the energy that the solar panels generate. The EPS of the CubeSat is composed of three modules:
the PV (photovoltaic panel), the BAT (battery), and the PCC (power control circuit) [10].

2.2.4 ADCS Interface

The hardware component known as the ADCS interface sends power from the EPS subsystem to the actuators,
as well as the signal received from the sensors to the microcontroller. The purpose of the interface module is
to maintain strong communication with and interact with other satellite systems by sending data [10].

Furthermore, the ADCS interface is the one that sends the required currents to the motors of the reaction
wheels or magnetorquers based on the control signals provided by the microcontroller.

10
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

Chapter 3

Hardware Prototype of the ADCS

In this chapter, each part of the system hardware will be detailed, to later present the final prototype achieved.
This includes the explanation of each of the components used, which are the motor driver, the IMU, the
communication device, and the Bluepill microcontroller.

3.1 MAXON Motor Driver


The ESCON 24/2 module is a strong, small-sized 4-quadrant PWM servo controller that can drive brushed
DC motors with permanent magnets or EC motors without brushes up to 48 watts. The model of the ESCON
24/2 module used in this project is the 466023 (Figure 3.1), which is a brushless EC motor driver. The device
is intended for configuration over USB interface using the ”ESCON Studio” graphical user interface for PCs
running Windows [14]. The data sheet for this component can be found in the Appendix D.1.

Figure 3.1: Module 24/2, Servo Controller, P/N 466023 (Source: [14])

The servo motor, on the other hand, is a model EC 20 flat 20 mm, brushless, 5 Watt, with Hall sensors, and
has the part number 351006 (Figure 3.2, Appendix D.2). A servo motor is a type of rotary actuator or motor
11
3.1. MAXON MOTOR DRIVER CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

that offers exact control over acceleration, speed, and angular position—features that a regular engine does
not. In essence, it combines a conventional motor with a sensor to provide position information [15].

Figure 3.2: EC 20 flat Ø20 mm, brushless, 5 Watt, with Hall sensors (Source: [16])

The transition from a stepper motor to a different type of motor is an improvement above what has been done
so far. Servo motors are a considerably better controller of positional precision, which explains this change.
In addition, servo motors have higher top speeds and steeper acceleration and braking ramps than stepper
motors. It’s also crucial to know that servo motors have the benefit of allowing torque to be controlled in
an application, whereas stepper motors operate at maximum torque. But the servo motor’s lower economic
efficiency is one of its main drawbacks [17].

Servo motors are used often because they are powerful and effective despite being small. In fact, servo motors
are a set of certain components coupled with an AC or DC motor. The ESCON 24/2 module has three
working modes that fulfil the strictest specifications: speed control (closed loop), speed control (open loop),
and current control. This module offers broad analogue and digital I/O capability and is intended to be
controlled by an analogue value [14]. The work mode utilised in this project is configured using ”ESCON
Studio,” which is the current control, see Figure 3.3.

12
3.1. MAXON MOTOR DRIVER CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

Figure 3.3: Current Control Mode (Source: Own)

Furthermore, only digital inputs have been setup using the ESCON application (Figure 3.4); the first digital
input is configured to be the setpoint value PWM (Figure 3.5), and the second digital input is set to be the
enable with the logic high level (Figure 3.6).

Figure 3.4: Digital Inputs and Outputs (Source: Own)

13
3.1. MAXON MOTOR DRIVER CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

Figure 3.5: Digital Input 1: Setpoint value (PWM) (Source: Own)

Figure 3.6: Digital Input 2: Enable (Source: Own)

Moreover, a fundamental component of servo motors is the encoder, which serves as a sensor and provides
speed and position data. The controller receives the end position and compares it to the start position input;
if there is a mismatch, the motor runs to the right position [15]. In this project, a Hall effect encoder is
employed as a feedback mechanism in a brushless servo system to provide information for the amplifier to
electrically control the motor. To create switching signals, the device employs a magnetic wheel and Hall
effect sensors. The accessory utilised is the Adapter 11-pole flexprint connection to 8-pole screw terminal
with the Part Number 220300 (Figure 3.7, Appendix D.3) to connect the motor driver to the MAXON motor.

14
3.1. MAXON MOTOR DRIVER CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

Figure 3.7: Adapter 11-pole flexprint connector to 8-pole screw terminal (Source: [18])

To conclude this section, the Figure 3.8 and the Table 3.1 are included below that indicate how the wiring
between the MAXON motor and the motor driver would appear if the technical specifications in the appendix
to each of them were followed.

Figure 3.8: Wiring between motor driver and MAXON motor (Source: Own)

15
3.2. IMU CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

Table 3.1: Wiring between motor driver and MAXON motor (Source: Own)

466023 (motor driver) 220300 (FPC to PCB) Wire Color


Pin1 (Motor winding 1) Pin8 (Motor winding 1) blue
Pin2 (Motor winding 2) Pin7 (Motor winding 2) blue
Pin3 (Motor winding 3) Pin6 (Motor winding 3) blue
Pin5 (GND) and Pin18 (GND) Pin5 (GND) black
Pin6 (+5VDC Hall Sensor Supply Pin1 (+4,5. . . 24VDC) turquoise
Voltage) and Pin16 (DigIN2)
Pin7 (Hall Sensor 1) Pin3 (Hall Sensor 1) yellow
Pin8 (Hall Sensor 2) Pin4 (Hall Sensor 2) green
Pin9 (Hall Sensor 3) Pin2 (Hall Sensor 3) orange

Accordingly, it is necessary that the battery provide between +10 and +24V, or else the device will not
operate. Figure 3.8, on the other hand, shows a little supplementary circuit constructed by a fuse, a diode,
and a capacitor to safeguard the MAXON components, as specified in its technical sheet.

Consider that this circuit would not function properly since it is merely a representation of how only two of
the required components should be linked. Later on, the remaining components will be detailed, as well as
how they should be connected.

3.2 IMU

3.2.1 MPU9250

This section will discuss the IMU, which is the component that will provide information on the CubeSat’s
orientation, speed, and acceleration. The Inertial Measurement Unit (IMU) is an electrical device that uses
accelerometers and gyroscopes to monitor acceleration and rotation. The sensor that will be utilised for this
purpose in this project is the MPU-9250 3.9. The MPU-9150 and MPU-9250 sensor families are Invensense’s
latest generation 9DOF IMUs [19].

16
3.2. IMU CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

Figure 3.9: MPU9250 9-Axis 9 DOF (Source: [20])

The MPU-9250 9DOF module detects 9-axis motion by combining on the same DMP chip a 3-axis gyroscope
(3DOF), a 3-axis accelerometer (3DOF), and an AK8963 3-axis magnetometer (3DOF) (9DOF). The I2C or
SPI bus may be used for communication, which makes it easier to collect measured data. I2C is used for
communication in this project [21].

According to Daniel Castillo’s work [1], in order to get a totally accurate measurement of the CubeSat’s
orientation, the DMP (Digital Motion Processor) device was utilised to acquire the needed orientation in
the form of mathematical equations of quaternions. Following that, the MPU9250 module’s access to DMP
was utilised to retrieve these quaternions, and the Euler angles were calculated using the Arduino software
library ”MPU6050 6Axis MotionApps20.h” and the subroutines ”IMU()” and ”QuatToEuler()” built by Juan
Palomares Moyano [22]. On the one hand, the ”IMU()” subroutine performs the ”mpu.dmpGetQuaternion”
subroutines needed to access the DMP, while on the other hand, ”QuatToEuler()” calculates the Euler angles
using the quaternion equations acquired from the DMP. According to the multiple benefits mentioned in
Daniel Castillo’s work [1] the data previously processed by the DMP are acquired as attitude quaternion
equations.

One of the new features of this project has been accessing the DMP to obtain the angular velocity value,
which has been obtained using the function ”mpu.dmpGetGyro”. This function returns a vector ”v”, and the
following expression is used to obtain its value in the yaw direction: ”vz = v.z”.

3.2.2 DMP Calibration Process

The MPU-9250 has a single integrated IMU, model number MPU-6500, inside that consists of a 3DOF
accelerometer and a 3DOF gyroscope. As was already indicated, both models support communication through
the SPI and I2C buses, making it simple to get the measured data. Low voltage supply, ranging from 2.4 to
3.6V. The majority of modules have a voltage regulator built in that enables 5V to be supplied directly [21].

17
3.2. IMU CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

With all sensors and the DMP turned on, the sensor uses 3.5mA. It contains programmable interrupts, a
high accuracy clock, and an inbuilt temperature sensor. Additionally, connections to additional I2C devices
are available. A new generation IMU, the MPU-9250, outperforms older IMUs like the MPU-6050 in terms of
performance. The MPU-9250 uses a magnetometer to avoid drift, which can occur in conventional IMUs
after a few hours of operation [21].

The MPU-9250 has a built-in CPU (DMP Digital Motion Processor) that uses sophisticated MotionFusion
algorithms to combine data from internal sensors instead of relying on external filters [21].

A calibration to correct the offset values must be done in order for the DMP readings to be entirely accurate.
Since there might be significant differences between different sensors, it is required to run the IMU calibration
code given in the Appendix A for each sensor in order to do this. Note that the DMP need time to begin
functioning. It will first give off rough measures, but as time goes on, it will stabilise. Although it occasionally
can go up to 40 seconds, the typical duration is around 15 seconds [21].

The following diagram (Figure 3.10) shows the wiring process. The Arduino’s SDA and SCL pins are linked
to the equivalent pins on the sensor, and the module is powered by the Arduino through GND and 5V. See
Table 3.2 for a better understanding of the wiring.

Figure 3.10: Wiring for DMP calibration (Source: Own)

18
3.3. COMMUNICATION DEVICE CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

Table 3.2: Wiring between MPU9250 and Arduino, Calibration (Source: Own)

MPU9250 (IMU) Arduino UNO) Wire Color


Pin1 (VCC) Pin88 (5V) red
Pin2 (GND) Pin89 (GND) black
Pin3 (SCL) Pin6 (A5/SCL) yellow
Pin4 (SDA) Pin5 (A4/SDA) orange
Pin8 (INT) Pin64 (D2) turquoise

The Arduino has to be connected to the computer by USB before the software can be compiled and uploaded,
see Appendix A. The calibration results may be seen on the serial monitor. The results of the calibration of
the IMU used in this project may be seen in the Figure 3.11.

Figure 3.11: IMU calibration results. (Source: Own)

3.3 Communication Device


The suggested system requires the establishment of a communication device that enables testing by the user.
This communication device, like those used in earlier PLATHON projects [1] [2], will be a Bluetooth module,
named the HC-05 (Figure 3.12). This is due to the requirement for non-wired communication in order to
transmit position commands and desired torque values for subsequent reading of sensor data. This device
was chosen since it is affordable and comfortable to use.

Figure 3.12: HC-05 Bluetooth Module, ZS040 Model (Source: [23])

One of the issues that needed to be addressed before moving further was that the system required the
capabilities of an HC-06 Bluetooth module while only HC-05 Bluetooth modules were available. As a result,
19
3.3. COMMUNICATION DEVICE CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

the HC-05 Bluetooth module was set up to behave similarly to the HC-06 Bluetooth module. It was necessary
to change the baud rate of the module.

The ZS-040 Bluetooth model (Figure 3.12), which operates on two voltage levels, has to be configured. Even
though its data ports run at 3.3V, this module has a 3.6 to 5V power range, allowing it to be powered by a
5V board. The data output (TXD) may be connected directly to an Arduino, such as the UNO, because
3.3 volts is regarded as a high level on an Arduino input, while the data input (RXD) has to be connected
through a resistive divider. The required wiring for the module’s setup is shown in Figure 3.13 and Table 3.3.

Figure 3.13: Wiring for Bluetooth module configuration (Source: Own)

Table 3.3: Wiring for Bluetooth module configuration (Source: Own)

Bluetooth Module ZS040 Arduino UNO) Wire Color


VCC Pin87 (3V3) red
GND Pin89 (GND) black
TXD Pin54 (D10) blue
RXD Pin55 (D11) green

The HC-05 has a particular operating mode called configuration mode, which processes incoming input as
20
3.3. COMMUNICATION DEVICE CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

AT commands that specify which internal parameter must be verified or adjusted.

There are two configuration options for the AT module, one of which permits altering any parameter and the
other of which has some limitations. The sole command that differs between the two modes in this context is
the AT+NAME command, which can only be used in the first mode, also known as reduced mode. It is
important to understand that 38400 baud is always the default connection speed in all cases [24].

To set the Bluetooth device in ”reduced” mode, the following steps given below should be followed:

• Disconnect the ZS040 module’s power supply.

• While connecting the device to the power, keep the Bluetooth button pressed.

• When the device is connected, the button may be released.

The slow LED flash indicates that the module is in programming mode.

To communicate with the HC-05 and analyze the values it returns using the serial terminal of the Arduino
IDE, a software that acts as a bridge between the computer and the Bluetooth module must be uploaded to
the Arduino UNO. The Arduino soft serial connection (pins 10 and 11) will be used to send each terminal
input to the PC, and the same port will be used to send each module output. See the Appendix B for the
code [24].

The serial monitor is set at 38400 baud and ”both NL and CR” are enabled in the line settings once the
software has been uploaded to the Arduino UNO.

If ”OK” is returned in response to the character ”AT” sent over the serial monitor, AT mode is active. As an
alternative, you can transmit the commands ”AT+NAME” and ”AT+NAME=NAME” to show it on the
serial monitor and modify the module name, respectively. Additionally, the speed has been adjusted to 9600
baud using the ”AT+UART” instruction. Consult the bibliography for further instructions [25].

In addition, downloading the ”Serial Bluetooth Terminal” application from the ”Google Play Store” is
required for communication with the Bluetooth module. Optionally, it is possible to store the data provided
or received by the device in ”.txt” format by clicking ”Log” from the ”Data” menu of the same application
when the results are being printed. The mobile device will save the file.

21
3.4. BLUE PILL MICROCONTROLLER CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

3.4 Blue Pill Microcontroller


The Blue Pill STM32 microcontroller 3.14, which is also the most essential component, will operate as an
interface between the inputs from the sensors and the outputs in duty of powering the actuators.

Figure 3.14: Blue Pill STM32 microcontroller. (Source: [26])

It is important to know that in order to programme the Blue Pill using the Arduino IDE, the ’stm32duino’
library must be added to the board manager, and the board must then be configured in the tools as indicated
in the Figure 3.15 [27].

Figure 3.15: Programming the Blue Pill with the Arduino IDE. (Source: [27])

22
3.4. BLUE PILL MICROCONTROLLER CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

The full pinout can be seen in the Figure 3.16. It is key to be aware that the majority of pins serve many
purposes.

Figure 3.16: The Generic STM32F103 Pinout Diagram. (Source: [28])

As seen in the Figure 3.16, some of the pins are labelled as 5V tolerant, meaning that when used as inputs,
they can withstand a voltage of 5 Volts, while others are marked as Not 5V tolerant, preventing us from using
them with voltages higher than 3.3 Volts despite the fact that they can withstand voltages of up to 4V [27].

The microcontroller uses PinB7 as the System Data (SDA) and PinB6 as the System Clock (SCL) to receive
measurement data from the IMU. Pin A10 (RX) is used to receive data from the Bluetooth module, whereas
Pin A9 (TX) is used to transmit data.

Besides, the Bluetooth module and measurements from the sensor (MPU9250) have undergone testing to
make sure they are operating properly. The sole purpose of this test was to check if the components were
functioning properly without the motor driver. The wiring diagram for this test is illustrated in Figure 3.17
and Table 3.4. References from earlier studies might be consulted for further details [1] [2] [3].

23
3.4. BLUE PILL MICROCONTROLLER CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

Figure 3.17: Wiring to test devices (Source: Own)

Table 3.4: Wiring to test devices (Source: Own)

STM32 Bluetooth MPU9250 Wire


Blue Pill Module (IMU) Color
3v3 VCC Pin1 (VCC) red
GND GND Pin2 (GND) black
PinA10 (RX1) TXD - pink
PinA9 (TX1) RXD - turquoise
PinB7 (SDA1) - Pin4 (SDA) yellow
PinB6 (SCL1) - Pin5 (SCL) blue

According to section 3.1, the ESCON 24/2 module is a 4-quadrant PWM servo controller that can power
brushless EC motors up to 48 watts. The servomotors work by using pulse width modulation (PWM), which
involves creating a square wave and altering the period of the wave while keeping the pulse’s high level
constant in order to change the servo’s location as needed.

PWM allows users utilise digital values to control analogue devices, such as a motor’s speed. PWM simulates
an analogue signal by using brief pulses. The duty cycle is the proportion of time that the PWM signal is
high (Figure 3.18). The duty cycle of a signal is expressed as either 100% or 0% depending on whether it is
always on or off. Figure 3.5 demonstrates that the motor driver’s reference value is already set to PWM. [29]

24
3.4. BLUE PILL MICROCONTROLLER CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

Figure 3.18: PWM Duty Cycle Waveforms. (Source: [30])

The most popular method for creating a PWM wave in a microcontroller is to utilise a timer and a comparator,
which frees up the microcontroller to handle other jobs and makes signal production more efficient and
automated. The technique entails setting the timer’s interrupts to correspond to the high pulse duration
value and the pulse width, which is the signal’s period. The interrupt subroutine should pull the PWM signal
high in response to a timer overflow interrupt and low in response to a comparator interrupt [29].

The STM32F103C8 features ten ADC pins and fifteen PWM pins (Figure 3.16). Each PWM output is given
via a channel coupled to 4 timers, and there are 7 timers in total. Because to its 16-bit PWM resolution,
counters and variables may have a maximum size of 65535. A PWM output with a 72 MHz clock rate can
have a maximum duration of around one millisecond [29].

PinA8 of the microcontroller is utilised in order to control the motor driver via PWM signals. The function
”pinMode(PA8, PWM);” first defines the pin as PWM before using the function ”pwmWrite(PA8, value);” to
assign any value to the pin. Experimental results show that the range of PWM values is from 1 to 1000,
with 500 representing zero, 1 representing the highest possible negative value, and 1000 representing the
highest possible positive value. The hardware portion of the attitude determination and control system’s
final assembly is shown in the section that follows.

25
3.5. FINAL HARDWARE WIRING CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

3.5 Final Hardware Wiring


In order to portray the project’s final wiring, all of the information about the devices that was covered in
chapter 3 must be taken into consideration. But first, it needs to be clarified that the little circuit, made
up of a capacitor, a diode, and a fuse, that helps to safeguard MAXON devices won’t be included in the
schematic in order to best aid in understanding the wiring. However, as Section 3.1 explains, in practice they
can indeed be incorporated.

Two switches have been added to the wiring, as can be seen in the Figure 3.20. The first one powers the
entire circuit, and the second one is to enable/disable the motor.

Since the power supply for the motor driver can range from +10 to +24V but the remainder of the circuit
should only get a maximum of 5V, a converter (reducer) has also been incorporated. The MP2307 converter
(Figure 3.19) reduces a power supply from 4.75V-23V to 1V-17V, making it a miniature DC to DC voltage
regulator that may be adjusted using the potentiometer it provides.

Figure 3.19: MP2307 Converter (Source: AliExpress)

Supplementarily, it is noteworthy that the modules 466023 and 220300 were developed in Fritzing as new
components from the corresponding Inkscape drawings made for this project.

The Figure 3.20 and Table 3.5 are followed by actual photographs of the prototype 3.21, on the other hand.

26
3.5. FINAL HARDWARE WIRING CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

Figure 3.20: Final Hardware Wiring (Source: Own)

Figure 3.21: Actual Photograph of the Prototype (Source: Own)

27
3.5. FINAL HARDWARE WIRING CHAPTER 3. HARDWARE PROTOTYPE OF THE ADCS

Table 3.5: Wiring between motor driver and MAXON motor (Source: Own)

466023 220300 STM32F MPU9250 Bluetooth


(motor driver) (FPC to PCB) Blue Pill (IMU) Module
Pin1 (Motor Pin8 (Motor - - -
winding 1) winding 1)
Pin2 (Motor Pin7 (Motor - - -
winding 2) winding 2)
Pin3 (Motor Pin6 (Motor - - -
winding 3) winding 3)
Pin4 (+10... - - - -
+24VDC)
Pin5 (GND) Pin5 GND Pin2 Pin3
Pin18 (GND) (GND) (GND) (GND)
Pin6 (+5VDC
Hall Sensor Pin1 - - -
Supply Voltage) (+4,5. . . 24VDC)
Pin16 (DigIN2)
Pin7 (Hall Pin3 (Hall - - -
Sensor 1) Sensor 1)
Pin8 (Hall Pin4 (Hall - - -
Sensor 2) Sensor 2)
Pin9 (Hall Pin2 (Hall - - -
Sensor 3) Sensor 3)
Pin17 - PinA8 - -
(DigIN1) (PWM)
- - PinB7 Pin4 -
(SDA1) (SDA)
- - PinB6 Pin5 -
(SCL1) (SCL)
- - PinA9 - Pin5
(TX1) (RXD)
- - PinA10 - Pin4
(RX1) (TXD)

28
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

Chapter 4

Software Control of the ADCS

The software that has been developed to this point will be discussed in this chapter (Appendix C). The
Arduino IDE, which is free software, was used to write the code. Two distinct enhancements have been made
to the original code to simplify and improve user comprehension.

• Firstly, the program has been optimized to function more effectively and with fewer resources in order
to improve performance.

• The second was to structure the software by grouping the code into tabs that each represented a file in
the same directory as the source code. The project became clearer, was easier to comprehend, and
could be expanded thanks to this alteration, which was able to split the enormous file into multiple
smaller ones. Figure 4.1 illustrates the project’s organizational structure.

Figure 4.1: Software Structure (Source: Own)

29
CHAPTER 4. SOFTWARE CONTROL OF THE ADCS

Henceforth, each tab is briefly explained.

• Control Code Alev Yilmaz : This is the main code, which contains ”setup()” and ”loop()”. The
setup function is the first to be run within the Arduino program. The loop is then entered, and it will
continue endlessly until the microcontroller is turned off or reset. This is also the file that contains
all of the definitions and loaded libraries, as well as where the IMU is setup and calibrated. This tab
always directs the user to the ”mode Select” file.

• mode Select : This section allows the user to choose between three distinct modes based on what they
want to perform. In contrast to other works, the modes used in this project fulfill different features.
The next sections provide detailed explanations of these modes.

• actual orientation : This is mode 1 of the ”mode Select” menu. By entering this mode, the user will
continually get the angle in degrees in the yaw direction through the Bluetooth connection. Section 4.1
goes into greater detail about this mode.

• assign current : This corresponds to the second mode of ”mode Select” and consists of rotating
the motor in both clockwise and anticlockwise directions at the user’s current input. This function is
described in more detail in the Section 4.2.

• positioning RW : Since it deals with the implementation of the fine positioning mode employing the
PID controller, this subprogram is the third and most crucial option of ”mode Select.” When the user
specifies the desired angle, the CubeSat accelerates and decelerates in both directions (CW or CCW)
infinitely to achieve the desired orientation. Section 4.3 provides a comprehensive explanation of this
mode.

• IMU : DMP data from the IMU is retrieved in this tab thanks to the ”MPU6050 6Axis MotionApps20.h”
library. These data are, on the one hand, the attitude quaternion, which is then transmitted to the
Euler angles, and, on the other hand, the angular velocity received via the gyroscope. The updated
orientation and speed data are acquired each time this function is activated.

• QuatToEuler : As mentioned in the ”IMU” tab, this function is an algebraic method for converting
quaternions to Euler angles. References can be consulted for more information [2].

• OBC data receive : This function configures the Bluepill to collect data using the CH3 timer and
Serial1 as the UART. The information obtained from the communication device is recorded as an
”OBC data value.”

• OBC mode receive : This function, as ”OBC data receive”, configures the Bluepill in data receive
mode utilizing the CH3 timer and Serial1 as an UART connection. ”OBC mode value” stores the data
received via the communication device.

• angle to 180 : For a more logical perception of results, this function is required to describe various
angles in degrees between -179.99 and +180.

30
CHAPTER 4. SOFTWARE CONTROL OF THE ADCS

It is recommended to check at the Figure 4.2 with the flowchart in it in order to comprehend the pro-
gram more clearly. The flowchart in Figure represents all of the software. In addition, each section of the
software modes contains its own more detailed flowchart in order to improve the understanding of the program.

Figure 4.2: Flowchart of the Software (Source: Own)

As shown in the Figure 4.2, the software for this project is composed of three distinct modes detailed in
the Table 4.1, which describes the aim, input, output, input condition, and output condition of the various
modes. The next sections will go through these modes in depth.

31
4.1. MODE 1: ACTUAL ORIENTATION CHAPTER 4. SOFTWARE CONTROL OF THE ADCS

Table 4.1: Summary of the Software Modes (Source: Own)

Mode 1 Mode 2 Mode 3


Actual Orientation Assign Current Positioning RW
Test mode that Test mode that Main code that
Aim angle monitoringin the consists of controls the
yaw direction moving the RW CubeSat’s attitude

Input None Desired intensity Desired angle

Output Yaw degree Actual intensity Degree error


Speed error

Input Condition Enter ”1” Enter ”2” Enter ”3”

Output Condition Enter positive Enter any Enter positive


number character number

4.1 Mode 1: Actual Orientation


The ”actual orientation” open loop mode, the initial mode of this code, is also the simplest. This mode’s
implementation was essential in determining if the IMU calibration was accurate as well as for testing the
communication device (Bluetooth Module), microcontroller (Blue Pill STM32), and MPU9250’s proper
performance.

As soon as the system enters this mode, microcontroller continuously communicates data obtained from
the IMU over Bluetooth at a rate of around every 100 milliseconds until the user sends a positive number
using the same way to exit mode. The data obtained is the yaw degree that is obtained from the IMU()
subprogram for each sample.

The application directs the user back to ”mode Select” to select a new mode once the user exits the current
mode. Appendix C contains the code for this mode, and the Section 5.1 of this project also contains the
experimental observations for this mode.

The flow chart for this initial mode is shown in the Figure 4.3.

32
4.2. MODE 2: ASSIGNING CURRENT TO RWCHAPTER 4. SOFTWARE CONTROL OF THE ADCS

Figure 4.3: Flowchart of the First Mode (Source: Own)

4.2 Mode 2: Assigning current to RW


As stated in the Section 3.4, in order to deliver PWM signals from the microcontroller to the motor driver,
the PA8 pin of the microcontroller is configured as PWM in this subprogram, which is the second mode from
which the user can choose between the three modes. Because the motor driver has been set up as a current
regulator (Figure 3.3), the microcontroller will interpret this signal as a current value.

The intensity is proportional to the torque produced by the servo motor. The capacity of a force to turn an
object is known as torque. A net torque on an object with a fixed point of rotation results in an angular
acceleration on it, which is the equivalent of Newton’s second law in rotational motion [31]. In accordance
with the current that the user specifies, the CubeSat will therefore accelerate more or less speedily and in a
clockwise or anticlockwise direction.

This applet has a while loop that will prompt the user to set the motor current between -100% and 100%,
which corresponds to values limited between -0.5A (CCW) and 0.5A (CW). While in this program mode, the
user may alter the current as many times as necessary by entering the desired value. Before delivering the

33
4.2. MODE 2: ASSIGNING CURRENT TO RWCHAPTER 4. SOFTWARE CONTROL OF THE ADCS

data to the micro driver, the range of values were converted using the ”map()” tool because the PWM only
recognises values between 1 and 1000.

The user must input the value ”-101” in order to exit the subprogram. The motor driver is given a current of
0A upon exit, and the software will wait until another mode is initiated.

To further understand this method, check Figure 4.4, where the appropriate flowchart is displayed.

Figure 4.4: Flowchart of the Second Mode (Source: Own)

34
4.3. MODE 3: POSITIONING RW CHAPTER 4. SOFTWARE CONTROL OF THE ADCS

4.3 Mode 3: Positioning RW


The third and last mode that the user can select over Bluetooth is this one. In this manner, the PID’s
implementation has helped the project fulfil its core goal. Therefore, the prior works, the improvements to be
made, and especially what has been accomplished in this manner will be detailed in this section.

4.3.1 Previous Works

Previously, the ADCS code was based on two separate positioning modes: coarse positioning mode and fine
positioning mode, which were produced by prior studies, and may be found in the references [1] [2] [3].

• Coarse positioning mode: using this method of operation, which covered the majority of the angular
distance and manoeuvre time, the intended location was first approximated within a five degree error
tolerance range [1].

• Fine positioning mode: this mode is engaged to exercise more exact orientation by directing the
last motions after the Coarse Positioning Mode has achieved its objective of being more or less near to
the target location. In this manner, the drive can be managed by a straightforward control algorithm,
carried out by a PID controller, or by a precise control algorithm, carried out by a more intricate
control loop [1].

The behaviour of both positioning modes is illustrated in the Figure 4.5.

Figure 4.5: Positioning modes identification (Source: [3])

35
4.3. MODE 3: POSITIONING RW CHAPTER 4. SOFTWARE CONTROL OF THE ADCS

The purpose of this project is to guide the CubeSat to the appropriate angle as precisely as possible. Due to
this, only the fine positioning mode has been used, disregarding the coarse positioning mode. The CubeSat
wouldn’t stop adjusting the angle it was situated at. The CubeSat would continue oscillating indefinitely
until it reached maximum accuracy, even if the mistake was very minor, and it would constantly be aware of
rectifying any angle error brought on by any circumstance, thanks to the implementation of PID controllers.

4.3.2 PID Controller Implementation

Torque has been identified as the action variable that has to be regulated in order to rotate the CubeSat. A
reaction wheel will be employed to perform the orientation manoeuvre; it will give torque in one of the three
degrees of rotational freedom. As a result, the first step is to create a controller that can rectify an angle by
sending a current signal into the actual plant. The motor that powers the reaction wheel will receive this
current signal, which is proportional to the torque. A PID controller will be used to manage the system [4].

PID controller is a control mechanism that determines the difference between the intended and real variables
through a feedback loop [32]. The components of a PID control loop are as follows:

• A sensor that measures the controllable variable It has previously been stated that the MPU9250 sensor
would be used in this project.

• A controller determines the output that causes the actuator to move using the signal from the sensor.

• An actuator that adjusts the controlled variable (motor).

The sensor outputs an analogue signal that indicates the process or system’s current position (PV Process
Variable). The value that has to be attained is the set point (SP SetPoint) that the controller has set. The
error, or difference between the desired value (SP) and the measured value (PV), is obtained by the controller
by deducting the PV from the SP. Each of the three components of the PID controller uses the error signal.
These three components (P+I+D) together form the output signal (MV Manipulated Variable) that the
controller will utilise to operate the actuator [32].

Figure 4.6: Block diagram of a PID controller in a feedback loop. (Source: [32])

36
4.3. MODE 3: POSITIONING RW CHAPTER 4. SOFTWARE CONTROL OF THE ADCS

Proportional
The proportional is merely the result of multiplying the error by the proportional constant (Kp). In doing
so, the output of the PID may be adjusted linearly with the error. Increased Kp translates into a higher
output value with the same error. The output does not change if the error is stable, which results in a fixed,
uncorrectable error known as ”offset” [32].

Integral
The integral eliminates that offset by integrating the error in time. Every X times, the mistake is added and
accumulated, and the value gained is multiplied by the integral constant Ki and added to the output, causing
the output to move cyclically and gradually correcting the offset. The interval X is the integration time Ti,
which denotes how frequently this computation is repeated [32].

Derivative
The derivative component attempts to minimise the mistake by proportionately correcting it at the same rate
that it happens. This is accomplished by deriving the error with respect to time every X times, multiplying
the result by the derivative constant Kd, and adding the resulting value to the output along with the preceding
components (P+I). In other words, it determines how quickly the error varies. The Td, or derivation time,
indicates how frequently this computation is repeated [32].

The procedures used in Joan Serrano’s work [4], which focuses on cascade control loops, have been applied
to the implementation of the controller. The motor that powers the reaction wheel will receive the torque
signal. Even though they are proportional values, the motor will interpret this signal as current; nonetheless,
the constants have been set under the assumption that this system is ideal. As can be observed in the
descriptions of the MAXON motor D.2, the torque constant, or relationship between the motor’s torque and
current, which is 8.82 [mNm/A], can be utilized by adding an extra gain.

Following Joan Serrano’s research [4], a cascaded P+PI controller has been built. This system is made up of
two feedback loops based on PID. The output of the first controller, as seen in the Figure 4.7, determines the
second controller’s set point.

Figure 4.7: Block diagram structure for a cascaded control (Source: [4])

The control of the CubeSat’s angular speed is shown by the inner loop in the Figure 4.8. As seen in Joan
Serrano’s work [4], a PI controller is required to control the angular speed.

37
4.3. MODE 3: POSITIONING RW CHAPTER 4. SOFTWARE CONTROL OF THE ADCS

Figure 4.8: Block diagram structure for the angular speed inner control loop (Source: [4])

In the ”positioning RW” mode, which is the third mode of the software for this project, it can be seen that the
difference between the ”desiredW,” that is the output of the first controller, and the ”vz”, which represents
the angular velocity of the CubeSat as determined by the IMU, is the input of the second controller, which is
”errorW”.

The ”outputP”, the proportional component of the PI, and the ”outputI”, the integral component of the
PI, have been calculated using the ”errorW”. The output of the second controller is the total of these two
components. On the one hand, multiplying the ”errorW” with the constant ”kpw” results in the ”outputP,”
which is the proportional component. On the other hand, the ”outputI” is a value that is calculated by
multiplying ”Ti” by ”errorW” and the constant ”kiw,” and it is a value that is added to each instance of
”Ti”.

The loop that would control the position is the outter one of the Figure 4.9, which with torque disturbances
would be as in the Figure 4.10.

Figure 4.9: Block diagram structure adding the position outer control loop (Source: [4])

38
4.3. MODE 3: POSITIONING RW CHAPTER 4. SOFTWARE CONTROL OF THE ADCS

Figure 4.10: Block diagram structure for the position controller adding torque disturbances (Source: [4])

The desired angle set by the user through Bluetooth would serve as the loop’s setpoint; this setpoint is
referred to as ”deltaDegree” in the code. The ”degreeError” variable, as implied by its name, represents
the difference between the desired angle and the current angle, and it is equal to the difference between
this setpoint and the ”actualDeltaDegree” determined using the data collected from the IMU. In order to
more precisely define which side the reaction wheel should rotate, these angles are modified between +-180º,
thanks to the function called ”angle to 180”.

After obtaining the error, all that is left to do is multiply it by the proportional constant ”kpp” to get the
output of the first controller. Take into account that the first controller’s output corresponds to the second
controller’s setpoint and is referred to as ”desiredW”.

In summary, the control is provided by the parameters ”kpp,” ”kpw,” and ”kiw” (Table 4.2).

Table 4.2: Controllers parameters (Source: Own)

Parameter Symbol
Proportional gain for the position controller kpp
Proportional gain for the angular speed controller kpw
Integral gain for the angular speed controller kiw

To be sure, these parameters could be calculated theoretically, as Joan Serrano indicates in his work [4],
for example, with the Root Locus Procedure. This method involves comparing the actual transfer function
denominator to the ideal transfer function denominator, once the system’s transfer function has been identified
in order to identify the system poles that fulfil the selected dynamics.

However, these parameters have been determined experimentally in this project and discussed in greater
detail in Section 5.4.

39
4.4. FLOWCHART OF THE MAIN MODE CHAPTER 4. SOFTWARE CONTROL OF THE ADCS

4.4 Flowchart of the Main Mode


Similar to the first two modes, the flow diagram for mode three may be observed to fully understand this
mode.

Figure 4.11: Flowchart of the main mode (Source: Own)

40
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

Chapter 5

Experimental Results

This part will display the outcomes of implementing the techniques described in the preceding chapters 3 4
for each software mode.

5.1 Mode 1: Actual Orientation


The outcomes of selecting software’s Mode 1 will be displayed in this mode, as described earlier. Two full
revolutions of the CubeSat are shown in the Figure 5.1; however, as this experiment included manual rotation
of the CubeSat, there are some imperfections. The proper IMU calibration (3.2.2) can also be shown in the
Figure 5.1, as well as the accurate measurement of the angle between 0 and 360 degrees when the CubeSat
rotates.

Figure 5.1: Experimental Result of Mode 1, Orientation of the CubeSat (Source: Own)

41
5.2. MODE 2: ASSIGNING CURRENT TO RW CHAPTER 5. EXPERIMENTAL RESULTS

5.2 Mode 2: Assigning current to RW


There have been three different experiments conducted in order to illustrate the experimental results of the
second mode of the code. It has already been explained that in this manner desired current may be introduced
in percentage values ranging from 0% to 100%. The many tests that have been conducted to ensure that the
motor driver functions properly with the other devices will be seen in the subsequent subsections.

5.2.1 Mode 2: Experiment 1

In this initial experiment, 20% and then -20% of current through Bluetooth were introduced sequentially. As
a result, the graph of the variation of current against time (Figure 5.2) and variation of velocity versus time
(Figure 5.3) can be seen. Since the maximum current that may be applied has been set at 0,5A, it is evident
from the Figure 5.2 that the maximum current that the 20% of current achieves is around 0,12A. On the
other hand, it can be seen in the Figure 5.3 that the maximum speed is achieved after around 1 ms.

Figure 5.2: Test 1 of Mode 2: 20% of current in both directions, Current Variations (Source: Own)

Figure 5.3: Test 1 of Mode 2: 20% of current in both directions, Speed Variations (Source: Own)

42
5.2. MODE 2: ASSIGNING CURRENT TO RW CHAPTER 5. EXPERIMENTAL RESULTS

5.2.2 Mode 2: Experiment 2

In the second experiment, 50% current was added, and the expected graphics were produced in the same way
as in the first experiment. The maximum current that can be observed in the Figure 5.4 is around 0.3A. After
then, it can be seen in the Figure 5.5 that the maximum speed is reached faster than in the first experiment,
in this case in one millisecond.

Figure 5.4: Test 2 of Mode 2: 50% of current in both directions, Current Variations (Source: Own)

Figure 5.5: Test 2 of Mode 2: 50% of current in both directions, Speed Variations (Source: Own)

43
5.3. SUMMARY OF THE EXPERIMENTAL RESULTS OFCHAPTER
MODE 2 5. EXPERIMENTAL RESULTS

5.2.3 Mode 2: Experiment 3

In this final experiment of mode 2, it was decided to apply the maximum current allowed by introducing
100%, which is 0.5A. The outcome is clearly shown in Figure 5.6. Additionally, in the Figure 5.7 it is possible
to see that, in contrast to the first two cases, the maximum speed is reached in this instance considerably
more quickly.

Figure 5.6: Test 3 of Mode 2: 100% of current in both directions, Current Variations (Source: Own)

Figure 5.7: Test 3 of Mode 2: 100% of current in both directions, Speed Variations (Source: Own)

5.3 Summary of the Experimental Results of Mode 2


With the three experiments, it can be concluded that it has been made possible for the motor to function
precisely in both directions in accordance with the PWM signal introduced by the user using a communication
device.

The Table 5.1, which includes the intensity applied and angular acceleration values, is a summary of the
outcomes obtained in this mode.

44
5.4. MODE 3: POSITIONING RW CHAPTER 5. EXPERIMENTAL RESULTS

Table 5.1: Summary of the Experiment 2 (Source: Own)

Current [A] Angular acceleration [rad·s-2 ]


Experiment 1 +0,1168 112,99
Experiment 1 -0,1183 -118,65
Experiment 2 +0,3044% +417,56
Experiment 2 -0,308% -421,17
Experiment 3 +0,4989% +671,77
Experiment 3 -0,492% -701,02

In conclusion, in the Table 5.1 it can be seen how the angular acceleration of the motor increases as the
intensity applied to the motor increases.

5.4 Mode 3: Positioning RW


In this section, the parameters ”kpp,” ”kpw,” and ”kiw” will be determined experimentally by trial and error.
These parameters provide the control, as described in the Section 4.3.

It must be acknowledged that several experiments were performed to produce the desired outcome, but only
three of them will be discussed in this section.

The first experiment has been carried out using the values of the parameters listed in the Table 5.2. The
outcome, as seen in the Figure 5.8, was not what was expected. Additionally, the motor performed poorly
with these parameters, produced an error, and abruptly stopped.

Table 5.2: Controllers parameters, Test 1 (Source: Own)

Parameter Symbol Value


Proportional gain for the position controller kpp 0.12
Proportional gain for the angular speed controller kpw 10
Integral gain for the angular speed controller kiw 0.055

45
5.4. MODE 3: POSITIONING RW CHAPTER 5. EXPERIMENTAL RESULTS

Figure 5.8: Test 1 of Mode 3 (Source: Own)

After completing a few tests, it became possible that the motor did not report an error in test 6 while using
the values shown in the Table 5.3. The result (Figure 5.9), nevertheless, fluctuated within a 30-degree error
range. As a consequence, the parameters needed to be improved since the inaccuracy was too large.

Table 5.3: Controllers parameters, Test 6 (Source: Own)

Parameter Symbol Value


Proportional gain for the position controller kpp 0.25
Proportional gain for the angular speed controller kpw 0.2
Integral gain for the angular speed controller kiw 0.005

46
5.4. MODE 3: POSITIONING RW CHAPTER 5. EXPERIMENTAL RESULTS

Figure 5.9: Test 6 of Mode 3 (Source: Own)

As can be seen in the Figure 5.10, the inaccuracy has been decreased to around 5º as a result of further
laboratory testing. The Table 5.4 contains the parameters that were utilised to produce this final outcome.

Table 5.4: Controllers parameters, Test 15 (Source: Own)

Parameter Symbol Value


Proportional gain for the position controller kpp 0.25
Proportional gain for the angular speed controller kpw 20
Integral gain for the angular speed controller kiw 0.075

Figure 5.10: Test 15 of Mode 3 (Source: Own)

47
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

Chapter 6

Budget summary

The cost of programming a CubeSat’s attitude control system to simulate space missions in low-Earth
orbit is described in this chapter. It should be highlighted that the separate budget document will include
measurements, unit costs, and a general budget for a prototype that will be subdivided into budgets for
hardware, software, and human resources. The budget summary is displayed in Table 6.1.

Table 6.1: Budget Summary (Source: Own)

Chapter Budget
1. Software Development 808,00€
2. Hardware Development 306,70€
3. Human Resources 18560,00€
Total Budget 19674,70€

48
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

Chapter 7

Environmental Analysis

The data transmission from satellites that track climate change may be allegedly hampered by the approxi-
mately 7,200 tonnes of space junk that is now encroaching on orbit [33].

An estimated 40,000 satellites are now being built for launch in the upcoming years, and there are already
5,000 active or missing spacecraft in low Earth orbit, according to a recent research by the University of
British Columbia [33].

As a satellite reaches the end of its useful life, the aluminium on those satellites burns and transforms into
reflective aluminium oxide, a highly hazardous chemical for the ozone layer.

Moreover, the space debris pose a danger to the environment and even space weather satellites, even though
the majority of these items that are detected in space manage to disintegrate along their journey [33].

However, this project has only been used for academic purposes, and all work has been done in research
laboratories. As a result, this project wouldn’t have the environmental impact that had been described.

49
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

Chapter 8

Conclusions

To conclude, the project’s goal of implementing a reaction wheel-based 1DoF attitude control for a CubeSat
has been accomplished; the created code is available in the Appendix C.

The software has mostly been reduced of the coarse positioning that was previously included because adding
fine positioning alone was sufficient to build an attitude control, causing the system to oscillate with a
negligible inaccuracy around the required angle.

A P+PI controller, which has been built to accomplish attitude control with precision positioning, has been
thoroughly described in the Section 4.3.2.

Additionally, one of the enhancements—the switch in motor—has been accomplished successfully, giving the
system greater stability and precision.

As has been demonstrated, it can be said that the project has succeeded in attaining the goals that were first
put out, creating a more exact attitude control with fine positioning.

8.1 Further Works


Future study approaches are covered in this part, along with a summary of the aspects that may be explored
in depth in related works and that need to be investigated right away as they extend beyond what was
initially anticipated.

• Currently, the results of the project present a small error that can be easily fixed by better tuning
the controller’s implemented parameters. This might be accomplished by first analyzing the internal
loop that makes up the PI controller, and then, after obtaining the necessary parameters, performing a
general analysis of the entire system.

• Using a PCB, which would have the required circuitry and components to drive the motor, would make
the hardware design more aesthetically appealing and result in a more compact CubeSat.

50
8.1. FURTHER WORKS CHAPTER 8. CONCLUSIONS

• Magnetorquers might be employed to detumble, perform coarse attitude adjustments, and desaturate
the reaction wheels as this project as intended only contains a reaction wheel. This allows for the
development of a small 3-axis magnetic control system to strengthen satellite control.

• Due to the CubeSat developed in this project only having one reaction wheel in the yaw orientation,
two more reaction wheels need be implemented in order to regulate speed changes in any direction
(yaw, pitch, and roll).

51
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

References

[1] D. C. Bonillo, “Project of attitude control system for 1u cubesat,” UPC, 2022.
[2] A. P. Fernández, “Project of attitude control system based on reaction wheels,” UPC, 2021.
[3] Y. Q. J. Zhang, “Project of 1 dof attitude control system of 1u cubesat based on reaction wheel,” UPC,
2021.
[4] J. S. Aporta, J. G. Barrio, and A. A. Pujol, “Bachelors thesis attitude control techniques for a 1u
cubesat,” 2022.
[5] “Cubesat.” (2022), [Online]. Available: https://es.wikipedia.org/wiki/CubeSat.
[6] D. Calvo, T. Avilés, V. Lapuerta, and A. Laverón-Simavilla, “Fuzzy attitude control for a nanosatellite
in low earth orbit,” Expert Systems with Applications, vol. 58, pp. 102–118, Oct. 2016.
[7] S. Loff and B. Dunbar. “Cubesats overview — nasa.” (Feb. 2018), [Online]. Available: https://www.
nasa.gov/mission_pages/cubesats/overview.
[8] T. Prejean, “Nanoracks cubesat deployer (nrcsd) interface definition document (idd),” 29 2018. [Online].
Available: https://nanoracks.com/wp-content/uploads/Nanoracks-CubeSat-Deployer-NRCSD-
IDD.pdf.
[9] C. Program, “P-pod mk. iii rev. e user guide the cubesat program, cal poly slo p-pod mk. iii rev. e user
guide the cubesat program, cal poly slo p-pod mk. iii rev. e user guide the cubesat program, cal poly
slo,”
[10] “Adcs: Attitude determination and control system - ece3sat.” (), [Online]. Available: http://www.
ece3sat.com/cubesatmodules/adcs/.
[11] S. R. Starin, “19.1 attitude determination and control systems,”
[12] T. E. S. Agency. “Esa - sensor avanzado de estrellas.” (), [Online]. Available: https://www.esa.int/
Space_in_Member_States/Spain/Sensor_Avanzado_de_Estrellas.
[13] D. J. C. Cerezo, “Desarrollo, implementación y evaluación de un algoritmo de lógica difusa para el
control de actitud de nanosatélites,” Jul. 2017. [Online]. Available: https://oa.upm.es/47742/1/
DANIEL_JAIME_CALVO_CEREZO.pdf.
[14] “Escon module 24/2 servo controller p/n 466023 hardware reference,” 2018.
[15] “Qué es un servomotor, para qué sirve y cómo funciona.” (), [Online]. Available: https : / / www .
cursosaula21.com/que-es-un-servomotor/.
[16] “Online shop for high precise drive systems by maxon — maxon group.” (), [Online]. Available:
https://www.maxongroup.com/maxon/view/product/351006.
52
REFERENCES REFERENCES

[17] “La diferencia entre el motor paso a paso y el servomotor de la máquina de grabado - igolden cnc.” (),
[Online]. Available: https://es.igoldencnc.com/La-diferencia-entre-el-motor-paso-a-paso-
y-el-servomotor-de-la-mC3A1quina-grabado-id3844102.html.
[18] “Online shop for high precise drive systems by maxon — maxon group.” (), [Online]. Available:
https://www.maxongroup.com/maxon/view/product/220300.
[19] “Mpu-9250 - invensense — digikey.” (), [Online]. Available: https://www.digikey.es/es/product-
highlight/i/invensense/mpu-9250-9-axis-gyro-accel-magnet.
[20] “Tarj mpu-9250 - sigma electrónica.” (), [Online]. Available: https://www.sigmaelectronica.net/
producto/tarj-mpu-9250/.
[21] “Usar arduino con los imu de 9dof mpu-9150 y mpu-9250.” (), [Online]. Available: https://www.
luisllamas.es/usar-arduino-con-los-imu-de-9dof-mpu-9150-y-mpu-9250/.
[22] “Trabajo final de grado,”
[23] “Controlar bombilla con arduino, bluetooth y teléfono móvil - parzibyte’s blog.” (), [Online]. Available:
https://parzibyte.me/blog/2020/12/12/controlar-bombilla-arduino-bluetooth-telefono-
movil/.
[24] “Configuración del módulo bluetooth hc-05 — profe tolocka.” (), [Online]. Available: https://www.
profetolocka.com.ar/2018/02/14/configuracion-del-modulo-bluetooth-hc-05/.
[25] C. Dũng, “Hc 0305 serial module at commamd set 201104 revised,” [Online]. Available: https :
//www.academia.edu/17291521/HC_0305_serial_module_AT_commamd_set_201104_revised.
[26] “Stm32f103c8t6 - blue pill — stm32-base project.” (), [Online]. Available: https://stm32-base.org/
boards/STM32F103C8T6-Blue-Pill.html.
[27] “Primeros pasos con la stm32 blue pill.” (), [Online]. Available: https://www.profetolocka.com.ar/
2021/04/12/primeros-pasos-con-la-stm32-blue-pill/.
[28] “Esquema de patillaje (pinout) del stm32f103 ”blue pill”.” (), [Online]. Available: https : / / www .
luisllamas.es/esquema-de-patillaje-pinout-del-stm32-blue-pill/.
[29] “Pulse width modulation (pwm) in stm32f103c8: Controlling speed of dc fan.” (), [Online]. Available:
https://circuitdigest.com/microcontroller- projects/stm32f103c8t6- pwm- tutorial- fan-
speed-control.
[30] “Pwm in avr atmega16/atmega32 — avr atmega controllers.” (), [Online]. Available: https://www.
electronicwings.com/avr-atmega/atmega1632-pwm.
[31] A. C. Contreras, J. J. Sarmiento, G. A. M. Fernández, and V. G. H. Herrera, “Control de torque
para servomotores sin escobillas (torque control for brushless servomotor),” Pistas Educativas, vol. 40,
130 Nov. 2018, issn: 2448-847X. [Online]. Available: http://www.itc.mx/ojs/index.php/pistas/
article/view/1625.
[32] “Controlador pid - wikipedia, la enciclopedia libre.” (), [Online]. Available: https://es.wikipedia.
org/wiki/Controlador_PID.
[33] “¿sabı́as que los satélites en el espacio pueden afectar al medio ambiente? - latinamerican post.” (),
[Online]. Available: https://latinamericanpost.com/es/37409-sabias-que-los-satelites-en-
el-espacio-pueden-afectar-al-medio-ambiente.
53
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

Appendix A

MPU Calibration Code

// Arduino sketch that returns calibration offsets for MPU6050 // Version 1.1 (31th January
2014)
// Done by Luis Rodenas <[email protected]>
// Based on the I2Cdev library and previous work by Jeff Rowberg <[email protected]>
// Updates (of the library) should (hopefully) always be available at https://github.com/jrowberg/
i2cdevlib

// These offsets were meant to calibrate MPU6050’s internal DMP, but can be also useful for
reading sensors.
// The effect of temperature has not been taken into account so I can’t promise that it will work
if you
// calibrate indoors and then use it outdoors. Best is to calibrate and use at the same room
temperature.

/* ========== LICENSE ==================================


I2Cdev device library code is placed under the MIT license
Copyright (c) 2011 Jeff Rowberg

Permission is hereby granted, free of charge, to any person obtaining a copy


of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
54
APPENDIX A. MPU CALIBRATION CODE

IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,


FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
=========================================================
*/

// I2Cdev and MPU6050 must be installed as libraries


#include "I2Cdev.h"
#include "MPU6050.h"
#include "Wire.h"

/////////////////////////////////// CONFIGURATION /////////////////////////////


//Change this 3 variables if you want to fine tune the skecth to your needs.
int buffersize=1000; //Amount of readings used to average, make it higher to get more precision
but sketch will be slower (default:1000)
int acel_deadzone=8; //Acelerometer error allowed, make it lower to get more precision, but
sketch may not converge (default:8)
int giro_deadzone=1; //Giro error allowed, make it lower to get more precision, but sketch may
not converge (default:1)

// default I2C address is 0x68


// specific I2C addresses may be passed as a parameter here
// AD0 low = 0x68 (default for InvenSense evaluation board)
// AD0 high = 0x69
//MPU6050 accelgyro;
MPU6050 accelgyro(0x68); // <-- use for AD0 high

int16_t ax, ay, az,gx, gy, gz;

int mean_ax,mean_ay,mean_az,mean_gx,mean_gy,mean_gz,state=0;
int ax_offset,ay_offset,az_offset,gx_offset,gy_offset,gz_offset;

/////////////////////////////////// SETUP ////////////////////////////////////


void setup() {
// join I2C bus (I2Cdev library doesn’t do this automatically)
Wire.begin();
// COMMENT NEXT LINE IF YOU ARE USING ARDUINO DUE
TWBR = 24; // 400kHz I2C clock (200kHz if CPU is 8MHz). Leonardo measured 250kHz.

55
APPENDIX A. MPU CALIBRATION CODE

// initialize serial communication


Serial.begin(115200);

// initialize device
accelgyro.initialize();

// wait for ready


while (Serial.available() && Serial.read()); // empty buffer
while (!Serial.available()){
Serial.println(F("Send any character to start sketch.\n"));
delay(1500);
}
while (Serial.available() && Serial.read()); // empty buffer again

// start message
Serial.println("\nMPU6050 Calibration Sketch");
delay(2000);
Serial.println("\nYour MPU6050 should be placed in horizontal position, with package letters
facing up. \nDon’t touch it until you see a finish message.\n");
delay(3000);
// verify connection
Serial.println(accelgyro.testConnection() ? "MPU6050 connection successful" : "MPU6050
connection failed");
delay(1000);
// reset offsets
accelgyro.setXAccelOffset(0);
accelgyro.setYAccelOffset(0);
accelgyro.setZAccelOffset(0);
accelgyro.setXGyroOffset(0);
accelgyro.setYGyroOffset(0);
accelgyro.setZGyroOffset(0);
}

/////////////////////////////////// LOOP ////////////////////////////////////


void loop() {
if (state==0){
Serial.println("\nReading sensors for first time...");
meansensors();
state++;
delay(1000);
}

56
APPENDIX A. MPU CALIBRATION CODE

if (state==1) {
Serial.println("\nCalculating offsets...");
calibration();
state++;
delay(1000);
}

if (state==2) {
meansensors();
Serial.println("\nFINISHED!");
Serial.print("\nSensor readings with offsets:\t");
Serial.print(mean_ax);
Serial.print("\t");
Serial.print(mean_ay);
Serial.print("\t");
Serial.print(mean_az);
Serial.print("\t");
Serial.print(mean_gx);
Serial.print("\t");
Serial.print(mean_gy);
Serial.print("\t");
Serial.println(mean_gz);
Serial.print("Your offsets:\t");
Serial.print(ax_offset);
Serial.print("\t");
Serial.print(ay_offset);
Serial.print("\t");
Serial.print(az_offset);
Serial.print("\t");
Serial.print(gx_offset);
Serial.print("\t");
Serial.print(gy_offset);
Serial.print("\t");
Serial.println(gz_offset);
Serial.println("\nData is printed as: acelX acelY acelZ giroX giroY giroZ");
Serial.println("Check that your sensor readings are close to 0 0 16384 0 0 0");
Serial.println("If calibration was succesful write down your offsets so you can set them in
your projects using something similar to mpu.setXAccelOffset(youroffset)");
while (1);
}
}

57
APPENDIX A. MPU CALIBRATION CODE

/////////////////////////////////// FUNCTIONS ////////////////////////////////////


void meansensors(){
long i=0,buff_ax=0,buff_ay=0,buff_az=0,buff_gx=0,buff_gy=0,buff_gz=0;

while (i<(buffersize+101)){
// read raw accel/gyro measurements from device
accelgyro.getMotion6(&ax, &ay, &az, &gx, &gy, &gz);

if (i>100 && i<=(buffersize+100)){ //First 100 measures are discarded


buff_ax=buff_ax+ax;
buff_ay=buff_ay+ay;
buff_az=buff_az+az;
buff_gx=buff_gx+gx;
buff_gy=buff_gy+gy;
buff_gz=buff_gz+gz;
}
if (i==(buffersize+100)){
mean_ax=buff_ax/buffersize;
mean_ay=buff_ay/buffersize;
mean_az=buff_az/buffersize;
mean_gx=buff_gx/buffersize;
mean_gy=buff_gy/buffersize;
mean_gz=buff_gz/buffersize;
}
i++;
delay(2); //Needed so we don’t get repeated measures
}
}

void calibration(){
ax_offset=-mean_ax/8;
ay_offset=-mean_ay/8;
az_offset=(16384-mean_az)/8;

gx_offset=-mean_gx/4;
gy_offset=-mean_gy/4;
gz_offset=-mean_gz/4;
while (1){
int ready=0;
accelgyro.setXAccelOffset(ax_offset);
accelgyro.setYAccelOffset(ay_offset);
accelgyro.setZAccelOffset(az_offset);

58
APPENDIX A. MPU CALIBRATION CODE

accelgyro.setXGyroOffset(gx_offset);
accelgyro.setYGyroOffset(gy_offset);
accelgyro.setZGyroOffset(gz_offset);

meansensors();
Serial.println("...");

if (abs(mean_ax)<=acel_deadzone) ready++;
else ax_offset=ax_offset-mean_ax/acel_deadzone;

if (abs(mean_ay)<=acel_deadzone) ready++;
else ay_offset=ay_offset-mean_ay/acel_deadzone;

if (abs(16384-mean_az)<=acel_deadzone) ready++;
else az_offset=az_offset+(16384-mean_az)/acel_deadzone;

if (abs(mean_gx)<=giro_deadzone) ready++;
else gx_offset=gx_offset-mean_gx/(giro_deadzone+1);

if (abs(mean_gy)<=giro_deadzone) ready++;
else gy_offset=gy_offset-mean_gy/(giro_deadzone+1);

if (abs(mean_gz)<=giro_deadzone) ready++;
else gz_offset=gz_offset-mean_gz/(giro_deadzone+1);

if (ready==6) break;
}
}

59
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

Appendix B

Bluetooth Module Configuration Code

#include <SoftwareSerial.h>

SoftwareSerial ModuloHC05 (10, 11); //pin RX, pin TX

void setup() {

Serial.begin(38400); //Inicializa puerto serie por hard


ModuloHC05.begin(38400); //Inicializa puerto serie por soft
}

void loop() {

char dato;
if (ModuloHC05.available()) { //Llega algo por bluetooth?
dato=ModuloHC05.read(); //Leer lo que llego
Serial.write(dato); //Sacarlo a la terminal
}

if (Serial.available ()) { //Llega algo de la terminal?


dato=Serial.read(); //Leer lo que llego
ModuloHC05.write(dato); //Sacarlo al modulo
Serial.write (dato); //Eco en la terminal
}
}

60
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

Appendix C

ADCS Arduino Code

#include <MapleCoOS.h>

/* Reaction Wheel controller


*
* The following code provides a control for PLATHON project’s CubeSat with MAXON motor.
*
* The following libraries are used:
* STM32 Bluepill microcontroller package from http:/ /dan.drown.org/stm32duino/
package_STM32duino_index.json
* MPU9250 IMU library by Rafa Castalla used (https://github.com/rafacastalla/MPU9250-1)
*/

//DEFINITIONS
//LIBRARIES
#include <Arduino.h> // Arduino library
#include <stdint.h> // Integer types library
#include <Wire.h> // I2C library

//IMU librarys
#include "MPU6050_6Axis_MotionApps20.h" //Mediante esta biblioteca se pueden obtener datos del
DMP (Digital Motion Processor) de la IMU
#include "I2Cdev.h" //Mediante esta biblioteca se pueden obtener datos del DMP de la IMU
#include "helper_3dmath.h" //Mediante esta biblioteca se pueden realizar operaciones de
cuaterniones

// DEFINITIONS
#define LEDPIN PC13 // Integrated LED of the Bluepill
#define STM32_CLOCK 72000 // Internal STM32 Clock (72MHz, in kHz so period is millisec)
61
APPENDIX C. ADCS ARDUINO CODE

#define PI 3.14159265 // Number PI


#define Rad_to_deg 57.29577951 // Convert radians to degrees
#define Deg_to_rad 0.01745329 // Convert degrees to radians

//IMU
const int mpuAddress = 0x68; // Se define la direccion de la IMU, puede ser 0x68 o 0x69
MPU6050 mpu(mpuAddress); //Se crea un objeto MPU6050 para poder extraer datos de la DMP
int fifoCount = 0, packetSize; //Se crea un contador de valores en el FIFO de la MPU y el tamano
del paquete que obtendremos
byte fifoBuffer[42]; //Se crea el buffer que se utilizara para obtener los datos roll, pitch y
yaw.
float roll, pitch, yaw, sqx, sqy, sqz, sqw, test; //Se crea tanto las variables de roll, pitch y
yaw como las variables "float"
//intermedias necesarias para obtenerlas
Quaternion q; //Se crea el cuaternion necesario para obtener los valores de pitch, yaw y roll
VectorInt16 v;
float vz;

// GLOBAL VARIABLES

const float pi = 3.141592653;


float Pitch_deg, Roll_deg, Yaw_deg = 0; // Pitch, Roll and Yaw (degrees)
int OBC_mode_value = 0; // Value of On Board Computer mode (waiting, positioning, detumbling, etc
.)
int OBC_data_value = 0; // Value of On Board Computer data (desired angle turn, etc.)
int Stop_state = 0; // If Stop_state != 0, motor stops rotating
double kpp, kpw, kiw; // Proportional contribution

// FUNCTIONS
// GENERAL USE FUNCTIONS
// OBC Functions

void setup() {

delay(1000); // wait to let open the serial


// Timers
Timer1.pause();
Timer1.setPrescaleFactor(7200); // 72MHz Clock / 7200 = 10KHz timer
Timer1.setOverflow(1000); // Overflow occurs at 1000, each 100 ms timer restarts

62
APPENDIX C. ADCS ARDUINO CODE

Timer1.setMode(TIMER_CH3, TIMER_OUTPUT_COMPARE); // Configure channel to OUTPUTCOMPARE: Channel


for OBC read values
Timer1.setMode(TIMER_CH4, TIMER_OUTPUT_COMPARE); // Channel for IMU read values
Timer1.setCompare(TIMER_CH3, 1); // Phase value in Overflow range
Timer1.setCompare(TIMER_CH4, 1);

Timer1.refresh(); // Refresh timer and start over


Timer1.resume();

// Initiations
Serial1.begin(9600);
Wire.begin();

Serial1.println("START");

// Setups

pinMode(LEDPIN, OUTPUT); // Integrated LED


pinMode(0x68, OUTPUT); // NCS Pin definition
pinMode(PA8, PWM); // setup the pin as PWM //PWM funciona 550Hz
pwmWrite(PA8, 501); //the code starts putting the speed of the RW to 0rpm which is 501
pinMode(PB1, OUTPUT);

// IMU Setup
//IMU
mpu.initialize(); //Inicializacion de la imu
Serial1.println("MPU successfully inicialized");
mpu.dmpInitialize(); //Inicializacion del DMP
mpu.setDMPEnabled(true); //Habilitacion del DMP
Serial1.println("successfull DMP acces");
packetSize = mpu.dmpGetFIFOPacketSize(); //Se obtiene el tamano del paquete que obtendremos del
DMP (42)

mpu.setXAccelOffset(6491);
mpu.setYAccelOffset(4850);
mpu.setZAccelOffset(9354);
mpu.setXGyroOffset(-95);
mpu.setYGyroOffset(-2);
mpu.setZGyroOffset(39);
Serial1.println("MPU calibrated");

63
APPENDIX C. ADCS ARDUINO CODE

//Se define el cuaternion inicial de actitud


q.w = 1;
q.x = 0;
q.y = 0;
q.z = 0;

delay(100); //Se da un margen de tiempo para que todos los procesos se completen
}

void loop() {

analogWrite(PB1, 255); //255 are 5V for the laser pointing


mode_Select();
}

void mode_Select()
{
/*
Function to select Mode

INPUT:
mode_value [’0’: Waiting; ’1’: Actual Orientation; ’2’: Mode Assigning speed to the RW (TEST
mode); ’3’]
OUTPUT:
None, but exits to selected mode
*/

float received_number;
int mode_value;

Serial1.println("Enter mode value:");


Serial1.println(" - Mode 1: Actual Orientation");
Serial1.println(" - Mode 2: Mode Assigning current to RW (TEST mode)");
Serial1.println(" - Mode 3: Mode Positioning RW");

OBC_mode_value = 0;
Timer1.attachInterrupt(TIMER_CH3, OBC_mode_receive);
while (OBC_mode_value == 0)
{
delay(1); // If not used the while function does not work
// it can be added more conditions to evade being blocked until a data is received.

64
APPENDIX C. ADCS ARDUINO CODE

// for example, it could function an interrupt with a forced exit and an if after or something
}
Timer1.detachInterrupt(TIMER_CH3);
Serial1.println(OBC_mode_value);
mode_value=OBC_mode_value;

switch (mode_value)
{
default:
Serial1.println("Wrong mode value, please enter a correct mode number;");
break;

case 1: // Actual orientation


Serial1.println("Actual Orientation");
actual_orientation();
break;

case 2: // Mode Assigning current to the RW (TEST mode)


Serial1.println("Test mode assigning current to the RW");
assign_current();
break;

case 3: // Mode Positioning RW


Serial1.println("Mode Positioning");
positioning_RW();
break;
}
}

void actual_orientation(){

float received_number=0;
Serial1.println("Yaw degree attitude");
Serial1.println("Press any positive number to stop");

/*
* It constantly writes the yaw angle while waiting for the user to enter a positive number.
*/

while (received_number == 0)

65
APPENDIX C. ADCS ARDUINO CODE

{
IMU(); //reading the IMU
Serial1.print("Axis Z position: ");
Serial1.println(Yaw_deg); //printing the yaw degree
delay(100);

//Check if a number has been entered to stop the mode


if (Serial1.available() > 0){
String bufferString = ""; // String for buffer of Serial1
while (Serial1.available() > 0){

bufferString += (char)Serial1.read(); // Adds chars to the Serial1 buffer

}
received_number = bufferString.toInt(); // Conversion from String to int
}
}
}

void assign_current (){

pinMode(PA8, PWM); //defining pin PA8 as PWM


Serial1.println("You are in the assigning current to the RW mode");

float current_value; //new variable for assigning torque


delay(1000);

OBC_data_value = 0;
while (OBC_data_value != -101) //to exit while enter -101
{
/*
* This while loop asks user to set the motor current between -100% and 100%, which is between
-0.5 A (CCW) and 0.5 A (CW).
* current_value goes between 1 and 1000 (STM32 bluepill)
* Exits the loop when user enters "-101".
*/

current_value = map(OBC_data_value,-100,100,1,1000); // converting OBC_data_value[-100-100] to


current value[1-700]
pwmWrite(PA8, current_value); //assigning value to the pin PA8
Serial1.print("Insert current to turn (actual = ");
Serial1.print(current_value);

66
APPENDIX C. ADCS ARDUINO CODE

Serial1.println(") or enter -101 to exit loop: ");


OBC_data_value = -102;
Timer1.attachInterrupt(TIMER_CH3, OBC_data_receive);
while (OBC_data_value == -102){
delay(10);
}
Timer1.detachInterrupt(TIMER_CH3);
}

/*
* Sets final speed at 0A and exits mode 3.
*/
pwmWrite(PA8, 1);
}

void positioning_RW(){

IMU();
float received_number=0;
float initial_degree = Yaw_deg; //initial_degree saves the initial Yaw_deg in the beginning of
the program
float actualDeltaDegree;
float degreeError;
float desiredW;
float time1;
float time2;
float errorW;
float outputPI, outputP, outputI = 0;

Serial1.println("You are in positioning mode");

//Reading the IMU and showing initial yaw degree


IMU();
Serial1.print("Initial yaw: ");
Serial1.println(Yaw_deg);
delay(1000);

//Ask user to insert degree value to turn using an interruption


//Exists when recieves a data value
Serial1.println("Insert degree value to turn: ");
OBC_data_value = 0;
Timer1.attachInterrupt(TIMER_CH3, OBC_data_receive);

67
APPENDIX C. ADCS ARDUINO CODE

while (OBC_data_value == 0){


delay(10);
}
Timer1.detachInterrupt(TIMER_CH3);
float deltaDegree = OBC_data_value;
Serial1.println(deltaDegree); //deltaDegree is the angle increment that CubeSat turn
//once here the degree to turn is specified

deltaDegree = angle_to_180(deltaDegree); //expressing the angle between +-180


Serial1.print("Correct deltaDegree is ");
Serial1.println(deltaDegree);

//PID loop

time1 = millis();

// CONTROLLER PARAMETERS
kpp = 0.25;
kpw = 20;
kiw = 0.075;

while (received_number == 0)
{
IMU();
actualDeltaDegree = Yaw_deg - initial_degree; //calculates the real delta degree angle
actualDeltaDegree = angle_to_180(actualDeltaDegree); //adjusting the angle between +-180
degreeError = deltaDegree - actualDeltaDegree; //calculates the difference between deltaDegree
setpoint and the real deltaDegree
degreeError = angle_to_180(degreeError); //adjusting the angle between +-180
desiredW = kpp*degreeError; //calculates the PID output
errorW = desiredW - vz;
outputP = kpw*errorW;
time2 = millis();
outputI += (time2-time1)*errorW*kiw;
if (outputI>300) outputI=300;
if (outputI<-300) outputI=-300;
time1 = millis();
outputPI = 500 + outputP + outputI; //500 is 0A in PWM
if (outputPI>800) outputPI=800;
if (outputPI<200) outputPI=200;
// float torque = map(outputPI, -4000, 4000, 400, 600);
float torque=outputPI;

68
APPENDIX C. ADCS ARDUINO CODE

pwmWrite(PA8, torque); //sends torque data to motor driver

//Serial1.print("Actual degree error: ");


Serial1.print(degreeError);
Serial1.print(" ");
Serial1.print(errorW);
Serial1.print(" ");
Serial1.print(outputP);
Serial1.print(" ");
Serial1.println(outputI);

delay(10);

if (Serial1.available() > 0){

String bufferString = ""; // String for buffer of Serial1


while (Serial1.available() > 0){
bufferString += (char)Serial1.read(); // Adds chars to the Serial1 buffer
}
received_number = bufferString.toInt(); // Conversion from String to int
if (received_number!=0) pwmWrite(PA8, 501);
}
}
deltaDegree=0;
}

void IMU() {
fifoCount = mpu.getFIFOCount(); //Se obtiene el numero de bytes del DMP
if (fifoCount >= 42) { //Si el numero de datos en el DMP es mayor a 42 bytes (mayor que el
packetSize)
mpu.resetFIFO(); //Se resetea el FIFO
fifoCount = mpu.getFIFOCount(); //Se vuelven a obtener el numero de bytes en el FIFO del DMP
}
while (fifoCount < packetSize) { //Mientras el numero de datos es menor al paquete
fifoCount = mpu.getFIFOCount(); //Se vuelven a obtener el numero de bytes en el FIFO del DMP
delay(1); //El delay es necesario para controlar el fifoCount. No se ha podido ver exactamente
como afecta porque al crear un println el problema se resuelve por el incremento de
tiempo.
if (fifoCount > packetSize) { //Si el numero de datos en el DMP es mayor a 42 bytes (mayor que
el packetSize)
mpu.resetFIFO(); //Se resetea el FIFO
fifoCount = mpu.getFIFOCount(); //Se vuelven a obtener el numero de bytes en el FIFO del DMP

69
APPENDIX C. ADCS ARDUINO CODE

}
}
fifoCount = fifoCount - packetSize; //Se resta al fifoCount el packetSize (el resultado deberia
ser siempre 0)
mpu.getFIFOBytes(fifoBuffer, packetSize); //Se obtienen los valores del DMP en forma de bytes
mpu.dmpGetQuaternion(&q, fifoBuffer); //Se obtiene el cuaternion de actitud mediante el DMP
mpu.dmpGetGyro(&v, fifoBuffer);
vz = v.z;
QuatToEuler(q, yaw, pitch, roll); //Se hace el paso del cuaternion de actitud a los angulos de
Euler

// The range of yaw, pitch adn roll anfles goes from 180 to -180: We need to adapt it to 0 to 360
range
if (yaw < 0) yaw += 360;
if (pitch < 0) pitch += 360;
if (roll < 0) roll += 360;
// Variable standardization to the ones used in the original program (the range of these angles
goes from 0 to 360)
Yaw_deg=yaw;
Pitch_deg=pitch;
Roll_deg=roll;
}

void OBC_data_receive()
{
/*
Function to set the Bluepill to receiving data mode. Uses Timer CH3. Serial1 as UART
communication

INPUT: None, but gets data from User Serial1 input


OUTPUT: Save OBC_data_value
*/
IMU();
// Check if UART Serial1 is available
if (Serial1.available() > 0)
{
String bufferString = ""; // String for buffer of Serial1
// Keep saving input prompt
while (Serial1.available() > 0)
{
bufferString += (char)Serial1.read(); // adds chars to the Serial1 buffer
}

70
APPENDIX C. ADCS ARDUINO CODE

OBC_data_value = bufferString.toInt(); // Conversion from String to int


}
}

void OBC_mode_receive()
{
/*
Function to set the Bluepill to receiving mode. Uses Timer CH3. Serial1 as UART communication

INPUT: None, but gets mode from User Serial1 input


OUTPUT: None, but saves OBC_mode_value
*/

// Check if UART Serial1 is available


IMU();

if (Serial1.available() > 0)
{
String bufferString = ""; // String for buffer of Serial1
// Keep saving input prompt
while (Serial1.available() > 0)
{
bufferString += (char)Serial1.read(); // Adds chars to the Serial1 buffer
}
// Conversion from String to int
OBC_mode_value = bufferString.toInt();
Serial1.print("Mode Number: ");
Serial1.println(OBC_mode_value);
}
}

void QuatToEuler(Quaternion q, float &yaw, float &pitch, float &roll) {


//El proceso que seguidamente se muestra es completamente algebraico, en la memoria del trabajo
se encuentra explicado el proceso.
test = q.x * q.z - q.w * q.y;
sqx = q.x * q.x;
sqy = q.y * q.y;
sqz = q.z * q.z;
sqw = q.w * q.w;
roll = (180 / pi) * atan2(2 * q.y * q.z + 2 * q.w * q.x, sqz - sqy - sqx + sqw);
pitch = -(180 / pi) * asin(2 * test);
yaw = (180 / pi) * atan2(2 * q.x * q.y + 2 * q.w * q.z, sqx + sqw - sqz - sqy);

71
APPENDIX C. ADCS ARDUINO CODE

//Se asegura que en caso de gimbal lock, el resultado este definido


if (pitch >= 89.5) {
pitch = 90;
yaw = (180 / pi) * 2 * atan2(q.z, q.w);
roll = 0;
}

else if (pitch <= -89.5) {


pitch = -90;
yaw = (180 / pi) * 2 * atan2(q.z, q.w);
roll = 0;
}
}

float angle_to_180(float inputAngle){


/*
* input:any angle expressed in degrees
* output:returns the same angle in degrees expressed between -179.99 and +180.00
*/

while (inputAngle>180 || inputAngle<=-180)


{
if (inputAngle>180)
{
inputAngle-=360;
}
else if (inputAngle<=-180)
{
inputAngle+=360;
}
}
return inputAngle;
}

72
Programming the attitude control of a CubeSat for
simulation of LEO orbit space missions

Appendix D

Datasheets

D.1 Motor Driver

73
Hardware Reference

ESCON Module 24/2 Servo Controller | P/N 466023


Hardware Reference
CCMC | Edition 2021-08 | DocID rel9004
Table of Contents

TABLE OF CONTENTS

TABLE OF CONTENTS 2

1 ABOUT 5
1.1 About this Document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 About the Device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3 About the Safety Precautions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2 SPECIFICATIONS 9
2.1 Technical Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3 SETUP 13
3.1 Generally applicable Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.2 Configuration of Power Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3 Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.4 Status Indicators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

4 WIRING 27
4.1 DC Motors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.2 EC Motors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

5 MOTHERBOARD DESIGN GUIDE 33


5.1 Requirements for Components of Third-party Suppliers. . . . . . . . . . . . . . . . . . . 33
5.2 Design Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.3 THT Footprint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.4 Pin Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
5.5 Technical Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

READ THIS FIRST


These instructions are intended for qualified technical personnel. Prior commencing with any activities …
• you must carefully read and understand this manual and
• you must follow the instructions given therein.

The ESCON Module 24/2 is considered as partly completed machinery according to EU Directive 2006/42/EC, Article 2,
Clause (g) and is intended to be incorporated into or assembled with other machinery or other partly completed
machinery or equipment.
Therefore, you must not put the device into service, …
• unless you have made completely sure that the other machinery fully complies with the EU directive’s requirements!
• unless the other machinery fulfills all relevant health and safety aspects!
• unless all respective interfaces have been established and fulfill the herein stated requirements!

ESCON Module 24/2 Hardware Reference


A-2 CCMC | 2021-08 | rel9004
Table of Contents

5.6 Dimensional Drawing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39


5.7 ESCON Module 24/2 Motherboard (486400) . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.8 Spare Parts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

LIST OF FIGURES 53

LIST OF TABLES 54

INDEX 55

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 A-3
Table of Contents

••page intentionally left blank••

ESCON Module 24/2 Hardware Reference


A-4 CCMC | 2021-08 | rel9004
About
About this Document

1 ABOUT

1.1 About this Document

1.1.1 Intended Purpose


The purpose of the present document is to familiarize you with the ESCON Module 24/2
Servo Controller. It will highlight the tasks for safe and adequate installation and/or commissioning. Follow
the described instructions …
• to avoid dangerous situations,
• to keep installation and/or commissioning time at a minimum,
• to increase reliability and service life of the described equipment.
The document contains performance data and specifications, information on fulfilled standards, details on
connections and pin assignment, and wiring examples. In addition, the document also includes a Mother-
board Design Guide and detailed information on the optionally available «ESCON Module 24/2 Mother-
board».

1.1.2 Target Audience


The present document is intended for trained and skilled personnel. It conveys information on how
to understand and fulfill the respective work and duties.

1.1.3 How to use


Take note of the following notations and codes which will be used throughout the document.

Notation Meaning

(n) refers to an item (such as order number, list item, etc.)

 denotes “see”, “see also”, “take note of” or “go to”

Table 1-1 Notation used

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 1-5
About
About this Document

1.1.4 Symbols & signs


In the course of the present document, the following symbols and signs will be used.

Type Symbol Meaning

Indicates an imminent hazardous situation.


DANGER
If not avoided, it will result in death or serious injury.

Indicates a potential hazardous situation.


WARNING If not avoided, it may result in death or
Safety Alert
serious injury.
(typical)
Indicates a probably hazardous situation or calls the
CAUTION attention to unsafe practices. If not avoided, it may
result in injury.

Prohibited
Indicates a dangerous action. Hence, you must not!
Action
(typical)

Mandatory
Indicates a mandatory action. Hence, you must!
Action
(typical)

Indicates an activity you must perform prior


Requirement /
to continuing, or gives information on a particular item
Note / Remark
you need to observe.

Indicates advice or a recommendation on the easiest


Information Best Practice
and best way to proceed.

Material Indicates instructions on how to prevent damage to the


Damage equipment.

Table 1-2 Symbols & Signs

1.1.5 Trademarks and Brand Names


For easier legibility, registered brand names are listed below and will not be further tagged with their respec-
tive trademark. It must be understood that the brands (the list below is not necessarily concluding) are pro-
tected by copyright and/or other intellectual property rights even if their legal trademarks are omitted in the
later course of this document.

Brand Name Trademark Owner

Littelfuse®
© Littelfuse, USA-Chicago, IL
SMD NANO2®

Windows® © Microsoft Corporation, USA-Redmond, WA

Table 1-3 Brand Names and Trademark Owners

ESCON Module 24/2 Hardware Reference


1-6 CCMC | 2021-08 | rel9004
About
About the Device

1.1.6 Copyright
The present document – including all parts thereof – is protected by copyright. Any use (including reproduc-
tion, translation, microfilming, and other means of electronic data processing) beyond the narrow restric-
tions of the copyright law without the prior approval of maxon, is not permitted and subject to prosecution
under the applicable law.
© 2021 maxon. All rights reserved. Subject to change without prior notice.
CCMC | ESCON Module 24/2 Hardware Reference | Edition 2021-08 | DocID rel9004

maxon motor ag
Brünigstrasse 220 +41 41 666 15 00
CH-6072 Sachseln www.maxongroup.com

1.2 About the Device


The ESCON Module 24/2 is a small-sized, powerful 4-quadrant PWM servo controller for the highly efficient
control of permanent magnet-activated brushed DC motors or brushless EC motors up to approximately 48
Watts.
The featured operating modes – speed control (closed loop), speed control (open loop), and current control
– meet the highest requirements. The ESCON Module 24/2 is designed being commanded by an analog set
value and features extensive analog and digital I/O functionality.
The miniaturized OEM plug-in module can be seamlessly integrated in complex customer applications. A
suitable motherboard is available for the initial commissioning.
The device is designed to be configured via USB interface using the graphical user interface «ESCON Stu-
dio» for Windows PCs.
You can download the latest ESCON software version (as well as the latest edition of the documentation)
from the Internet under http://escon.maxongroup.com.

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 1-7
About
About the Safety Precautions

1.3 About the Safety Precautions


• Make sure that you have read and understood the note “READ THIS FIRST” on page A-2!
• Do not engage in any work unless you possess the stated skills (chapter “1.1.2 Target Audience”
on page 1-5)!
• Refer to chapter “1.1.4 Symbols & signs” on page 1-6 for explanations of the symbols used in the
following!
• You must observe any regulation applicable in the country and/or at the site of implementation with
regard to health and safety/accident prevention and/or environmental protection!

DANGER

High Voltage and/or Electrical Shock


Touching live wires causes death or serious injuries!
• Consider any power cable as connected to live power, unless having proven the opposite!
• Make sure that neither end of cable is connected to live power!
• Make sure that power source cannot be engaged while work is in process!
• Obey lock-out/tag-out procedures!
• Make sure to securely lock any power engaging equipment against unintentional engagement and tag
it with your name!

Requirements
• Make sure that all associated devices and components are installed according to local regulations.
• Be aware that, by principle, an electronic apparatus can not be considered fail-safe. Therefore, you must
make sure that any machine/apparatus has been fitted with independent monitoring and safety equip-
ment. If the machine/apparatus should break down, if it is operated incorrectly, if the control unit breaks
down or if the cables break or get disconnected, etc., the complete drive system must return – and be
kept – in a safe operating mode.
• Be aware that you are not entitled to perform any repair on components supplied by maxon.

Electrostatic Sensitive Device (ESD)


• Make sure to wear working cloth in compliance with ESD.
• Handle device with extra care.

ESCON Module 24/2 Hardware Reference


1-8 CCMC | 2021-08 | rel9004
Specifications
Technical Data

2 SPECIFICATIONS

2.1 Technical Data


ESCON Module 24/2 (466023)

Nominal operating voltage +VCC 10…24 VDC

Absolute operating voltage


8 VDC / 28 VDC
+VCC min/+VCC max

Output voltage (max.) +VCC

Output current Icont/Imax (<4 s) 2A/ 6A

Pulse width modulation frequency 53.6 kHz


Electrical Rating Sampling rate of PI current controller 53.6 kHz

Sampling rate of PI speed controller 5.36 kHz

Max. efficiency 92%

limited by max. permissible speed (motor) and


Max. speed of DC motor
max. output voltage (controller)

Max. speed EC motor 150,000 rpm (1 pole pair)

Built-in motor choke –

Analog input 1
12-bit resolution; −10…+10 V; differential
Analog input 2

Analog output 1
12-bit resolution ; −4…+4 V; referenced to GND
Analog output 2

Digital input 1
Inputs & Outputs +2.4…+36 VDC (Ri = 38.5 kΩ)
Digital input 2

Digital input/output 3
+2.4…+36 VDC (Ri = 38.5 kΩ)/max. 36 VDC (IL <50 mA)
Digital input/output 4

Hall sensor signals H1, H2, H3

Encoder signals A, A\, B, B\, (max. 1 MHz)

Auxiliary output voltage +5 VDC (IL ≤10 mA)

Voltage Outputs Hall sensor supply voltage +5 VDC (IL ≤30 mA)

Encoder supply voltage +5 VDC (IL ≤70 mA)

Motor DC motor + Motor, − Motor


Connections EC motor Motor winding 1, Motor winding 2, Motor winding 3

Interface USB 2.0 / USB 3.0 full speed

Operation green LED


Status Indicators
Error red LED

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 2-9
Specifications
Technical Data

ESCON Module 24/2 (466023)

Weight approx. 7 g

Physical Dimensions (L x W x H) 35.6 x 26.7 x 12.7 mm

Connection Plugs into socket headers with 2.54 mm pitch

Operation −30…+60 °C

+60…+80 °C
Temperature Extended range *1)
Derating Figure 2-1

Environmental Storage −40…+85 °C


Conditions Operation 0…6’000 m MSL
Altitude *2)
6’000…10’000 m MSL
Extended range *1)
Derating Figure 2-1

Humidity 5…90% (condensation not permitted)

*1) Operation within the extended range (temperature and altitude) is permitted. However, a respective derating (declination
of output current Icont) as to the stated values will apply.
*2) Operating altitude in meters above Mean Sea Level, MSL.

Table 2-4 Technical Data

Figure 2-1 Derating Output Current

Protection functionality Switch-off threshold Recovery threshold

Undervoltage 7.2 V 7.4 V

Overvoltage 31 V 29 V

Overcurrent 9.6 A —

Thermal overload 95 °C 85 °C

Table 2-5 Limitations

ESCON Module 24/2 Hardware Reference


2-10 CCMC | 2021-08 | rel9004
Specifications
Technical Data

Figure 2-2 Dimensional Drawing [mm]

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 2-11
Specifications
Standards

2.2 Standards
The described device has been successfully tested for compliance with the below listed standards. In prac-
tical terms, only the complete system (the fully operational equipment comprising all individual components,
such as motor, servo controller, power supply unit, EMC filter, cabling etc.) can undergo an EMC test to
ensure interference-free operation.

Important Notice
The device’s compliance with the mentioned standards does not imply its compliance within the final, ready
to operate setup. In order to achieve compliance of your operational system, you must perform EMC testing
of the involved equipment as a whole.

Electromagnetic compatibility

IEC/EN 61000-6-2 Immunity for industrial environments


Generic stan-
dards Emission standard for residential, commercial and light-
IEC/EN 61000-6-3
industrial environments

IEC/EN 61000-6-3
IEC/EN 55022 Radio disturbance characteristics/radio interference
(CISPR22)

Applied stan- Radiated, radio-frequency, electromagnetic field immunity test


IEC/EN 61000-4-3
dards >10 V/m

IEC/EN 61000-4-4 Electrical fast transient/burst immunity test ±2 kV

Immunity to conducted disturbances, induced by radio-


IEC/EN 61000-4-6
frequency fields 10 Vrms

Others

Environmental testing – Test Fc: Vibration (sinusoidal,


IEC/EN 60068-2-6
Environmental 10…500 Hz, 20 m/s2)
standards
MIL-STD-810F Random transport (10…500 Hz up to 2.53 grms)

Safety standards UL File Number E148881; unassembled printed circuit board

Reliability prediction of electronic equipment


Environment: Ground, benign (GB)
Ambient temperature: 298 K (25 °C)
Reliability MIL-HDBK-217F
Component stress: In accordance with circuit diagram and
nominal power
Mean Time Between Failures (MTBF): 1'044'089 hours

Table 2-6 Standards

ESCON Module 24/2 Hardware Reference


2-12 CCMC | 2021-08 | rel9004
Setup
Generally applicable Rules

3 SETUP
IMPORTANT NOTICE: PREREQUISITES FOR PERMISSION TO COMMENCE INSTALLATION
The ESCON Module 24/2 is considered as partly completed machinery according to EU Directive 2006/42/
EC, Article 2, Clause (g) and is intended to be incorporated into or assembled with other machinery or
other partly completed machinery or equipment.

WARNING

Risk of Injury
Operating the device without the full compliance of the surrounding system with EU Directive
2006/42/EC may cause serious injuries!
• Do not operate the device, unless you have made completely sure that the other machinery fully com-
plies with the EU directive’s requirements!
• Do not operate the device, unless the other machinery fulfills all relevant health and safety aspects!
• Do not operate the device, unless all respective interfaces have been established and fulfill the
requirements stated in this document!

3.1 Generally applicable Rules


Maximal permitted Supply Voltage
• Make sure that operating voltage is between 10…24 VDC.
• Supply voltages above 28 VDC, or wrong polarity will destroy the unit.
• Note that the necessary output current is depending on the load torque. Yet, the output current limits of
the ESCON Module 24/2 are as follows; continuous max. 2 A / short-time (acceleration) max. 6 A.

Hot plugging the USB interface may cause hardware damage


If the USB interface is being hot-plugged (connecting while the power supply is on), the possibly high poten-
tial differences of the two power supplies of controller and PC/Notebook can lead to damaged hardware.
• Avoid potential differences between the power supply of controller and PC/Notebook or, if possible, bal-
ance them.
• Insert the USB connector first, then switch on the power supply of the controller.

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 3-13
Setup
Configuration of Power Supply

3.2 Configuration of Power Supply


Basically, any power supply may be used, provided it meets the minimal requirements stated below.

Power Supply Requirements


Output voltage +VCC 10…24 VDC
Absolute output voltage min. 8 VDC; max. 28 VDC
Depending on load
Output current • continuous max. 2 A
• short-time (acceleration, <4 s) max. 6 A

1) Use the formula below to calculate the required voltage under load.
2) Choose a power supply according to the calculated voltage. Thereby consider:
a) During braking of the load, the power supply must be capable of buffering the recovered
kinetic energy (for example, in a capacitor).
b) If you are using an electronically stabilized power supply, make sure that the overcurrent pro-
tection circuit is configured inoperative within the operating range.

Note
The formula already takes the following into account:
• Maximum PWM duty cycle of 100%
• Controller’s max. voltage drop of 1 V @ 2 A

KNOWN VALUES:
• Operating torque M [mNm]
• Operating speed n [rpm]
• Nominal motor voltage UN [Volt]
• Motor no-load speed at UN, n0 [rpm]
• Speed/torque gradient of the motor Δn/ΔM [rpm/mNm]

SOUGHT VALUE:
• Supply voltage +VCC [Volt]

SOLUTION:

UN Δn
V CC ≥ ------- ⋅  n + --------- ⋅ M + 1 [ V ]
nO  ΔM 

ESCON Module 24/2 Hardware Reference


3-14 CCMC | 2021-08 | rel9004
Setup
Connections

3.3 Connections
The actual connection will depend on the overall configuration of your drive system and the type of motor
you will be using.
Follow the description in the given order and choose the wiring diagram that best suits the components you
are using. For corresponding wiring diagrams chapter “4 Wiring” on page 4-27.

3.3.1 Pin Assignment

Figure 3-3 Pin Assignment

Pin Signal Description

Motor (+M) DC motor: Motor +


1
Motor winding 1 EC motor: Winding 1

Motor (−M) DC motor: Motor −


2
Motor winding 2 EC motor: Winding 2

3 Motor winding 3 EC motor: Winding 3

4 +VCC Nominal operating voltage (+10…+24 VDC)

Power_GND Ground of operating voltage


5
GND Ground

Hall sensor supply voltage (+5 VDC; ≤30 mA)


6 +5 VDC Encoder supply voltage (+5 VDC; ≤70 mA)
Auxiliary output voltage (+5 VDC; ≤10 mA)

7 Hall sensor 1 Hall sensor 1 input

8 Hall sensor 2 Hall sensor 2 input

9 Hall sensor 3 Hall sensor 3 input

10 Channel A Encoder channel A

11 Channel A\ Encoder channel A complement

12 Channel B Encoder channel B

13 Channel B\ Encoder channel B complement

Table 3-7 Pin Assignment (Pins 1-13)

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 3-15
Setup
Connections

Figure 3-4 Pin Assignment

Pin Signal Description

14 DigIN/DigOUT4 Digital input/output 4

15 DigIN/DigOUT3 Digital input/output 3

16 DigIN2 Digital input 2

17 DigIN1 Digital input 1

18 GND Ground

19 AnOUT2 Analog output 2

20 AnOUT1 Analog output 1

21 AnIN2− Analog input 2, negative signal

22 AnIN2+ Analog input 2, positive signal

23 AnIN1− Analog input 1, negative signal

24 AnIN1+ Analog input 1, positive signal

Table 3-8 Pin Assignment (Pins 14-24)

ESCON Module 24/2 Hardware Reference


3-16 CCMC | 2021-08 | rel9004
Setup
Connections

3.3.2 Hall Sensor

Hall sensor supply voltage +5 VDC


Max. Hall sensor supply current 30 mA
Input voltage 0…5.5 VDC
Max. input voltage ±5.5 VDC
Logic 0 typically <1.0 V
Logic 1 typically >2.4 V
Internal pull-up resistor 10 kΩ (referenced to +5.45 V)

Figure 3-5 Hall Sensor 1 Input Circuit (analogously valid also for Hall Sensors 2 & 3)

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 3-17
Setup
Connections

3.3.3 Encoder

Best practice
• Differential signals offer good resistance against electrical interference. Therefore we recommend
using a differential scheme. Nevertheless, the controller supports both schemes – differential and sin-
gle-ended (unsymmetrical).
• The controller does not require an index impulse (Ch I, Ch I\).
• For best performance, we strongly recommend using encoders with a line driver. Otherwise, speed
limitations may apply due to slow switching edges.

Differential
Min. differential input voltage ±200 mV
Max. input voltage +12 VDC/−12 VDC
Line receiver (internal) EIA RS422 standard
Max. input frequency 1 MHz

Figure 3-6 Encoder Input Circuit Ch A “Differential” (analogously valid also for Ch B)

ESCON Module 24/2 Hardware Reference


3-18 CCMC | 2021-08 | rel9004
Setup
Connections

Single-ended
Input voltage 0…5 VDC
Max. input voltage +12 VDC/−12 VDC
Logic 0 <1.0 V
Logic 1 >2.4 V
Input high current IIH = typically +420 μA @ 5 V
Input low current IIL = typically −170 μA @ 0 V
Max. input frequency 100 kHz

Figure 3-7 Encoder Input Circuit Ch A “Single-ended” (analogously valid also for Ch B)

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 3-19
Setup
Connections

3.3.4 Digital I/Os

3.3.4.1 Digital Input 1

Input voltage 0…28 VDC


Max. input voltage +36 VDC/−36 VDC
Logic 0 typically <1.0 V
Logic 1 typically >2.4 V
typically 47 kΩ (<3.3 V)
Input resistance typically 38.5 kΩ (@ 5 V)
typically 25.5 kΩ (@ 24 V)
Input current at logic 1 typically 130 µA @ +5 VDC
Switching delay <8 ms

PWM frequency range 10 Hz…5 kHz


PWM duty cycle range (resolution) 10...90%
typically 0.1% @ 10 Hz
PWM accuracy typically 0.5% @ 1 kHz
typically 2.5% @ 5 kHz
RC Servo cycle duration 3…30 ms
RC Servo pulse length 1…2 ms

Figure 3-8 DigIN1 Circuit

ESCON Module 24/2 Hardware Reference


3-20 CCMC | 2021-08 | rel9004
Setup
Connections

3.3.4.2 Digital Input 2

Input voltage 0…28 VDC


Max. input voltage +36 VDC/−36 VDC
Logic 0 typically <1.0 V
Logic 1 typically >2.4 V
typically 47 kΩ (<3.3 V)
Input resistance typically 38.5 kΩ (@ 5 V)
typically 25.5 kΩ (@ 24 V)
Input current at logic 1 typically 130 µA @ +5 VDC
Switching delay <8 ms

Figure 3-9 DigIN2 Circuit

3.3.4.3 Digital Inputs/Outputs 3 and 4

DigIN
Input voltage 0…28 VDC
Max. input voltage +36 VDC
Logic 0 typically <1.0 V
Logic 1 typically >2.4 V
typically 47 kΩ (<3.3 V)
Input resistance typically 38.5 kΩ (@ 5 V)
typically 25.5 kΩ (@ 24 V)
Input current at logic 1 typically 130 µA @ +5 VDC
Switching delay <8 ms

Figure 3-10 DigIN3 Circuit (analogously valid also for DigIN4)

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 3-21
Setup
Connections

DigOUT
Max. input voltage +36 VDC
Max. load current 50 mA
Max. voltage drop 0.5 V @ 50 mA
Only possible with external protective circuitry (free-
Max. load inductance
wheeling diode)

Figure 3-11 DigOUT3 Circuit (analogously valid also for DigOUT4)

Figure 3-12 DigOUT3 Wiring Examples (analogously valid also for DigOUT4)

ESCON Module 24/2 Hardware Reference


3-22 CCMC | 2021-08 | rel9004
Setup
Connections

3.3.5 Analog I/Os

3.3.5.1 Analog Inputs 1 and 2

Input voltage −10…+10 VDC (differential)


Max. input voltage +24 VDC/−24 VDC
Common mode voltage −5…+10 VDC (referenced to GND)
80 kΩ (differential)
Input resistance
65 kΩ (referenced to GND)
A/D converter 12-bit
Resolution 5.64 mV
Bandwidth 10 kHz

Figure 3-13 AnIN1 Circuit (analogously valid also for AnIN2)

3.3.5.2 Analog Outputs 1 and 2

Output voltage −4…+4 VDC


D/A converter 12-bit
Resolution 2.42 mV
AnOUT1: 26.8 kHz
Refresh rate
AnOUT2: 5.4 kHz
Analog bandwidth of output amplifier 50 kHz
300 nF
Max. capacitive load Note: The rate of the increase is limited in propor-
tion to the capacitive load (e.g. 5 V/ms @300 nF).
Max. output current limit 1 mA

Figure 3-14 AnOUT1 Circuit (analogously valid also for AnOUT2)

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 3-23
Setup
Connections

3.3.6 USB (J7)

Hot plugging the USB interface may cause hardware damage


If the USB interface is being hot-plugged (connecting while the power supply is on), the possibly high poten-
tial differences of the two power supplies of controller and PC/Notebook can lead to damaged hardware.
• Avoid potential differences between the power supply of controller and PC/Notebook or, if possible, bal-
ance them.
• Insert the USB connector first, then switch on the power supply of the controller.

Figure 3-15 USB Socket J7

Note
Column “Head B” (Table 3-9) refers to USB terminals of your PC.

J7 &
Head B
Head A Signal Description
Pin Pin

1 1 VBUS USB BUS supply voltage input +5 VDC

2 2 D− USB Data− (twisted pair with Data+)

3 3 D+ USB Data+ (twisted pair with Data−)

4 – ID not connected

5 4 GND USB ground

Table 3-9 USB Socket J7 – Pin Assignment & Cabling

USB Type A - micro B Cable (403968)

Cable cross-section According to USB 2.0 / USB 3.0 specification

Length 1.5 m

Head A USB type “micro B”, male

Head B USB type “A”, male

Table 3-10 USB Type A - micro B Cable

ESCON Module 24/2 Hardware Reference


3-24 CCMC | 2021-08 | rel9004
Setup
Connections

USB standard USB 2.0 / USB 3.0 (full speed)


Max. bus operating voltage +5.25 VDC
Typical input current 60 mA
Max. DC data input voltage −0.5…+3.8 VDC

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 3-25
Setup
Status Indicators

3.4 Status Indicators


Light-emitting diodes (LEDs) indicate the actual operating status (green) and possible errors (red).

Figure 3-16 LEDs – Location

LED
Status/Error
Green Red

off off INIT

slow off DISABLE

on off ENABLE

2x off STOPPING; STOP STANDSTILL

• +Vcc Overvoltage Error


off 1x ERROR • +Vcc Undervoltage Error
• +5 VDC Undervoltage Error

• Thermal Overload Error


• Overcurrent Error
off 2x ERROR
• Power Stage Protection Error
• Internal Hardware Error

• Encoder Cable Break Error


• Encoder Polarity Error
off 3x ERROR
• DC Tacho Cable Break Error
• DC Tacho Polarity Error

off 4x ERROR • PWM Set Value Input out of Range Error

• Hall Sensor Pattern Error


off 5x ERROR • Hall Sensor Sequence Error
• Hall Sensor Frequency too high Error

• Auto Tuning Identification Error


off on ERROR
• Internal Software Error

Table 3-11 LEDs – Interpretation of Condition

ESCON Module 24/2 Hardware Reference


3-26 CCMC | 2021-08 | rel9004
Wiring
DC Motors

4 WIRING

Figure 4-17 Interfaces – Designations and Location

Note
The subsequent diagrams feature this symbol:

• Ground safety earth connection (optional)

4.1 DC Motors

MAXON DC MOTOR

Figure 4-18 maxon DC motor

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 4-27
Wiring
DC Motors

MAXON DC MOTOR WITH DC TACHO

Figure 4-19 maxon DC motor with DC Tacho

ESCON Module 24/2 Hardware Reference


4-28 CCMC | 2021-08 | rel9004
Wiring
DC Motors

MAXON DC MOTOR WITH ENCODER

Figure 4-20 maxon DC motor with Encoder

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 4-29
Wiring
EC Motors

4.2 EC Motors

MAXON EC MOTOR WITH HALL SENSORS

Figure 4-21 maxon EC motor with Hall Sensors

ESCON Module 24/2 Hardware Reference


4-30 CCMC | 2021-08 | rel9004
Wiring
EC Motors

MAXON EC MOTOR WITH HALL SENSORS & ENCODER

Figure 4-22 maxon EC motor with Hall Sensors & Encoder

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 4-31
Wiring
EC Motors

••page intentionally left blank••

ESCON Module 24/2 Hardware Reference


4-32 CCMC | 2021-08 | rel9004
Motherboard Design Guide
Requirements for Components of Third-party Suppliers

5 MOTHERBOARD DESIGN GUIDE


The following provides helpful information on integrating the ESCON Module 24/2 on a printed circuit board.
The «Motherboard Design Guide» contains recommendations for the layout of the motherboard and speci-
fies external components that may be required, pin assignments, and connection examples.

CAUTION

Dangerous Action
Errors in implementing the Design can result in serious Injury!
• Only proceed if you are skilled in electronics design!
• Designing a printed circuit board requires special skills and knowledge and may only be performed by
experienced electronic developers!
• This quick guide is only intended as an aid, does not make any claim to completeness, and will not
automatically result in a functional component!

Bring in additional Support:


If you are not trained in the design and development of printed circuit boards, you will need additional sup-
port for this point.
maxon will be happy to provide you with a quote for designing and manufacturing a motherboard for your
specific application.

5.1 Requirements for Components of Third-party Suppliers

5.1.1 Socket Headers


The ESCON Module 24/2’s implementation with pin headers permits mounting in two different ways. The
module can either be plugged onto a socket header (Table 5-12) or be directly soldered to a printed cir-
cuit board.

5.1.2 Supply Voltage


To protect the ESCON Module 24/2, we recommend using an external circuit breaker, a TVS diode, and a
capacitor in the voltage supply cable. In this regard, please note the following recommendations:

Figure 5-23 Wiring of Voltage Supply Cable

INPUT FUSE (FU1)


An input fuse (FU1) is necessary in order to provide reverse polarity protection. Together with an unipolar
TVS diode (D1), this prevents current from flowing in the wrong direction.

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 5-33
Motherboard Design Guide
Requirements for Components of Third-party Suppliers

TVS DIODE (D1)


To protect against overvoltage resulting from voltage transients or brake energy feedback, we recommend
connecting a TVS (transient voltage suppressor) diode (D1) to the voltage supply cable.

CAPACITOR (C1)
The function of the ESCON Module 24/2 does not necessarily require the use of an external capacitor (C1).
To further reduce voltage ripple and feedback currents, an electrolytic capacitor can be connected to the
voltage supply cable.

5.1.3 Encoder Inputs


To protect the encoder inputs of the ESCON Module 24/2 against overcurrent, we recommend using an
external TVS diode network.

Figure 5-24 Encoder Inputs – Protective Circuitry

ESCON Module 24/2 Hardware Reference


5-34 CCMC | 2021-08 | rel9004
Motherboard Design Guide
Requirements for Components of Third-party Suppliers

5.1.4 Analog Inputs and Outputs


To protect the analog inputs and outputs of the ESCON Module 24/2 against overcurrent, we recommend
using an external TVS diode network.

Figure 5-25 Analog Inputs and Outputs – Protective Circuitry

5.1.5 Motor Cables/Motor Chokes


The ESCON Module 24/2 is not equipped with internal motor chokes.
The majority of motors and applications do not require additional chokes. However, in the case of high
supply voltage with very low terminal inductance, the ripple of the motor current can reach an unacceptably
high value. This causes the motor to heat up unnecessarily and causes instable control behavior. The
minimum terminal inductance required per phase can be calculated using the following formula:

V cc
L phase ≥ --- ⋅  ----------------------------- – ( 0.3 ⋅ L motor )
1
2  6 ⋅ f PWM ⋅ I N 

L phase [ H ] Additional external inductance per phase

V cc [ V ] Operating voltage +VCC

f PWM [ Hz ] Switching frequency of the power stage = 53 600 Hz

IN [ A ] Nominal current of the motor (line 6 in the maxon catalog)

L motor [ H ] Terminal inductance of the motor (line 11 in the maxon catalog)

If the result of the calculation is negative, no additional chokes are necessary. Nevertheless, the use of
chokes in combination with additional filter components can be useful to reduce the emission of electromag-
netic interference.

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 5-35
Motherboard Design Guide
Requirements for Components of Third-party Suppliers

An additional choke must feature electromagnetic shielding, a high saturation current, minimal losses, and a
nominal current greater than the continuous current of the motor. The below wiring example refers to an
additional inductance of 150 μH. If a different additional inductance is required, also the filter components
must be adapted accordingly. Should you need further help with the filter design, contact maxon Support at
http://support.maxongroup.com.

Figure 5-26 Wiring of Motor Winding 1 (analogously valid also for Motor Windings 2 & 3)

ESCON Module 24/2 Hardware Reference


5-36 CCMC | 2021-08 | rel9004
Motherboard Design Guide
Requirements for Components of Third-party Suppliers

5.1.6 Recommended Components and Manufacturers

Recommended components

Straight socket header, pluggable with 0.64 x 0.64 mm pin headers, 2.54 mm pitch, 3 A,
contact material: gold

Preci-Dip (801-87-013-10-005101)
Socket 13 poles, 1 rows Würth (613 013 118 21)
Header E-tec (BL1-013-S842-55)

Preci-Dip (801-87-011-10-005101)
11 poles, 1 row Würth (613 011 118 21)
E-tec (BL1-011-S842-55)

Littelfuse 157 series, fuse holder incl. SMD NANO2


FU1 Fuse
Fuse 4 A very fast-acting, 3.152 A2sec (0157004.)

• Vishay (SMBJ33A)
UR=33 V, UBR = 36.7…40.7 V @ 1 mA, UC = 53.3 V @ 11.3 A
TVS Diode D1
• Diotec (P6SMBJ33A)
UR=33 V, UBR = 36.7…40.7 V @ 1 mA, UC = 53.3 V @ 11.3 A

• United Chemi-Con (EKZE630E_ _820MJC5S)


Rated voltage 63 V, Capacitance 82 μF, Ripple Current 690 mA
• Rubycon (63ZLH120M10X12.5)
Capacitor C1
Rated voltage 63 V, Capacitance 120 μF, Ripple Current 725 mA
• Nichicon (UPM1J121MHD)
Rated voltage 63 V, Capacitance 120 μF, Ripple Current 820 mA

• Würth Elektronik WE-PD (7447709151)


LN=150 μH, RDC=151 mΩ, IDC=2.1 A, Isat=2.7 A, shielded
Motor Cable
• Bourns (SRR1210-151M)
LN=150 μH, RDC=190 mΩ, IDC=2.2 A, Isat>1.8 A, shielded
Motor Choke
• Würth Elektronik WE-PD-XL (7447714470)
LN=47 μH, RDC=83 mΩ, IDC=2.2 A, Isat=2.5 A, shielded

TVS Diode for


• ON NUP4102XV6
Encoder
• ST ESDA14V2BP6
Inputs

TVS Diode for • NXP PESD1CAN


analog Inputs • ON NUP2105

TVS Diode for


analog • Bourns CDDFN2-T3.3B
Outputs

Table 5-12 Motherboard Design Guide – Recommended Components

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 5-37
Motherboard Design Guide
Design Guidelines

5.2 Design Guidelines


The following instructions are intended to serve as an aid for designing an application-specific motherboard
and ensuring the correct and reliable integration of the ESCON Module 24/2.

5.2.1 Ground
All ground connections (GND) should be internally connected to the ESCON Module 24/2 (equal potential).
It is customary to equip the motherboard with a ground plane. All ground connections should be connected
to the voltage supply ground via wide conductive tracks.

Pin Signal Description

Power_GND Ground of operating voltage


5
GND Ground

18 GND Ground

Table 5-13 Motherboard Design Guide – Grounding

If an earth potential is in place or required, the ground plane should be connected to the earth potential via
one or more capacitors. The use of ceramic capacitors with 100 nF and 100 V is recommended.

5.2.2 Layout
Guidelines for the layout of the motherboard:
• Connector pin [4] +VCC operating voltage:
The pins should be connected to the fuse via wide conductive tracks.
• Connector pins [5] and [18] ground:
All pins should be connected with the ground of the operating voltage via wide conductive tracks.
• The width of the conductive track and the copper coating thickness of the conductors for supply
voltage and motor depend on the current required for the application. A minimum width of 75 mil is
recommended for the track and a minimum thickness of 35 μm for the copper coating.

5.3 THT Footprint

Figure 5-27 THT Footprint [mm] – View from above

5.4 Pin Assignment


For detailed specifications chapter “3.3 Connections” on page 3-15.

ESCON Module 24/2 Hardware Reference


5-38 CCMC | 2021-08 | rel9004
Motherboard Design Guide
Technical Data

5.5 Technical Data


For detailed specifications chapter “2 Specifications” on page 2-9.

5.6 Dimensional Drawing


For the dimensional drawing Figure 2-2 on page 2-11.

5.7 ESCON Module 24/2 Motherboard (486400)


The ESCON Module 24/2 Motherboard (subsequently named ESCON Module MoBo) is available as an
alternative to developing an own motherboard. All required connections are already in place and designed
as screw-type terminals.

Figure 5-28 ESCON Module MoBo (left), with mounted ESCON Module 24/2 (right)

Figure 5-29 ESCON Module MoBo – Dimensional Drawing [mm]

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 5-39
Motherboard Design Guide
ESCON Module 24/2 Motherboard (486400)

5.7.1 Assembly
The ESCON Module MoBo is designed to easily be screw-mounted or integrated into standard rail systems.
For ordering information for the components required Figure 5-30 (only for illustrative purposes) and
Table 5-14.

Figure 5-30 ESCON Module MoBo – Mounting on DIN Rail

Specification / Accessories

PHOENIX CONTACT
2 x panel mounting base element 11.25 mm UMK-SE11.25-1 (2970442)
2 x base element 45 mm UMK-BE45 (2970015)
2 x foot element UMK-FE (2970031)
Adapter for DIN rail
CamdenBoss
2 x end section with foot 22.5 mm (CIME/M/SEF2250S)
1 x base element 22.5 mm (CIME/M/BE2250SS)
1 x base element 45 mm (CIME/M/BE4500SS)

Table 5-14 ESCON Module MoBo, mounting on DIN Rail – Specification & Accessories

ESCON Module 24/2 Hardware Reference


5-40 CCMC | 2021-08 | rel9004
Motherboard Design Guide
ESCON Module 24/2 Motherboard (486400)

5.7.2 Connections

Note
The USB interface is located directly at the ESCON Module 24/2.

5.7.2.1 Power Supply (J1)

Figure 5-31 ESCON Module MoBo – Power Plug J1

J1
Signal Description
Pin

1 Power_GND Ground of operating voltage

2 +VCC Nominal operating voltage (+10…+24 VDC)

Table 5-15 ESCON Module MoBo – Power Plug J1 – Pin Assignment

Specification / Accessories

Type Pluggable screw-type terminal block, 2 poles, 3.5 mm pitch

0.14…1.5 mm2 multi-core, AWG 28-14


Suitable cables
0.14…1.5 mm2 single wire, AWG 28-14

Table 5-16 ESCON Module MoBo – Power Plug J1 – Specification & Accessories

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 5-41
Motherboard Design Guide
ESCON Module 24/2 Motherboard (486400)

5.7.2.2 Motor (J2)


The servo controller is set to drive either maxon DC motors (brushed) or maxon EC motors (brushless).

Figure 5-32 ESCON Module MoBo – Motor Plug J2

J2
Signal Description
Pin

1 Motor (+M) DC motor: Motor +

2 Motor (−M) DC motor: Motor −

3 not connected –

4 Motor shield Cable shield

Table 5-17 ESCON Module MoBo – Motor Plug J2 – Pin Assignment for maxon DC motor (brushed)

J2
Signal Description
Pin

1 Motor winding 1 EC motor: Winding 1

2 Motor winding 2 EC motor: Winding 2

3 Motor winding 3 EC motor: Winding 3

4 Motor shield Cable shield

Table 5-18 ESCON Module MoBo – Motor Plug J2 – Pin Assignment for maxon EC motor (brushless)

Specification / Accessories

Type Pluggable screw-type terminal block, 4 poles, 3.5 mm pitch

0.14…1.5 mm2 multi-core, AWG 28-14


Suitable cables
0.14…1.5 mm2 single wire, AWG 28-14

Table 5-19 ESCON Module MoBo – Motor Plug J2 – Specification & Accessories

ESCON Module 24/2 Hardware Reference


5-42 CCMC | 2021-08 | rel9004
Motherboard Design Guide
ESCON Module 24/2 Motherboard (486400)

5.7.2.3 Hall sensor (J3)


Suitable Hall effect sensors IC use «Schmitt trigger» with open collector output.

Figure 5-33 ESCON Module MoBo – Hall Sensor Plug J3

J3
Signal Description
Pin

1 Hall sensor 1 Hall sensor 1 input

2 Hall sensor 2 Hall sensor 2 input

3 Hall sensor 3 Hall sensor 3 input

4 +5 VDC Hall sensor supply voltage (+5 VDC; IL ≤30 mA)

5 GND Ground

Table 5-20 ESCON Module MoBo – Hall Sensor Plug J3 – Pin Assignment

Specification / Accessories

Type Pluggable screw-type terminal block, 5 poles, 3.5 mm pitch

0.14…1.5 mm2 multi-core, AWG 28-14


Suitable cables
0.14…1.5 mm2 single wire, AWG 28-14

Table 5-21 ESCON Module MoBo – Hall Sensor Plug J3 – Specification & Accessories

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 5-43
Motherboard Design Guide
ESCON Module 24/2 Motherboard (486400)

5.7.2.4 Encoder (J4)

Figure 5-34 ESCON Module MoBo – Encoder Socket J4

J4
Signal Description
Pin

1 not connected –

2 +5 VDC Encoder supply voltage (+5 VDC; ≤70 mA)

3 GND Ground

4 not connected –

5 Channel A\ Channel A complement

6 Channel A Channel A

7 Channel B\ Channel B complement

8 Channel B Channel B

9 not connected –

10 not connected –

Table 5-22 ESCON Module MoBo – Encoder Socket J4 – Pin Assignment

Accessories

For sockets with strain relief:


1 retainer clip, height 13.5 mm, 3M (3505-8110)
Suitable strain Retainer
For sockets without strain relief:
relief
1 retainer clip, height 7.9 mm, 3M (3505-8010)

Latch For sockets with strain relief: 2 pieces, 3M (3505-33B)

Table 5-23 ESCON Module MoBo – Encoder Socket J4 – Accessories

ESCON Module 24/2 Hardware Reference


5-44 CCMC | 2021-08 | rel9004
Motherboard Design Guide
ESCON Module 24/2 Motherboard (486400)

Encoder Cable (275934)

Cable cross-section 10 x AWG28, round-jacket, flat cable, 1.27 mm pitch

Length 3m

Head A DIN 41651 female, 2.54 mm pitch, 10 pins, with strain relief

Head B DIN 41651 connector, 2.54 mm pitch, 10 poles, with strain relief

Table 5-24 ESCON Module MoBo – Encoder Cable

Best practice
• Because of its resistance against electrical interferences, we recommend using differential scheme.
Nevertheless, the controller supports both schemes – differential and single-ended.
• The controller does not require an index impulse (Ch I, Ch I\).
• For best performance, we strongly recommend using encoders with line driver. Otherwise, speed
limitations may apply due to slow switching edges.

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 5-45
Motherboard Design Guide
ESCON Module 24/2 Motherboard (486400)

5.7.2.5 Digital I/Os (J5)

Figure 5-35 ESCON Module MoBo – Digital I/Os Plug J5

J5
Signal Description
Pin

1 DigIN1 Digital input 1

2 DigIN2 Digital input 2

3 DigIN/DigOUT3 Digital input/output 3

4 DigIN/DigOUT4 Digital input/output 4

5 GND Ground

6 +5 VDC Auxiliary output voltage (+5 VDC; ≤10 mA)

Table 5-25 ESCON Module MoBo – Digital I/Os Plug J5 – Pin Assignment

Specification / Accessories

Type Pluggable screw-type terminal block, 6 poles, 3.5 mm pitch

0.14…1.5 mm2 multi-core, AWG 28-14


Suitable cables
0.14…1.5 mm2 single wire, AWG 28-14

Table 5-26 ESCON Module MoBo – Digital I/Os Plug J5 – Specification & Accessories

ESCON Module 24/2 Hardware Reference


5-46 CCMC | 2021-08 | rel9004
Motherboard Design Guide
ESCON Module 24/2 Motherboard (486400)

5.7.2.6 Analog I/Os (J6)

Figure 5-36 ESCON Module MoBo – Analog I/Os Plug J6

J6
Signal Description
Pin

1 AnIN1+ Analog input 1, positive signal

2 AnIN1− Analog input 1, negative signal

3 AnIN2+ Analog input 2, positive signal

4 AnIN2− Analog input 2, negative signal

5 AnOUT1 Analog output 1

6 AnOUT2 Analog output 2

7 GND Ground

Table 5-27 ESCON Module MoBo – Analog I/Os Plug J6 – Pin Assignment

Specification / Accessories

Type Pluggable screw-type terminal block, 7 poles, 3.5 mm pitch

0.14…1.5 mm2 multi-core, AWG 28-14


Suitable cables
0.14…1.5 mm2 single wire, AWG 28-14

Table 5-28 ESCON Module MoBo – Analog I/Os Plug J6 – Specification & Accessories

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 5-47
Motherboard Design Guide
ESCON Module 24/2 Motherboard (486400)

5.7.3 Wiring

Note
The USB interface is located directly at the ESCON Module 24/2.

Note
The subsequent diagrams feature this symbol:

• Ground safety earth connection (optional)

5.7.3.1 DC Motors

MAXON DC MOTOR

Figure 5-37 ESCON Module MoBo – maxon DC motor (J2)

ESCON Module 24/2 Hardware Reference


5-48 CCMC | 2021-08 | rel9004
Motherboard Design Guide
ESCON Module 24/2 Motherboard (486400)

MAXON DC MOTOR WITH DC TACHO

Figure 5-38 ESCON Module MoBo – maxon DC motor with DC Tacho (J2)

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 5-49
Motherboard Design Guide
ESCON Module 24/2 Motherboard (486400)

MAXON DC MOTOR WITH ENCODER

Figure 5-39 ESCON Module MoBo – maxon DC motor with Encoder (J2 / J4)

ESCON Module 24/2 Hardware Reference


5-50 CCMC | 2021-08 | rel9004
Motherboard Design Guide
ESCON Module 24/2 Motherboard (486400)

5.7.3.2 EC motors

MAXON EC MOTOR WITH HALL SENSORS

Figure 5-40 ESCON Module MoBo – maxon EC motor with Hall Sensors (J2 / J3)

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 5-51
Motherboard Design Guide
Spare Parts

MAXON EC MOTOR WITH HALL SENSORS & ENCODER

Figure 5-41 ESCON Module MoBo – maxon EC motor with Hall Sensors & Encoders (J2 / J3 / J4)

5.8 Spare Parts

Order number Description

444144 2-pole pluggable screw-type terminal block, 3.5 mm pitch, labeled 1…2

444145 4-pole pluggable screw-type terminal block, 3.5 mm pitch, labeled 1…4

444146 5-pole pluggable screw-type terminal block, 3.5 mm pitch, labeled 1…5

444147 6-pole pluggable screw-type terminal block, 3.5 mm pitch, labeled 1…6

444148 7-pole pluggable screw-type terminal block, 3.5 mm pitch, labeled 1…7

Table 5-29 Spare Parts List

ESCON Module 24/2 Hardware Reference


5-52 CCMC | 2021-08 | rel9004
List of Figures

LIST OF FIGURES

Figure 2-1 Derating Output Current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10


Figure 2-2 Dimensional Drawing [mm] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Figure 3-3 Pin Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 3-4 Pin Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 3-5 Hall Sensor 1 Input Circuit (analogously valid also for Hall Sensors 2 & 3) . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 3-6 Encoder Input Circuit Ch A “Differential” (analogously valid also for Ch B) . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Figure 3-7 Encoder Input Circuit Ch A “Single-ended” (analogously valid also for Ch B) . . . . . . . . . . . . . . . . . . . . . . . . 19
Figure 3-8 DigIN1 Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Figure 3-9 DigIN2 Circuit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Figure 3-10 DigIN3 Circuit (analogously valid also for DigIN4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Figure 3-11 DigOUT3 Circuit (analogously valid also for DigOUT4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Figure 3-12 DigOUT3 Wiring Examples (analogously valid also for DigOUT4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Figure 3-13 AnIN1 Circuit (analogously valid also for AnIN2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Figure 3-14 AnOUT1 Circuit (analogously valid also for AnOUT2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Figure 3-15 USB Socket J7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Figure 3-16 LEDs – Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Figure 4-17 Interfaces – Designations and Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 4-18 maxon DC motor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 4-19 maxon DC motor with DC Tacho. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Figure 4-20 maxon DC motor with Encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Figure 4-21 maxon EC motor with Hall Sensors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Figure 4-22 maxon EC motor with Hall Sensors & Encoder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Figure 5-23 Wiring of Voltage Supply Cable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 5-24 Encoder Inputs – Protective Circuitry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Figure 5-25 Analog Inputs and Outputs – Protective Circuitry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Figure 5-26 Wiring of Motor Winding 1 (analogously valid also for Motor Windings 2 & 3) . . . . . . . . . . . . . . . . . . . . . . . . 36
Figure 5-27 THT Footprint [mm] – View from above . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Figure 5-28 ESCON Module MoBo (left), with mounted ESCON Module 24/2 (right) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Figure 5-29 ESCON Module MoBo – Dimensional Drawing [mm] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Figure 5-30 ESCON Module MoBo – Mounting on DIN Rail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Figure 5-31 ESCON Module MoBo – Power Plug J1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Figure 5-32 ESCON Module MoBo – Motor Plug J2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Figure 5-33 ESCON Module MoBo – Hall Sensor Plug J3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Figure 5-34 ESCON Module MoBo – Encoder Socket J4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Figure 5-35 ESCON Module MoBo – Digital I/Os Plug J5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Figure 5-36 ESCON Module MoBo – Analog I/Os Plug J6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Figure 5-37 ESCON Module MoBo – maxon DC motor (J2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Figure 5-38 ESCON Module MoBo – maxon DC motor with DC Tacho (J2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Figure 5-39 ESCON Module MoBo – maxon DC motor with Encoder (J2 / J4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Figure 5-40 ESCON Module MoBo – maxon EC motor with Hall Sensors (J2 / J3). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Figure 5-41 ESCON Module MoBo – maxon EC motor with Hall Sensors & Encoders (J2 / J3 / J4) . . . . . . . . . . . . . . . . 52

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 Z-53
List of Tables

LIST OF TABLES

Table 1-1 Notation used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5


Table 1-2 Symbols & Signs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Table 1-3 Brand Names and Trademark Owners . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Table 2-4 Technical Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Table 2-5 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Table 2-6 Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Table 3-7 Pin Assignment (Pins 1-13) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Table 3-8 Pin Assignment (Pins 14-24) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Table 3-9 USB Socket J7 – Pin Assignment & Cabling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Table 3-10 USB Type A - micro B Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Table 3-11 LEDs – Interpretation of Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Table 5-12 Motherboard Design Guide – Recommended Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Table 5-13 Motherboard Design Guide – Grounding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Table 5-14 ESCON Module MoBo, mounting on DIN Rail – Specification & Accessories . . . . . . . . . . . . . . . . . . . . . . . . . 40
Table 5-15 ESCON Module MoBo – Power Plug J1 – Pin Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Table 5-16 ESCON Module MoBo – Power Plug J1 – Specification & Accessories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Table 5-17 ESCON Module MoBo – Motor Plug J2 – Pin Assignment for maxon DC motor (brushed). . . . . . . . . . . . . . . 42
Table 5-18 ESCON Module MoBo – Motor Plug J2 – Pin Assignment for maxon EC motor (brushless). . . . . . . . . . . . . . 42
Table 5-19 ESCON Module MoBo – Motor Plug J2 – Specification & Accessories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Table 5-20 ESCON Module MoBo – Hall Sensor Plug J3 – Pin Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Table 5-21 ESCON Module MoBo – Hall Sensor Plug J3 – Specification & Accessories . . . . . . . . . . . . . . . . . . . . . . . . . 43
Table 5-22 ESCON Module MoBo – Encoder Socket J4 – Pin Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Table 5-23 ESCON Module MoBo – Encoder Socket J4 – Accessories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Table 5-24 ESCON Module MoBo – Encoder Cable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Table 5-25 ESCON Module MoBo – Digital I/Os Plug J5 – Pin Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Table 5-26 ESCON Module MoBo – Digital I/Os Plug J5 – Specification & Accessories . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Table 5-27 ESCON Module MoBo – Analog I/Os Plug J6 – Pin Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
Table 5-28 ESCON Module MoBo – Analog I/Os Plug J6 – Specification & Accessories . . . . . . . . . . . . . . . . . . . . . . . . . 47
Table 5-29 Spare Parts List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

ESCON Module 24/2 Hardware Reference


Z-54 CCMC | 2021-08 | rel9004
Index

INDEX

275934 45
A 403968 24
additionally applicable regulations 8 438725 9
analog inputs 23 444144 52
444145 52
applicable EU directive 13
444146 52
assignment of the connections 15
444147 52
444148 52
C 486400 39
cables (prefab)
Encoder Cable 45 P
USB Type A - micro B Cable 24
performance data 9
country-specific regulations 8
pin assignment 15
precautions 8
D prerequisites prior installation 13
digital inputs 20, 21 prohibitive signs 6
purpose
E of the device 7
error display 26
ESD 8 R
EU directive, applicable 13 regulations, additionally applicable 8

H S
how to safety alerts 6
calculate required supply voltage 14 safety first! 8
interpret icons (and signs) used in the document 6 signs used 6
support for designing the motherboard 33 sockets
J1 41
I J2 42
incorporation into surrounding system 13 J3 43
informatory signs 6 J4 18, 44
intended purpose J5 46
of the device 7 J6 47
of this document 5 J7 24
interfaces, location and designation 27 standards, fulfilled 12
status display 26
L status LEDs 26
supply voltage, required 14
LEDs 26
symbols used 6

M T
mandatory action signs 6
technical data 9
MoBo (ESCON Module 24/2 Motherboard) 39
U
N
USB interface 24
notations used 5
W
O
wiring diagrams for
operating license 13 DC motors 27, 48
operating status, display 26 EC motors 30, 51
order numbers

ESCON Module 24/2 Hardware Reference


CCMC | 2021-08 | rel9004 Z-55
The present document – including all parts thereof – is protected by copyright. Any use (including reproduction, translation, micro-
filming, and other means of electronic data processing) beyond the narrow restrictions of the copyright law is not permitted with-
out the prior approval of maxon and will be subject to prosecution under the applicable law.
© 2021 maxon. All rights reserved. Subject to change without prior notice.
CCMC | ESCON Module 24/2 Hardware Reference | Edition 2021-08 | DocID rel9004

maxon motor ag
Brünigstrasse 220 +41 41 666 15 00
CH-6072 Sachseln www.maxongroup.com
D.2. MAXON MOTOR APPENDIX D. DATASHEETS

D.2 MAXON Motor

130
EC 20 flat ∅20 mm, brushless, 5 watt
A with Hall sensors B sensorless
motor
ECEC flat

M 1:1


Stock program Part Numbers


Standard program
Special program (on request)

A with Hall sensors 351005 351006 351007 351008


B sensorless 351054 351055 351056 351057
Motor Data (provisional)
Values at nominal voltage
1 Nominal voltage V 6 9 12 24
2 No load speed rpm 9350 9430 9380 9300
3 No load current mA 102 68.3 51.1 25.1
4 Nominal speed rpm 4780 5310 5170 5220
5 Nominal torque (max. continuous torque) mNm 7.59 8.58 7.59 7.74
6 Nominal current (max. continuous current) A 1.31 0.974 0.655 0.329
7 Stall torque1 mNm 17.2 22.4 18.9 19.9
8 Stall current A 2.93 2.54 1.61 0.838
9 Max. efficiency % 67 71 68 69
Characteristics
10 Terminal resistance phase to phase W 2.05 3.54 7.45 28.6
11 Terminal inductance phase to phase mH 0.189 0.424 0.754 3.09
12 Torque constant mNm/A 5.88 8.82 11.8 23.8
13 Speed constant rpm/V 1620 1080 812 402
14 Speed/torque gradient rpm/mNm 567 435 515 484
15 Mechanical time constant ms 30.3 23.2 27.5 25.8
16 Rotor inertia gcm2 5.1 5.1 5.1 5.1
Specifications Operating Range Comments
Thermal data n [rpm]  Continuous operation
17
 Thermal resistance housing-ambient 16.5 K/W
18
 Thermal resistance winding-housing 2.66 K/W In observation of above listed thermal resistance
19
 Thermal time constant winding 1.77 s 5.0 (lines 17 and 18) the maximum permissible winding
20 Thermal time constant motor 27.5 s 16000 temperature will be reached during continuous
-40…+100°C
21 Ambient temperature 351006 operation at 25°C ambient.
+125°C
22 Max. winding temperature 12000
= Thermal limit.
Mechanical data (preloaded ball bearings) 8000
23 Max. speed 15 000 rpm  Short term operation

24 Axial play at axial load < 2.0 N 0 mm The motor may be briefly overloaded (recurring).
4000

> 2.0 N 0.14 mm
25 Radial play preloaded Assigned power rating
26 Max. axial load (dynamic) 1.8 N
27 Max. force for press fits (static) 26 N 5 10 15
(static,
 shaft supported)  200 N 0.5 1.0 1.5
28 Max. radial load, 5 mm from flange 5.3 N

Other specifications maxon Modular System Details on catalog page 46


29 Number of pole pairs
4
30 Number of phases
3 Planetary Gearhead
31 Weight of motor 22 g ∅22 mm
Values listed in the table are nominal. 0.5 - 2.0 Nm
Connection with Hall sensors sensorless Page 383/386
Pin 1 VHall 4.5…24 VDC Motor winding 1 Recommended Electronics:
Pin 2 Hall sensor 3 Motor winding 2 Notes Page 46
Pin 3 Hall sensor 1 Motor winding 3
Pin 4 Hall sensor 2 neutral point ESCON Module 24/2 500
Pin 5 GND ESCON 36/3 EC 501
Pin 6 Motor winding 3 ESCON Mod. 50/4 EC-S 501
Pin 7 Motor winding 2 DEC Module 24/2 505
Pin 8 Motor winding 1 EPOS4 Micro 24/5 509
Adapter Part number Part number EPOS4 Mod./Comp. 24/1.5 510
see p. 529 220300 220310 EPOS4 Comp. 24/5 3-axes 511
Connector Part number Part number
TE 1-84953-1 84953-4
Molex 52207-1133 52207-0433
Pin for design with Hall sensors:
FPC, 11-pol, Pitch 1.0 mm, top contact style
Wiring diagram for Hall sensors see p. 59
1
Calculation does not include saturation effect
(p. 71/178)
288 maxon EC motor March 2021 edition / subject to change
28/12/22, 16:55 Online shop for high precise drive systems by maxon | maxon group

DETAILS
EC 20 flat Ø20 mm, brushless, 5 Watt, with Hall sensors
Part number 351006

PRICE SCALES Quantity Price per unit


Prices excluding VAT and shipping 1-4 €113.68
costs
5-19 €97.68

20-49 €80.00

from 50 On request

Start combination

Order quantity 1 Add to cart

Specifications Description Downloads

Specifications

TECHNICAL ILLUSTRATIONS

Dimension drawing
Information: Drawings are not to scale.

VALUES AT NOMINAL VOLTAGE

Nominal voltage 9V
No load speed 9430 rpm
No load current 68.3 mA
Nominal speed 5310 rpm
Nominal torque (max. continuous torque) 8.58 mNm
Nominal current (max. continuous current) 0.974 A

https://www.maxongroup.com/maxon/view/product/351006 1/3
28/12/22, 16:55 Online shop for high precise drive systems by maxon | maxon group

Stall torque 22.4 mNm


Stall current 2.54 A
Max. efficiency 71 %

CHARACTERISTICS

Terminal resistance 3.54 Ω


Terminal inductance 0.424 mH
Torque constant 8.82 mNm/A
Speed constant 1080 rpm/V
Speed / torque gradient 435 rpm/mNm
Mechanical time constant 23.2 ms
Rotor inertia 5.1 gcm²

THERMAL DATA

Thermal resistance housing-ambient 16.5 K/W


Thermal resistance winding-housing 2.66 K/W
Thermal time constant winding 1.77 s
Thermal time constant motor 27.5 s
Ambient temperature -40...+100 °C
Max. winding temperature +125 °C

MECHANICAL DATA

Bearing type ball bearings


Max. speed 15000 rpm
Axial play 0 mm, at radial load < 2 N
0.14 mm, at radial load > 2 N
Max. axial load (dynamic) 1.8 N
Max. force for press fits (static) 26 N
(static, shaft supported) 200 N
Max. radial load 5.3 N, 5 mm from flange

OTHER SPECIFICATIONS

Number of pole pairs 4


Number of phases 3
Number of autoclave cycles 0

PRODUCT

Weight 22 g

Description

Thanks to their flat design, the brushless EC flat motors are exactly the right drive for many applications. The well-conceived, simple engineering
allows mainly automated production which results in a favorable price.

Downloads

CAD-FILES (STEP)

CAD model (STEP) (ZIP 20 KB) Version 2017

https://www.maxongroup.com/maxon/view/product/351006 2/3
28/12/22, 16:55 Online shop for high precise drive systems by maxon | maxon group
CATALOG PAGE

目录页 (chinesisch, PDF 1 MB) Version 2020

Katalogseiten (deutsch, PDF 135 KB) Version 2020


Catalog page (english, PDF 153 KB) Version 2021
Catálogo Pagina (español, PDF 138 KB) Version 2020
Page de catalogue (française, PDF 137 KB) Version 2020

カタログページ (日本語, PDF 381 KB) Version 2020

Videos

Add to wish list Make a request Send to a colleague Print specifications

https://www.maxongroup.com/maxon/view/product/351006 3/3
D.3. FLEX-PRINT CONNECTOR TO PCB-SCREW CLAMPS APPENDIX D. DATASHEETS

D.3 Flex-Print Connector to PCB-screw clamps

135

You might also like