You are here

Custom board: R and L measurement problem!

7 posts / 0 new
Last post
JustClap
Offline
Last seen: 3 years 8 months ago
Joined: 2020-07-16 11:24
Posts: 3
Custom board: R and L measurement problem!

Hello, 

At first let me say that I'm new using VESC, I'm working on an E-Bike project so I built a custom board based on VESC HW 4.8 solution. 

In BLDC mode everything is working fine for me with the default FW 2.18 using BLDC Tool (duty cycle and rpm control, sensorless and using hall sensors...), but when I want to switch on FOC mode and I try to measure R and L, in this process my card disconnect.

Motor configuration that worked for me : 

I tested also with the default FW 5.10 with the VESC Tool and I got :

  • Same problem when measuring R and L in FOC mode.
  • Over current fault when reaching 50% duty cycle control in BLDC mode.
  • RPM control not working in BLDC mode.

I'm working with a rear hub motor 250W 36V and 10S Lithium Ion battery.

Is there someone who had this problem before ? Any help ?

Thank you! 

 

 

TechAUmNu
Offline
Last seen: 4 days 55 min ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 575

Btw you don't need to make everything bold.. This isn't the Trampa product page lol.

If you want help with custom hardware you might need to tell us a bit more about your design. A schematic and some pictures of your board would be perfect.

Usually the problem you are referring to is caused by some problem with phase sense resistors, current shunt amplifier or just noise from poor layout.

I would certainly stay away from older firmwares as they have many problems. Use the latest one.

JustClap
Offline
Last seen: 3 years 8 months ago
Joined: 2020-07-16 11:24
Posts: 3

Thank you for your response, 

Its okay I'll make it simple now without bold words laugh

So this this some pictures of the schematic : 

  • STM32F407 : 

stm32f407.PNG

  • DRV8302 : 

DRV8302.PNG

  •  Mosfets: 

Mosfets.PNG

  •  Current shunts: (0,001 Ohm)

I_SENS.PNG

  • Phase sens: 

V_SENS.PNG

 

Board picture: 

IMG_20200810_140235.jpg

TechAUmNu
Offline
Last seen: 4 days 55 min ago
VESC Free
Joined: 2017-09-22 01:27
Posts: 575

What is connected to STM32 reset pin?

JustClap
Offline
Last seen: 3 years 8 months ago
Joined: 2020-07-16 11:24
Posts: 3

To reset using a switch, other MCU, or JTAG 

Reset PIN.PNG

TheFallen
Offline
Last seen: 10 months 4 weeks ago
VESC Original
Joined: 2017-09-11 11:46
Posts: 222

Unfortunately posting snapshots of your schematic doesn't tell us about the boring things that are vitally important: decoupling capacitors, logic power supplies, board layout etc...

If it works when the motor is un-driven but driving the motor causes the USB to disconnect then it's probably noise. Have you tried the nicest USB cable you own? How much decoupling do you have on the USB connector, any EMI filtering? What's the PCB layout like? Do you have high voltage high speed traces near sensitive parts/traces? Hows the ground plane?

nickw1881
Offline
Last seen: 3 years 6 months ago
Joined: 2018-01-19 10:15
Posts: 17

I have a similar problem, though maybe not as bad. My motor can detect easily on a power supply, and sometimes on batteries, but other times the fets explode and catch fire during detection. I have good separation between my shunt signal traces and a ground plane above and below them.

When running, I always get an overcurrent fault around 35-40A where the current goes to -nan. Sampling on fault shows this issue happens in 1 sample.  I will make a separate post about this. Perhaps we can discover a big "dont" about the layout process.