A Small 6 fet Vesc 6 Design

Didn't notice your tutorial video, I followed that and everything compiled just fine.

BLDC mode is able to spin up motors no problem but I can't get foc detection to work.
I am using a 36v hoverboard motor and foc detection results in mostly squealing noises and very little current being drawn from the battery. I am using a 6s lithium ion battery currently. I think it may be something to do with the current sense amplifiers being saturated because I am using 0.002 ohm sense resistors rather than the three 0.0005 ohm resistors in parallel in the 75 300 circuit diagram. I noticed that in the hwconf there is a current amplifier gain setting and I never changed this. Notice how I have changed the resistance value to match the sense resistors I'm using. I put the motor under load in bldc mode with my hand while looking at the current drawn in the realtime data view and it matches up exactly with the ammeter I have attached to the battery so current sensing seems to work just fine.

#ifndef CURRENT_AMP_GAIN
#define CURRENT_AMP_GAIN 20.0
#endif
#ifndef CURRENT_SHUNT_RES
#define CURRENT_SHUNT_RES (0.002)
#endif

[youtube]https://youtu.be/cr3fe2GD4bQ[/youtube]
 
I also had the squealing noise on one of my 5 boards. That's the main symptom of it not working. All 5 have the same firmware. I'm buggered if i can work out what it is. If you find out please tell me. I desperately want to know.

You don't need to change the gain of the amp if you... Haven't changed it. Changing the sense resistor values suffices.
 
sdobbie said:
It might be a faulty pcb trace or maybe the MCU has a fault.

Definitely not the MCU in my case,i replaced that and same effect.

Faulty trace... I can't find it. It's possible but the currents and phase voltages check out and it's pwming correctly.
 
Is the faulty board the exact same design as the working boards? Potentially there's an issue with one of the m74vhc1gt66 analogue switch chips?
 
sdobbie said:
Is the faulty board the exact same design as the working boards? Potentially there's an issue with one of the m74vhc1gt66 analogue switch chips?

Big discovery earlier this evening.

I downloaded the firmware for 5.03 beta branch and compiled it. Had to hammer it in with a segger jlink since VESC tool was having none of it...

That firmware won't run with the standard VESC tool...

But there's a beta VESC tool as well which bugger me it actually works.

Appears to have solved all my problems. It wasn't anything to do with my hardware, the new firmware quite happily detects and spins the mega motor (5mohm 6uH) motor I have on my desk.

[youtube]yFzWwgQjvSY[/youtube]
 
this all looks very promising! I tried to download the firmware but the link just contains the three vesc tools for windows, linux and android. Can you please give the link to the 5.03 firmware?
 
sdobbie said:
this all looks very promising! I tried to download the firmware but the link just contains the three vesc tools for windows, linux and android. Can you please give the link to the 5.03 firmware?

You'll need to compile yourself.

Go to vedder's repository.
Clone it... I think you've already compiled something for this on Linux?
Change the branch to the latest 5.03

You might have to manually copy in your header files and change the main hardware config file again

Compile and upload. Have to use stlink. Getting it in through VESC tool seems impossible. I used a segger.

There's other cool things on this branch we've been waiting for for ages. HFI actually works now, there's some sign of mtpa after a 2 year wait and some signs of field weakening which looking at the code looks like in the end they just did a complicated version of what i did a year ago a ramped up the Id in the last 10% of Vd duty change.
 
I managed to get the firmware downloaded and compiled but my old laptop won't run the vesc tool because of something to do with opengl. Maybe the android app will work, I assume I can just use the android app with an HC05 bluetooth module connected to the serial on the vesc?

A feature I would love to see eventually is induction motor support.
 
sdobbie said:
I assume I can just use the android app with an HC05 bluetooth module connected to the serial on the vesc?

It is not expected to work, nrf will

sdobbie said:
A feature I would love to see eventually is induction motor support.

Foc openloop, most likely induction motor will run
 
sdobbie said:
A feature I would love to see eventually is induction motor support.

Foc openloop, most likely induction motor will run
[/quote]

Badly. But probably no worse than V/F control.

Why do you want induction motor? Aren't 99% of them rated for 415V? You'd get a tiny fraction of the power with a 60V battery.
 
afzal said:
mxlemming said:
afzal said:
Foc openloop, most likely induction motor will run

Badly

Certainly. Inefficient, high motor temperature etc.

I've been wondering for a while what the meaning of FOC is for an induction motor since it creates it's own field in phase with the stator with a slip speed against the rotor.

Not immediately obvious how you decouple Id and Iq although it is clear that if you set either and spin open loop it will spin...

I guess you could control it such that Vd=i*Rd and Vq=i*Rq+k*w with the Rd and Rq representing projected equivalent resistances...

But I'm not quite sure what the point would be. Perhaps you could avoid avoid losses and manage slip frequency.

Doesn't really sound too hard in principle. I haven't got any induction motors so i guess this one will remain hypothetical to me.
 
mxlemming said:
I've been wondering for a while what the meaning of FOC is for an induction motor since it creates it's own field in phase with the stator with a slip speed against the rotor.

Not immediately obvious how you decouple Id and Iq although it is clear that if you set either and spin open loop it will spin...

I guess you could control it such that Vd=i*Rd and Vq=i*Rq+k*w with the Rd and Rq representing projected equivalent resistances...

But I'm not quite sure what the point would be. Perhaps you could avoid avoid losses and manage slip frequency.

Doesn't really sound too hard in principle. I haven't got any induction motors so i guess this one will remain hypothetical to me.

FOC a.k.a vector control is suited for both asynchronous (induction motor) as well as synchronous (permanent magnet motors being one among them) motors. Vector control had been used from 80's where precise (a relative term) control of induction motor is required, mainly in industrial applications, ABB being one of the manufacturer.

As vector control provides a separate torque & speed knobs, various types of motors can be controlled with the simplicity of controlling the old brushed dc motor.

A closed loop vector controlled induction motor would perform well to the extent induction motor can. An open loop implementation would perform badly for induction motor as well as PMSM.

Take the opinions above with a grain of salt as they are based on old & rusty academic memories without much practical experience.
 
afzal said:
mxlemming said:
I've been wondering for a while what the meaning of FOC is for an induction motor since it creates it's own field in phase with the stator with a slip speed against the rotor.

Not immediately obvious how you decouple Id and Iq although it is clear that if you set either and spin open loop it will spin...

I guess you could control it such that Vd=i*Rd and Vq=i*Rq+k*w with the Rd and Rq representing projected equivalent resistances...

But I'm not quite sure what the point would be. Perhaps you could avoid avoid losses and manage slip frequency.

Doesn't really sound too hard in principle. I haven't got any induction motors so i guess this one will remain hypothetical to me.

FOC a.k.a vector control is suited for both asynchronous (induction motor) as well as synchronous (permanent magnet motors being one among them) motors. Vector control had been used from 80's where precise (a relative term) control of induction motor is required, mainly in industrial applications, ABB being one of the manufacturer.

As vector control provides a separate torque & speed knobs, various types of motors can be controlled with the simplicity of controlling the old brushed dc motor.

A closed loop vector controlled induction motor would perform well to the extent induction motor can. An open loop implementation would perform badly for induction motor as well as PMSM.

Take the opinions above with a grain of salt as they are based on old & rusty academic memories without much practical experience.

I'm looking for an answer about 27 layers deeper than that... marketing blurb.

Essentially, how does one compute the "vector" in an induction motor. It's clear what this represents in a synchronous motor but not really so clear in an induction motor.

This might have to be answered by trying it.

Vector control includes DTC. FOC is not quite synonymous with vector control.
 
mxlemming said:
I'm looking for an answer about 27 layers deeper than that... marketing blurb.

Essentially, how does one compute the "vector" in an induction motor. It's clear what this represents in a synchronous motor but not really so clear in an induction motor.

This might have to be answered by trying it.

Vector control includes DTC. FOC is not quite synonymous with vector control.

I know my post was a kind of handwavy. I am unable to provide proper reply without investing quite some time re-reading relevant literature, a few as in,

https://endless-sphere.com/forums/viewtopic.php?f=30&t=105139&start=125#p1682245
 
I managed to get the vesc tool to run, I downloaded it from the vesc forum again just in case it had been updated. When I connected to the vesc, I did get an error saying unable to deserialise app or motor configuration, so the beta firmware I flashed must have had some updates done to it in the last few weeks while I was away from the project. Unfortunately the squealing noise remains and I still can't get the motor to spin and measure the flux linkage properly. I will download the beta firmware again, compile it and report back.
 
sdobbie said:
I managed to get the vesc tool to run, I downloaded it from the vesc forum again just in case it had been updated. When I connected to the vesc, I did get an error saying unable to deserialise app or motor configuration, so the beta firmware I flashed must have had some updates done to it in the last few weeks while I was away from the project. Unfortunately the squealing noise remains and I still can't get the motor to spin and measure the flux linkage properly. I will download the beta firmware again, compile it and report back.

Unfortunately they're changing it day by day and you need a snapshot of firmware and tool at the same time.

Trust me... It's worth it though. After banging my head against VESC for 6 months I got the 5.03 and it all just worked perfectly.
 
I used the latest vesc tool and firmware build today but still having the same squealing motor problem.

https://www.youtube.com/watch?v=XFHZRZ2NVrQ

It appears to measure the resistance and inductance without issue but the flux linkage measurement just gives the squealing noise. When trying to perform the hall sensor angle calculation you can see in the video that the motor turns very roughly and makes strange noises.

I have tested the hall sensors and they all function normally. Also, no fault codes are coming up in the realtime data.
 
Very strange. You got an oscilloscope? Are you getting pwm on all 3 phase wires (all 6 gate drives)? Getting sensible current offsets and are the current amplifiers outputting anything sensible?

I presume the motor itself works...
 
Back
Top