Open GMahmoud opened 3 years ago
Strage, so you have gyro and accel but not DMP data. We need to debug further a bit, can you display the DEBUG output when you first power on the sideboard. It should say Configuring...writing DMP.. Ok
And maybe place some printf(..)
in the Euler angle calculation to see what happens.
Hello @EmanuelFeru, Thanks for your answer
I confirm I am getting the Ok
message after the configuration (see attached logs)
However, I looked a bit in your code to add some printfs. I did not focus on euler angle only as these are computed from quaternions which are zeros as well. I added some log to dmp_read_fifo
function that computes quaternions and it's returning -1 because of mpu_read_fifo_stream
.
In this function I found that variable fifo_count
is usually equal to 0 as well as tmp
array (see debug printf in the logs)
Could you help me please to debug i2c_read
function ?
--- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
Configuring MPU6050... writing DMP... OK
=== HELP ===
h: Print Help
x: Print Serial AUX
8: Set Accelerometer on/off
9: Set Gyroscope on/off
r: Print Registers
a: Print Accelerometer
g: Print Gyroscope
q: Print Quaternion
e: Print Euler angles in deg*100
t: Print Temperature in degC*100
p: Print Pedometer
0: Reset Pedometer
1: Set DMP/MPU freq 10 Hz
2: Set DMP/MPU freq 50 Hz
3: Set DMP/MPU freq 100 Hz
,: Set DMP interrupt to gesture
.: Set DMP interrupt to continuous
f: Set DMP on/off
v: Set Quaternion on/off
w: Test low-power accel mode
s: Run self-test (device must be facing up or down)
============
DEBUG: fifo_count: 0, length: 32, tmp[0]: 0, tmp[1]: 0
Command = e
Roll:0 Pitch:0 Yaw:0
Roll:0 Pitch:0 Yaw:0
Roll:0 Pitch:0 Yaw:0
Roll:0 Pitch:0 Yaw:0
Roll:0 Pitch:0 Yaw:0
Roll:0 Pitch:0 Yaw:0
Roll:0 Pitch:0 Yaw:0
Command = e
Command = q
qW:0 qX:0 qY:0 qZ:0
qW:0 qX:0 qY:0 qZ:0
qW:0 qX:0 qY:0 qZ:0
qW:0 qX:0 qY:0 qZ:0
qW:0 qX:0 qY:0 qZ:0
qW:0 qX:0 qY:0 qZ:0
qW:0 qX:0 qY:0 qZ:0
qW:0 qX:0 qY:0 qZ:0
qW:0 qX:0 qY:0 qZ:0
qW:0 qX:0 qY:0 qZ:0
Command = q
Cheers
Other question: Do you have any idea what the difference between MPU-6050
and MPU-6050A
is ?
Not sure about the difference, but it could be a reason why is the DMP and angles not working. Because the quaternion is zero for you. I am thinking.. could it be that the DMP firmware is different. I think we need to investigate it.
Hello. I have a question about the hoverboard-sideboard-hack-GD project. I plan to use your firmware to upgrade a small electric car. With wheels and a gyro-scooter motherboard. To run two wheels, do I have to install the firmware on the two side boards? Or do you need to connect one side board from both sides to the motherboard? I need the central motherboard to be able to be controlled by an adult via a car model receiver. And to be able to control the pedal with a hall sensor. Will this firmware be able to implement such management?
Are you sure you have the same sideboards? Because I have a feeling that you have gen2 boards. If yes, it will not work with this firmware you have to use https://github.com/flo199213/Hoverboard-Firmware-Hack-Gen2 This firmware is for the sideboards of gen1 boards, where the 2 motors are driven from one mainboard
ΠΡ ΡΠ²Π΅ΡΠ΅Π½Ρ, ΡΡΠΎ Ρ Π²Π°Ρ ΡΠ°ΠΊΠΈΠ΅ ΠΆΠ΅ ΡΠ΅ΡΠ²Π°Π½ΡΡ? ΠΠΎΡΠΎΠΌΡ ΡΡΠΎ Ρ ΠΌΠ΅Π½Ρ ΡΠ°ΠΊΠΎΠ΅ ΠΎΡΡΡΠ΅Π½ΠΈΠ΅, ΡΡΠΎ Ρ Π²Π°Ρ ΠΏΠ»Π°ΡΡ Gen2. ΠΡΠ»ΠΈ Π΄Π°, ΠΎΠ½Π° Π½Π΅ Π±ΡΠ΄Π΅Ρ ΡΠ°Π±ΠΎΡΠ°ΡΡ Ρ ΡΡΠΎΠΉ ΠΏΡΠΎΡΠΈΠ²ΠΊΠΎΠΉ, Π²Ρ Π΄ΠΎΠ»ΠΆΠ½Ρ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡ https://github.com/flo199213/Hoverboard-Firmware-Hack-Gen2 ΠΡΠ° ΠΏΡΠΎΡΠΈΠ²ΠΊΠ° ΠΏΡΠ΅Π΄Π½Π°Π·Π½Π°ΡΠ΅Π½Π° Π΄Π»Ρ Π±ΠΎΠΊΠΎΠ²ΡΡ ΠΏΠ°Π½Π΅Π»Π΅ΠΉ ΠΏΠ»Π°Ρ Gen1, Π³Π΄Π΅ 2 Π΄Π²ΠΈΠ³Π°ΡΠ΅Π»Ρ ΠΏΡΠΈΠ²ΠΎΠ΄ΡΡΡΡ Π² Π΄Π΅ΠΉΡΡΠ²ΠΈΠ΅ Ρ ΠΎΠ΄Π½ΠΎΠΉ ΠΌΠ°ΡΠ΅ΡΠΈΠ½ΡΠΊΠΎΠΉ ΠΏΠ»Π°ΡΡ.
Hello. I have a Gen1 (photo attached) where two motors are powered by a single motherboard. For my purpose, I need control via the receiver and the RC remote control (photo attached). And also to be able to switch to the control from the pedal (photo attached). Pedal with hall sensor. ΠΠ΄ΡΠ°Π²ΡΡΠ²ΡΠΉΡΠ΅. Π£ ΠΌΠ΅Π½Ρ Gen1 (ΡΠΎΡΠΎ ΠΏΡΠΈΠΊΡΠ΅ΠΏΠΈΠ»), Π³Π΄Π΅ Π΄Π²Π° Π΄Π²ΠΈΠ³Π°ΡΠ΅Π»Ρ ΠΏΡΠΈΠ²ΠΎΠ΄ΡΡΡΡ Π² Π΄Π΅ΠΉΡΡΠ²ΠΈΠ΅ ΠΎΠ΄Π½ΠΎΠΉ ΠΌΠ°ΡΠ΅ΡΠΈΠ½ΡΠΊΠΎΠΉ ΠΏΠ»Π°ΡΠΎΠΉ. ΠΠ»Ρ ΠΌΠΎΠ΅ΠΉ ΡΠ΅Π»ΠΈ Π½ΡΠΆΠ½ΠΎ ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ ΡΠ΅ΡΠ΅Π· ΠΏΡΠΈΠ΅ΠΌΠ½ΠΈΠΊ ΠΈ ΠΏΡΠ»ΡΡ RC (ΡΠΎΡΠΎ ΠΏΡΠΈΠΊΡΠ΅ΠΏΠΈΠ»). Π ΡΠ°ΠΊ ΠΆΠ΅ ΡΡΠΎ Π±Ρ Π±ΡΠ»Π° Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡ ΠΏΠ΅ΡΠ΅ΠΊΠ»ΡΡΠ°ΡΡΡΡ Π½Π° ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ Ρ ΠΏΠ΅Π΄Π°Π»ΠΈ (ΡΠΎΡΠΎ ΠΏΡΠΈΠΊΡΠ΅ΠΏΠΈΠ»). ΠΠ΅Π΄Π°Π»Ρ Ρ Π΄Π°ΡΡΠΈΠΊΠΎΠΌ Ρ ΠΎΠ»Π»Π°.
ΠΠ΄ΡΠ°Π²ΡΡΠ²ΡΠΉΡΠ΅. Π£ ΠΌΠ΅Π½Ρ Π΅ΡΡΡ Gen1 (ΡΠΎΡΠΎ ΠΏΡΠΈΠ»Π°Π³Π°Π΅ΡΡΡ), Π³Π΄Π΅ Π΄Π²Π° Π΄Π²ΠΈΠ³Π°ΡΠ΅Π»Ρ ΠΏΠΈΡΠ°ΡΡΡΡ ΠΎΡ ΠΎΠ΄Π½ΠΎΠΉ ΠΌΠ°ΡΠ΅ΡΠΈΠ½ΡΠΊΠΎΠΉ ΠΏΠ»Π°ΡΡ. ΠΠ»Ρ ΠΌΠΎΠΈΡ ΡΠ΅Π»Π΅ΠΉ ΠΌΠ½Π΅ Π½ΡΠΆΠ½ΠΎ ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ ΡΠ΅ΡΠ΅Π· ΡΠ΅ΡΠΈΠ²Π΅Ρ ΠΈ ΠΏΡΠ»ΡΡ Π΄ΠΈΡΡΠ°Π½ΡΠΈΠΎΠ½Π½ΠΎΠ³ΠΎ ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΡ (ΡΠΎΡΠΎ ΠΏΡΠΈΠ»Π°Π³Π°Π΅ΡΡΡ). Π ΡΠ°ΠΊΠΆΠ΅ ΠΈΠΌΠ΅ΡΡ Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡ ΠΏΠ΅ΡΠ΅ΠΊΠ»ΡΡΠ°ΡΡΡΡ Π½Π° ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ Ρ ΠΏΠ΅Π΄Π°Π»ΠΈ (ΡΠΎΡΠΎ ΠΏΡΠΈΠ»Π°Π³Π°Π΅ΡΡΡ). ΠΠ΅Π΄Π°Π»Ρ Ρ Π΄Π°ΡΡΠΈΠΊΠΎΠΌ Ρ ΠΎΠ»Π»Π°. ΠΠ΄ΡΠ°Π²ΡΡΠ²ΡΠΉΡΠ΅. Π£ ΠΌΠ΅Π½Ρ Gen1 (ΡΠΎΡΠΎ ΠΏΡΠΈΠΊΡΠ΅ΠΏΠΈΠ»), Π³Π΄Π΅ Π΄Π²Π° Π΄Π²ΠΈΠ³Π°ΡΠ΅Π»Ρ ΠΏΡΠΈΠ²ΠΎΠ΄ΡΡΡΡ Π² Π΄Π΅ΠΉΡΡΠ²ΠΈΠ΅ ΠΎΠ΄Π½ΠΎΠΉ ΠΌΠ°ΡΠ΅ΡΠΈΠ½ΡΠΊΠΎΠΉ ΠΏΠ»Π°ΡΠΎΠΉ. ΠΠ»Ρ ΠΌΠΎΠ΅ΠΉ ΡΠ΅Π»ΠΈ Π½ΡΠΆΠ½ΠΎ ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ ΡΠ΅ΡΠ΅Π· ΠΏΡΠΈΠ΅ΠΌΠ½ΠΈΠΊ ΠΈ ΠΏΡΠ»ΡΡ RC (ΡΠΎΡΠΎ ΠΏΡΠΈΠΊΡΠ΅ΠΏΠΈΠ»). Π ΡΠ°ΠΊ ΠΆΠ΅ ΡΡΠΎ Π±Ρ Π±ΡΠ»Π° Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡ ΠΏΠ΅ΡΠ΅ΠΊΠ»ΡΡΠ°ΡΡΡΡ Π½Π° ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ Ρ ΠΏΠ΅Π΄Π°Π»ΠΈ (ΡΠΎΡΠΎ ΠΏΡΠΈΠΊΡΠ΅ΠΏΠΈΠ»). ΠΠ΅Π΄Π°Π»Ρ Ρ Π΄Π°ΡΡΠΈΠΊΠΎΠΌ Ρ ΠΎΠ»Π»Π°.
ΠΠΎΠ΄ΡΠΊΠ°ΠΆΠΈΡΠ΅, ΠΊΠ°ΠΊΠΈΠ΅ Ρ Π΄ΠΎΠ»ΠΆΠ΅Π½ ΡΠΎΠ²ΠΌΠ΅ΡΡΠΈΡΡ ΠΏΡΠΎΡΠΈΠ²ΠΊΠΈ Π΄Π»Ρ ΠΏΠΎΠ»ΡΡΠ΅Π½ΠΈΡ ΡΠ°ΠΊΠΎΠ³ΠΎ ΡΠΏΡΠ°Π²Π»Π΅Π½ΠΈΡ? Π― Π½Π΅ Π³ΠΎΠ²ΠΎΡΡ Π½Π° Π°Π½Π³Π»ΠΈΠΉΡΠΊΠΎΠΌ, ΠΏΠ΅ΡΠ΅Π²ΠΎΠΆΡ ΡΠ΅ΡΠ΅Π· Google c Π ΡΡΡΠΊΠΎΠ³ΠΎ Π½Π° ΠΠ½Π³Π»ΠΈΠΉΡΠΊΠΈΠΉ. ΠΠ΅ΡΠ΅Π²ΠΎΠ΄ ΠΌΠΎΠΆΠ΅Ρ Π½Π΅ΠΊΠΎΡΡΠ΅ΠΊΡΠ½ΡΠΌ. Π‘ΠΊΠ°ΠΆΠΈΡΠ΅ Π΅ΡΠ»ΠΈ ΡΡΠΎ-ΡΠΎ Π±ΡΠ΄Π΅Ρ Π½Π΅ ΠΏΠΎΠ½ΡΡΠ½ΠΎ Π² Π²ΠΎΠΏΡΠΎΡΠ΅. ΠΠΎΠΏΡΠΎΠ±ΡΡ ΡΡΠΎΡΠΌΡΠ»ΠΈΡΠΎΠ²Π°ΡΡ ΠΈΠ½Π°ΡΠ΅ ΠΈ Π΄ΠΎΠ±Π°Π²ΠΈΡΡ ΠΊΠ°ΡΡΠΈΠ½ΠΎΠΊ. Tell me, what should I combine the firmware to get such control? I do not speak English, I translate through Google from Russian to English. The translation may be incorrect. Tell me if something is unclear in the question. I will try to formulate it differently and add pictures.
@2com68 seems like you have the normal supported board. From what I understand you need the Hovercar variant. This works with using the mainboard and one sideboard connected to the Right (short cable). Schematic:
Mainboard firmware:
Sideboard firmware:
Hello. Thank you for the information. I will study it. I hope I'll figure it out by the summer. Just got a question. The process of turning on the reverse can only be done by double pressing the brake pedal? Or can I turn off the brake pedal? Do the reverse through the switch?
I didn't test myself, but theory says the reverse should engage with a switch by double pressing as replacement to Brake pedal. However, if you want to be sure you can implement a very easy if else based on the switch.
Π― Π½Π΅ ΠΏΡΠΎΠ²Π΅ΡΡΠ» ΡΠ΅Π±Ρ, Π½ΠΎ ΡΠ΅ΠΎΡΠΈΡ Π³Π»Π°ΡΠΈΡ, ΡΡΠΎ Π·Π°Π΄Π½ΠΈΠΉ Ρ ΠΎΠ΄ Π΄ΠΎΠ»ΠΆΠ΅Π½ Π²ΠΊΠ»ΡΡΠ°ΡΡΡΡ ΠΏΠ΅ΡΠ΅ΠΊΠ»ΡΡΠ°ΡΠ΅Π»Π΅ΠΌ Π΄Π²ΠΎΠΉΠ½ΡΠΌ Π½Π°ΠΆΠ°ΡΠΈΠ΅ΠΌ Π²ΠΌΠ΅ΡΡΠΎ ΠΏΠ΅Π΄Π°Π»ΠΈ ΡΠΎΡΠΌΠΎΠ·Π°. ΠΠ΄Π½Π°ΠΊΠΎ, Π΅ΡΠ»ΠΈ Π²Ρ Ρ ΠΎΡΠΈΡΠ΅ Π±ΡΡΡ ΡΠ²Π΅ΡΠ΅Π½Ρ, ΡΡΠΎ ΠΌΠΎΠΆΠ΅ΡΠ΅ ΡΠ΅Π°Π»ΠΈΠ·ΠΎΠ²Π°ΡΡ ΠΎΡΠ΅Π½Ρ ΠΏΡΠΎΡΡΠΎΠΉ if else Π½Π° ΠΎΡΠ½ΠΎΠ²Π΅ ΠΏΠ΅ΡΠ΅ΠΊΠ»ΡΡΠ°ΡΠ΅Π»Ρ.
Hello. I didn't quite understand what to do. Tell me please. Need to edit something in the firmware? To implement the reverse through the switch? The photo shows an example of a switch. Or should I plug in a switch instead of a pedal, without changing anything in the firmware?
Other question: Do you have any idea what the difference between
MPU-6050
andMPU-6050A
is ?
Hi, I also have a some boards with mpu6050a, maybe we can collaborate. Have you made any progress in the meantime? We can chat if you are in the telegram group
@Candas1 With pleasure, I was quite busy lately to debug more about this issue. A question: Did you get the same problem with your board ? I am not in the telegram group, but we could chat in it if you could please explain to me how to join πΈ
Cheers
Yes. All seems OK but I don't get DMP data. If I disable DMP in config.h I can at least see accelerometer and gyro data.
Here is the link to the hoverboard telegram group: https://t.me/joinchat/BHWO_RKu2LT5ZxEkvUB8uw
My nickname is Candas there
@ 2com68 ΠΏΠΎΡ ΠΎΠΆΠ΅ Ρ Π²Π°Ρ Π½ΠΎΡΠΌΠ°Π»ΡΠ½Π°Ρ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΈΠ²Π°Π΅ΠΌΠ°Ρ ΠΏΠ»Π°ΡΠ°. ΠΠ°ΡΠΊΠΎΠ»ΡΠΊΠΎ Ρ ΠΏΠΎΠ½ΠΈΠΌΠ°Ρ, Π²Π°ΠΌ Π½ΡΠΆΠ΅Π½ Π²Π°ΡΠΈΠ°Π½Ρ Hovercar. ΠΡΠΎ ΡΠ°Π±ΠΎΡΠ°Π΅Ρ Ρ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ΠΌ ΠΌΠ°ΡΠ΅ΡΠΈΠ½ΡΠΊΠΎΠΉ ΠΏΠ»Π°ΡΡ ΠΈ ΠΎΠ΄Π½ΠΎΠΉ Π±ΠΎΠΊΠΎΠ²ΠΎΠΉ ΠΏΠ°Π½Π΅Π»ΠΈ, ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½Π½ΠΎΠΉ ΡΠΏΡΠ°Π²Π° (ΠΊΠΎΡΠΎΡΠΊΠΈΠΉ ΠΊΠ°Π±Π΅Π»Ρ). Π‘Ρ Π΅ΠΌΠ°:
ΠΡΠΎΡΠΈΠ²ΠΊΠ° ΠΌΠ°ΡΠ΅ΡΠΈΠ½ΡΠΊΠΎΠΉ ΠΏΠ»Π°ΡΡ:
- Π Π°ΡΠΊΠΎΠΌΠΌΠ΅Π½ΡΠΈΡΡΠΉΡΠ΅ VARIANT_HOVERCAR Π² platformio.ini, ΡΠΎΠ±Π΅ΡΠΈΡΠ΅ ΠΈ ΠΏΡΠΎΡΠ΅ΠΉΡΠ΅
ΠΡΠΎΡΠΈΠ²ΠΊΠ° ΡΠ΅ΡΠ²Π°Π½ΡΠ°:
- Π Π°ΡΠΊΠΎΠΌΠΌΠ΅Π½ΡΠΈΡΡΠΉΡΠ΅ VARIANT_HOVERCAR Π² platformio.ini, ΡΠΎΠ±Π΅ΡΠΈΡΠ΅ ΠΈ ΠΏΡΠΎΡΠ΅ΠΉΡΠ΅
Hello. I downloaded the firmware from the specified link. As I understand it, the automatic calibration of the handles is disabled by default? Tell me what changes I should make to enable automatic calibration. At what point do I need to make changes to connect the side board and get i-bus control? I built the firmware without making any changes. I installed the firmware in the motherboard and side board. The motherboard is turned on, but you can't turn on auto-calibration mode.
Hey @EmanuelFeru, I followed all the steps to get sideboard data (GD32F130C6T6 with MPU-6050A). I unlocked the board and got it flashed. However, when I monitored Euler value I got only zeros.
When I run a self-test, I get this result
Any idea what's causing this ? Thanks for your help Cheers π
PS: After the flash, I have a steady green LED light.