The following images are screenshots of the terminal program I use for setting up the chip. These are for version 2.00, just to show that setup is easy.
The program I use is gtkterm under Linux, for Windows you can use Termite
This is the main menu from v2.00
View attachment 10
best is to always go through the menu's in alphabetical order. When you change something in menu a it's recommended you look
through all subsequent menus to make sure nothing changed, as some parameters share a dependency.
With the PCB as it is the PWM setup is shown as above, 21 kHz freuquency and 400ns deadtime. This menu also shows an
autocomplete function under option g: whenever a menu has an autocomplete it will fill in all the options after the autocomplete
option, so here the chip enters option h by itself. Typically the autocomplete uses information from previous options (here for
instance option h is calculates as two times the PWM frequency minus 1) and information from previous sub-menus.
I'm going through the submenu's in order, so above shows the current settings menu. The current sensor transimpedance can be
found in the datasheet of the sensor, for the ACS768 series it typically is 2000/I_max mV/A . Above is for 50A sensors. After entering
the maximum motor phase and battery currents, the chip can autocomplete the rest. Autocompleted options, by the way, can be
overrided by selecting them and typing a new value.
View attachment 7
the throttle menu is the same as for v1...
At the moment the battery voltage is only used later on to calculate the measured inductance/resistance. I can imagine that in future versions
here you can set the low voltage cutoff
View attachment 5
This menu is for the calibration of the current sensors in combination with the motor. Option a resets b and c, and autocompletes d. When you
select option b the motor will make a horrible noise for about a second. Option c, it will make a horrible noise and rotate the motor, so watch out
and make sure the motor can rotate freely. If for some reason it jerks too much (cogging), increase the position force current in the current settings menu).
With option c, after it's run the chip will display the measured gains. The total should be about 300%. Sometimes the measurement goes wrong and
all three sensors will display about 189%. In this case, you MUST select option a to reset all the settings and try again.
Option c measures not only the gain of the current sensors but also small differences in the motor windings. For instance, if one winding for whatever
reasons has a different resistance this will show up as a different gain. Therefore, do not change the wiring around after running this calibration as
the values will then no longer be valid. In such a case, you must re-run.
These are the controll loop parameters. The whole menu autocompletes. If the controller during use refuses to go into drive 3, typically options
b,c and d must be all increased with a (common) factor (I use 1.5). Don't go overboard though as higher numbers here increase the amount of
noise in the system.
This menu autocompletes.
This menu autocompletes for options b and c. You need to select option d, after which the motor will make a horrible noise. After this the chip will
display the measured motor resistance and inductance. For the values to be correct the battery voltage entered earlier must be correct.
View attachment 1
These options are the same as for v1, menu autocompletes.
this is the save menu. Option a saves everything to ROM so that the chip can read all the settings before starting to run the motor. Option b gives you a hex dump which
you can copy/paste into a text file for later use. Many terminal programs have the option to transmit a text file over RS232. This can be used in combination with option c
to read in previously saved settings in one go. Remember though, the settings include throttle and current sensor calibration, so if the throttle or current sensors are different
(maybe because you have a different controller) these settings are not correct.
AFTER READING IN THE SETTINGS FROM A TEXT FILE, OPTION A MUST STILL BE USED TO WRITE THE SETTINGS TO ROM !!!
Option d finally allows the on-line current sensor calibration to be stored. If you short the setup pins in motor mode all LEDs will flash and the
new calibration data will be written to ROM. This will also disable this option, so online data can only be written once. The online calibration data
is only gathered in drive 2, so keep the motor there for a few revolutions before writing to ROM with the setup pins. The current sensor gain data
will be overwritten, so if you want to see the new measured data you can go into that menu
Finally, the 4 drive modes are:
drive 0: waiting for the motor to stop spinning before the controller can take controll of the motor.
drive 1: the motor will be forced into a certain position and the HF tone will start. The motor must be able to turn freely (don't sit on the bike yet !) but will only move for a very small amount.
drive 2: the motor is run with the HF tone
drive 3: the motor is running sensorless without HF tone.
oops, seems I've forgotten one menu, will add this later (the erpms menu)