Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gen 2.1.1 #76

Open
Freshwater123 opened this issue Mar 23, 2024 · 26 comments
Open

Gen 2.1.1 #76

Freshwater123 opened this issue Mar 23, 2024 · 26 comments

Comments

@Freshwater123
Copy link

I got 2x 2.1.1 hoverboards. I have unlocked the boards but getting errors when i try to write to them. Tried both STM Util and STM Cube prog with same failures leading me to believe it's not a software problem

Namnlös

@AILIFE4798
Copy link

use pyocd

@RoboDurden
Copy link
Owner

RoboDurden commented Mar 24, 2024

@Freshwater123
Copy link
Author

Try autoflash.bat

https://github.com/RoboDurden/Hoverboard-Firmware-Hack-Gen2.x/wiki/Flash-via-st%E2%80%90flash.exe

Cool, that seemed to do it. Thanks!

@Freshwater123
Copy link
Author

Freshwater123 commented Apr 17, 2024

Namnlös

Hey! Was gonna connect an RC receiver and went with your ESP32_PPM Arduino code for my Arduino mini D1 (Clone) and got this message. Also could we run the Arduino mini from the hoverboard somehow so we dont need a powerbank ?

@I-hate-2FA
Copy link

esp8266(d1 mini) only have one serial port, but that is enough for ppm to serial
im not sure if hardware timer on the esp is used to decode pwm/ppm if not it will work on esp8266
you can power the esp from the 5v supply or the 3.3v supply on the hoverboard, both is rated for 1a and only less then 100ma is used, but esp8266 is power hungry and excessive heat will be generated

@RoboDurden
Copy link
Owner

You should not call HoverSetupEsp32 when you have an ESP8266. HoverSetupArduino might work with SoftwareSerial.

#ifdef ESP32
  #define oSerialHover Serial1    // ESP32
#else
  #include <SoftwareSerial.h>    // not compatible with RCReceiver because of interrupt conflicts.
  SoftwareSerial oSerialHover(9,8); // RX, TX 
  //#define oSerialHover Serial    // Arduino
#endif

@I-hate-2FA
Copy link

only 1 serial is used so why not just use the hardware serial

@RoboDurden
Copy link
Owner

normally used for debug log output to Arduino console..

@Freshwater123
Copy link
Author

Ah okey, saw you used the mini in your picture so assumed it was compatible with the code

image

@I-hate-2FA
Copy link

A esp32s2 and esp8266 is very different

@Freshwater123
Copy link
Author

Yes, my lack of knowledge on the matter

@pacraf
Copy link

pacraf commented May 3, 2024

I haven't been here for few months and so many changes :)
Anyone can help with issue that when I compile for this GEN2.1.1 (former 2_0) the simplest dummy firmware in keil, then motor shakes (I was not able to reconnect colors of motor to get it spin)
BUT when I download ready to test ](hoverboard 2.1.1 master Dummy.bin)
it works normally

my settings in keil should be fine (as I am able to generate for board version 2.1.8 without problem)

the only change is here
#define LAYOUT 1 //8 = 2.1.8 1=2.1.1

and I have this shaking behavior

@RoboDurden
Copy link
Owner

As i am currently working with my 2.1.4 testsetup i quickly tested RemoteDummy and motor is spinning nicely as expected:

//#define REMOTE_AUTODETECT		// !! highly experimental 
				// ONLY test with 1-2A constant current power supply !!!!
				// will drive the motor without hall input to detect the hall pins..
				// outputs ascii to uart 19200 baud to TX=PB6 , RX=PB7

#ifdef REMOTE_AUTODETECT
	
	#define HAS_USART0	// tx=PB6,rx=PB7	uncomment to connect via 19200 baud serial
	//#define HAS_USART1	// tx=PA2,rx=PA3	uncomment to connect via 19200 baud serial

	#define SINGLE
	#define MASTER_OR_SINGLE
	#define BAT_CELLS         	6        // battery number of cells. Normal Hoverboard battery: 10s
	#define SPEED_COEFFICIENT   -1
	#define STEER_COEFFICIENT   1
	//#define CHECK_BUTTON		// disable = add '//' if you use a slave board as master
#else

	// LAYOUT_2_X is used in defines.h
	#ifdef GD32F130		// TARGET = 1
		#define LAYOUT 4
		#define LAYOUT_SUB 1	// Layout 2.1.7 exisits as 2.1.7.0 and 2.1.7.1
	#elif GD32F103		// TARGET = 2
		#define LAYOUT 1
	#elif GD32E230		// TARGET = 3
		#define LAYOUT 1
	#elif MM32SPIN05	// TARGET = 4
		#define LAYOUT 1
	#endif

	//#define MASTER		// uncomment for MASTER firmware. Choose USART0_MASTERSLAVE or USART1_MASTERSLAVE in your defines_2-?.h file
	//#define SLAVE			// uncomment for SLAVE firmware. Choose USART0_MASTERSLAVE or USART1_MASTERSLAVE in your defines_2-?.h file
	#define SINGLE			// uncomment if firmware is for single board and no master-slave dual board setup

	#define BAT_CELLS         	6        // battery number of cells. Normal Hoverboard battery: 10s

	#if defined(MASTER) || defined(SINGLE)
		#define MASTER_OR_SINGLE
		
		#define REMOTE_DUMMY
		//#define REMOTE_UART
		//#define REMOTE_UARTBUS	// ESP32 as master and multiple boards as multiple slaves ESP.tx-Hovers.rx and ESP.rx-Hovers.tx
		//#define REMOTE_CRSF		// https://github.com/RoboDurden/Hoverboard-Firmware-Hack-Gen2.x/issues/26
		
		#ifdef REMOTE_UARTBUS
			#define SLAVE_ID	1		// must be unique for all hoverboards connected to the bus
		#endif

		#define TEST_HALL2LED	// led the 3-led panel blink according to the hall sensors
		//#define DEBUG_LED		// uncomment to activate DEBUG_LedSet(bSet,iColor) macro. iCol: 0=green, 1=organge, 2=red

		#define SPEED_COEFFICIENT   -1
		#define STEER_COEFFICIENT   1
		
		#define CHECK_BUTTON		// disable = add '//' if you use a slave board as master
	#endif
#endif

@RoboDurden
Copy link
Owner

Sure that target is set to GD32F130 ?
Maybe i uploaded keil project set to GD32E230 :-(

@pacraf
Copy link

pacraf commented May 3, 2024

@RoboDurden target is selected GD32130
I reloaded project to keil (downloaded fresh from repo)

now whatever I try to compile, I see error:

Build started: Project: Hoverboard
*** Using Compiler 'V6.19', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin'
Build target 'GD32F130'
compiling setup.c...
compiling bldc.c...
compiling main.c...
compiling led.c...
compiling it.c...
compiling remoteUart.c...
compiling remoteCrsf.c...
compiling remoteDummy.c...
compiling remoteUartBus.c...
compiling commsMasterSlave.c...
compiling RemoteAutodetect.c...
compiling gd32f1x0_adc.c...
compiling gd32f1x0_dbg.c...
compiling gd32f1x0_dma.c...
compiling gd32f1x0_fwdgt.c...
compiling gd32f1x0_gpio.c...
compiling gd32f1x0_i2c.c...
RTE/Device/GD32F130C8/gd32f1x0_misc.c(68): error: no member named 'IPR' in 'NVIC_Type'
NVIC->IPR[nvic_irq] = (uint8_t)temp_priority;
~~~~ ^
1 error generated.
compiling gd32f1x0_misc.c...
compiling gd32f1x0_pmu.c...
compiling gd32f1x0_syscfg.c...
compiling gd32f1x0_rcu.c...
compiling gd32f1x0_timer.c...
compiling gd32f1x0_wwdgt.c...
compiling gd32f1x0_usart.c...
compiling system_gd32f1x0.c...
".\Objects\Hoverboard.axf" - 1 Error(s), 0 Warning(s).
Target not created.
Build Time Elapsed: 00:00:02

my config is
image
image

image

what is soo strange for me, is that I still can successfully compile old project from (lets say september... )
I do not see any differences in options. but this error - maybe it says something obvious for you?

@RoboDurden
Copy link
Owner

Yes you need to doubleclick on the error and replace ->IPR with ->IP.
or update your Keil packs..
Old packs had ->IP , new pack has ->IPR

@pacraf
Copy link

pacraf commented May 3, 2024 via email

@Freshwater123
Copy link
Author

@pacraf Did you get that remote controlled mower to work with 2.1.1?

@pacraf
Copy link

pacraf commented May 12, 2024 via email

@Freshwater123
Copy link
Author

Freshwater123 commented May 15, 2024

Gotten stuck.

  • Flashed Master Uart + Slave with Autoflash, thus did no mods to the code.

  • Flashed the correct ESP32 arduino with the "ESP32_PPM" (again did no mods) and check in Arduino that it reads the input from the RC receiver. Soldered the correct ard pins to the "Remote" on the Master side.

Turn it on and get no lights that turns on except on the RC receiver. Nothing happens when i push the throttle (Yes, RC trans paired with receiver)

Anyone got any suggestions ?

@RoboDurden
Copy link
Owner

Always first flash the dummy binary to see if motor is spinning.
Then flash remoteUart or RemoteUartBus and testspeed.ino with the uartBus define uncommented or not.
Finally try the ppm ino.

Repository owner deleted a comment from MathMyne May 16, 2024
@Freshwater123
Copy link
Author

Freshwater123 commented May 20, 2024

Been banging my head against my hoverboard for awhile trying to figure this out. Now found something odd, when i run a simple arduino code it reads PPM signal fine. But when i use RoboDurdens "ESP32_PPM" i get "dead RClink" in the monitor, see pictures

Is this why i can't get my boards to run when it's all connected correctly?

1

2

@RoboDurden
Copy link
Owner

Don't ask me for help on PPM. I do not care for these old remote controls.

@Freshwater123
Copy link
Author

I didn't ask you for help, this is a open forum. Anyone who wants to can answer or noone

@pacraf
Copy link

pacraf commented May 20, 2024 via email

@pacraf
Copy link

pacraf commented May 20, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants