You are here

Request: Report hall sensor tables.

8 posts / 0 new
Last post
Roger Wolff
Offline
Last seen: 2 years 5 months ago
VESC Original
Joined: 2017-05-24 12:27
Posts: 202
Request: Report hall sensor tables.

I'm having issues getting a bigger motor to run. We're now suspecting that the hall sensors are misplaced.... 

With the foc-hall-sensor-table the hall sensors could be more-or-less randomly placed, provided they are correctly spaced. However, when you want to use the hall sensors to directly translate to the "best" activation of the motor coils, the hall sensors should change at the same rotational positions that the "best activation" changes, right?

If that theory is right, everybody's hall-sensor table should contain about the same numbers, but in different orders depending on the distances between the sensors, polarity of the sensors, and the wiring of the sensors to H1, H2, H3 compared to the three motor leads. 

 

My hall sensor table is: 255-95-162-129-28-61-194-255 (I also have a version somewhere where I have rounded the numbers to say 28+n*33.3)

Instead of copying from the GUI in 8 separate steps, you can also: 
 

$ grep foc_hall_table <your XML file> 
    <foc_hall_table_0>255</foc_hall_table_0>
    <foc_hall_table_1>95</foc_hall_table_1>
    <foc_hall_table_2>162</foc_hall_table_2>
    <foc_hall_table_3>128</foc_hall_table_3>
    <foc_hall_table_4>28</foc_hall_table_4>
    <foc_hall_table_5>62</foc_hall_table_5>
    <foc_hall_table_6>195</foc_hall_table_6>
    <foc_hall_table_7>255</foc_hall_table_7>


(if you have a "grep" on your system). 

hexakopter
Offline
Last seen: 1 year 8 months ago
VESC Original
Joined: 2017-05-24 12:13
Posts: 94

Here the hall table from my eBike motor:

    <foc_hall_table_0>255</foc_hall_table_0>
    <foc_hall_table_1>95</foc_hall_table_1>
    <foc_hall_table_2>164</foc_hall_table_2>
    <foc_hall_table_3>128</foc_hall_table_3>
    <foc_hall_table_4>29</foc_hall_table_4>
    <foc_hall_table_5>64</foc_hall_table_5>
    <foc_hall_table_6>196</foc_hall_table_6>
    <foc_hall_table_7>255</foc_hall_table_7>

Hope that helps you in any way.

hexakopter
Offline
Last seen: 1 year 8 months ago
VESC Original
Joined: 2017-05-24 12:13
Posts: 94

Also attached my external hall sensors to a SK3 motor and read the FOC hall sensor table ones with the "Current Position" and "Hall Position" matching in the BEMF plot and the next time with an offset between both graphs. (so I rotate the hall sensors a bit)

Matching:

    <foc_hall_table_6>187</foc_hall_table_6>
    <foc_hall_table_5>66</foc_hall_table_5>
    <foc_hall_table_1>96</foc_hall_table_1>
    <foc_hall_table_2>156</foc_hall_table_2>
    <foc_hall_table_3>122</foc_hall_table_3>
    <foc_hall_table_4>24</foc_hall_table_4>
    <foc_hall_table_7>255</foc_hall_table_7>
    <foc_hall_table_0>255</foc_hall_table_0>

Offset:

    <foc_hall_table_6>12</foc_hall_table_6>
    <foc_hall_table_5>76</foc_hall_table_5>
    <foc_hall_table_1>114</foc_hall_table_1>
    <foc_hall_table_2>178</foc_hall_table_2>
    <foc_hall_table_3>152</foc_hall_table_3>
    <foc_hall_table_4>47</foc_hall_table_4>
    <foc_hall_table_7>255</foc_hall_table_7>
    <foc_hall_table_0>255</foc_hall_table_0>

Hope you can get useful information from that.

Roger Wolff
Offline
Last seen: 2 years 5 months ago
VESC Original
Joined: 2017-05-24 12:27
Posts: 202

Thanks very much. Yes. this helps. So my theory is that we should see the numbers 28-66-95 and 100 more than each of these. If you rotated the hall sensors yourself for that last table, then that one doesn't count for disproving my theory. Now, if you rotate the hall sensors, I think the VESC will work surprisingly well, provided you don't need full torque at precisely 0 RPM.... (as soon as things start moving the VESC can manage). 

Caleb Kahan
Offline
Last seen: 5 years 1 month ago
Joined: 2018-07-19 02:51
Posts: 1

I have two identical motors, and I'm getting mostly similar values except for foc_hall_table_3 = 0 for the 2nd motor.  Is something wrong with the motor or VESC?  Thank you

1st Motor

    <foc_hall_table_0>255</foc_hall_table_0>
    <foc_hall_table_1>30</foc_hall_table_1>
    <foc_hall_table_2>164</foc_hall_table_2>
    <foc_hall_table_3>197</foc_hall_table_3>
    <foc_hall_table_4>98</foc_hall_table_4>
    <foc_hall_table_5>65</foc_hall_table_5>
    <foc_hall_table_6>131</foc_hall_table_6>
    <foc_hall_table_7>255</foc_hall_table_7>

2nd Motor

    <foc_hall_table_0>255</foc_hall_table_0>
    <foc_hall_table_1>34</foc_hall_table_1>
    <foc_hall_table_2>166</foc_hall_table_2>
    <foc_hall_table_3>0</foc_hall_table_3>
    <foc_hall_table_4>101</foc_hall_table_4>
    <foc_hall_table_5>68</foc_hall_table_5>
    <foc_hall_table_6>134</foc_hall_table_6>
    <foc_hall_table_7>255</foc_hall_table_7>

Tilman Baumann
Offline
Last seen: 5 years 6 days ago
Joined: 2018-02-12 11:53
Posts: 49

What does this table actually express? It has more entries than sensors. And the values don't seem to express angles (of 0-255 of a revolution)

I tried with someone else to re-use the hal mapping for a different driver. We could not figure it out.

Roger Wolff
Offline
Last seen: 2 years 5 months ago
VESC Original
Joined: 2017-05-24 12:27
Posts: 202

0-200 is a revolution. Don't ask me why. Hall table 0 and 7 should be 255. Good. The others are circular values between 0 and 199 and they can vary a bit between measurements or between (otherwise identical) motors. A difference of 3 or 4 is quite acceptable. You've got a difference of four (30 - 34) in table entry 1, and you've got a difference of three in hall table entry 3 (0-197). 

What you COULD do is "cleanup" the table. Entries whose entry-NUMBER add up to 7 should differ by 100 (half a revolution). So 1+6=7 -> 34-134 is perfect. while 3+4=7 -> 0-101 is off-by-one. Really, your motor is high quality the way these match up. :-) And between the pairs should be a difference of 100/3 = 33 or 34. 

 

Tilman Baumann
Offline
Last seen: 5 years 6 days ago
Joined: 2018-02-12 11:53
Posts: 49

Thanks I understand it better now.