Difference between revisions of "Adapter V2 manual"
Line 91: | Line 91: | ||
For '''two way throttle''', we need to change the control mode in VESC to 'center' mode, we adopt the ''''Current No Reverse Brake Center'''' mode in this guide. We also can do two/one wheel drive mode for two way throttle. | For '''two way throttle''', we need to change the control mode in VESC to 'center' mode, we adopt the ''''Current No Reverse Brake Center'''' mode in this guide. We also can do two/one wheel drive mode for two way throttle. | ||
For '''one way throttle''', we adopt the ' | For '''one way throttle''', we adopt the ''''Current Reverse ADC2 Brake Button'''' mode. | ||
The Ubox dual has a internal 2.4G receiver, the receiver is no use this application, we can disable receiver by click the button 9 times after the Ubox powered on and the button LED solid. | The Ubox dual has a internal 2.4G receiver, the receiver is no use this application, we can disable receiver by click the button 9 times after the Ubox powered on and the button LED solid. | ||
Line 116: | Line 116: | ||
[[File:Make connection.jpg|frameless|400x400px]] | [[File:Make connection.jpg|frameless|400x400px]] | ||
----Then go to APP Settings->General page. | ----7. Then go to APP Settings->General page. | ||
[[File:Set adc mode in general.jpg|frameless|400x400px]] | [[File:Set adc mode in general.jpg|frameless|400x400px]] | ||
Line 127: | Line 127: | ||
Click 'Write app configuration' on the right sidebar to store current settings. | Click 'Write app configuration' on the right sidebar to store current settings. | ||
----Then go to APP Settings->ADC->General page. | ----8. Then go to APP Settings->ADC->General page. | ||
[[File:Set mode on adc page.jpg|frameless|400x400px]] | [[File:Set mode on adc page.jpg|frameless|400x400px]] | ||
Line 134: | Line 134: | ||
Click 'Write app configuration' on the right sidebar to store current settings. | Click 'Write app configuration' on the right sidebar to store current settings. | ||
----Then go to APP Settings->ADC->Mapping page. | ----9. Then go to APP Settings->ADC->Mapping page. | ||
[[File:Mapping adc input.jpg|frameless|400x400px]] | [[File:Mapping adc input.jpg|frameless|400x400px]] | ||
Line 145: | Line 145: | ||
In this step, pull the throttle and the brake handles, to let the ESC learn the throttle input signal for ADC CH1. If you don't have a throttle handle (analog brake input) for brake, trigger the mechanical brake to fulfill the ADC CH2 learning. | In this step, pull the throttle and the brake handles, to let the ESC learn the throttle input signal for ADC CH1. If you don't have a throttle handle (analog brake input) for brake, trigger the mechanical brake to fulfill the ADC CH2 learning. | ||
Click 'Apply' to accept the ADC input learning. | |||
Click 'Write app configuration' on the right sidebar to store current settings. | Click 'Write app configuration' on the right sidebar to store current settings. | ||
Line 166: | Line 168: | ||
Finished, to check if all the controls are working correctly. | Finished, to check if all the controls are working correctly. | ||
---- | |||
=== Two/one wheel drive switch-able === | === Two/one wheel drive switch-able === | ||
If you want a switch-able system, you need to separate two ESCS from CAN bus, let them working alone. And set each of | If you want a switch-able system, you need to separate two ESCS from CAN bus, let them working alone. And set each of the two ESCs one by one. | ||
#After Ubox power on, and button LED solid, click the button 7 times, then wait 1 second, the internal CAN bus connection is off. | #After Ubox power on, and button LED solid, click the button 7 times, then wait 1 second, the internal CAN bus connection is off. | ||
Line 178: | Line 177: | ||
#Plug in another ADC cable from adapter's second socket to ESCB's socket. | #Plug in another ADC cable from adapter's second socket to ESCB's socket. | ||
#Set you throttle handle bar's H-M-L switch to H position. | #Set you throttle handle bar's H-M-L switch to H position. | ||
#Then use a USB cable plug into ESCA, setup ESCA | #Then use a USB cable plug into ESCA, setup ESCA then ESCB both from step 6 to step 9 as described in '''<nowiki/>'Two wheel drive only mode with one way throttle''''. | ||
When two ESCs are finished, to check if both ESCA and ESCB are working correctly, and to try to switch the two/one wheel drive mode, to check if the switching is working. | |||
---- | |||
=== Centered throttle === | |||
Centered throttle setting is similar to above two modes, except we need to choose the '<nowiki/>'''Current No Reverse Brake Center'''<nowiki/>' mode in the General->General page, instead of ''''Current Reverse ADC2 Brake Button'''<nowiki/>'. | |||
'''updated to here, 2022-5-11 23:11''' | |||
'''below are need to update.''' | |||
==Concludes and explains== | ==Concludes and explains== |
Revision as of 23:11, 11 May 2022
In revising, will finish soon, sorry!
The V2 adapter is designed to make convenient for users to connect wires of e-bike/e-scooters to the VESC. Combine with Ubox V2 or Ubox single, We can easily to build an e-bike/e-scooter.
Size: 63 x 53 x 12.5 mm
This manual is based on Ubox V2 dual, for the other VESCs, the conceptions are the same.
Features
- Horn, head light, turn light, brake & rear light, and reverse light support.
- High, middle, low, 3 level throttle support.
- Motor reverse and cruise support.
- Buzzer to prompt turn, reverse and settings.
- Support both hall brake and mechanical brake input.
- Support centered (two way) throttle.
- Two/one wheel drive support.
- Power limit mode for compliant to the local regulations.
Wiring
- Mechanical brake, light, horn, reverse and cruise are actually switches, we don't need to distinguish the two wires of each switch.
- The turn left/right switch and throttle level switch, they usually has three wires, the neutral wire is the one which can be switched on/off to other wires, so if you are not sure the wire orders, use a multimeter to test them to find the neutral wire first, then know what the rest two wires are.
- Usually, hand bar throttle or thumb throttle have three wires: black, red, green, corresponding to GND, 5V, throttle output.
- Users can also use these type of throttles to make ADC(analog) brake, in Adapter V2, the ADC brake signal is transferred to VESC's ADC2 pin.
- The second VESC ADC PORT is for two wheel drive config, if you have one wheel drive only, connect MAIN PORT to VESC.
- Adapter need a 5V and 12V power source, the 5V is get from VESC ADC port, users need to connect a 12V power source to adapter's 12V socket, for Ubox V2 connect to its FAN socket.
- The rear and brake light, usually comes with three wires in common ground connection mode, the two lights share one GND. Connect the positive(anode) wire of rear light to 12V, and brake light's to Brake light+, and their negative(cathode) wire to GND.
- The other lights and horn are low side switched, so connect the positive(anode) wire to the '12V' pin, and the negative(cathode) wire to the pin with a '-' suffix.
- For Ubox single 75V, the extra NRF port is not available, or for the other VESCs with out NRF port (some vendor referred as second UART), if the cruise and reverse functions are not needed, the TX and RX pin from the 8 pin port can connect to VESC Bluetooth by pick out the wires from the cable. We are designing a bridge PCB to separate the UART from the 8 pin cable, will be soon.
On board switch and potentiometers
The potentiometers are increase clockwise and decrease counterclockwise.
Throttle and brake power supply
If your throttle can only accept 3.3V supply, set the ‘HALL VDD’ switch to '3.3V' side. Otherwise set it to '5V'. The ADC brake port shares this supply too.
Throttle potentiometers
Adapter V2 supports three level throttles, the High level is equal to the throttle handle in put. The middle and low is scaled from throttle handle input according to the 'THR M' and 'THR L' potentiometer's positions. The scale range is from 0 to 100%.
If you are not connect a three level throttle switch to adapter, the default throttle level is Middle, so adjust the 'THR M' to meet your requirement.
Brake potentiometer
When trigger the mechanical brake, adapter V2 will assist it with regenerative brake automatically, the regenerative brake strength is according to the 'BRK' potentiometer, from 0 to 100%.
Mode configuring
Adapter V2 has 3 mode configurations: two/one wheel drive mode switching, power limit mode on/off, and one way/ two way throttle switching.
Two/one wheel drive mode switching
Hold both the right and left brake handles then power on the system, the adapter will toggle the 2/1 drive mode, after the switching, the buzzer will ring once for one wheel mode, and twice for two wheel mode. Release both left and right brake.
The principle of 2 wheel drive is to copy the control signal from main ESC to the second ESC. In order to implement this function, the CAN bus connection of two ESCS need to set off, for Ubox dual, it has a internal CAN bus connection, please refer: The power button of Ubox#The click button configuration.
Power limit mode
When power on, the buzzer will ring to prompt the power limit mode state:
Ring one time ---- Limited mode.
Ring three times ---- Unlimited mode.
To change mode:
Hold both the left brake handle and the throttle handle bar, then power on the system, the adapter will switch the power limited/unlimited mode, after the switching, the buzzer will ring three times to indicate the mode change, release the throttle and left brake immediately.
If not release them in time, the adapter will proceed to next setting: Two/one way throttle switching.
The principle of Power limit mode is to scale the throttle handle bar's input to the L level, ignores the H, M, L state. So set the L level to meet your local regulations.
Two/one way throttle switching
Two way throttle is being referred as 'center' throttle in VESC tool, it return to its center position when idle.
To change mode:
Hold both the left brake handle and the throttle handle bar, then power on the system, wait the buzzer ring three times, then still hold throttle and left brake 3 more seconds, until the buzzer again to ring 6 times, release the throttle and left brake.
The setting entry is shared with power limit mode switching, so we need to wait the power limit mode setting being time out.
The difference between two/one way mode is, in one way mode, the throttle output to ESC is as same as throttle input, in two way mode, if the brake not triggered, throttle output to ESC is as same as throttle input; If the brake handle is triggered, it will replace the throttle output with the brake signal from the brake input.
Setup in VESC tool
Before setup control logic to the VESC, we need to setup motor's FOC first. The following contents are based on VESC tool 3.01 PC edition.
Since the input setup wizard of VESC tool 3.01 (FW 5.3) is easy to fail, so we will set them in manual mode instead.
For two wheel drive mode, the principle is set ADC input on main ESC (this guide will assign it to ESCA), then let the control signal relied to ESCB by CAN bus.
For two/onw wheel drive switchable configuration, the principle is to turn off CAN bus connection, let the adapter to send the control single to the two ESCs separately.
For two way throttle, we need to change the control mode in VESC to 'center' mode, we adopt the 'Current No Reverse Brake Center' mode in this guide. We also can do two/one wheel drive mode for two way throttle.
For one way throttle, we adopt the 'Current Reverse ADC2 Brake Button' mode.
The Ubox dual has a internal 2.4G receiver, the receiver is no use this application, we can disable receiver by click the button 9 times after the Ubox powered on and the button LED solid.
We will begin with one way throttle with two wheel drive mode first. For the two/one drive switch-able mode, just disable the CAN bus connection and set the ADC control mode on the second ESC similar as main ESC . For the two throttle, just set the control mode to 'Current No Reverse Brake Center'.
Two wheel drive only mode with one way throttle
Caution: during the setup, the motor will spin even to full speed, to keep every thing and every one away from the motor.
If you want 2 wheel drive only mode, you can config the two ESC of Ubox into CAN mode, let the control signals relay through the CAN bus.
1.After Ubox power on, and button LED solid, click the button 6 times, then wait 1 second, the internal CAN bus connection is on.
2. Do the FOC setup for both ESC.
3. Set the adapter V2 to one way throttle mode, the Two/one wheel drive mode is meaningless in this configuration.
4.Plug in the ADC cable only from adapter's main socket to ESCA's socket.
5.Set you throttle handle bar's H-M-L switch to H position, if you don't have this switch, adjust the 'THR M‘ potentiometer to it max position (increase clockwise).
6. Set the brake potentiometer to max position, connect ADC (HALL or analog) brake if you have it.
6.Then use a USB cable plug into ESCA, on the VESC tool PC edition: make connection.
7. Then go to APP Settings->General page.
Click 'Read app configuration ' on the right sidebar.
Click 'Read default app configuration ' on the right sidebar.
Set APP to Use 'ADC' mode.
Click 'Write app configuration' on the right sidebar to store current settings.
8. Then go to APP Settings->ADC->General page.
Set the Control Type to 'Current reverse ADC2 Brake Button'.
Click 'Write app configuration' on the right sidebar to store current settings.
9. Then go to APP Settings->ADC->Mapping page.
Click 'Stream realtime app data' on the right sidebar.
Set ADC Voltage Mapping mode to 'Current reverse ADC2 Brake Button'.
Click 'Reset min and max'.
In this step, pull the throttle and the brake handles, to let the ESC learn the throttle input signal for ADC CH1. If you don't have a throttle handle (analog brake input) for brake, trigger the mechanical brake to fulfill the ADC CH2 learning.
Click 'Apply' to accept the ADC input learning.
Click 'Write app configuration' on the right sidebar to store current settings.
Now to check if the main ESC is running follow the throttle, and the brake action.
Then we will go to set the second ESC as salve.
Click the CAN device window in the left-down of the app window.
Click 'Read app configuration ' on the right sidebar.
Click 'Read default app configuration ' on the right sidebar.
Go to APP Settings->General page, set the Can Status Message Mode to ’CAN_STATUS_1_2‘.
Click 'Write app configuration' on the right sidebar to store current settings.
Now to check if the second ESC is running follow the main ESC.
Finished, to check if all the controls are working correctly.
Two/one wheel drive switch-able
If you want a switch-able system, you need to separate two ESCS from CAN bus, let them working alone. And set each of the two ESCs one by one.
- After Ubox power on, and button LED solid, click the button 7 times, then wait 1 second, the internal CAN bus connection is off.
- Plug in an ADC cable from adapter's main socket to ESCA's socket.
- Plug in another ADC cable from adapter's second socket to ESCB's socket.
- Set you throttle handle bar's H-M-L switch to H position.
- Then use a USB cable plug into ESCA, setup ESCA then ESCB both from step 6 to step 9 as described in 'Two wheel drive only mode with one way throttle'.
When two ESCs are finished, to check if both ESCA and ESCB are working correctly, and to try to switch the two/one wheel drive mode, to check if the switching is working.
Centered throttle
Centered throttle setting is similar to above two modes, except we need to choose the 'Current No Reverse Brake Center' mode in the General->General page, instead of 'Current Reverse ADC2 Brake Button'.
updated to here, 2022-5-11 23:11
below are need to update.
Concludes and explains
- The reverse function is mapped on to the RX pin of VESC's ADC & UART socket. And the cruise function onto the TX pin. So we suggested to use ADC only mode instead of ADC and UART mode. This is a link to illustrate the mapping of TX RX pins: https://vesc-project.com/node/600
- Reverse or Cruise function used in escooter via ewheel ADC adapter:
- if you're using adapter v1, then the adapter is connected in ESCA's ADC&UART socket, and paralle the RX(or TX) and GND pin out for the reverse/cruise function applicaiton in the same ESCA side.
- if you're using adapter v2, has reverse port already in adapter v2, no need any above wiring in ubox v2.
- There are many ADC control mode in the VESC, the most flexible mode is Current Reverse ADC2 Brake Button, it supports cruise, reverse, and ADC brake, if you want a button brake, you can let the brake input connect to a button with the other pin of the button connected to VDD (3.3V).
- For UBox's power button click function, please refer: The power button of Ubox.
- On Ubox dual, the two/one wheel drive switching can also be achieved by Ubox's power button to turn on/off its internal CAN bus connection.
- For the ignite key and voltage meter of Ubox V2, please refer: The CAN-IN and IGNITE socket of Ubox V2.
Caution and limits
- Since our solution is based on open source VESC, users should fully understand the risks of open source projects. This article only describes the possibility of this build method, and is not responsible for the damage and accidents caused by user themselves.
- This product is for DIY purpose, so we only offer a very limited warranty.