You are here

Connecting handlebar controlls

1 post / 0 new
mannberg
Offline
Last seen: 8 months 3 weeks ago
Joined: 2019-10-13 00:12
Posts: 1
Connecting handlebar controlls

My very loose plan is to connect my handlebar inputs, such as throttle, break sensor, turn signal and buttons to my vesc, read the handlebar switches-ctrls from Lisp1 and send CAN frames to my lights[^2] and horn.

How do I connect my handlebar switches to the vesc? In my example I'm have a Ennoid vesc and these wires from my handlebar:

Ennoid Esc Pinout Diagram

WIRE FUNCTION VESC-Connection #
Throttle
Red VCC 3.3V 01
Black GND GND 02
Green GND GND 02
Yellow IO BTN 04
White IO Analog throttle COMM ADC1 05
Light-Ctrls
Purple GND GND 02
Black IO Head-light switch 06
White IO Head-light switch 07
Green IO Signal-right 08
Brown IO Signal-left 08
Orange IO Horn 10
Right Break
Black GND GND 02
Green/Yellow IO Break sensor rear COMM ADC2 11
Left Break
Black GND GND 02
Green/Yellow IO Break sensor front COMM ADC3 12

What route should I go? The 4 options I can think of is:

  1. Connect everything to the vesc. Can I use any of the others connecters as digital input? Such as SERVO, SWD and SDW NRF? What are these connections used for?

  2. Connect the input buttons to something, like a RaspberryPi Pico, read the inputs of the buttons and talk to the vesc over UART (TX, RX). Still connecting the analog throttle, rear break-sensor, front break-sensor to ADC1, ADC2 and ADC3.

  3. Read ALL of the inputs, including throttle and break sensor on the RaspberryPi Pico and talk to the vesc over UART (TX, RX).

  4. Read the ALL of the inputs, including throttle and break sensor on a Adafruit Feather and send can frames to the vesc and read throttle and break sensor values from Lisp? Can this be done? I have no ide .

I also got my Ennoid SS-24 BMS connected the vesc by the can-bus.

Any suggestions how to do this?


  1. VESC Lisp receive and send CAN-frames - YouTube [^2]:headligts, breaklights, turnsignals. ↩︎