Michael Peter | Michael Wüthrich | Camille Huber |
---|---|---|
[email protected] | [email protected] | [email protected] |
TE 307 | TE 301 | TE 307 |
Big shoutout to Maciej Szarek for his help and the support (https://github.com/szar99).
Fast Prototyping does not have to be perfect
Fast prototyping in robotics focuses on quickly building and testing a simple version of the system rather than aiming for perfection from the start. Through iterative development, each prototype helps identify and fix issues, leading to gradual improvements. This approach saves time and cost, encourages experimentation, and ensures that the final design is optimized based on real-world performance. Additionally, hardware and software evolve together, allowing adjustments to both as new challenges arise. Instead of spending too much time planning, build, test, and refine — learning from each iteration.
- Course Setup
- Hardware
- Tips
- Workshops, Solutions and Examples
- Build Mbed OS projects with VS Code
- Weblinks
In order to be able to complete the course, one must first register on the following platforms and obtain the appropriate tools. All the information needed to start the course can be found in Course Setup.
This document covers all the information about:
During the course, we will use the Nucleo-F446RE board from ST Microelectronics in combination with the PES board designed and developed at ZHAW. The basic hardware kit that students receive includes a variety of sensors and actuators for practical applications.
IMPORTANT NOTE:
- When working with hardware (connecting, reconnecting etc.), it is recommended that all power sources are disconnected. This is a general safety measure! So for us, the Nucleo is disconnected and the PES board Power Switch is OFF whenever we change something at the hardware setup.
- The USB cable should only be connected to the computer after the power switch has been switched on.
- Do not connect the charger when the battery packs are not connected, otherwise the PES board will be damaged.
- Using the PES board with power ON and hardware running while connected to your computer/laptop happens at your own risk. There was a case where a student's laptop was damaged in the past.
- Various Nucleo boards, PES boards and even laptops have been damaged in the past, so make sure to stick to the rules above.
The Nucleo-F446RE is a microcontroller development board featuring the STM32F446RET6 microcontroller from ST Microelectronics. It provides a versatile platform for prototyping and developing embedded systems, offering a wide range of peripherals, connectivity options, and compatibility with the Arduino and ST Morpho ecosystems.
Arm Mbed provides a dedicated platform with essential information about the development board. Here you can find technical specifications and the pinmap.
The PES board is a hardware board with additional sensors, devices and power electronics to work in combination with the Nucleo F446RE. It provides multiple pinouts for:
- 3 DC-Motor (brushed)
- 4 Servos (these occupy the 4 DI/O if used)
- 4 DI/O, 3.3V (5V tolerant)
- 4 AI/O, 3.3V (5V tolerant)
- 3 Encoder-Counter
- 9-axis IMU (accelerometer, gyroscope, magnetometer)
- SD-Card slot
IMPORTANT NOTE:
- The voltage of the DO (servos) is set via the switch behind the charging socket: 3.3V or 5V. Generally this can be set to 5V.
- Motor encoder soldering can be wrong. Do not assume that if you plug in one motor and everything works you can then also use the same connections with a different motor. You have to make sure that the physical rotation is according to your needs and that a positive input leads to a positive change of increments.
- Depending on the PES board version DCMotor M3 rotation direction might be inverted.
- Depending on the PES board version, the pin map might differ. Feel free to ask if you are not sure.
The kit includes two sets of 6V battery packs, which can be connected in series to provide 12 volts. The battery packs need to be connected to the back of the PES board. The picture below illustrates the proper battery connection required to get a total voltage of 12V.
The batteries enable the board itself to be powered independently of the connection to the computer/laptop, eliminating the need for a connection via the Mini USB cable. The board continues to receive a stable 5V supply while offering the option to use up to 12V supply for the power electronics of the motors. To activate the external battery power, switch the slider on the PES board to the ON position.
Single battery pack - if you are using a single battery pack, the remaining pins need to be bridged. If only 6 V is used, this must be parameterized accordingly in the firmware when parameterizing classes of hardware.
Using the Charger - if you connect the charger to the PES board, the battery packs must be connected. If the battery packs (2 packs for 12 volts or one pack and a jumper for 6 volts) are not connected when you plug in the charger, the PES board will be destroyed. THE CHARGER IS NOT A POWER SUPPLY
Charging batteries - the battery packs are only charged when the power switch is set to OFF.
Usage while charging - don't use the PES board while it is charging.
All additional technical information such as schematics and pin maps for the PES board can be found here. Also included there are CAD files of the combined Nucleo F446RE and PES board in .3dxml
extensions (for 3Dexperience).
- 2x Battery packs 6v / 2300mAh with charger
- 1x Servo – REELY S-0090
- 1x Servo – FUTABA S3001
- 1x LED green with resistor 2200/600mW/1%
- 1x Distance sensor SHARP GP2YOA41 analog 300mm with cable
- 1x DC Motor POLOLU (different gear ratios) D = 20 mm/ l = 43 mm/ 12V with encoder POLOLU 2.7 – 18V
- 1x Mechanical Button
- 1x Ultrasonic sensor GROVE ULTRASONIC RANGER V2.0 with cable
The following links contain the hardware tutorials. The documents contain specifications and technical information about the hardware itself and how to use it. The tutorials cover the software drivers, specific calibration procedures, controlling actuators and retrieving measurements from the sensors and actuators.
Important Note: The PES board currently does not support stepper motors. The following example uses an external hardware driver and an additional battery pack, which is directly wired to the Nucleo board.
Tips that you might find useful can be found in the document Tips. Here you can find information about:
The following links contain the workshop instructions:
And below you will find all the solutions, as well as some additional examples:
- Solution Workshop 1
- Solution Workshop 2, Part 1
- Solution Workshop 2, Part 2
- Solution Workshop 3, Part 1
- Solution Workshop 3, Part 2
- Example Line Follower
- Example Gimbal
- Example Line Follower Base Example
- Example Differential Drive Robot Kinematics Calibration
- Example Stepper Motor
- Example 1 SD-Card
- Example 2 SD-Card
- Example Serial Stream
The following descriptions explain how to build Mbed OS projects with VS Code on different operating systems without using PlatformIO. With PlatformIO the project should work as is.
- Git and GitHub Tutorial for Beginners from 32:40 about Github: https://www.youtube.com/watch?v=tRZGeaHPoaw
- C++ step by step tutorials: https://www.w3schools.com/cpp/default.asp
- Detailed explanation of C++ programming language: https://cplusplus.com/
- C++ data types: https://www.tutorialspoint.com/cplusplus/cpp_data_types.htm
- Printf format convention: https://cplusplus.com/reference/cstdio/printf/
- Flowchart diagram maker: https://app.diagrams.net/
- https://www.pololu.com
- https://www.adafruit.com
- https://www.sparkfun.com
- https://www.seeedstudio.com
- https://www.robotshop.com
- https://boxtec.ch
- https://www.play-zone.ch
- http://farnell.ch
- https://www.mouser.ch
- https://www.digikey.com
- https://www.conrad.ch
- https://www.distrelec.ch
- Online C++ Compiler: https://www.onlinegdb.com/online_c++_compiler