Futterama said:Lebowski, when calculating the RC filters for the current sensors, what is the "pi" in the formula in the schematic?
nieles said:Jeremy, have a look at the imaginary number i (or j for the electrical engineers) and how it is used to solve any circuit made of R,C,L components.
hint: the real and imaginary voltages/currents will form a triangle
Of course! I was thinking it was some coefficient from the setup menu, I didn't see at as the mathematical constant π.nieles said:My guess would be 3.14
Thanks, that was what I thought.nieles said:So the cut-off frequency of the low pass should be equal or higher than f_pwm.
saves a capacitor,less pulling of the midpoint.7circle said:@Lebowski - nice work on the adabtable hall analyzer.
Wondering whyvthe change to the Phase Voltage curcuit.
oops, my badI noticed the manual V2.30 still discusses the older 2k2 divider style.
The idea was to have about 3 to 5 mA in those resistorsWill 70 x Max_Bat be enough to limit input on analogue input?
For 100V Bat thats 3 R_mot resitors in series 7k x 3 is 21k
The algorithm doesn't sample the motor voltages, it looks at the 3 motor phase currentsAnd 22k with 22k divider. So with Mid-point link via 21k to say 10V the mid pint is already a little over 5V.
Also what sampling rate on the analogue inputs do you need to average out the square wave of the Bridge Powee stage.?
noOr are you expexting some analogue filtering?
On a tangent... could the third Current sensor be used for Bus current ro the Battery?
that what it does now, for the battery current limiter function it calculates the battery current based on phase currents and PWM ratiosOr can the use of just 2 phase current and PWM ratio be used to work it out accurately.
Wondering if it xould be reported on the CAN .messages.
7C
the standstill disabled only works in recovery (thats why this menu is called 'recovery only'). In the other modes it looks at the motor voltages on the pins you mention.Futterama said:Lebowski, I can only get my motor spinning in toneless with recovery mode. In the other 2 modes, the chip won't leave drive_0 even when check for motor standstill is disabled. So do the controller need the input on pins 5,7 and 8 to work in HF tone and non-recovery toneless mode?
If I enter 2 or anything above, I'll end up in the erpm menu and the setting won't be saved.Lebowski said:or maybe just putting a motor standsill voltage of 2.5 or higher in the misc menu.
########################################
# (c)opyright 2014, B.M. Putter #
# Adliswil, Switzerland #
# bmp72@hotmail.com #
# #
# version 2.21 #
# experimental, use at your own risk #
########################################
0) mode: Toneless, with recovery
a) PWM parameters
b) current settings
c) throttle setup
d) erpm limits
e) battery
f) current sensor calibration
g) control loop coefficients
h) filter bandwidths
i) FOC motor impedance
j) CAN setup
k) recovery only
l) miscellaneous
z) store parameters in ROM for motor use
------> l
a) autocomplete
b) motor standstill voltage threshold: 1.98 V
c) low side pulsing in drive 0: enabled
d) low side pulsing rate: 20 Hz
e) low side pulsing width: 20 usec
f) wiggle range: 9 deg
g) wiggle rate: 99 Hz
h) minimum # of cycles going from drive 2 to 3: 1000
i) number of cycles going from drive 3 to 2, HF only: 200
z) return to main menu
------> b
new value -> 2
a) erpm limit, forward: 99.97 k-erpm
b) erpm limit, reverse: 19.98 k-erpm
c) accept direction change below: 75 erpm
d) transition erpm drive 2 -> 3: 976 erpm
e) transition erpm drive 3 -> 2: 488 erpm
z) return to main menu
------>
you cant really as the pwm is a fixed frequency... what you can try is to filter the pwm signal with a 2khz RC filter so see the sine content.Futterama said:How is the erpms measured using the PWM output from the chip (see the scope shot in my thread)?
I have tried, but I just can't get anything meaningful out. When the databytes are sent so close to each other, I can't sync them when trying to print something human readable at the same time as receiving the data.Lebowski said:or you look at the system variable for phi_int with the rs232 realtime data out.
i plot real time running graphs using a small labview program. If you run linux you can find labview 6.1 for free on the internet, this is what I use...Futterama said:I have tried, but I just can't get anything meaningful out. When the databytes are sent so close to each other, I can't sync them when trying to print something human readable at the same time as receiving the data.Lebowski said:or you look at the system variable for phi_int with the rs232 realtime data out.
How do you use the debug output from the RS232?
labview is a programming language tailored for equipment control.Futterama said:Maybe you could share your wisdom? I have labview installed on Ubuntu, but have no clue how to use it.
run these command lines:
export VXIPNPPATH=/usr/local/vxipnp
sudo chmod 666 /dev/ttyUSB0
sudo chmod 666 /usr/local/vxipnp
to show unknown dependencies:
sudo ldd /usr/local/vxipnp/linux/NIvisa/visaconf
to add:
sudo gedit /etc/ld.so.conf
add lines:
/usr/local/vxipnp/linux/lib
/usr/local/cvirte/lib
to process, run:
sudo ldconfig
run visaconf with:
sudo /usr/local/vxipnp/linux/NIvisa/visaconf
Lebowski said:Had a very interesting day yesterday, I figured out an improvement to the HF tone at standstill... What I've done till now is that the controller measures
the three motor inductors. When for an inductor there is a strong field going through the stator tooth the indutance is lowered as the iron is near saturation.
Measuring the inductance values however does not tell you whether the field in the stator tooth is N-S or S-N, meaning it tells you which coils to power
to make the motor turn but is doesn't give you the polarity to make it turn forward. So, measuring inductance values gives you 0 to 180 degree information
but it doesn't give full 0-360 degree info like you really want. Only having 0-180 infor means you need to bring the motor in a fixed position before you
start and need to keep track of the rotor at all times (so you know whether or not to add 180 degrees to the 0-180). 0-360 though means you don't
need to do that as you can always get the correct phase.
So, yesterday I got it to give 0-360 information ! I do this by measuring not the inductor values but by measuring the inductor non-linearity. Last weeks
work on using two controllers to run one motor made me realise how much current is actually necessary to match the magnetic field of the motor magnets.
For my big scooter motor (rated at 100A) you actually need to put 700 A through it to match the strength of the fixed magnets. If you want to measure
inductor non-linearity you need to change the field over a few % of the fixed magnets field, meaning it takes in the order of 20A or more, not the measely 2A
I used so far. i had the algorithm for 0-360 info ready to go, but with 2A I didn't see any signal coming out. Because of last weeks experiments
I realised I needed a lot more Amps, so I tried it again with 15A and hey presto, results !
At this rate I'll never have time to start on my lipo BMS and charger, now I'll need to upgrade the controller IC to include the newfound HF method...
Lebowski said:labview is a programming language tailored for equipment control.Futterama said:Maybe you could share your wisdom? I have labview installed on Ubuntu, but have no clue how to use it.
first thing, if you're using a usb-rs232 cable, is to add the cable to the list of ports.
the program to do this is visaconf, which can be started like this:
add the ttyUSB0 as instrument 5 (it has some funny name, copy from the others)Code:run these command lines: export VXIPNPPATH=/usr/local/vxipnp sudo chmod 666 /dev/ttyUSB0 sudo chmod 666 /usr/local/vxipnp to show unknown dependencies: sudo ldd /usr/local/vxipnp/linux/NIvisa/visaconf to add: sudo gedit /etc/ld.so.conf add lines: /usr/local/vxipnp/linux/lib /usr/local/cvirte/lib to process, run: sudo ldconfig run visaconf with: sudo /usr/local/vxipnp/linux/NIvisa/visaconf
i'll post the labview program tomorrow, it's getting late...