How to build a 2/4WD switch-able board with ubox v2
This article is Just for a possibility, 2/4WD switching may not helpful for actual e-skate riding, because an idle motor will have drag force to resist moving.
Ubox was born with internal electronic CAN bus switch, for easily switch on/Off internal CAN connection, which is initially expected for help e-bike/e-scooter applications.
Ubox V2 added 2 features: disable receiver and CAN in/out, these 2 features will help for build a switch-able 2/4WD e-skite board.
Conception
In a 4WD VESC configuration, the control input signal is relied through CAN bus, when one of the VESC haven't received the input from CAN bus, it will stop to idle state, free its own motor. So, in 4WD, we want input relied to all 4 VESCs, and in 2WD, we need to cut off two of the VESC's input. In conventional configuration, their topology is like this:
Ubox's CAN switch is between its A and B, so if we switch off A1 to B1 in main Ubox1, the input path will stopped before B1, will leave A2,B1,B2 stop. If we switch off B2 to A2 in secondary Ubox, will cause A1,B1,A2 run, B2 stop. This is not what we wanted.
Once I have an idea[1], we still can do it, by a tricky:
Keep Ubox2's CAN bus being off, then by controlling the Ubox1's internal CAN switch, we can switch off CAN between A1-B2 and B1-A2 now.
Prepares
Let's start from VESC tool PC edition, with Uremote V2. Prepare bellows:
- 2 CAN cables, 1 USB cable.
- 2 Ubox V2
- A Power button
- A 'Y' cable to distribute battery to 2 Uboxes.
- 4 Motors
Step by step
Wire two Ubox V2 as fore mentioned.
- Power off Uremote V2, then power on Ubox, wait the power button led stable.
- Do disable receiver on Ubox2, by click the power button 9 times continuously then wait 1 second. Do enable receiver on Ubox1 by click the power button 8 times continuously then wait 1 second.To check if receiver is disabled, repower on Ubox, then to check if the button led has blinking in 3 seconds. Blinking is for enabled, no blinking is for disabled.
- Binding Ubox1 with Uremote V2 if not binded yet.
- Go into remote's setting menu, settings->Ports Config->CAN Bus, set it to 'on'. settings->Ports Config->Uart, set it to as 'Uart to A'.
- Plug USB cable to ESCA of Ubox1, do 'FOC setup', in this setp, all the 4 motors will spin, if not, there must have a CAN path issue.
- After FOC setup, test the remote throttle, check if all 4 motors are spin simultaneously.
- Then check the 2WD mode, by set off the Ubox1's internal CAN bus. Go into remote's setting menu, settings->Ports Config->CAN Bus, set it to 'off'. Then test the throttle, to check if motor front A, front B is not spinning when throttle up.
- Completed.
Conclusion and explain
- The 5V wire of CAN cable A1B2 is cut to prevent the 5V out of Ubox2 to supplying power to Ubox1, to avoid failure to shut down by the power button of Ubox1. The 5V voltage input of CAN-in socket is only used to trig on power supply of Ubox. Ubox does not use this 5V as power source. For CAN-in and CAN-out, please refer to ubox V2 75V Manual: FAQ.
- The principle of using the third-party remote controller + Receiver Kit is the same. The throttle signal of the remote controller is input to A1. However, at this time, there is no way to control the on / off of the internal can of ubox1 through the third-party remote control. The solution is to press the power button 6 / 7 times continuously, and then wait for 1 second. In this way, the on / off of the internal can of ubox1 can also be controlled.
- Ubox V1 can also be configured in this way, but the startup and shutdown cannot be controlled by Ubox1 alone like V1. Both Uboxes need to be pluged in with a on-off button.
- Uremote V1 can also be used for configuration. The main difference between V1 and V2 is that V2 adds some functions, and V2 has a built-in bootloader What's new of Uremote V2.
Limits and cautions
- 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.
- The above scheme should only be applicable to VESC current mode. In VESC current mode, when the throttle signal is not controlled, ESC will remain idle and release the control of the motor.
See also
Main Page
How to setup a 4WD with Ubox V2
Notes:
- ↑ Jan17,2022