You are here

FOC detection error " R is 0"

39 posts / 0 new
Last post
MontPierre
Offline
Last seen: 6 years 10 months ago
Joined: 2017-09-05 14:14
Posts: 5
FOC detection error " R is 0"

Hi

 

I have successfully set up BLDC mode and had few great rides.

 

When detecting FOC I get error R is 0 Please measure it first..

I have read this below post on the esk8 forum which explains my problems in more detail.

 

http://www.electric-skateboard.builders/t/vesc-project-com-is-online-pub...

 

I was able to finish FOC detection only after going to General tab of Motor and selectring BLDC there, writing conf and then going to FOC submenu and doing detection.

 

After this " trick" motor does not work in FOC mode. I went back to General, changed from BLDC to FOC and wrote configuration. Perhaps changing mode in General tab erases any detections settings? 

 

Motor doesn't spin in FOC but does in BLDC.

 

Any ideas?

 

benjamin
Offline
Last seen: 1 week 6 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490
I have not seen this problem myself, but I will have a look and try to reproduce it. It would be great if you can post a video.
MontPierre
Offline
Last seen: 6 years 10 months ago
Joined: 2017-09-05 14:14
Posts: 5

Sure, sending PM shortly with a link

 

Ackmaniac
Offline
Last seen: 6 years 7 months ago
Joined: 2017-09-04 23:17
Posts: 10

So what happens is that when you use the wizard the wizard initially set's the actual motor type to FOC. When the motor type is changed to FOC the motor doesn't move at all.

So during motor detetcion the resistance doesn't get measured and it reports back 0.

When you then set the motor type manually back to BLDC and do the FOC detection from the FOC Tab (not the wizzard) the reistance can be measured.

Then you set the motor type to FOC and the motor doesn't move at all.

 

But strangely when you only measure the flux linkage now (detection has already values so it is allowed to only mesaure the flux linkage) then the FOC becomes active.

It is not necessary to write the motor settings again. Only flux linkage needs to be detected.

Doesn't make any sence to me but that's the way it is for 4.12 hardware.

 

You can simply force that by setting motor type back to bldc, write the settings and set it back to FOC and write the settings. Motor is locked then and doesn't move.

 

Strangely after the motor moved once it even works when the vesc os powered off and back on. (Doesn't make any sense)

But it doesn't work when you reboot the VESC via the VESC-Tool.

MontPierre
Offline
Last seen: 6 years 10 months ago
Joined: 2017-09-05 14:14
Posts: 5

@Ackmaniac - what you have described is great detail ( much better than my write up) I have just captured on video and DM'd to Ben. 

Hopefully he'll find a fix for it.

BTW - I have a FocBox and when setting up Vesc Tool - updating firmware -  I had to choose hardware type . I choose 4.10 4.11. 4.12 - as it was all one choice - couldn't choose one of them separately. 

Now after firmware update it shows current version of firmware and hardware 4.10. Hmm I thought FocBoxes are 4.12 .... mine was purchased couple months ago... Have I done something wrong?

benjamin
Offline
Last seen: 1 week 6 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490
I had a look at the video, and it does look quite strange. I will do some testing with HW 4.12 and see if I can reproduce the behavior. It could be different with FOCBOX though, but I don't have one available for testing.
MontPierre
Offline
Last seen: 6 years 10 months ago
Joined: 2017-09-05 14:14
Posts: 5

thanks! Keep us posted. 

Silverline
Silverline's picture
Offline
Last seen: 4 years 5 months ago
Joined: 2017-09-05 16:29
Posts: 9

Any news.... My focboxes are waiting :-)

 

If i take of the receiver, i dont get the "R = 0" bug, and i can make the FOC motor detection. But then the motors wont spin up afterwards 

frank
Offline
Last seen: 1 month 1 week ago
VESC BronzeVESC FreeVESC GoldVESC OriginalVESC PlatinumVESC Silver
Joined: 2016-12-27 20:19
Posts: 847
There is a FOCBOX on its way to Benjamin. THX rwxr from the electric-skateboard.builders forum. Frank
SeanHacker
Offline
Last seen: 3 years 3 months ago
VESC Free
Joined: 2017-09-05 01:11
Posts: 2

Nice. This is good news. I want FOC on my FOCBoxes!!! :)

RiGo
Offline
Last seen: 6 years 11 months ago
Joined: 2017-10-17 05:08
Posts: 1

Hi Benjamin. Any updates on this?

 

Ackmaniac seems to have fixed the issue and this is what he wrote about it on the sk8 builder forums:

 

"Took me a couple of days and a lot of testing, debugging and analyzing. Some ADC values get initialized incorrect in the first moments the FOCBOX starts (maybe the direct fets are too fast at startup).  After that it works fine."

 

benjamin
Offline
Last seen: 1 week 6 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

I have the focbox at home and did some testing, but I'm not able to reproduce the problem. For me it works every time with or without a ppm remote connected on a bunch of different motors. This weekend I will do some testing and coding, and hopefully come up with something. I will keep the focbox for testing and send back a VESC6 instead by tomorrow (hopefully he is OK with that). This way I can hopefully keep future firmwares compatible.

benjamin
Offline
Last seen: 1 week 6 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

I had a look at Ackmaniacs fw after finally finding it, and I could only notice one change that possibly could make a difference. Some NAN-checks were added. I have added this to the latest firmware too, so if this was the problem then focbox should be working now. The latest version of VESC Tool also has some nice updates in the wizards and the new firmware has my modified observer that should work for higher ERPM. The updates should be available now.

Dmaxx69
Dmaxx69's picture
Offline
Last seen: 1 year 4 months ago
VESC Free
Joined: 2017-09-21 00:18
Posts: 2

Is the firmware update automatic or do i need to reinstall vesc-tool?

Dusten Maxwell

benjamin
Offline
Last seen: 1 week 6 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

you need to download the latest vesc tool, it will ask you to update the firmware.

Dmaxx69
Dmaxx69's picture
Offline
Last seen: 1 year 4 months ago
VESC Free
Joined: 2017-09-21 00:18
Posts: 2

Have updated the firmware to 3.3, did the FOC motor setup wizard with no problems. When i try to setup the remote receiver the motor spins and vibrates rapidly until i disconnect the receiver from the vesc. I am completely new and want to understand what im doing wrong. Any advice?

Dusten Maxwell

frameto
Offline
Last seen: 3 years 6 days ago
Joined: 2017-11-19 20:10
Posts: 5

Hi,

I have the same error "R is 0. Please measure it first" in FOC mode, with sensor mode "Hall sensors". Yet the inductance value is detected after the noise occurs (maybe 30 seconds to 1 minute after clicking on the "rl" button). But with the previous BLDC-tool, the start detection failed in bldc mode and I got a drv error returned by the "faults" command. So this error may hide a damage hw and may not necessarily lead to a detection bug...

 

Cledus
Offline
Last seen: 4 years 3 months ago
Joined: 2017-10-11 12:22
Posts: 5

Hi!

I'm about to order 2 Focboxes and I want to use VESC-Tool. But this thread made me hesitate. Have the issue disused here been solved?

Thanks!

benjamin
Offline
Last seen: 1 week 6 days ago
VESC FreeVESC OriginalVESC Platinum
Joined: 2016-12-26 15:20
Posts: 490

I have a focbox at home that works, so I haven't really been able to reproduce the problem. I think there are different versions though. Fw 3.30 and onwards has some changes that could help. Maybe someone can confirm that?

Cledus
Offline
Last seen: 4 years 3 months ago
Joined: 2017-10-11 12:22
Posts: 5

Just a quick bump. Anyone using Focbox and VESC-Tool?

Andre
Offline
Last seen: 5 years 3 weeks ago
Joined: 2018-01-27 06:33
Posts: 1

Yes, just updated my Focbox to 3.34 using the VESC-Tool. Update worked perfectly...tool shows 4.10 hardware afterwards (not sure if that’s ok? I thought the focbox is 4.12). But everything works. No errors during wizard setup of FOC. All good!

hackerboysf
hackerboysf's picture
Offline
Last seen: 3 years 12 months ago
Joined: 2018-01-10 22:39
Posts: 1

I'm using a Maytech VESC from Psychotiller and the VESC Tool. Using the Tool, I updated the firmware on the VESC to 3.34, and the Tool tells me the Hardware version is 4.10 (instead of the 4.12 I bought... I don't know if this matters and is worth fighting over...) The motor is a Turnigy Aerodrive 6364 - 190.  It's on the back of a converted kick-scooter.  Controls are 2 ADC's (throttle and brake).

I had this working in both BLDC and FOC mode with an 8S LiFePO battery (about 26V), but it didn't have enough juice to pull my kid up our hill, so I swapped out the battery for a 12S LiPo from an old gokart project (reading 52V). In BLDC mode it works great and is a lot of fun, but I had gotten used to the smoothness and quiet, so I'd like to make it work in FOC mode if I can.

Unfortunately, when I try to measure the RL parameter with the higher Voltage battery attached, it takes a very long time (sometimes it makes some ticking sounds, sometimes it almost sounds like it did with the 26V battery, but then it does its "buzz", and gives me the "R=0 Please measure it first." message.)  I have played with all the settings I can think of to no avail.  I swapped out the battery again and both processes worked fine (measuring RL and lamda) with the 26V battery, but those settings didn't work for the FOC mode at the higher voltage.  

Also, the serial connection seems to be flaky at the higher voltage- when updating either the App or Motor configurations I sometimes have to disconnect and then reconnect (using the soft buttons on the top right of the VESC Tool) in order for the changes to be sent and confirmed.

...  I just thought to check the voltage that the motor is rated for, and it says "10S LiPoly", so I wonder if that's the problem?  It seems happy enough in BLDC mode, and barely feels warm to the touch after running up and down our hill, so I don't think it's too much of an overvoltage for the motor, but perhaps that's too far out of the parameters to run FOC. 

Anybody have any feedback?  Thanks in advance.

Jury Rigged Battery

Controls

Motor

 

TheFallen
Offline
Last seen: 1 week 6 days ago
VESC FreeVESC Original
Joined: 2017-09-11 11:46
Posts: 222

Those images aren't showing up, I think you're privacy settings on Google Drive are too strict.

wedontplay
Offline
Last seen: 6 years 8 months ago
Joined: 2018-03-09 16:12
Posts: 1

Same problem here with Maytech vesc and latest firmware, everything works perfectly in BLDC but is impossible to measure R when I try to configure FOC mode.

ThierryGTLTS
Offline
Last seen: 6 years 3 months ago
Joined: 2017-09-06 14:18
Posts: 116

Post 23 is dated ...    Fri, 2018-02-16 09:48   and we are Tue, 2018-03-13!   Funny.

Have a Nice Day.

Thierry

Youngjae Lee
Offline
Last seen: 4 years 5 months ago
VESC Free
Joined: 2017-12-24 01:45
Posts: 6

Reduce "motor current max" to 20A, and retry.

Resetting "motor current max" according to specifications of the motor

Clearic
Offline
Last seen: 5 years 6 months ago
Joined: 2019-04-23 08:13
Posts: 2

Hi guys.

I have a similar problem. Last year I finished making my  longbard. I use VESC(HW.-4.12 Firmware 3.30), Turnigy Aerodrive SK3 - 6364-245kv and li-ion battery 7S4P. 

Previously, I used the motor 5055 and problems did not arise. But now I can not make friends the motor with VESC. ))

I get an error "R is 0. ... "

Please tell me how to solve this error. Is there is a solution to this problem.

Clearic
Offline
Last seen: 5 years 6 months ago
Joined: 2019-04-23 08:13
Posts: 2

I tried various combinations of current settings. ((

chris-H
chris-H's picture
Offline
Last seen: 4 years 3 weeks ago
Joined: 2019-04-03 16:41
Posts: 3

Im running VESC 6.6. Using 130KV brushless motor. 14s LIPO. Everting was working fine up untill a point. I performed some work on the battery housing (not related) then when I went to reconnect the motor, VESC and Batts. the motor refused to run. Initially it kept saying sensor error when attmpting to run FOC motor setup. I did a Hall senor test and this passed o.k, Whn I go to FOC tab, and try to detect te mtor the motor make noises (like buzzing) then comes up with this error R=0. The VESC has a flashin red light. I cannot seem to figure out if the problem is the VESC or the Motor.

Any advice / tests appreciated.

Chris-H

Chris Hamblen

miguelspimpao
Offline
Last seen: 3 years 1 month ago
Joined: 2019-07-31 10:47
Posts: 3

Have you got a solution to this problem ? I´m having the same one.

s0313045
Offline
Last seen: 3 months 1 week ago
Joined: 2018-09-23 11:29
Posts: 15

Same problem encounted here

using Flipsky VESC 4.12 50A

In firmware 3.62, FOC detection always stuck at measuring R

Ris 0, Please measure R first.

 

I was using the old firmware version 3.4 and everything works fine...

But I was curious about the sin/cos encoder... so I upgraded the firmware... what a mistake

 

Sam

david
Offline
Last seen: 3 weeks 5 days ago
Joined: 2017-09-12 01:01
Posts: 15

Very strange bug, I just tried tuning up my focbox with Vesc_tool_1.26 and ran into the same "R = 0" issue.  Also tried a 200A Vesc 6 derivative from flipsky which tuned up perfectly.

mariuss
Offline
Last seen: 4 years 11 months ago
Joined: 2019-12-27 14:08
Posts: 1

I had the same issue when I switched to 41V, red flashing at the same time.

Initially worked fine with 12V. I'm using it with a hoverboard motor.

I fixed it by reflashing the firmware, the motor started to work after that at 41V also, but the error will happen again if I tried to run detect in FOC mode at 41V.

Setup the motor at lower voltage and then try to increase the voltage.

I'm using a DC-DC booster, to increase the voltage from 12V (SLA battery) to 41V.

david
Offline
Last seen: 3 weeks 5 days ago
Joined: 2017-09-12 01:01
Posts: 15

Hey Guys, after playing around more I think this is related to foldback settings.  I.e. make sure your voltage cutoff/current settings will allow the auto tune algorithm to run.  I think those take highest priority so they will prevent autotune from working if set incorrectly.

david
Offline
Last seen: 3 weeks 5 days ago
Joined: 2017-09-12 01:01
Posts: 15

Found the problem, for some reason it's reading very high values for MOSFET temperature which is putting the drive in a foldback state.  Tested with a FOCBOX

Annotation 2020-02-01 113513.png

Foxyirish1987
Offline
Last seen: 4 years 6 months ago
Joined: 2020-04-05 17:08
Posts: 2

Hey guys, relatively new to this VESC stuff. I'm running a MP70131 Motor (https://www.alibaba.com/product-detail/MP70131-12kw-powerful-10-pole-brushless_62285666832.html?spm=a2700.galleryofferlist.0.0.307e3e33ZA66k8) with a 14S Battery Pack made up of Boston Swing Batteries (https://www.alibaba.com/product-detail/new-8-groups-products-Imported-Boston_60796811122.html?spm=a2700.7724838.normalList.1.34186e59Vj02eO) and a Flipsky 200A FSESC. I'm plodding along nciely until I ge tthe dreaded "R is 0" Error and now I'm stuck!.

Has anyone managed to get this resolved?

Parameters I put in are:

  • Motor Current Max: 120A - as it won't let me pick anythig higher - Motor can take 170A
  • Motor Current Max Break: 0A
  • Battery Max Current: 79A
  • Battery Max Current Break: 0A

I’ve set the voltage limits to:

  • Battery Voltage Cutoff Start: 47.6V
  • Battery Voltage Cutoff End: 43.4V

Using this for an efoil so no breaking is required

david
Offline
Last seen: 3 weeks 5 days ago
Joined: 2017-09-12 01:01
Posts: 15

Solved (for me).  For some reason my bootloader was requesting the wrong HW version.  For Focbox it should be 4.10/4.11/4.12 but instead was requesting firmware 48 which was causing all sorts of issues including current offset fault and crazy high fet temp readings.  Stupid thing for me to miss...but goes without saying to make sure your FW matches your HW version!

Artius Reynolds
Offline
Last seen: 2 years 8 months ago
Joined: 2020-10-18 22:25
Posts: 4

How was it at 12v ? Did it still have torque what was the rpms?

Artius Reynolds

danielhugentobler
Offline
Last seen: 2 years 10 months ago
Joined: 2021-04-26 23:17
Posts: 2

I also was looking for the longest time, why i got R = 0. My battery supplied way more voltage then labled. Check your volteage!