EFeru / hoverboard-firmware-hack-FOC

With Field Oriented Control (FOC)
GNU General Public License v3.0
1.11k stars 922 forks source link

4WD question #152

Closed interlark closed 3 years ago

interlark commented 3 years ago

Hi! Very interesting project. There are 2 hoverboards. What's the solution to synchronize the speed of all 4 wheels, any suggestions?

EFeru commented 3 years ago

Depends how are you controlling it and what is your input. The idea is to have both mainboards receive the same input. Just some examples (didn't try myself):

interlark commented 3 years ago

Thanks for reply. Okay, so it doesn't matter whether I place wheels like (HWWx = x-th hoverboard's wheel):

[HWW1 LEFT] - [HWW1 RIGHT]
[HWW2 LEFT] - [HWW2 RIGHT] 

or

[HWW1 LEFT] - [HWW2 RIGHT]
[HWW1 LEFT] - [HWW2 RIGHT] 

?

EFeru commented 3 years ago

It does matter. You can use the arrangement you prefer, just make sure to comment/un-comment in config.h the following defines to match your setup:

 #define INVERT_R_DIRECTION                // Invert rotation of right motor
 #define INVERT_L_DIRECTION                // Invert rotation of left motor
interlark commented 3 years ago

@EmanuelFeru Thank you, mate!

SchO2n commented 1 year ago

Depends how are you controlling it and what is your input. The idea is to have both mainboards receive the same input. Just some examples (didn't try myself):

  • if you used ADC as input, then you have to make the 2 mainboards GND common, and connect the potentiometer(s) output to both mainboards ADC input. Take 3.3V from one board only.
  • if you use UART, then send the same data to both boards, again common GND.

Hello, can we link the two GND of the motherboards if they are powered by two different batteries? Tks