Git Product home page Git Product logo

Comments (10)

fender90 avatar fender90 commented on August 15, 2024 2

yes, the configuration is the same.
If you are using arduino or bluepill I'd recommend using UART2 or UART3, baud rate on software serial is limited

So just leaving the baud rate at 26315 and setting the #define CONTROL_TYPE USART3_CONTROLLED

Thanks will try and write the results :-)

from bipropellant-hoverboard-firmware.

p-h-a-i-l avatar p-h-a-i-l commented on August 15, 2024 1

yes, the configuration is the same.
If you are using arduino or bluepill I'd recommend using UART2 or UART3, baud rate on software serial is limited

from bipropellant-hoverboard-firmware.

p-h-a-i-l avatar p-h-a-i-l commented on August 15, 2024 1

115200 is good, the default baud rate is for communication to the sensor boards.

from bipropellant-hoverboard-firmware.

btsimonh avatar btsimonh commented on August 15, 2024

if using software serial, leave the software serial baud rate at 9600.
the 52177 is for the sensor boards, but it should auto sense this if using the 'hoverboard' env in platform.io.

from bipropellant-hoverboard-firmware.

p-h-a-i-l avatar p-h-a-i-l commented on August 15, 2024

Hi guys. I've got a board that is based on GD chip
Has anyone managed to run the firmware on these boards?

Yes, I got both ST and GD boards in use.

Could you advice on how to configure it properly?

How do you want to control the baord? I guess you want to use the sensor boards (hoverboard mode) since you are talking about the baud rate below.)

I've got several theories but it would be great is someone could confirm.
As mentioned in config file the baud rate for GD chips is 52177

The baud rate applies to the chips on the sensor boards.

// thoery says this is the only thing you need to change.... #define CONTROL_TYPE SOFTWARE_SERIAL_A2_A3 //////////////////////////////////////////////////////////

So i need to change the baud rate to 52177 in

// ############################### SOFTWARE SERIAL ############################### // // there should now be a free choice of serial GPIO pins #define SOFTWARE_SERIAL_BAUD 52177

Software serial can be used as an additional serial connection to communicate to a PC or microcontroller when bot UART cables are in use. So the baud rate there is not the baud rate needed to communicate to the sensor boards

The second option is to select
// thoery says this is the only thing you need to change.... #define USART3_CONTROLLED //////////////////////////////////////////////////////////

and to change the baud rate in
// #define SERIAL_USART3_IT #define USART3_BAUD 52177 // UART baud rate

yes, when connecting to the sensor boards

from bipropellant-hoverboard-firmware.

fender90 avatar fender90 commented on August 15, 2024

Hi guys. I've got a board that is based on GD chip
Has anyone managed to run the firmware on these boards?

Yes, I got both ST and GD boards in use.

Could you advice on how to configure it properly?

How do you want to control the baord? I guess you want to use the sensor boards (hoverboard mode) since you are talking about the baud rate below.)

I've got several theories but it would be great is someone could confirm.
As mentioned in config file the baud rate for GD chips is 52177

The baud rate applies to the chips on the sensor boards.

// thoery says this is the only thing you need to change.... #define CONTROL_TYPE SOFTWARE_SERIAL_A2_A3 //////////////////////////////////////////////////////////
So i need to change the baud rate to 52177 in
// ############################### SOFTWARE SERIAL ############################### // // there should now be a free choice of serial GPIO pins #define SOFTWARE_SERIAL_BAUD 52177

Software serial can be used as an additional serial connection to communicate to a PC or microcontroller when bot UART cables are in use. So the baud rate there is not the baud rate needed to communicate to the sensor boards

The second option is to select
// thoery says this is the only thing you need to change.... #define USART3_CONTROLLED //////////////////////////////////////////////////////////
and to change the baud rate in
// #define SERIAL_USART3_IT #define USART3_BAUD 52177 // UART baud rate

yes, when connecting to the sensor boards

Thanks for your reply
Oh, I missed that the baud rate was 52177 for sensor boards only
I want to control the board via software serial with Arduino and move to Blue Pill in future. I will not use sensor boards at all.
Is the configuration for GD boards the same as for STM?

from bipropellant-hoverboard-firmware.

fender90 avatar fender90 commented on August 15, 2024

Sorry for another dumb question. What baud rate should I use in Arduino sketch?
115200?
there is a baud rate set in config.h
#ifndef USART3_BAUD #define USART3_BAUD 26315

this baud rate is not supported by arduino, I can use it with BluePill
What would be the best for Arduino?

from bipropellant-hoverboard-firmware.

fender90 avatar fender90 commented on August 15, 2024

115200 is good, the default baud rate is for communication to the sensor boards.

So I should change the baud rate in
#ifndef USART3_BAUD #define USART3_BAUD 115200 ?

Me and my friend tried using configuration with
#define CONTROL_TYPE USART3_CONTROLLED and baud rate 9600 and 115200 but didn't get any result

we changed the control type to CONTROL_TYPE SOFTWARE_SERIAL_A2_A3 and were able to control the wheels on some GD based boards.
Actually we are getting some very strange results with this option
We have boards with GD32F103 chips. We are using the same firmware builds on both of them and the same Arduino sketch from HoverboardAPI examples
https://github.com/bipropellant/bipropellant-hoverboard-api/blob/master/examples/readSpeed/readSpeed.ino

The wheel on the first board runs OK and we get data in Terminal
https://www.youtube.com/watch?v=HgDN6uisttc

But the second wheels runs with interruptions
https://www.youtube.com/watch?feature=youtu.be&v=L-sIF51fuGM

we even tried to reboot the board as shown in the video but the motor still spins with interruptions

from bipropellant-hoverboard-firmware.

p-h-a-i-l avatar p-h-a-i-l commented on August 15, 2024

So I should change the baud rate in
#ifndef USART3_BAUD #define USART3_BAUD 115200 ?

yes

Me and my friend tried using configuration with
#define CONTROL_TYPE USART3_CONTROLLED and baud rate 9600 and 115200 but didn't get any result

I just noticed that other defaults do not work with USART3_CONTROLLED. (I'm always using the environments from platformio.ini so I haven't noticed problems with config.h.

you also need to set

    #define SERIAL_USART3_IT
    #define USART3_BAUD 115200 
    #define USART3_WORDLENGTH UART_WORDLENGTH_8B   
    #define  SERIAL_USART_IT_BUFFERTYPE unsigned char

we changed the control type to CONTROL_TYPE SOFTWARE_SERIAL_A2_A3 and were able to control the wheels on some GD based boards.
Actually we are getting some very strange results with this option
We have boards with GD32F103 chips. We are using the same firmware builds on both of them and the same Arduino sketch from HoverboardAPI examples
https://github.com/bipropellant/bipropellant-hoverboard-api/blob/master/examples/readSpeed/readSpeed.ino

The wheel on the first board runs OK and we get data in Terminal
https://www.youtube.com/watch?v=HgDN6uisttc

But the second wheels runs with interruptions
https://www.youtube.com/watch?feature=youtu.be&v=L-sIF51fuGM

we even tried to reboot the board as shown in the video but the motor still spins with interruptions

Might be EMI related. Short wires, electrical filters, shielding..

from bipropellant-hoverboard-firmware.

p-h-a-i-l avatar p-h-a-i-l commented on August 15, 2024

#70 should also fix the config problems..

from bipropellant-hoverboard-firmware.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.