You are here

Hall sensor not working

2 posts / 0 new
Last post
Stupidspencer
Stupidspencer's picture
Offline
Last seen: 1 month 3 weeks ago
VESC Platinum
Joined: 2019-06-20 00:06
Posts: 30
Hall sensor not working

Hi everybody, I've got a problem with the hall sensor circuit on one of my VESC 6+'s.  In the last couple weeks, I have had to update the firmware 3 times (now on 3.65). I don't know if the firmware has anything to do with it, but I am left with this issue after the fact.

One of my 2 VESCs is not detecting hall sensors. I have narrowed the problem down to the VESC itself. When I connect the right motor to the left controller, the halls are detected and the motor runs fine. But the controller on the right side returns an error and the motor starts in sensorless mode. If I set that VESC to use hall sensors, the motor can't start most of the time and runs extremely rough when it does get going. As soon as the rpm is high enough for sensorless, the motor runs just fine. If I unplug the sensor harness while in sensored mode, the motor runs smooth but has to hunt for a position upon startup such as is typical in sensorless mode.

Looking at the rotor position graph (for observer and PID) in VESC tool and slowly turning the motor by hand, I can see why there is a problem. Instead of producing a stair-step pattern that increases from low to high as the motor is turned in one direction, there is an occasional reversal that appears to happen at random every 2-3 cycles. I say random because it does not coincide with any absolute physical angle of the rotor. For instance, if I am turning the motor clockwise and the graph is stepping upward, it will step down once every few cycles. If I reverse the rotation of the motor to before the bad step, and then forward rotation again, the backwards step is not always produced again.

I have re-uploaded firmware 3.65 and tried sensor detection on the Android and desktop versions with the same results. So I think that VESC has become damaged in some way, somehow. If Benjamin or someone with knowledge of the circuitry could point me in the right direction for component testing on the board, it would help greatly. Physically, I cannot see any damaged components or anything that would raise a flag.  I can say this though: I have had the voltage switch set on 5v all along, but my testing has revealed that only 3.3v is being returned on the hall signal lines (when signal is high). I switched it to 3.3v and still get roughly 3.3v back, so I think I was running the halls on the wrong voltage. I really had no idea what voltage to use since my motors came with no documentation. But like I said, the hall sensors still are working fine, but that one VESC can't detect or use them. I wouldn't think that having the voltage set incorrectly could damage the VESC since most hall setups pull the control voltage to ground. But I don't see any current limiting resistors on my hall sensor board, so could this have been the cause?

An interesting thing to note is that I get that step reversal whether the sensor harness is plugged in or not. I can see that having the sensors plugged in changes the shape of the waveforms somewhat, but the random direction reversal is present with or without the sensors plugged. I performed the exact same testing on the same motor, but with the other VESC, and did not get the step reversal at all. How can the motor run fine in sensorless if the observer is also seeing the random step reversal!?  Im confused. 

I don't have any screenshots of the rotor position graph at the moment, but I will upload some later today so you can see what I'm talking about.

Please help!

Stupidspencer
Stupidspencer's picture
Offline
Last seen: 1 month 3 weeks ago
VESC Platinum
Joined: 2019-06-20 00:06
Posts: 30

It seems that the problem has evolved. As of my last post, having the sensor plugged in and enabled would cause the motor to run super rough. But now it seems the sensor input doesn't work at all. Now the VESC runs in sensorless mode with the sensor connected and enabled.

In the following pictures, both VESCs are running the exact same settings, same firmware 3.65, same motor.

I have labeled the VESCs by their CAN ID.

VESC97 is the one with the problem

VESC67 works fine

<img></img>

Edit:  There should be images here, but either gdurl.com (the service that provides the public link to the image) or google drive (the image host) are not working. Since it seems no one has any help to offer on this subject, I will assume the sensor port cannot be fixed, and so I'm not gonna put in the effort to re-link the pics.

<img></img>

 

 

Edit:

I forgot to mention that both VESCs appear to produce the step reversal when the sensor is not plugged in. It seems that the reversal is normal behavior when only using BEMF to get position data. You can see that reversal in several cycles in the middle picture. But apparently it is a non-issue.