Projets:Vesc tool setup

De wikilab

Project overview

This project presents in details how to configure a VESC board (Vedder Electronic Speed Control) :

  • Make the wiring and the required electrical connections to use this electronic board in order to control an electrical bike engine (as well as other types of engines such as DC, brushless)
  • Configure an electronic VESC board with a dedicated program (VESC Tool) in order to control an electrical bike engine with an electrical scooter type accelerator throttle.

Special thanks

The VESC card and the VESC Tool were designed by Benjamin Vedder VESC Project


Merci/Thanks/Danke Shön Benjamin Vedder :)

Warning

  • /!\ Do not unplug the engine when the battery is plugged in !
  • Reversing is not possible with this type of engine.

When you attempt to reverse with your installed device, the engine opposes a resistance, this is supposed to happen. There is way to facilitate reversing through special settings indicated by the acronym (M.Ar).

Moreover, the implementation of a master switch that cuts the main power (Safety circuit breaker) will hold the engine at rest. You will then be able to reverse.


  • In the program, when you have a number with a decimal, you must use a comma (example: -0,10) and not a dot (-0.10).

Useful links


  • Realization of the mechanical part (First version) : Mécanique V1 NOTE : This solution is not retained because it is too difficult to set up and remove.
  • The second version is similar to the third version. It is however less aesthetic. It is therefore not described here.
  • Realization of the mechanical part (Third version) : Mécanique V3

Design brief

For who : For all individuals who wish to enhance their mobility using an electrical bike engine.

For what : For children's bikes, hemiplegic quadricycles, scooters to tow wheelchairs (trotti)

How : By inserting an engine in the wheel using a Dibond flange (Documentation in the works) and by controlling the engine with a dedicated electronic card (VESC).

How much : Thanks to our partnership with La petite Rennes we can provide you with a battery free of charge, a battery charger and an electrical bike engine. In exchange you will be asked to take photos and make videos of your work in order to showcase your project.

You will nonetheless have to purchase components on the internet:

  • 1 VESC card: VESC electronic card
  • 1 cable for the hall effect sensors : TORQUE ESC Sensor Wires $6.99 (you only need to check the corresponding checkbox after you've bought the card)
  • The handle of an electrical scooter : Handle
  • 2 Manfrotto clamps to connect the chassis on your chair: Manfrotto clamps

Where : At the Humanlab or at a FabLab near you : FabLab maps by Makery

Existing prototype(s) analysis

There are several existing devices with the same function, here is a non-comprehensive list of these devices:

Models purchasable on the market :

"Do it yourself" model :

Team (Project leaders and contributors)

  • Project leader : Guillaume (Trotti), DomiBike, Lila ...
  • Contributors : Christian, Delphine, Julien, Super DD
  • Referent Fabmanager : Yohann
  • Documentation manager : Delphine

Required components

Mandatory

  • Prepared VESC card Version 4.12: VESC electronic card
  • VESC Tool Free program (v 0.95 is used here): https://www.vesc-project.com/vesc_tool
  • 1 acceleration handle. (There are several other control options such as Nunchuck, Potentiometer, wireless etc.)
  • 1 electrical bike brushless engine 250 WATTS documentation of the engine in the wheel Motorisation_roue
  • 1 bike battery
  • Crimp terminals adapted to JST connectors
  • mini-USB DATA cable
  • 1 female JST connector P:2mm Step:2mm, 6 points
  • 1 female JST connector P:2mm Step:2mm, 7 points
  • Heavier gauge silicone cable (10AWG, 5mm2) for powering
  • Flat or mixed open-end 5/8ths wrench (number 15 spanner) for the securing nuts of the engine on the fork
  • Screw, nut 5mm diameter to secure the bike battery support


cost-efficient alternative to the VESC card NOT TESTED

  • There are other engine controlling electronic boards that are 10 times cheaper but these cannot be reprogrammed. This means you cannot select the speed at which the vehicle goes nor adjust the acceleration curve, you can find these here:

ESC low cost banggood

ESC low cost amazon


Optional

  • Stabilized powering to test if you don't have a battery
  • Additional cabling for extension cables if needed
  • Cable gland to seal the cable feedthrough


Pictures of the components

Required tools

  • Soldering iron (Powerful enough to work with heavy gauge cables)
  • Tin
  • Heat shrink sleeve
  • Crimping tool

Cost

  • VESC board + Hall effect sensor cable = 92 $
  • Battery + Charger + brushless motor = 0€ thanks to "La petite Rennes"
  • Clamp bracket : 15€ x 2 = 30 €
  • Acceleration handle = 8 €

Fabrication time

Fabrication time is given on an indicative basis and may vary, ref : Murphy's Law

  • Metallic chassis fabrication : 1 to 2 days (working hours)
  • First installation of the completed device (Chassis + electronic component) on the chair : 2 to 3 hours
  • Wiring set up : 1 to 2 hours
  • Programming process of the board : 1 to 2 hours
  • Installation of the completed device on the chair with practice : 5 to 10 minutes

Source files

You will find our Configuration Settings in the provided ZIP file as of July 4th, 2019:

XML file : Motor configuration

XML file : App configuration

Fichier:4-7-19.zip

Electronic component : VESC board preparation

Overview schematics

FW 02 wiring.jpg


--> WARNING - (This step is now obsolete since we've chosen a new board provider)<-- - Wiring if use of a naked VESC board

Strip and tin the power supply wires and then cut back so that the stripped wires are not too long.

BALa0ZVr o.jpg QI4Jvynz o.jpg



Wrap the capacitor's lugs (holding parts) and then solder them (WARNING You have to solder the capacitor according to its polarity. The + (longest lug) on the red wire and the - (shortest lug) on the black. Then check the continuity of the wire with a multimeter and the insulation of one wire in relation to the other.

YLaFF5AM o.jpg BNy8yi8P o.jpg


Solder the power supply wires to the board by first putting tin on the + and - terminals and then placing the wires directly on them.

P2jZXvcJ o.jpg Wr20V0Ep o.jpg Z319LbTM o.jpg


Tin the other two extremities of the wires.

QHpaYd3K o.jpg GqRkBPJE o.jpg


Tin the three ends on the board, then the two ends of the cables that will feed the three electromagnetic coils of the motor (three-phase cables).

Mui7MH74 o.jpg Zgn3aFPt o.jpg


Solder them flat on the three previously tinned ends of the board.

MtdZoe8O o.jpg


-->End of the obsolete step<--

Fabrication of the necessary wiring

  • Wiring connections from the motor to the board

Connections cables moteur carte.JPG


  • Link the battery to the VESC board and implementation of a killswitch (emergency stop button)
  • Handle with the adapted connector
  • Wiring for the Hall effect sensors

Placing the card in its dedicated housing

(Pictures soon)

Programming the electronic board

Preliminary step

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

To enter the software in the board you will need to connect the board via usb AND power it from the bike battery (or a laboratory power supply) thanks to the 2 black and red wires.

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


ESC

The Electronic Speed Controler) is used to manage the operation of the engine.

Step by step software configuration

You will first need to download the software, you will need to purchase it ... for 0€ But you can also support the project by purchasing the software VESC Tool

Open the VESC Tool software.

A picture is worth a thousand explanations! You will be able to edit the tabs by following the mouse cursor on the images.

You might get a message the first time you open the software on udev rules. Click Yes to install them.


Install udev rules.png


Install udev rules 2.png


Install udev rules 3.png


VESC Tool>Connection tab

In Connections tab>USB Serial, click on Refresh serial port list (Baud Option on 115200)


Connection-Serial-refresh.png


If no port is detected, leave the USB cable plugged in, and restart the software.

Then click the Connection icon.


Connection-connection.png


If you get the following error message, you will need to update the firmware (see next step)


Connectionmessage-erreur.png


VESC Tool>Firmware tab>Included File

Click on the Firmware tab


5 Firmware.png


See the original documentation in English if needed. Documentation

WARNING: the wrong firmware can permanently damage the board if it is not the right firmware! Select the board version in the left window (V 4.12) and VESC_default.bin in the right window.

Upload the VESC firmware VESC_default.bin corresponding to hardware v4.12.


6 Televerser Firmware.png


Information message: the card configuration will be overwritten by the new firmware.


7 Firmware alerte effacement.png


Once the new firmware is uploaded, please wait the required 10 seconds and then disconnect the power from the board.


8 Firmware upload 10seconds wait.png


Message informing that the Firmware is uploaded. Wait for at least 10 seconds, then disconnect the USB and then reconnect.


10 Firmware message reboot.png


Reconnect the board


Connection-connection.png


VESC Tool>Motor settings>General

We will now configure the board for our engine by selecting Motor settings>General from the left menu.


11 MS General.png


VESC Tool>Motor settings>General>Current

12 MS General Current.png


VESC Tool>Motor settings>General>Voltage

In the "Battery Cutoff Calculator" window at the bottom of the main window, enter 12 cells if you are using Arcade bike batteries. Otherwise refer to the documentation of the batteries you are using. Click Apply to confirm.


13 MS General Voltage.png


14 MS General Voltage Apply.png


VESC Tool>Motor settings>General>RPM

Indicate the maximum value of motor rotation in the MAX ERPM parameter (12000RPM here) (revolutions per minute). If you want to limit the speed of your device this is where it is controlled, feel free to test it.

- (M.Ar) - If you want to facilitate reversing (free wheel to allow reversing) you have to indicate this value in the max ERPM reverse box : -0,10


15 MS General RPM.png


VESC Tool>Motor settings>Wattage

Indiquer la puissance de votre moteur dans la case Maximum Wattage : ici 250W

- (M.Ar) : il faut indiquer dans la case Maximum Breaking Wattage : -0,1W


16 MS General wattage.png

VESC Tool>Motor settings>Temperature

Il n'y a rien à modifier dans l'onglet Temperature.


17 MS General Temperature.png


VESC Tool>Motor settings>Advanced

Il n'y a rien à modifier dans l'onglet Advanced.


18 MS General Advanced.png


VESC Tool>Motor settings>BLDC>General

Dans le menu de gauche allez dans : Motor settings > BLDC puis dans la fenêtre centrale choisir l'onglet General. Recopier les parametres de l'images suivante. Dans le paramètre Sensormode choisir "Sensored"


19.png


Dans la fenetre du bas dans l'onglet "detect BLDC parameters" :


20 MS BLDC General Detect.png


Cliquer sur l'icone du triangle dans un rond (icône play) (Attention cela va mettre en route le moteur).

Veiller à ce que le moteur ne soit pas en charge (que rien ne le freine ou ne l'empêche de tourner)


attention si vous utilisez le banc de puissance MHK : la courroie ne doit pas être tendue du tout), il doit être libre.


21 MS BLDC General Detect message.png


Vous obtenez la table des capteurs de hall de votre moteur (vous pouvez noter et archiver ces paramètres) :


22 MS BLDC General Detected.png


Suite du résultat obtenu:


23 MS BLDC General Detected.png

VESC Tool>Motor settings>BLDC>sensorless

Onglet sensorless : il n'est pas utile puisque nous utilisons les capteurs de hall du moteur

VESC Tool>Motor settings>BLDC>Sensors

Onglet Sensors : Cliquez sur apply, et la table se remplit automatiquement avec les bonnes valeurs


24 MS BLDC sensors.png


26 MS BLDC sensors apply.png

Sauver la config moteur

Cette étape sert à mémoriser votre configuration dans la carte VESC

Dans le menu de droite, cliquez sur le bouton : Write motor configuration


28 Write Motor Config.png

VESC Tool>App settings>BLDC>General

29 AS General.png


Dans le paramètre "App to use" : Choisir "ADC"


30 AS General App2UseADC.png

VESC Tool>App settings>ADC>General

- Onglet General : Choississez Duty Cycle

OU

- (M.Ar) - Choississez Duty Cycle Reverse Center (ce qui permet de reculer sans que la roue bloque)


31 AS ADC General.png


VESC Tool>App settings>ADC>Mapping

Onglet Mapping : Il va falloir paramétrer votre poignée de gaz (poignée accélérateur)


32 AS ADC mapping.png


Dans la colonne de droite activer les icone RT et RT APP (vous verrez ainsi les valeurs en temps réelles)


35 RT RT APP.png


Dans la fenetre du bas : ADC Voltage Mapping : choississez "Duty Cycle" ou "Duty Cycle Reverse Center ( (M.Ar) si vous avez choisi d'avoir cette possibilité en implémentant l'interrupteur qui permet de passer d'un mode à l'autre (mode normal et mode roue libre)


36 AS ADC Mapping DutyCyclereversecenter.png


Si vous avez choisi Duty Cycle Reverse Center : - appuyer sur le bouton reset min et max


39 AS ADC Mapping ResetMinMax.png


Mettez le bouton de selection (interrupteur) en M Ar pour atteindre le minimum (cad 0V) : Photo 41


41 AS ADC Mapping ResetMinMax bouton M ar.png


Puis mettre le bouton (interrupteur) en mode normal et tourner l'accélérateur au min et max pour atteindre les valeurs seuil :

Cliquer sur "Apply"

Vue avant


43 AS ADC Mapping ResetMinMax bouton M ar.png


Vue après


44 AS ADC Mapping ResetMinMax bouton M ar.png


Dans le menu de droite, sauvegarder avec le bouton Write App Configuration


45 Write App Config.png


FINALISATION Motor Settings>Additional infos

Dans la colonne de gauche allez dans : Motor settings / Additionnal infos : photo 46


46 Motor Settings Additional Infos.png


Compléter les champs avec vos renseignements : changer le nb de cells, le poids, la marque du moteur, qui correspond à votre config .


50 Motor Settings Additional Infos MotorGeneral.png


Ajouter une description pour vous rappeler de votre config


51Motor Settings Additional Infos Description.png


Sauvegarder en cliquant sur "Write motor config" dans le menu de droite

- Write motor config


28 Write Motor Config.png


Et voilaaaaaaaa, votre carte est prête à être installée sur votre moyen de locomotion.

Youpi !! :)