Introduktion till mjukvara och elektronik för instrumentering och datainsamling 4,5 hp FOR034F

Publicerad: 15 januari 2019

Personnel: David J. Cuartielles, PhD
School of Arts and Communication, K3
Culture and Society, Malmo University
Co-founder of Arduino
Tel: +46 763 98 58 18
Office: Arduino AB, MINC, Anckargripsgatan 3, 21119 Malmo


Each participant needs a computer with:

  • a working MATLAB installation
  • a Python interpreter
  • a C++ compiler
  • a working Arduino IDE installation
  • a working Processing IDE installation (alternatively you could use Eclipse for Java)

Also each participant needs some electronics materials, namely:

  • a microcontroller board using and AVR processor (recommended Arduino UNO)
  • a microcontroller board using an ARM Cortex M0 processor and with wireless connectivity capabilities (recommended Arduino MKR1010)
  • a breadboard
  • small components: leds, resistors, jumperwires
  • a storage card and a reader for microcontrollers: SD card connector, SD card
  • a way to read the data from SD cards into a computer (either the student computer has a card reader or an external reader is needed)
  • small sensors: LM35 temperature sensor, Sharp infrarred distance sensor
  • actuator: MOSFET transistor, relay
  • a small DC motor, a small servo motor
  • real time clock: RTC board

The teacher will provide different alternatives (in Sweden and abroad) on where to purchase the materials either as a single package or as separate parts, for those already having their own personal toolboxes.

Course contents

  • basic microcontroller programming in C
  • reading sensors, controlling actuators
  • getting processors into low-power mode, creating high latency systems
  • optimizing reading speeds
  • operating systems on embedded: revision of alternatives
  • low level control of peripherals: UART, ADC, DAC, SPI, I2C, PWM
  • logging data on memory cards
  • connecting Arduino boards to different software packages for direct data acquisition on computers
  • using Simulink to write and upload to Arduino, potentialities and limitations
  • wireless connectivity: alternatives and basic experiments with WiFi and BT
  • (advanced) types of bootloaders: serial, I2C, UF2
  • (advanced) design your own electronic board with KiCad

Note: the advanced topics will only be covered if / with the students that reach the appropriate level and that need to use specific designs for their studies


Set of 6 lectures covering the contents of the course. Lectures will be broadcasted. During the course, further reading materials and datasheets will be provided along with homework assignments. These exercises are to be solved individually. During the grading sessions, groups of participants will work through the solutions to the problems in a teacher guided peer-review setting and provide feedback to each other. Physical presence at the grading sessions is mandatory. These will be held at campus Luleå. Prior to each grading sessions, solutions to the homework problems should be uploaded in Canvas.


Time and place for all lectures is listed below. All broadcasted lectures will be streamed through Zoom. Links to each lecture will be provided on Canvas. Grading sessions will NOT be broadcasted.

  • Lecture 1: January 14, 2019, 10.15 – 11.45. Zoom session link:
  • Lecture 2: January 28, 2019, 10.15 – 11.45. Zoom session link:
  • Grading session 1: February 4, 2019, 13.00 – 15.30, room A3011
  • Lecture 3: February 8, 2019, 10.15 – 11.45. Zooom session link:
  • Lecture 4: February 15, 2019, 10.15 – 11.45. Zoom session link:
  • Grading session 2: February 25, 2019, 13.00 – 15.30, room A3024
  • Lecture 5: March 1, 2019, 10.15 – 11.45. Zoom session link:
  • Lecture 6: March 8, 2019, 10.15 – 11.45. Zoom session link:
  • Grading session 3: March 20, 2019, 13.00 – 15.30, room A3011


The following materials are needed to deepen the information that will be provided during the lectures:

  • datasheet for the ATMega 328 microcontroller from AVR / Atmel / Microchip
  • datasheet for the SAMD21 microcontroller from ARM / Atmel / Microchip
  • (advanced extra literature) The Definitive Guide to the ARM Cortex-M0 by Joseph Yiu (
  • (advanced extra documentation) KiCad documentation site (

Course hand outs will be provided before the beginning of the course, including as many as possible of the above mentioned materials at the basic level.

Final projects

Final projects are the way the course will be evaluated. It is recommended to work with a topic of relevance for the student’s future projects. Therefore individual form is preferred, however, it is possible to work in teams but the tasks will have to be adjusted accordingly. Project proposals have to be approved by the teacher and should include the development of dataloggers in any form using memory cards or computers as systems to capture data. Also a workflow showing how to display the data through a visual representation should be presented. The projects will be presented as open source solutions to be published on Elsevier’s HardwareX journal, in other words, the journal’s submission rules will be requested. Writted feedback will be provided for each one of the papers one week after grading session 3.


To pass the course, the following is required:

  • Solutions to all homework assignments presented at each grading session. A serious attempt to a solution is a minimum requirement.
  • Active participation during the grading sessions. Physical attendance is required.
  • Completion of the tasks to the individual projects.

Only pass or fail grades will be awarded.