Sensored FOC setup

Couldn’t really find some detailed up to date information about this, so decided just to make a new topic. I wonder whether it is better to control your motor through FOC or sensored through BLDC (in hybrid mode probably). Although my motor does have a 6-pin sensor wire which should be compatible with the Enertion VESC I use, I have only used an FOC setup thus far, which worked quite well. If I increase the connector size on the motor’s sensor wire it will fit the VESC so I can setup sensored/hybrid mode, but before doing so I hope someone’s able to tell me whether this is preferable to do.

You say your FOC setup worked quite well, so why you want to change to BLDC? You can also try sensored motor with FOC.

Found out only yesterday in the BLDC tool that it is possible to use hall sensors with the FOC mode too. Always thought it was FOC ór sensored, but now know you can do both. Thanks for the respons.

However, during setup my Enertion VESC-X gave a ‘fault’ warning by a red flickering LED, after which a part of the VESC blew up, so unfortunately I’m not able to test it out anyway…

which fault did you get? if it’s a over/under voltage error you may need to change your voltage limit, for example max input voltage should be 57V.

@makevoid just made a new topic for it, hoping to get some input like yours. However I do not know what kind of error it was. The VESC features a small red LED specific for indicating a fault, which suddenly went blinking. I already set the maximum input voltage to 57V in the very beginning, so I think it couldnt’t be that problem, or can it?

Topic about the problem is:

I would like to set up my VESC(-X) sensored as soon as I have the time for it. However, the female 6 pin JST-connector on the sensor wire coming from the motor, is smaller than the male connector on the VESC.

I think the sensor wire is a “Standard RC Sensor Wire JST-ZH 6pin 1.5mm pitch”. Not sure what kind of connector is on the VESC and what dimensions it is.

Can anyone please tell me the best way to connect the sensor wire to the VESC? Haven’t yet been able to find the right female connector online to replace the sensor wire connector with.

search for JST-PH 6pin 2.0mm pitch. Maybe you try this adapter diy-electric-skateboard-kits-parts/vesc-sensor-wires/

or just find the right plug and solder it to your wire. If you want to solder the plug I could send this to you if you are in europe. I just ordered yesterday 10 plugs with wire, same like Jinra posted right now. It was just € 5,49 free shipping, but it comes from China and will need some time to arrive.

This works perfectly

2 Likes

@Jinra @yaca thanks That adapter would have been perfect. Wish I knew they had it when I ordered the motor from them. Shipping alone from diyelectricskateboard costs $40 however, so that’s a bit too pricey to go for though. The best option will indeed probably be one of these connectors like Jinra just sent. Would only need 1 though and according to Ebay shipping will be between Fri. May. 26 and Tue. Jun. 20, a bit long… Yaca, when do you think your plugs will arrive? I would be really glad if you could just send me one, I live in the Netherlands. But do you think shipping costs from you to me be worth it?

Decided to just order the connector wires Jinra showed. Will have to wait until they arrive for some time, but it’s worth the money just ordering, it might also come in handy in the future. Will use sensorless control first and switch to sensored when they arrive. Let’s see it in a positive way: I will be able to enjoy the improvement the more.

Also ordered an HM-10 BLE Bluetooth module today to connect the VESC to my phone and will look further for some suitable front- and backlights for using in addition to the RGB LED-lightning I placed under the board.

After finally receiving the needed JST-PH 6pin 2.0mm connector wires I started setting up my board sensored instead of unsensored, which I used before. However, after pressing ‘Detect Hall Sensors’ in the FOC tab I get the notification ‘Bad Detection Result Received’ in the down right corner. Could anyone tell me how I can fix this problem?

The motor I use is this one from . In the description of their motors, the following is stated, which I used for connecting the wires:

Sensor Wire: Standard RC Sensor Wire JST-ZH 6pin 1.5mm pitch Red = 5v White = Temp Blue = A Yellow = C Green = B Black = GND

I use the FOCBOX (previously called the VESC-X), on which characters are written next to each port for the Hall-sensors. From one side to the other these are: 5V H3 H2 H1 T GND

So I cut off the 1.5 mm pitch from the sensor wire coming from the motor and replaced it with the new 2.0 mm one, in such a way that the wires were connected in the following way if I put the 2.0 connector in the FOCBOX/VESC: Red = 5v --> 5V White = Temp --> T Blue = A --> H1 Yellow = C --> H3 Green = B --> H2 Black = GND --> GND

These combinations seemed the right ones to me, but maybe some need to be switched? Hopefully, someone can help me out. Thanks in advance.

At 4.12 VESC the temperature pin is next to the red 5V+ pin. It seems at the focbox it’s next to the GND pin. Is this correct @onloop? I’m not sure how you connected it. Maybe a picture?

@yaca A sort of sticker on the FOCBOX gives the following pinsequence (the left one for the not knowing people), which is the one I listed above.

That makes it seem indeed that the 5V+ pin is next to the GND pin, so conform to this I connected my wires. However if I take of the plastic cover and watch the backside of the board I can read the following pinsequence (again the one in the left), which is much different and is more like the normal VESC pinsequence as far as I know:

3 Likes

On the cover the temp pin is next to the GND pin and on the board the temp pin is next to 5V+!? So I think they printed it wrong on the cover. It would be clear if @onloop or somebody else can confirm this before you continue.

1 Like

@carl.1 could you please help me out?

I’d trust the PCB over the cover as they’re likely from two different suppliers

In that case, I’ll try to resolder them the way the PCB indicates. Did I assume correctly that for the Hall sensors H1 corresponded with A, H2 did with B and H3 with C?

Order of the sensors doesn’t matter as long as you do detection.

why do you have to resolder? You can use a pin to remove the wires from the jst header

1 Like

Hmm, didn’t think of that. I just resoldered/switched the second and the fifth wires, so it corresponded with the pinsequence written on the PCBA. It seems that Enertion didn’t put the right markings on their sticker. I just redetected the Hall sensors in the BLDC tool and it works now. Thanks @Jinra and @yaca! Gonna try out the difference with sensors hopefully tonight.

1 Like