Kart

(Difference between revisions)
Jump to: navigation, search
(Virtual Kart)
(28 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{TOC right}}
 
{{TOC right}}
  
The Kart module (214_Pr1) is a Summer School module for students between the 2nd and the 3rd semester.
+
The Kart module (214_Pr1) is a Summer School module for students
It is a home-made model car remotely controlled by a smartphone.
+
between the 2nd and the 3rd semester.
 +
It is a [[kart/gallery|home-made model car]] remotely controlled by a smartphone.
  
[[File:Summer_School_15.jpg|thumb|Summer School '15]]
+
[[File:Kart I2C.jpg|150px|center|Demo Kart]]
[[File:SummerSchool_13.jpg|thumb|Summer School '13]]
+
[[File:SummerSchool_12.jpg|thumb|Summer School '12]]
+
[[File:SummerSchool_09.jpg|thumb|Summer School '09]]
+
[[File:SummerSchool_05.jpg|thumb|Summer School '05]]
+
[[File:SummerSchool_04.jpg|thumb|Summer School '04]]
+
 
+
[[File:Kart I2C.jpg|400px|center|Demo Kart]]
+
  
 
The work of the students can be summarized in four main tasks:
 
The work of the students can be summarized in four main tasks:
* design and assembly of the chassis
+
* design and assembly of the chassis and the body
* analysis of the motor driver circuits (DC and stepper)
+
* analysis of the DC motor
* configuration of the controlling FPGAs
+
* [[Kart#FPGA_Design|configuration of the controlling FPGAs]]
* completion and extension of the control GUI on the smartphone
+
* [[Kart#Android_App|completion and extension of the control GUI on the smartphone]]
 +
 
 +
Take a look at the [[kart/gallery|karts gallery]] !
  
 
== System Architecture ==
 
== System Architecture ==
Line 47: Line 43:
 
=== FPGA Design ===
 
=== FPGA Design ===
  
A [[Media:ELN_kart.zip|FPGA design environment]] is available, based on:
+
==== Design environment ====
 +
 
 +
A [https://classroom.github.com/g/Gvzsxsu_ FPGA design environment] is available, based on:
 
* [http://www.mentor.com/products/fpga/hdl_design/hdl_designer_series/ HDL designer] for graphical design entry
 
* [http://www.mentor.com/products/fpga/hdl_design/hdl_designer_series/ HDL designer] for graphical design entry
 
* [http://www.mentor.com/products/fv/modelsim/ ModelSim] for simulation
 
* [http://www.mentor.com/products/fv/modelsim/ ModelSim] for simulation
Line 53: Line 51:
  
 
{{TaskBox|content=
 
{{TaskBox|content=
Download the [[Media:ELN_kart.zip|ELN_kart.zip]] and unpack it to your personal drive (''U:\'').
+
clone the Git repository or download the corresponding <code>zip</code> and install it,
 +
preferably to your personal drive (<code>U:\</code>).
 
}}
 
}}
 
{{WarningBox|content=
 
{{WarningBox|content=
 
Make sure that there is no space character in the path to ELN_kart.
 
Make sure that there is no space character in the path to ELN_kart.
 
}}
 
}}
 +
 +
The design is made using [https://www.mentor.com/products/fpga/hdl_design/hdl_designer_series/ HDL Designer]
 +
as it was the case during the case during the [[Main_Page#Semester_1|previous semester's]] labs and project.
 +
The FPGAs are [[Libero IDE presentation|configured]] using the [https://www.microsemi.com/product-directory/design-resources/1751-libero-ide Libero IDE].
 +
 +
==== Board designs ====
  
 
With this, the following designs have to be completed:
 
With this, the following designs have to be completed:
Line 70: Line 75:
  
 
The installable package of the (or rather a) solution can be found here: [[Media:Kart.apk|Kart.apk]]
 
The installable package of the (or rather a) solution can be found here: [[Media:Kart.apk|Kart.apk]]
 
==== Android ====
 
 
An introduction to Android can be found here: [[Media:Android_Introduction.pdf|Android Introduction]]
 
 
Another sample project to learn how to create vertical seek bars: [[Media:VerticalSeekBarExample.zip|Vertical SeekBar Example]]
 
  
 
==== Starting point ====
 
==== Starting point ====
  
You can download the Kart project with the minimal interface here: [[Media:Kart.zip|Kart.zip]]
+
* You can download the Kart project with the minimal interface here: [[Media:Kart.zip|Kart.zip]]
 +
* You can find the instructions how to open the project in Android Studio in the [[Media:Programming_Introduction.pdf|programming introduction]] presentation...
 +
* The online documentation of all Java classes that are at your disposition is [[http://kart-javadoc.hevs.ch here]]
 +
* If you need timers, please do not use Java standard Timer and TimerTask, we provide a dedicated Timer class in the package <b>ch.hevs.utils.Timer</b>.
 +
* 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(...)).
  
You can find the instructions how to open the project in Android Studio in the "Programming Introduction" presentation...
+
==== 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.
  
The online documentation of all Java classes that are at your disposition is [[http://kart.vlegit.hevs.ch here]]
+
==== 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 [[Media:Kart USB-RS232 board.pdf|board]].
  
If you need timers, please do not use Java standard Timer and TimerTask, we provide a dedicated Timer class for your project [[Kart:Android:Timer|here]]
+
* Windows version [http://kart-javadoc.hevs.ch/Virtual%20Kart-2019.8-win64.exe here]
 +
* macOS version [http://kart-javadoc.hevs.ch/Virtual%20Kart-2019.8-macOS.dmg here]
  
 
== Components ==
 
== Components ==
Line 98: Line 105:
 
=== FPGA boards ===
 
=== FPGA boards ===
  
The [[Kart/FPGA board|FPGA motherboards]] are equipped with an AGL125 [http://www.microsemi.com/products/fpga-soc/fpga/igloo-overview IGLOO] in a VQ100 package.
+
The [[Kart/FPGA board|FPGA motherboards]] are equipped with an AGL125 [http://www.microsemi.com/products/fpga-soc/fpga/igloo-overview 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.
 
They hold daughterboards which drive different parts of the Kart.
 
The motherboards are interconnected via an [[kart/I2C link|I2C link]].
 
The motherboards are interconnected via an [[kart/I2C link|I2C link]].

Revision as of 09:30, 3 September 2021

Contents

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 boards

A Bluetooth receiver on the kart communicates via an RS232 serial link with the FPGA control board. This board stores the control values in a set of registers and dispatches them at a regular interval on an I2C link. The master also reads data values from the slave boards, stores them into a second set of registers and sends the corresponding information at a regular pace over the RS232 with a very simple protocol.

The control is distributed over several FPGA boards connected together via I2C. These base boards each hold a slave function board:

Tasks

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 FPGA boards preprogrammed with a functional solution and androïd phones with a demo application. This allows to start the development either with the FPGA design or the Android application development.

FPGA Design

Design environment

A FPGA design environment is available, based on:


View-pim-tasks.png

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

Dialog-warning.png

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.

Introduction

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

Components

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:

Sensors

The sensors connected to the I/O board are:

Additional Information

Personal tools
Namespaces
Variants
Actions
Navigation
Modules / Projects
Browse
Toolbox