From FSI
Revision as of 15:47, 23 June 2022 by Axel.amand (Talk | contribs)
Jump to: navigation, search


The Kart module (214_Pr1) is a Summer School module for students between the 2nd and the 3rd semester. It is a home-made model car remotely controlled by a smartphone.

Demo Kart

The work of the students can be summarized in four main tasks:

Take a look at the karts gallery !

System Architecture

The kart is controlled by a smartphone via Bluetooth.

Distributed controls

A Bluetooth - USB dongle on the kart communicates via an UART serial link with the FPGA. The control values are stored in a set of registers accessed through a simple protocol.

The design is separated over four different modules:

  • A DC motor controller receives a prescaler and a speed value to build the corresponding PWM and direction signals.
  • A stepper motor controller receives a prescaler and the desired angle and builds the coil controls signals.
  • A sensor controller manages I/O comprising hall sensors (to retrieve the driving speed), LEDs, buttons, and a range finder (to get the distance from an obstacle).
  • A control registers manager retrieve various information of the Kart and can play test sequences.


The programming introduction gives an overview about the structure of the software/hardware and the students' tasks. They comprise:

  • FPGA design for driving the hardware and reading the sensors
  • Android application development for the remote control

The students receive the FPGA board preprogrammed with a functional solution and Android phones with a demo application. This allows to start the development either with the FPGA design or the Android application.

FPGA Design

Design environment

A FPGA design environment is available, based on:


clone the Git repository or download the corresponding zip and install it, preferably to your personal drive (U:\).


Make sure that there is no space character in the path to ELN_kart.

The design is made using HDL Designer as it was the case during the case during the previous semester's labs and project. The FPGAs are configured using the Libero IDE.

Board designs

With this, the following designs have to be completed:

Android App

One goal is to implement an Android application that controls and monitors the kart.


The installable package of the (or rather a) solution can be found here: Kart.apk

Starting point

  • You can download the Kart project with the minimal interface here: Kart.zip
  • You can find the instructions how to open the project in Android Studio in the programming introduction presentation...
  • The online documentation of all Java classes that are at your disposition is [here]
  • If you need timers, please do not use Java standard Timer and TimerTask, we provide a dedicated Timer class in the package ch.hevs.utils.Timer.
  • To be informed when a register is modified by the kart (i.e. the hall sensor counter value has changed), your application has to implement the KartStatusRegisterListener interface. This will force your application to have a method (statusRegisterHasChanged) that will be called when a register value has changed. Don't forget to register your listener to the Kart (kart.addStatusRegisterListener(...)).

Common Problems

  • Don't block the main thread with an infinite loop
  • Don't change the orientation of the display during the execution, it can crash the BT communication. Do it in the Manifest.

Virtual Kart

If you need to test your Android application against a Kart and your Kart is either not build yet or not available at the moment, you can install the Virtual Kart application and use the Kart Bluetooth to USB adapter board.

  • Windows version here
  • macOS version here


Power supply

The power supply board provides the 5 V and the 3.3 V to the other boards. This is generated from two 6 V battery packs.

The power supply board also comprises an ADC which provides the battery level.

FPGA boards

The FPGA motherboards are equipped with an AGL125 IGLOO in a VQ100 package. The clock passed to the FPGA comes from a 10 MHz quartz.

They hold daughterboards which drive different parts of the Kart. The motherboards are interconnected via an I2C link.

The FPGA motherboards can be tested with the help of a dedicated test board which runs a signal from one I/O pin to the next.

FPGA daughterboards

Existing daughterboards are:


The sensors connected to the I/O board are:

Additional Information

Personal tools
Modules / Projects