all you need is a magnetic hall effect module, power it from the UART port with 3.3v and connect the digital output to the ADC2.
Then in the VESC tool go to App Settings, General and under the General Tab you see the last row is labeled kill stitch, and select mode ADC2 High
Then when a magnet is near the hall it turn the output to the motor on and when the magnet is taken away it kills the motor
You seem to be the first forum member to implement the VESC kill switch feature on an efoil.
Do you still keep a disconnection mean between battery and ESC ?
You’ve chosen ADC2 with a 3.3V detection. Would it work equally with PPM High same wiring ?
On the 3356 post given above, when choosing LOW, PPM is grounded when a normally open regular ice lanyard is pulled off.
And are you talking about the Flipsky 75200 here?
The kill switch feature signals the VESC to stop the motor, no power will be interrupted. PPM signal will just be ignored as long as the kill signal is active. It requires VESC FW5.3
Its only blocking the throttle signal as a kill function so there is still power coming in.
The way to get that done is to add a relay to the main battery terminal or if you have your battery running through a bms to do it that way.
It really depends why you need the kill switch.
Keep in mind with a remote if you fall off and the remote is far enough away to loose signal and you forget to take your finger off the throttle it still cuts out the motor based in loosing signal to the VESC. So by adding a kill you have 2 forms of protection from runaway if you fall off, and effectively 3 if you consider the throttle is snap back to
Would do it this way with ADC1 set to HIGH in the Flipsky FSESC 75200 n°7 COM connector?
My feedback after a lot of tests.
My magnetic switch is connected on 3.3V and ADC2 and my firmware is 5.3 on my VESC maytech
I tested ADC2 High on VESC tool but didn’t work, the motor runs even with the switch open.
I tested ADC2 LOW, it works but not all the time
you can see how it works on my youtube video
Maybe the problem is that I don’t use a magnetic hall effect module
Do you use a reed switch? I tried the same with my esc and a reed and it didn’t work reliably, the reed was not consistent. Can’t understand why though as they are used in many other applications.
Perhaps the reed became magnetized?
I ve been used a big reed swtich and so far it has worked consistently
Reeds are crap. They can get stuck for being closed for too long, a bit of current or even a shock…
I’m switching to a hall sensor instead, will be more reliable.
I check the VESC output voltage and I have only 1.3V
instead of 3.3v, and my switch is normaly open, that why I need to put ADC2 low
So when I close the switch I have 0V at ADC2, and when I open the switch I have 1.3V at ADC2
I think to solve the problem I must either increase the voltage to 3.3V, but I don’t know how, or install a normally closed switch, but i think i will an issue during the run due to a false detection.
So I think I have no choice if I want to use this function I must increase the output voltage at 3.3V
I test again the voltage, in fact I have between vesc 3.3V and the GND => 3.3V
So all is ok at the VESC output.
but ADC2 and the GND => 1.2V
The question is, why I have 1.2V at the ADC2 when is disconnected ?
Perhaps it’s the same issue at this link
ADC1 problems with Firmware/Hardware issue? | VESC Project (vesc-project.com)
I found a solution
I plug a 10k pull-down resistor on ADC2 and all works fine
0V on ADC2 when kill switch is open
3.3V when kill switch is close
@FoilEngineer you can’t simply block the main battery while the motor and ESc are running full power, it will send back a high voltage pulse and destroy your electronics.
to kill propulsion power, you need to ramp down to zero RPM and then kill power.
We have not found anything that will do that.
I have four fully stuffed Maytech electronic switches that say they can switch high current, but they can’t.
@ausdroid it is not blocking the main battery, it is turning off the PWM or whatever you use to control the motor speed. It has nothing to do with the battery or high current killing
It is the same as going full throttle then taking your finger off the throttle or loosing signal so no need for any of those Maytech electronic switches. Those are used to switch on the VESC under no load to stop spark during battery connection. If you use it to connect or disconnect the battery under load it will surely blow the unit as that is not its intention.
Thanks for the info @jeffM, found this post just at the right time for me, I’ll test the VESC kill switch feature in the coming week.
What do you use as lanyard? The leashes i’ve found are all too long to work on kill switches
I like the idea of using the VESC killswitch feature together with a hall (or similar) sensor.
Does anyone have a recommendation on which sensor to buy?
It’s not critical with the exact sensor, there are hundreds that will work but it should be a ”unipolar digital” or ”unipolar switch” sensor type.
It must not be a latching or ratiometric/analog hall sensor.
Just a question: If your switch is normally open (open circuit with lanyard attached) then connecting a pull-down resistor from adc2 to ground will ensure low status during riding but when you pull lanyard the circuit closes and ADC2 goes high, therefore the kill switch setting in the VESC should be ADC2 high, right?
It seems to me you describe the opposite?
EDIT: tried it connected and set up like i describe it above, works as intended