University of Twente Student Theses


A bare-metal microcontroller as a target for 20-sim-generated C code

Visser, Berend (2020) A bare-metal microcontroller as a target for 20-sim-generated C code.

[img] PDF
Abstract:By the use of 20-sim, real-time controllers for mechatronic systems can be developed. Using the 20-sim 4C software this controller can be run on actual hardware. Several development targets are by default supported by this software, it is also possible to make a customtarget. The goal of this project is to explore the capabilities of amicrocontroller as a target for 20-simgenerated C code. A microcontroller is an interesting target as it can run without an operating system allowing for fast interrupt response times while having direct access to a wide range of peripherals. Also, it can be low energy, has a small footprint on a PCB and is relatively cheap. This comes at the cost of processing power. We found that the Arduino Due board, featuring an ARM-M3 microcontroller, can run a PID controller with a 10th-order low-pass filter at a loop frequency of 100[Hz]. The combinedmaximum latency per sample is 0.6[ms]. We measured latencies for the step calculation, reading input, setting output and sending logging. Extending the IO drivers would allow the system to be used on a wider range of plants. The latency can be reduced further by converting the control algorithm to work with fixed-point numbers. The data interface between the base station and the microcontroller should be improved as this is currently limiting the maximumsampling frequency.
Item Type:Essay (Bachelor)
Faculty:EEMCS: Electrical Engineering, Mathematics and Computer Science
Programme:Electrical Engineering BSc (56953)
Link to this item:
Export this item as:BibTeX
HTML Citation
Reference Manager


Repository Staff Only: item control page