My motor is turning in reverse and I can’t find a way to change the direction in software. (besides using the nunchuck in reverse).
I’ve tried swapping phases (which works for reversing), but the hall sensor detection always fails now. I think I’ve tried all the permutation of swapping the hall sensor wires and it always fails.
Any idea how to reverse direction, besides mounting the motor on the opposing wheel ?
It seems like it should be possible in software - if I can do it from the nunchuck.
Put the phase wires in the way you say detection works. Turn off power, unplug vesc from computer. Flip outside phase wires. Turn vesc back on, plug in and connect. Try detection again.
Again, I’m no VESC expert but it worth a try.
Edit - From VESC Tool:
Z-Button:
The Z-button is used to change the direction of the motor if reverse is activated. Without reverse, Z has no effect.
Edit 2: Make sure control mode is disabled. You may have it on, and forgot to change it. (App config, PPM) make sure to write config and then reboot the VESC.
Sadly the sensor inside the motor are possibly badly place, they are probably too far from the stator, or in a small angle, that could lead them to work in one direction but not the other.
You can open the motor to see if you can move the sensor, but they are most likely to be pot in epoxy.
I guess to best outcome, is to change the side of the motor, or just run without sensor.
The black is the ground… the red is the 5V… and the 3 other are sensor (they are automatically detect if your using a vesc) you don’t have to know witch one is witch. But you can still try to move there position, to see what can happen
You can pretty easily swap the sensor wires (which I imagine is much easier/less likely to break something by opening the motor). Each phase has a corresponding sensor wire. In the image below, the sensor wires plug into the holes on the top left of the board on the left. Going left to right, you can see a 5V, TEMP, H1, H2, H3, GND. That’s the sensor’s 5V, Temp sensor, corresponding hall sensors, and the ground. The corresponding phase connectors, going from left to right on the bottom of the board on the left are P1, P2, and P3.
So plug in your phase wires so that the sensor detects correctly, then swap 2 phase wires (to swap the spin direction) and swap the same (corresponding) sensor wires. ie. If you swap the wires connected to phase 1 and phase 2, then swap the sensor wires H1 and H2.
Edit: if you’re adamant about no hardware changes, you could swap the port configuration (what physical pins on the processor correspond to what function) in the firmware, essentially swapping the sensor wires.
Sorry my bad… but still unlike other esc vesc is mde to automatically detect the motor and sensor… also if the problem is inside the motor there only little you can do
Sensor are suppose to be place at certain range (generally glue directly to) of the stator, if the are too far or badly place, they might only work in one way if the magnetic field is strong enough
hall sensor & phase wires
H: blue green yellow & P: black yellow blue WORKS (reverse)
reboot
H: blue green yellow & P: yellow black blue DOES NOT WORK
reboot
H: yellow green blue & P: yellow black blue DOES NOT WORK
reboot
H: green blue yellow & P: yellow black blue DOES NOT WORK
reboot
H: blue yellow green & P: yellow black blue DOES NOT WORK
…
Is there a point trying the other combination of phase wire swapping ?
@psychotiller I tried your methodology, no improvement :
H: blue green yellow & P: black yellow blue WORKS (reverse)
reboot (didn’t have to actually write this one, detect worked on the first try)
now swapping phase wires :
reboot detect, apply, write, reboot
H: blue green yellow & P: yellow black blue DOES NOT WORK
reboot detect, apply, write, reboot
H: yellow green blue & P: yellow black blue DOES NOT WORK
reboot detect, apply, write, reboot
H: green blue yellow & P: yellow black blue DOES NOT WORK
reboot detect, apply, write, reboot
H: blue yellow green & P: yellow black blue DOES NOT WORK
Back to the original one, and it works, without detect / apply / write.
H: blue green yellow & P: black yellow blue WORKS (reverse)
Hall sensors aren’t complicated; if it works to detect spin in one direction, it should work the other. I think maybe you’re adding too many variables by monkeying around with the sensor wires in between detection tests.
Maybe a silly question but have you tried changing the phase wires to, say, black yellow blue (or black blue yellow) while leaving the hall sensor wires in the default configuration? When you say “DOES NOT WORK”, are you saying that auto detect doesn’t detect the motor spin direction, or that the motor doesn’t spin?
If there is a problem with the hall sensor / wire connections within the motor, you ought to be able to find it with a multimeter (spinning the can by hand). I can give you a quick synopsis on how to open that motor up if a wire is loose at the hall sensors.
But before you do that, I think you need to hold one variable constant (in this case the hall sensor wires) and make sure you’re testing without incorrect auto-detect presets in order to isolate the failure point. If you already did that above, that I apologize.