Skip to content

Embedded system providing telemetry and datalogging to the "course en cours" model car educational competition

License

Notifications You must be signed in to change notification settings

heolfief/Course-en-Cours

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Course en cours

www.course-en-cours.com



VERSION EN FRANCAIS / FRENCH VERSION

Table of contents

Description

This project contains hardware, software and documentation files for the "course en cours" educationnal competition in France. During a year, teams of 4 to 6 middle/high school students build their small electic car using the same tools as engineers. the contest consists of designing, creating, testing and running a small model car during the regional competitions, to acces the national final.

We are two university students in electrical engineering and industrial data processing, from IUT de Rennes, France. Our project is to integrate embedded telemetry, datalogging and manual control into the existings cars engines. We choosed to works with the Arduino environnement, to make it possible for everybody to program their car, modify it as they like, and to make programming accesible for the young people of the competition.

This project is realesed under the general public license and is strongly welcome to modifications.

Where to start

In order to be able to program your board with the arduino IDE via usb, you will first need to install a bootloader on your board. Find insruction on how to do that in the software section.

When this step is done you should be able to programm your board like if it was an arduinon pro mini.

Just install the course-en-cours library (link in the software section) and import it to your arduino sketch. Here is a tutorial if you need help for this step.

You should now be able to program your board via USB, as described in the software section.

Hardware

The hardware is based on 4 main components:

  • ATmega328p microcontroller (the same as the arduino uno/nano/pro mini)
  • MPU6050 accelerometer and gyro chip
  • A FTDI chip (to program the microcontroller via USB)
  • A micro SD card holder

This board is fully arduino compatible and should be selected in the arduino environnement as the arduino pro mini (ATmega328p, 3.3V 8MHz).

Documents availables

Board form factor

PCB pinout diagram:

PCB pinout

PCB wiring diagram:

BE CAREFULL: You need to provide 3.3V to the board, plugging directly the 11.1V LiPo battery will kill it. You can step down the battery voltage with a standard DC/DC converter (also known as buck-converter) set to output 3.3V (min 200mA), like in the wiring diagram above.

Software

Firmware

You can program your course en cours board in C/C++ directly with the arduino IDE via USB, assuming you already have a bootloader installed on your board. Instructions on how to flash a bootloader below.

In the arduino IDE, select the "arduino pro mini" under Tools/Board, and the ATmega328p 3.3V 8MHz under Tools/Processor. Then select the COM port (under Tools/Port) on wich the board is plugged. To access all the course en cours related function, just import the "course_en_cours" library to your sketch. Here is a tutorial if you need help for this step.

You should now be able to program your board with the arduino software environement.

The delay() function from the Arduino IDE shouldn't be used in your program because it will block the process of our library.

Needed libraries

  • MPU6050 by jarzebski : Allows us to use the IMU.
  • SDFat by greiman : Allows us to get a high speed SD card communication.

Exemple code:

#include "Course_en_Cours.h"

Couse_en_Cours cec;	 // create Couse_en_Cours object

void setup() {
	cec.initialiser(AUTO);
	cec.palier_moteur(1000,0);
	cec.palier_moteur(5000,50);
	cec.palier_moteur(7500,75);
}

void loop() {
	cec.executer();
}
Function Description Parameters
cec.executer(void); Mandatory function, needs to be run in the loop().
  • cec : a variable of type Course_en_cours
cec.initialiser(bool pilotage_mode); Function to set the driving mode. Needs to be run in the setup().
  • cec : a variable of type Course_en_cours
  • pilotage_mode : the mode you want your car to run in. Can be set to "AUTO" or "MANU".
    • AUTO : you can drive the motor within your arduino code with the palier_moteur function.
    • MANU : palier_moteur functions are disabled, and remote control signal is redirected to the ESC. You can manualy drive the motors with a remote.
cec.palier_moteur(unsigned int ms, unsigned char pourcentage); The motor power step function. Use it in the setup() to set a fixed power/speed to the motor at a certain time. Can be called several times to create differents steps at different times.
  • cec : a variable of type Course_en_cours
  • ms : the time in milieconds you want the function to take effect. Timer starts right after power-up.
  • pourcentage : this sets the power/speed of the motor, in percentage.

Known issues

The actual software have some issues :

  • If the .csv file is not already on the SD card, the logging would be slower than expected. Make sure that the file already exists on the card.
  • The logging time may vary depending of how many steps (palier_moteur functions) you have added.
  • The object Course_en_Cours must be called "cec" and declared as global variable (away from the loop() and setup(), or from any fonction).

Bootloader

In order to be able to program your board with the arduino IDE via usb, you will first need to install a bootloader on your board. Sparkfun have made an easy to understand tutorial on how to do that here : Installing an arduino bootloader

Here is the wiring diagram to install the bootloader with an arduino UNO (follow the sparkfun tutorial for step by step instructions).

When installing the bootloader, make sure your arduino target board is the arduino pro mini (ATmega328p 3.3V 8MHz), as this board is arduino pro mini compatible.

You should now be able to program your board via USB, as described in the software section.

Creators

Heol Fief

Dylan Gageot

Copyright and license

heolfief/Course-en-Cours is licensed under the GNU General Public License v3.0.

See the LICENSE file for more informations.

About

Embedded system providing telemetry and datalogging to the "course en cours" model car educational competition

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages