Thank you, robo durden! I used your online compiler for the original Nicklas firmware and worked like a charm with 2 potentiometers. Next days, I will use your firmware to control the boards with Arduino/Raspberry Pi via serial communication. Thank you for all the effort you put in this and for all the details and explanation. Keep up the good work!
Superb ! Everything was clear. I started by watching this video for compiling... Then read all the comments... Found your other videos... And just finished programming my board with the Motor test. I thank you 1000x for making this process so easy ! Donation coming your way now :) for your work info and keeping Open-Source alive. Greetings and BIG THANKS ! Peter Lunk
Great work! I love people like you that act as a link between us in the real world and the ones inside the "nerd garden". I tested your online compiler with the ADC setup and it worked as a charm. However when I tried to compile any of the PPM presets I always got errors and warnings. One more problem... To morrow I have to explain to my kids that their hoverboard is in pieces and the will not have it back :-)
When compilation fails I output the error. With ppm you need to uncomment the line #define PPM_NUM_CHANNELS 6 // total number of PPM channels to receive, even if they are not used. My presets are made on the source code of others... As I said in the video you should always search for XXX and look what changes my presets have made. Regarding your kids: build something really useful out of that fun product :-)
@@robodurden I get this warnings... src/main.c: In function 'main': src/main.c:235:5: warning: implicit declaration of function 'PPM_Init'; did you mean 'HAL_Init'? [-Wimplicit-function-declaration] PPM_Init(); ^~~~~~~~ HAL_Init src/main.c:335:13: warning: unused variable 'scale' [-Wunused-variable] float scale = ppm_captured_value[2] / 1000.0f; ^~~~~ src/stm32f1xx_it.c: In function 'EXTI3_IRQHandler': src/stm32f1xx_it.c:229:5: warning: implicit declaration of function 'PPM_ISR_Callback'; did you mean 'PPM_SysTick_Callback'? [-Wimplicit-function-declaration] PPM_ISR_Callback(); ^~~~~~~~~~~~~~~~ PPM_SysTick_Callback
you prolly dont give a shit but does anybody know a tool to get back into an Instagram account?? I stupidly lost my account password. I would appreciate any tricks you can offer me
@Isaac Lian I really appreciate your reply. I found the site through google and Im waiting for the hacking stuff now. Takes a while so I will reply here later when my account password hopefully is recovered.
Hi :) I've got a question for you. I'm building an electric scooter for my niece based on Emanuel Feru's software as it seems the best so far. I'm wondering if it's possible to change the code a bit to achieve field weakening but only if a button is pressed (or a key turned more accurately) as I intend to drive it now and then aswell and I'd like to go a little faster^^ I noticed there is a possibility to use right sensor cables as buttons with #define SUPPORT_BUTTONS_RIGHT. However I'm not sure how the code is supposed to look like. Based on some lines in NiklausFauth's code I came up with something like this: if (button1==1) { #define FIELD_WEAK_ENA 1 } else { #define FIELD_WEAK_ENA 0 } Do you think it will work? And if the codes structure is fine, do you think it is better to simply turn on/off field weakening variable or maybe it's safer to just change potentiometer range to make it go slower without actually modifying motor's parameters mid-drive? I'm using a potentiometer which gives 2,82 volts top, which equals to adc1_max=3472. If the value of adc1_max variable would rise to, for example, 6000 and the potis best is 3472, the max speed should be a little above half of what the motors can deliver. So the code would look like this: if (button1==1) { #define ADC1_MAX 3472 } else { #define ADC1_MAX 6000 } What do you think? How would you solve it yourself? Thanks for the videos and the compiler. Cheers :))
I have tried compiling Bipropellant firmware through the online tool but it gives the following error. The only change I have made this far is low voltage values in config.h. src/protocolfunctions.c: In function 'setup_protocol': src/protocolfunctions.c:356:5: error: 'protocol_GetTick' undeclared (first use in this function); did you mean 'protocol_tick'? protocol_GetTick = HAL_GetTick; ^~~~~~~~~~~~~~~~ protocol_tick src/protocolfunctions.c:356:5: note: each undeclared identifier is reported only once for each function it appears in src/protocolfunctions.c:357:5: error: 'protocol_Delay' undeclared (first use in this function); did you mean 'protocol_enable'? protocol_Delay = HAL_Delay; ^~~~~~~~~~~~~~ protocol_enable src/protocolfunctions.c:358:5: error: 'protocol_SystemReset' undeclared (first use in this function); did you mean 'protocol_byte'? protocol_SystemReset =HAL_NVIC_SystemReset; ^~~~~~~~~~~~~~~~~~~~ protocol_byte make: *** [build/protocolfunctions.o] Error 1
Mine won't turn off and the speed of the motors is not the same. Won't turn either. Seems a software problem because before flashing the board it was working just fine. Can you help me, please? I want to put the motors on my wheelchair.
What firmware did you compile ? First always flash the original Niklas fauth firmware with no changes and see the test mode. Just as i did in this video.
@@robodurden The only firmware that partially works is github.com/p-h-a-i-l/hoverboard-firmware-hack/tree/bewegungsappar.at/build . With the original Niklas fauth firmware, the board just turns on then off. If I tie the wires together the board constantly turns on then off
@@Diygenes You flashed the original Fauth firmware with no changes, disconnect both motors so only the 36 Volt battery and the on/off button is connected to the board and when you push the onoff button once the boards gets on but immediately turns off again ? Upload a 60 seconds youtube video !
@@robodurdenI'm going to make a video, thanks for your response! I think I missed something. My battery is a 24 volt one, but the software is for a 36 volt unit
Then of course the firmware will turn off. But usually only after the speed comes back to zero. So you should have been able to at least get the motor running once.
digger! wie geil :-D Du rettest damit mein Projekt!!! Ich hab die zeit nicht für die Linux kacke... und du hast mich grade drauf gebracht warum nix geht mit meiner IDE XD ich dachte ich bin der dumme... aber den deutschen hört man dir an :-D also spaar ich mir das Englische grad :-P schönen gruß und nochmal danke aus dem Sauerland
Very well done tutorial and thank you for your compiler!! I had a question about steering with potentiometers that I REALLY hope you can answer. When using the steer pot, it only incrementally increases the direction it turns left. It wont go the other way. Is there any code I can change to make it turn both left and right?
You should compile the Niclas ADC armchair preset. Attach a USB uart module to get the debug output. First two number are adc1 and adc2. Take a look at main.c to learn how the steer adc effects the speed of left motor and right motor.
@@robodurden Thank you for such a swift response!! Changing the Steer_Coefficient from - to + only changes which wheel rotates, but it is still only able to go in one direction. Do you know if there is a way to make each pot associated with one wheel's speed independent of the other? I don't know if you've already addressed this somewhere else or not. Thank you for your time!
@@dmahoney23 Tale a close look at the main.c and learn how the two adc values and up as speed left and speed right. If course you can modify main.c so speed adc is only for speed left and steer adc will be for speed right.
hello, you do not have the old version of the firmware left, the new version with git when flashing constantly crashes with an error of three signals when flashing usart (Serial communication timeout)
You can get GND on many ports, including the flash header. 3.3V is only on the flash header available. See the nice photo with all the ports and the flash header on the GitHub page :-)
Ahh, so the ADC (breadboard) is going to one of the existing cables that would have gone to the tilt sensor board. You are using the "flash" pins to power the ADC and potentiometer. Thank you for posting this video. Any thought about posting your web compiler source code on GitHub?
My online compiler is built on only a few lines php code that executes the makefile via command line. But I already have built on that code for a free Arduino font compiler: pionierland.de/fonts/ Maybe I will put my code on GitHub so others can copy and paste the essential lines of code into their online compilers. I do not yet see the opportunity to build a universal online compiler for all GitHub projects that offer a makefile.
having trouble with potentiometer controls(ADC), motors not moving when turning the pots. I have selected the ###### CONTROL VIA TWO POTENTIOMETERS ###### but no luck. Am i missing something here???
Connect a Usb-uart module and read the debug output. And compile and install the test mode first to see that board and motors are okay. Be sure to only use 3.3 Volt vor the potentiometers ! Same for the usb-uart device. Rx pin might output 5 volt !
Great job. I'm excited. I have a motor mounted on a bicycle but I don't know what parameters to touch to just drive one motor (cancel the other one) and drive speed with an e-bike accelerator or analog potentiometer. Could you help me? Many thanks.
Choose the original Niklas firmware and the Bobbycar ADC preset. That is exactly what I show in this video. Simply connect only one motor. Should work :-)
@robo_durden great job on the compiler and the firmware. Would you consider adding some comments to the hoverserial.ino example? I am not a complete n00b but frankly I am not 100% sure on what the loop does and not too confident messing with it since they are actual motors on this thing. When I connect arduino to hoverboard with you code running on it, I don't understand the behavior of the motors, seems completely random. My project is based around a blue_pill connected to bno055 , a pwm receiver and well the hoverboard. Once I understand how to interact with the motors from the arduino sketch I am hoping to get the thing to stand still and be able to remote control it before I move on to computer vision and mapping. Any help is much appreciated.
well then simply add the line Serial.println(iSpeed);; before Send(iSpeed,0); to see what speed is sent to the hoverboard. The default settins are int iSpeedMax = 1000; // for SPEED_IS_KMH in config.h use 60 for max speed of 6.0 km/h int iSpeedDelta = 20; // for SPEED_IS_KMH in config.h use 2 for speed steps of 0.2 km/h So +1000 should be fast forward and -1000 fast backwards. If you want to send a target speed in kmh, you have to change these defines and activate the SPPED_IS_KMH in the config.h
Usually, used boards have the stm32F103 or the compatible gd32F103. I could add this Niklas fork to my compiler: github.com/cloidnerux/hoverboard-firmware-hack
Emanuel Feru was also interested in these new boards: github.com/NiklasFauth/hoverboard-firmware-hack/issues/97 Tell me when/if he succeeded to port his FOC firmware.
It seems that Emanuel succeeded at least with his sinusoidal mode: github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/issues/46 Juodumas wrote: Another spare board that I had is with AT32F403 CPU, so I am currently using it with sinusoidal + voltage. It works perfectly with impressive top speed, but unfortunately current limiting does not work, so I am not sure if it's safe to introduce support for this board to the main repo? When I get a chance, I will try FOC with the changes in #81.
@@robodurden thank you so much for your responses, I'm trying to start flashing and reprogram by using st link, I found that it can be done with github.com/bipropellant/bipropellant-hoverboard-firmware/issues/67#issuecomment-516657520 but sincerely as my first time using the st link and a similar stm32 mcu, it's very hard to understand what the steps I should take. I don't think it follows the step you took on your project(using st32 software). Best would be if there's any video describring the steps detailed.
@@TheLordbruh I suggest you will make such a video once you succeed :-) I am a stm32 beginner as well. And i strongly dislike all this linux commandline nonsense..
Apart from different clock they are said to be compatible. In the beginning I succeeded installing an IDE and uploading a blink sketch to a blue pill. Next step would have been to upload the blink code to the hoverboard controller. The some code with uart debug messages. And then the original Niklas firmware. Inside China you can buy blue pills with the GD32 instead of the STM32. So step by step :-)
Hello, you seem to be the only guy who can explain how to make it work, but nevertheless I could not get mine to work. I opened your online compiler chose RoboDurden/hoverboard-firmware-hack (as I had no success with compiling other methods) loaded SIMPLE BOBBYCAR, CONTROL_PPM downloaded .bin file flashed downloaded .bin with st-link utility (successfully programmed) connected RC receiver to +5 and GND of the hall sensor connected signal pin of my RE receiver to all possible wires (blue and green of both uarts) but my motor never moved. I am using 5065BLDC motor with no hall sensor (may it be the reason for not working?) Do you have any suggestions what I am doing wrong?
With no hall sensors connected the firmware will not work. You should only use this board with the standard hoverboard motors or possibly ebike motors. When I disconnect the hall sensor cables in my setup, the controller will not work. So should your setup not work. With no hall sensors go with an ordinary ESC. Or try a cheap $11 ebike controller that does not need hall sensors. And anyway when something does not work: always read the serial debug output.
@@robodurden Thank you for a quick answer. That's good to hear that it is not supposed to work without hall sensors. I will install an original wheel to test it out, I just don't have access for it right now. I have other ESCs also, I just wanted to get hoverboard ESC to work. Thanks for reply!
I have a hoverboard Skymaster 11 double wheels, the board turns on and after a while it stops working, I disconnect plug from batery to electronics. I take multimetr, and there is a short circuit on the electronics. I take schorcut plus with the minus in electronics plug , after connecting electronic devices it works again, what could be wrong?
do not really understand your text. If you have a shortcut from plus to minus then mostly one pair of mosfets burned. So test the two left pins of the 12 mosfet for a shortcut. And watch my mosfet repair videos.. When two mosfet burned then the connections of the two left pins to the circuit board might have also burned and been interrupted. Then there is no longer a short cut from plus to minus but the attached motor cable will not work..
I have a hoverboard Skymaster 11 double wheels, the board turns on and after a while it stops working, I disconnect plug from batery to electronics. I take multimetr, and there is a shortcut on the electronics. I take schorcut plus with the minus in electronics plug, i take multimetr and i do not have schortcut , after connecting electronic devices it works again, what could be wrong?
I have a problem, and that is that after entering my code on the motherboard, the board turns on but does not turn off, that is, it simulates turning off but the red led stays on and you have to disconnect the battery so that it turns off and works again, I have only touched the speed, and the ADC control
If the board also turns on without pushing the on-button, then probably the TO220 transistor is broken and the board always on. Check my second repair video where i show how to test that transistor.
@@robodurden it was not the case, in main.c you have to modify where it puts poweroff, you have to replace the variable CONTROL_MOTOR_TEST by the variable ADC_MIN. This means that the plate does not stay on after pressing the shutdown button.
You only need two potentiometers and the armchair ADC preset at my online compiler :-) for reverse I would advice a digital communication like my uart fork. For analog ADC control you might to adjust the main.c code. Generally, +1000 is full speed forward and -1000 is full speed backwards. The ADC control only maps to 0-1000 and these invert defines make it 0- -1000. But in the main.c you are free to map 0-1000 onto -1000 -+1000. Have a look at the code on my online controller.
Awesome! How exactly are the potentiometers connected to the main board? What are the values of the potentiometers & any pull-up or pull-down resistors?
@@reggieguevara8025 read my other answers here! If backwards is not already supported by the armchair preset I might add a Boolean bBackwards to the main.c and two time variables (or counter values) iTimeFullLeft and iTimeFullRight. Then you control bBackwards by: if ((speed-500) && (iTimeFullRight>0) ) { bBackwards=true; iTimeFullRight=iTimeFullLeft=0;} To set iTimeFullRight: if (steer>950) iTimeFullRight=iNow; Code to disable bBackwards would be "speed potentiometer must be zero and first full left then full right within 500 milliseconds :-) So a digital command to change from forward to backwards. But that depends how often you need backwards. With my solar car (see next video) I only need backwards on a parking lot..
Hy, I get 4 slow beeps after uploading the software to Hoverboard. I used EFeru at RoboDurden compiler and choosing pwm. I connected 6ch receiver to 3.3v and GND from hoverboard. CH1 to PA2, CH2 to PA3. Also Im using 2x 20v lithium tool battery in series for 40v (do i need to make a change in software?) Thnx.
6ch receiver sound like ppm and not pwm. So you might choose VARIANT_PPM. Also search main.c for the code that is beeping out the error code. Then you know what 4 slow beeps mean. I never used pwm or ppm.
@robodurden Hy, and thank you for your fast reply. I did manage to get it to work, I made some changes before compiling and had to connect to the right cable instead of left. I tried different types of controls: like VLT_mode, SPD_mode and TRQ_mode. But i get violent and fast movement in the beginning of the joystick movement, and it's slower when I move the joystick 🕹 further. May that be the reason because I use only 3.3V for the receiver? Should I use 5V, and do you know what would be the best place to source it from the hoverboard mainboard.
@@mariomlinaric9861 5V would have killed the adc inputs of the long cable. The short cable is 5VT but you should not power your rc receiver with 5V. Connect a UART dongle to short cable and get serial debug output to see how your joystick movements translate to speed steer -1000 - +1000. I guess this is only a stupid fun project. Watch my tutorials and stop asking for personal help.
Hi, I am getting the following error when compiling with PPM. Src/control.c:21:29: error: 'PPM_NUM_CHANNELS' undeclared here (not in a function); did you mean 'IS_TIM_CHANNELS'? uint16_t ppm_captured_value[PPM_NUM_CHANNELS + 1] = {500, 500}; ^~~~~~~~~~~~~~~~ IS_TIM_CHANNELS make: *** [build/control.o] Error 1 I think #define PPM_NUM_CHANNELS 6 should also be enabled.
I don't think that this would be worth a try. Because it probably won't be successful and not worthful either. But try you can: stackoverflow.com/questions/43845767/dump-the-current-firmware-from-an-stm32-microcontroller
I'm building an electric scooter and i'm using Feru's firmware. I'd like to use electric bike throttle, and it's working, but there is some interference with ADC1 and ADC2 (i used variant_adc). If i connect both cables to throttle, the ADC values are not same, i don't know why. I don't need steering, so i disabled it, but it won't help. Is there some way to use just ADC1 without ADC2 or do i have to use both?
In this video i too use the Feru firmware with only one potentiometer for speed (=throttle): ua-cam.com/video/DILzw6RzPkE/v-deo.html You simply leave the steer ADC cable unconnected. Better pull it to ground to prevent static overvoltages because any voltage above 3.3V on the two adc pins/cables can destroy the main processor.
@@robodurden Is it ADC1 for speed and ADC2 for steering? I also like to use motors as electric brake, where i need to connect switch and what value i must change to get it working in Feru's firmware with variant_adc? i tried to use standstill and it works, but if you loose throttle too fast it brakes very strong and suddently. i also tried to use torgue mode, but it will not work, also variant_hovercar will not work, i don't know why.
@@jusubbidiy take a look at the wireing image on our githubs. I think green is speed adc but i may be wrong. A scooter is a 2 wheeler. So one motor for back wheel and a motor for front wheel ? Uplaod a video ! Yes, a switch that will pull down the speed adc to gnd would result in an abrupt stop. You could short cut the throttle with another potentiometer to brake down to a slower speed. Or you could switch from the speed potentionmeter to a capacitor that discharges via a resistor withing 2 seconds to 0. When the throttle is active, the capactior would be charged to the same level as the adc input. Or you abuse the steer potiometer as the brake input and change that analog value in main.c to whatever behavior you like.
@@jusubbidiy You can adjust #define DEFAULT_RATE 480 // 30.0f [-] lower value == slower rate [0, 32767] = [0.0, 2047.9375]. Do NOT make rate negative (>32767) #define DEFAULT_FILTER 6553 // Default for FILTER 0.1f [-] lower value == softer filter [0, 65535] = [0.0 - 1.0]. in the config.h to make the brake to 0 affect the speed more slowly. This however also will affect when want to speed up in a flash. The RATE and FILTER will be used in the main.c here: github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/blob/master/Src/main.c#L254
@@robodurden Blue = ADC1 Green = ADC2 (mine has Grey). Variant_hovercar has #define STANDSTILL_HOLD_ENABLE, i copied this to under variant_adc and used it as brake. It works fine, but you have to loose throttle very gently. I'd like to use #define ELECTRIC_BRAKE_ENABLE, but it will work only with torgue mode and that will not work. I don't know why. That's why i need to use #define CTRL_MOD_REQ VLT_MODE. I make video later today.
Yes the firmware indeed has recuperation ! Don't know why and I haven't yet studied the bldc.c but with my 7s 24V solar car and chain drive (watch my latest video) I can drive as fast as 10 km/h. When I set the speed to zero while driving, the motors brake and a few amps flow back into the battery. Even when I drive downhill at only 3 kmh, the controller manages to step up the motor voltage to charge the battery. With my own fork (see my online compiler) you have the option to set a max_recuperation in order to not brake too abruptly.
A pedal assist sensor :-) It should be possible to detect a periodic current change !! Simply log the current and do a 3 second fft every 5 seconds. Then you should be able to detect a 120-180 Hz pedaling frequency (two pedals per rev). And please share your code on success.
@@robodurden Thank you very much, I have no idea how to do it but I am going to investigate it, I love your projects!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Of course, a $7 pas sensor that is mounted to one pedal crank will be far more responsive and stable then a pure software solution. And if you have a freewheel you would not be able to detect a pedaling before the motor has kicked in :-( If you don't need the steer value you could take that adc input to read the digital hall sensor. But beware that the adc inputs are not 5v tolerant. The hall sensor of these cheap pas however should also work at 3.3v. In the main.c it might need an interrupt to count the risings slopes of the pas sensor. I have no experience with stm32 programming. I am only the guy with the online compiler. You might want to ask Emanuel on his GitHub for help.. It might be best to let an arduino or esp32 read the pas sensor and control the hoverboad controller via uart.
A lot rc esc also run on a STM32F103 (Or F1 processor on a Naze32 board). So you could ask him to Port his blheli to our boards: github.com/bitdump/BLHeli I guess it would only need new pin definitions. And 10s esc are still expensive. But take a look at my other videos where I test such a cheap "bldc controller" that has the chip for sensorless on the board. Simply search AliExpress for "bldc controller".
Thanks for compiler! I'm trying to get serial communication working with usb-to-ttl converter. It sends data to putty, but it's a mess. COM3 and 9600 baud settings are default. Can you help me?
i guess you do not want to control the hoverboard via serial but only want to read the logging data. With the original Niklas firmware that was indeed asc code which should be received with putty. take a look at the config.h at which baud rate the hoverboard is sending. With my firmware and i guess also the firmware from Emanuel, the serial data stream is a c-struct which can not be displayed as an ascii stream. Take a look at our arduino .ino example files on our githubs ..
hello, great tutorial! i have a question, im using 2 hall effect sensors for adc1 and adc2 as throttle and brake/reverse operating them with 5v. I have the problem when i let go of the throttle the board powers down and i have to turn it back on. The adc values are 1033 min and 4095 max would giving the throttles 3.3v rather than 5 fix this? any ideas would be very helpful!
If you let more than 3.3V to the ADC inputs of the controller board you very likely will kill it. When firmware powers down after speed is set to zero this can be the result of a wrong battery voltage defined at the top of config.h
@@robodurden thank you for your quick reply, ive just looked in the battery section and saw : #define BAT_CALIB_ADC 1704 i havent calibrated that yet, could that cause the powering down issue ?
@@Jason-yd6lb you should not need to calibrate the internal adc with #define BAT_CALIB_REAL_VOLTAGE 43.0 // input voltage measured by multimeter
#define BAT_CALIB_ADC 1704 // adc-value measured by mainboard (value nr 5 on UART debug output) but if you keep #define BAT_NUMBER_OF_CELLS 10 // normal Hoverboard battery: 10s but only connect a 7s 24 Volt battery, the firmware will shut down when your throttle is telling the firmware to set speed to 0: #define BAT_LOW_DEAD 3.37 // undervoltage poweroff. (while not driving) [V/cell] If this does not help you should connect the serial debug output and see what the firmware outputs. Do only connect GND, RX and TX to your computer.
@@robodurden thanks for your help good sir, ive just noticed that my cells is set to 12s instead of 10s for some reason (im using normal hoverboard battery) so ill flash that and hope it works :) edit: that did the trick, thanks for your advice!
@@robodurden thanks for the response and I understand and have already looked and I know they exist. What I'm trying to ask is can the motherboard of the hoverboard be programmed to run sensorless motors
ADC2 is speed and ADC1 is steer: raw.githubusercontent.com/NiklasFauth/hoverboard-firmware-hack/master/pinout.png Remember to only connect 3.3V to the potentiometers ! Select the ADC preset for the Niklas firmware at my online compiler. And guys, you should read the GitHub repo !
You should use my fork as it has reliable serial communication. Take a look at my Arduino example code and the main.c of my firmware where I define the response communication sruct: //ROBO begin typedef struct{ int16_t iSpeedL; // 100* km/h int16_t iSpeedR; // 100* km/h uint16_t iHallSkippedL; uint16_t iHallSkippedR; uint16_t iTemp; // °C uint16_t iVolt; // 100* V int16_t iAmpL; // 100* A int16_t iAmpR; // 100* A uint32_t crc; } SerialFeedback; When iAmplL + iAmpR == 0 you can take iVolt as the battery level. Also search in main.c for #ifdef SPEED_IS_KMH long iSpeed = abs(HallData[0].HallSpeed_mm_per_s) > abs(HallData[1].HallSpeed_mm_per_s) ? -HallData[0].HallSpeed_mm_per_s : -HallData[1].HallSpeed_mm_per_s; It should be possible to use HallData[i].HallPosn_mm so the motor speed = cmd2 drives you to the exact position :-)
Hi! Сan anyone help me resolve one issue? I used NiklasFauth / hoverboard-firmware-hack CONTROL_ADC version. I connected simple hall throttle which gives (when powered from 3.3v) 0.8 ... 2.5V. Somehow I need to narrow the range from 0 ... 3.3V (ADC of firmware reaction) to 0.8 ... 2.5V (for moving only forward according to this firmware). I changed #define ADC2_MIN 1215 (its about 1V, if 4095 is equal max 3.3V) and #define ADC2_MAX 3200 (its about 2.5V, if 4095 is equal max 3.3V) lower threshold is working! hoverboard moves only when throttle is slighlty down. but the max speed is still above reachable threshold for throttle on 3.3V. How can I limit the upper limit of the ADC max speed threshold to 2.5V?
God damn it, I just caught my self learning ''programing'' just so to turn on 2 ffffuu wheels - by God, out of anger am about to install damn brushes into ffffuu wheels! Thank you RoboDurden
@@robodurden I don't blame you and I am sorry, thou it's all from a frustration and complicated ''coding'' in which I have no clue! I started making ''ebike'' and I thought I can use Hboard-board and motors-wheels, - out of my ignorance I thought it will be walk in the park,,, but after building the whole bike construction, I now encounter ''software'' problems that am trying to learn :S (and all I need its just forward drive no freaking steering nor freaking zurück) and what would be lovely is when I would let go the ''throttle'' the wheels to spin freely! ...anyhow am learning, and I don't dare asking questions coz there's a lot to learn from your channel. THANK YOU for sharing knowledge.
For E-Bike you might want to use a freewheel sprocket: ua-cam.com/video/ux3u7hCExMk/v-deo.html The motors will not have enough torque without a 1:3 gear ratio. Unless you use both motors and want to drive 50 kmh :-/
@@robodurden (I got it working) ...kindly please, in your opinion which one is the best ''.hex'' file just for forward drive Ebike/Scooter - thank you in advance. Danke tausendmal!
As promised, here is video of my project: ua-cam.com/video/PatJK148ie0/v-deo.html I managed to get Feru's Variant_hovercar working with two throttles. Hand throttle = throttle and thumb throttle = brake. I also make test run, but when i finished it one mosfet blows up (and it's driver Q2CL too). I bought this faulty hoverboard and replaced two mosfets, but now another blow up again. I also noticed that there is high pitch noise coming from mainboard. Earlier i used voltage mode, but now with torque mode this happened. Maeby there was some other faulty components also than mosfets. Maybe drivers?
Very nice project with a lot of love :-) Yes i too have by now lots of used controller boards where a mosfet burned. Have by now new mosfet from China but had not yet the happiness to replace the burned one. Did that once and then simple another mosfet burned. Try measuring the gate voltage before you solder in a new mosfet. I guess it should not exceed 15 Volt or so. I have a video on mosfet repair but i fear it will not really help you. Did the gate pin of the mosfet blow up ? Then it must have been gate over voltage. If one of the others blew up it was over current from the motor ?!
Hi, great tutorial! I trying to control both motors with one potentiometer. I'm using your online-compiler with the RoboDurden/hoverboard-firmware-hack. I encountered 2 issues: 1. I can't get DEBUG_SERIAL_ASCII to work. (It works with the other firmware from NiklasFauth) What do I need to comment out/in? 2. How do I adjust these parameters correctly? #define ADC1_MIN 0 // min ADC1-value while poti at minimum-position (0 - 4095) #define ADC1_ZERO 1100 // ADC1-value while poti at zero-position (0 - 4095) #define ADC1_MAX 4095 // max ADC1-value while poti at maximum-position (0 - 4095) #define ADC1_MULT_NEG 1000.0f // Use 1000.0f to calibrate form MIN to MAX #define ADC1_MULT_POS 1000.0f // Use 1000.0f to calibrate form MIN to MAX My potentiometer goes from 1010 to 3040. I want the wheels to start turning at 1050 and turn at the highest speed at 3040. I don't want the wheels to spin backwards. I only need one direction.
My fork is only good for uart control (download the Arduino .ino from my GitHub). For potentiometers better use the original Niklas firmware with the ADC preset. Like shown in this tutorial, the Bobbycar adc_control only spins in one direction.
@@robodurden Thanks for the response. I got it working yesterday with the original Niklas firmware. The problem was that the analog signal from the potentiometer wasnt good at first. I had to put a 1kOhm pull-down resistor to it.
I have been trying to hacked i would like to have a forward reverse brake and steering but I'm having issues. Could you set it up copy and paste it underneath my message so I can make sure I have the same settings?
No, you have to learn step by step what you are doing. When one step is not working I might help you with that specific step. Start by finally watching this video and repeat the Bobbycar adc preset. And no more 5V to the input cables!
Guten Abend, ich habe eine Frage, vielleicht können Sie mir helfen. Ich versuche schon länger mittels PWM (RC-Empfänger) die Motoren anzusteuern. Alles funktioniert so weit aber der linke Motor wirkt sich auf den rechten aus. Wenn ich diesen blockiere, steigt die Drehzahl rapide an und das ganze Teil fährt mir weg ohne Kontrolle. Blockiere ich den rechten passiert nichts. Haben Sie vielleicht einen Tipp für mich? :) BTW: Vielen Dank für die Videos und den Compiler, das hat mich schon sehr weiter geholfen. Beste Grüße!
egal welche Firmware, immer das selbe. Switche aber jetzt immer zwischen EFeru FOC und Ihrer FOC. Nach dem Flash? Die genau Meldung muss ich raus kopieren. Motoren habe ich schon untereinander getauscht (hab 4 liegen) immer das selbe. Habe aber die 10" Motoren :)
@@thomasgrabner3909 vertausche Mal zwei der Motorphasen bei beiden Motoren. Das Phänomen dass plötzlich die Motoren viel zu schnell laufen kann dadurch bedingt sein. Mir die dicken Kabel Die Hall Kabel weiterhin nach gleichen Farben belassen.
I did the first one it does not seem to be changing for me sorry about the late reply. I'm trying to use the hoverboard motors for my mom's wheelchair to help her be mobile.
Is there any way you can go through the firmware? Set it up to use the Wii nunchuck that way I can go through the entire thing and make sure it matches? Any help would be greatly appreciated.
You have to disable debug output by putting // at the beginning of the definition in config.h : //#define DEBUG_SERIAL_USART3 // right sensor board cable, disable if I2C (nunchuck or lcd) is used! Then it compiles. With a lot warnings but the .bin file should work.
@@speedox3771 pwm is no good for steering and speed. You would need two servo tester. Better take two potentiometers. There is no brake but recuperation. Simply set the speed low and the motors will brake and push energy back into the battery. The label is only for you to remember what settings you used when compiling the firmware. Seems that most of you haven't even watched this video..
Hello I want to use this with only one motor with thorttle e bike It's possible to have information for programming optimized current speed ? Thanks for explaining me
But with a 1000 Watt hub motor you could use both motor drivers of the hoverboard controller in parallel ! For safeness the bldc should be modified that only one hall input drives all 12 mosfets. With such a rear or front hub motor you would benefit from the recuperation and have an electric brake Wich would charge the battery down to about 3 km/h :-)
Robo you are such a strong developer i follow your projects specially hoverboard firmware but i did stuck in the middle of way flashed bipropellant firmware on my hoverboard main pcb seems two side boards also need to be flashed by some firm ware cause it doesnt work! any idea? i compiled and tried Feru version too on github feru has said is workin on side board codes for making a hacked version of firmware but im hoping there is a way right now i be able to use my hoverboard again... ;) p.s. i compiled on your great website :))) 👍👍👍
Sorry i will not help you. I have never tested these sideboards. And i do not really like the idea to put all the parts back together to get a functional hoverboard again, when you can simply buy an original hoverboard controller for less then $20. It may be nice to use the sideboards for new purposes and the Feru firmwares might help for that. Forget about being able to use your hoverboard again and do something better with the parts.
@@robodurden well im from persia and it costs about 10000000 iranRial (~150$) here in iran! i tried to compile feru side firmware on your web and faced this message: latest commit on github.com/EmanuelFeru/hoverboard-sideboard-hack-GD to source code: 2020-06-25T18:18:36Z local source code is up to date :-) compiling source/emanuelferu_hoverboard-sideboard-hack-gd could not parse original config.h compiling succeeded but could not find hover*.bin file :-( could not parse original config.h i just uncommented //varient_hoverborad line on config.h
@@robodurden yeah you r right but actually i wanna try to add some feature to its code not a normal hoverboard again as it was yesterday untill i changed it few hours ago to start a new journey :> 1. auto self balance when i turn it on 2. self movement (you know like 9bot Segway Xiaomi that you can move scooter by your smartphone which has its app installed on) for this feature may i need to add an handle like xiaomi`s hoverboard that helps system to manage weight difference between front and back in order to make a little unbalancement and moves hoverboard ! 3. and i dont know yet what other feature i will go for adding :))))))
@@mirahdicano9275 still this will not make the world a better place :-( But i have been thinking.. i could turn www.pionierland.de into an expert forum where all you tinkeres can register and select how you can tribute to the hoverboard community: 1. which firmwares you have successfully tested 2. which use cases you have succeeded: wheelchair, 4-wheeler, recumbent bike, wind turbine, water turbine, hoverboard, etc. 3. what special features you realized: recuperation/electrice brake, etc. 4. what control methods you successfuly implemented: ppm, serial, adc, etc. 5. would you accept paid jobs ? That could become a worldwide expert community.. And with car companies desperately searching for programmers, this forum could be a career starting point for all of you. Would only take me a day to set up a futuristic forum with my oo-database, see for instance www.scriptdoctors.org. And then i could run a USD 500 Kickstarter to rent another v-server for $4/month only for the online compiler. Right now i only allow only one compilation at a time because i use that vserver for other things too. With all the different firmwares and different control types, an expert forum in addition to my online compiler could become a very fruitful place - that even could make the world a better place. So will you back my Kickstarter campaign with USD $10 within the first 24 hours ?
Hello, very nice video. I am having problem on ST link connection. I have done all the connections right. but i receive the error as " cannot connect to target". The board is powered from 36V battery, DIO, CLK, GND connections are done right. STlink dongle firmware up to date. I also tried powering the board from 3.3V from the dongle(cutting the battery power off.) what do you propose i should do? Thanks
You should shortcut the power button like shown in my video. I too had problems with connecting the dongle :-( There are some different settings in the ST-link app that you could try - but did not really help me. If nothing works then try to connect the dongle to a cheap "blue pill". If that works, than your hoverboard controller might be broken :-/ Sorry that i can not help you better :'(
@@robodurden Thanks for very fast reply. I am shunting the power button as instructed. Do you think that this might be related to different mainboard than the ones used for this firmware? Or is it because it needs unlocking? (they explain that for first flashing unlocking is necessary but no clear tutorial is available for that.)
@@alicangoncu522 i have already flashed two or three boards (gd32 and stm32) without any unlocking. I have no experience with stm32 chips. You might need to ask in a stm32 forum. If you have a DSO oscilloscope you could check the wires. And as i said, try to source a $2 blue pill..
@@robodurden Hi!!!! I bought bunch of new boards and one of them has worked out. (the others have some kind of hardware locks i presume.) I flashed the firmware using your nice compiler, but cannot get the wheels to run or steer. I am using an RC remote, connected channel 1 and 2 as instructed, powered the RC receiver via 3.3V from the board. Did i make some mistake on the config file can you help out? cheers! // Battery voltage calibration: connect power source. see . write value nr 5 to BAT_CALIB_ADC. make and flash firmware. then you can verify voltage on value 6 (devide it by 100.0 to get calibrated voltage). #define BAT_CALIB_REAL_VOLTAGE 43.0 // input voltage measured by multimeter #define BAT_CALIB_ADC 1704 // adc-value measured by mainboard (value nr 5 on UART debug output)
#define BAT_NUMBER_OF_CELLS 10 // normal Hoverboard battery: 10s #define BAT_LOW_LVL1_ENABLE 0 // to beep or not to beep, 1 or 0 #define BAT_LOW_LVL1 3.6 // gently beeps at this voltage level. [V/cell] #define BAT_LOW_LVL2_ENABLE 1 // to beep or not to beep, 1 or 0 #define BAT_LOW_LVL2 3.5 // your battery is almost empty. Charge now! [V/cell] #define BAT_LOW_DEAD 3.37 // undervoltage poweroff. (while not driving) [V/cell]
#define DC_CUR_LIMIT 15 // DC current limit in amps per motor. so 15 means it will draw 30A out of your battery. it does not disable motors, it is a soft current limit.
// Board overheat detection: the sensor is inside the STM/GD chip. it is very inaccurate without calibration (up to 45°C). so only enable this funcion after calibration! let your board cool down. see . get the real temp of the chip by thermo cam or another temp-sensor taped on top of the chip and write it to TEMP_CAL_LOW_DEG_C. write debug value 8 to TEMP_CAL_LOW_ADC. drive around to warm up the board. it should be at least 20°C warmer. repeat it for the HIGH-values. enable warning and/or poweroff and make and flash firmware. #define TEMP_CAL_LOW_ADC 1655 // temperature 1: ADC value #define TEMP_CAL_LOW_DEG_C 35.8 // temperature 1: measured temperature [°C] #define TEMP_CAL_HIGH_ADC 1588 // temperature 2: ADC value #define TEMP_CAL_HIGH_DEG_C 48.9 // temperature 2: measured temperature [°C] #define TEMP_WARNING_ENABLE 0 // to beep or not to beep, 1 or 0, DO NOT ACTIVITE WITHOUT CALIBRATION! #define TEMP_WARNING 60 // annoying fast beeps [°C] #define TEMP_POWEROFF_ENABLE 0 // to poweroff or not to poweroff, 1 or 0, DO NOT ACTIVITE WITHOUT CALIBRATION! #define TEMP_POWEROFF 65 // overheat poweroff. (while not driving) [°C]
#define INACTIVITY_TIMEOUT 8 // minutes of not driving until poweroff. it is not very precise.
// ###### CONTROL VIA UART (serial) ###### ////XXX #define CONTROL_SERIAL_USART2 // left sensor board cable, disable if ADC or PPM is used! #define CONTROL_BAUD 19200 // control via usart from eg an Arduino or raspberry // for Arduino, use void loop(void){ Serial.write((uint8_t *) &steer, sizeof(steer)); Serial.write((uint8_t *) &speed, sizeof(speed));delay(20); }
// ###### CONTROL VIA RC REMOTE ###### // left sensor board cable. Channel 1: steering, Channel 2: speed. Use a very short cable! #define CONTROL_PPM //XXX // use PPM-Sum as input. disable CONTROL_SERIAL_USART2! #define PPM_NUM_CHANNELS 6 // total number of PPM channels to receive, even if they are not used.
// ###### CONTROL VIA TWO POTENTIOMETERS ###### // ADC-calibration to cover the full poti-range: connect potis to left sensor board cable (0 to 3.3V) (do NOT use the red 15V wire in the cable!). see . turn the potis to minimum position, write value 1 to ADC1_MIN and value 2 to ADC2_MIN. turn to maximum position and repeat it for ADC?_MAX. make, flash and test it. ////XXX #define CONTROL_ADC // use ADC as input. disable CONTROL_SERIAL_USART2! #define ADC1_MIN 0 // min ADC1-value while poti at minimum-position (0 - 4095) #define ADC1_MAX 4095 // max ADC1-value while poti at maximum-position (0 - 4095) #define ADC2_MIN 0 // min ADC2-value while poti at minimum-position (0 - 4095) #define ADC2_MAX 4095 // max ADC2-value while poti at maximum-position (0 - 4095)
// ###### CONTROL VIA NINTENDO NUNCHUCK ###### // left sensor board cable. keep cable short, use shielded cable, use ferrits, stabalize voltage in nunchuck, use the right one of the 2 types of nunchucks, add i2c pullups. use original nunchuck. most clones does not work very well. ////XXX #define CONTROL_NUNCHUCK // use nunchuck as input. disable DEBUG_SERIAL_USART3!
// ###### MOTOR TEST MODE ###### // slowly move both wheels forward and backward, ignoring all inputs //XXX #define CONTROL_MOTOR_TEST //XXX #define CONTROL_MOTOR_TEST_MAX_SPEED 300 // sweep slowly from -MAX_SPEED to MAX_SPEED (0 - 1000)
// inputs: // - cmd1 and cmd2: analog normalized input values. -1000 to 1000 // - button1 and button2: digital input values. 0 or 1 // - adc_buffer.l_tx2 and adc_buffer.l_rx2: unfiltered ADC values (you do not need them). 0 to 4095 // outputs: // - speedR and speedL: normal driving -1000 to 1000 // - weakr and weakl: field weakening for extra boost at high speed (speedR > 700 and speedL > 700). 0 to ~400 #define FILTER 0.05 //XXX // lower value == softer filter. do not use values
@@alicangoncu522 first flash the CONTROL_MOTOR_TEST to verify that your board and motors are functional. Another user succeeded with PPM and learned that With CONTROL_PPM you need to set PPM_NUM_CHANNELS in config.h to those of your PPM transmitter (like 10 for example).
@@gianlucadionisi6730 first you need to know how you want to control the motors. Then look at the config.h and choose a variant_xy. Go with the Emanuel Feru firmware. Watch my absolute beginners video :-)
Like you I have also the separated type of mainboards which have 4 pins for ST-LINK connection each of them. Do you have any suggestions for those type?
@@WhyNotCycles no I have only one stlink socket. Don't know what you are talking about. Read the entire readme of the original Niklas GitHub. Upload a video describing your Problem.
@@robodurden there are some hoverboards out there working with two mainboards, one per bldc motor. Each of those boards have the 4pin holes and i m not sure if i should flash the new filmware to each of them. For now i have connection issues i have to solve. My target is to power both bldc's with one throttle signal... Thank you for your very helpful video tutorial!
That would be a tank mode. Go to the Emanuel Ferry FOC github und study the different VARIANT_XYZ. If you don't find such a tank mode you can modify the main.c
Hi I'm working on the same type of project but Im having one problem after uploading the .bin file it upload fine but when its done I get a continuous beep can you help
Get a second board to check the first one is not broken. Is it exactly the same board as on the GitHub ? Different board might have different pins connected.. Did you install one of my presets ? The adc- bobbsCar works fine on my board.
@@brooklyn_uav4589 Check if your board has the identical STM32F103RCTx processor ! And even if same mcu, the pins could be mapped differently. You could help others (.... !) in learning the pin assignment of your board. Is the serial debug output still working on your board (besides the continuous beep.) Then you could check whether the two adc inputs are also mapped correctly. Then take a look into the source code to find all the pins used by the firmware (input: hall sensors, output: mosfet drivers..) It might only need a few changes in the pin setup to make your board work. We could modify the firmware to set all pins to input but the TX of the debug serial. Then logging all the new input pins to the serial and you could quickly identify the hall sensor inputs. Same could be done for the mosfet pins by setting all mcu pins to output..
@@robodurden is that I have a binary file that someone published for a homemade electric bicycle, and the user only started a motor, and I would also be interested in turning the direction of rotation of the motor
Hey Robo Durden, thank you so much for one of the best video. I'm new here , I have one hoverboard card and one STM32 link , whenever I try to connect using stmcube programmer or STM32 utility. It always give me the error, target not found . Kindly can you give me the brief idea of wire diagrams for power supply to hoverboard. thx lot
No you have try more yourself. Check that the stm32 dongle is properly installed and working, check that hoverboard controller board is powered by 36V, check that the power on switch is bridged. If nothing works, get yourself a plue pill and try to connect to this stm32. I have made several beginner videos. This is not the absolute beginners video. bye and good luck 🙂
@@ahmadhussainwebshare1001 See how many men have been killed in the name of god. God for sure must be evil. Please no blessing of whatever god is yours !
thanks robo for you great online compliler I am using phail firmware need your help please if I want to to steer a high speed at the same place without going forward or backward .. so I need to increase steering speed how could I do it and what line need to be modified in the code. thanks and regards
For questions concerning the different firmwares better open an issue at the corrosponding githubs. to steer without moving forward you normaly set speed to 0 and steer to how fast you want to steer. so +1000 should be fasted steering to the right. or spinning right at full speed in place. I think the phail firmware is no longer updated. Either follow the creator to biporpellant, use the original niklas, my better serial or give the new Feru firmware a try.
Thanks for your fast replay I tried to compile feru using your online complier without making any modifications but it turns error could not parse original config.h
@@mohammedmy you have to uncomment one of these lines at the beginning of config.h : //#define VARIANT_ADC // Variant for control via ADC input //#define VARIANT_USART // Variant for Serial control via USART3 input //#define VARIANT_NUNCHUK // Variant for Nunchuk controlled vehicle build //#define VARIANT_PPM // Variant for RC-Remote with PPM-Sum Signal //#define VARIANT_PWM // Variant for RC-Remote with PWM Signal //#define VARIANT_IBUS // Variant for RC-Remotes with FLYSKY IBUS //#define VARIANT_HOVERCAR // Variant for HOVERCAR build //#define VARIANT_HOVERBOARD // Variant for HOVERBOARD build //#define VARIANT_TRANSPOTTER // Variant for TRANSPOTTER
i buy on ebay and aliexpress. If you plan to use an arduino mini which has no usb interface, get yourself an usb-uart dongle with 6 pins = DTR for automatic upload. If you plan to use uart2 of the hoverboard controller which is NOT 5V tolerant, you need an usb-uart dongle that can output 3.3V on the RX line !! a 3.3V/5V switch on the usb-uart dongle mostly only changes the VCC voltage, NOT the RX voltage. You have to buy several cheap dongles with a 3.3/5 V switch to be lucky enough to get one that can output 3.3V on the RX line. But when you only use uart3 = the short cable, you can go with any usb-uart dongle. watch my latest tutorial for absolute beginners !
what is possible ? You can not flash a stm32 with UART, you need a ST-Link V2 usb dongle. If you want to control the hoverboard via uart serial connection, of course a usb uart dongle could help you to control the board from a pc
Choose CONTROL_PPM and Connect the Receiver to the Green cable of left Sensor Board: raw.githubusercontent.com/NiklasFauth/hoverboard-firmware-hack/master/pinout.png
Gd work Durden! I have been testing the roboDurden hoverboard-firmware-hack for a while and everything thing is working fine. But when I uncommented #define KMH line to work with KMH, the arduino does not work as it should. For EXAMPLE, sending Send(whatever more than 3 for the speed, 0 for the steer) run the wheels at the highest speed. And sending whatever after that the hoverboard will not react at all. So it is reacting with the first sended command and also incorrectly. Do u know what the problem could be!?
This is a long known bug which i thought i had solved by in main.c with: if (abs(HallData[0].HallSpeed_mm_per_s) > abs(HallData[1].HallSpeed_mm_per_s)) { #ifdef INVERT_L_DIRECTION iSpeed = -HallData[0].HallSpeed_mm_per_s; #else iSpeed = HallData[0].HallSpeed_mm_per_s; #endif } else { #ifdef INVERT_R_DIRECTION iSpeed = -HallData[1].HallSpeed_mm_per_s; #else iSpeed = HallData[1].HallSpeed_mm_per_s; #endif } When the speed goes to max, the control loop had the inverted max speed because of different INVERT_X_DIRECTION .. Do you have my latest version installed ?? Also give my FOC fork a try. I am no longer using the Niklas fork and the Emanuel fork is compatible to my old fork.
@@robodurden yes I belive it is the latest one cause I downloaded yesterday from the compiler. I have tried ur FOC version with the USART but it is not working as I wanted. It run for some milli seconds and then stops, then u have to use Send() again. It behaves as the orginal Emanuel one. It send correct spedds but it runs just for some milliseconds.
@@mazenbahy5012 I would be happy if you continue to resolve the bug :-) Try commenting/uncommenting INVERT_L_DIRECTION and INVERT_R_DIRECTION to see if my SPEE_IS_KMH control loop then works. Concerning the Emanuel fork, i send Send() every 100 ms and have no problems. You should do that too unless you verfiy with the returned SerialFeedback that your send command indeed got accepted. As i have this nasty noise on INPUT_PULLUP lines (so also the RX line), i can not rely on reading the struct SerialFeedback :-/
@@robodurden Hello Again! I did some testing regarding the points you said about. For all the cases are tested I hade Send(40,0); delay(3000);Send(0,0); in the Arduino setup(){}. - Uncommented both R, L ----> Both wheels start fast, the same direction, and continue forever without reacting with the Send(0,0). - Commented both R, L ----> Both wheels start fast, the same direction, and continue forever without reacting with the Send(0,0). - Commented R, Uncommented L ---> Both wheels start fast, different directions, and continue forever without reacting with the Send(0,0). - Commented L, Uncommented R ---> Both wheels start fast, different directions, and continue forever without reacting with the Send(0,0).
Could you activate your settings and then change the minus signs in the main.c code I posted here those lines that are active for your invert defines Are you working on my old Niklas fork or the new Emanuel fork ?
Hi! I have tried ur firmware and ur arduino code example and it working very well and I can steer the robot. But I wanna to steer the robot by giving it vr and vl by myself or by giving it angular and linear speed. I tried to search into the firmware code to see where you convert speed and angle to vr and vl so I can send them the values directly but I can see nothing. Can u give some ideas! or solution! Best Regards and thanks again.
speedL and speedR are set in main.c: at lines 472+ github.com/RoboDurden/hoverboard-firmware-hack/blob/master/src/main.c#L472 But you should stay with speed and steer and send speed = (vr+vrl)/2 and steer = (vr-vl)/2
@@robodurden Thank you so much for the fast and interesting reply. The problem is that I have just the linear and angular speed (I am working with ROS). According to your recommendation I did not change speed and angle . Without I convert them in arduino like this: float linear_speed = cmd_vel.linear.x; float angular_speed = cmd_vel.angular.z; vl=(linear_speed-e*angular_speed)/r; vr=(linear_speed+e*angular_speed)/r; localSpeed=(vr+vl)/2; localSteer=(vr-vl)/2; Send(localSpeed,localSteer); The linear and angular speed in my example are in m/s so localSpeed are also in m/s so would it feets with the -1000 and 1000 that u have? I mean how should I convert them ? Do you think it is good solution!
@@mazenbahy5012 if you want to dictate an absolute speed in m/s or km/h you should uncomment my SPEED_IS_KMH define. Then i guess the -1000 to +1000 for the steer will be -100% to +100% of the speed value where 60 would be 6 km/h and 150 would be 15 km/h. You would need to multiply by 3.6 to get from m/s to km/h. But i have no idea if this will work. I calculate the real speed for the closed loop to be the maximun of either the left wheel or the right wheel. So when you would do Send(140,-500); that should/could result in the right wheel to spin at 14 km/h and the left wheel at 7 km/h. I suggest you restart from where you calculate cmd_vel.linear.x; and change that calculation to a speed and steer that our firmwares can handle. And definitely move on to the Emanuel Feru firmware !!! It too has serial communicaton and absolute speed. And it is about 23 % more energy efficient while beeing about 16% faster and on top way more silent. Watch my next video coming today or tomorrow ! I will move on too and stop maintaining my firmware.
SUBBED!! THANK MY FRIEND! *******I AM TRYING TO HACK HOVERBOARD TO KEEP CONSISTENT SPEEDS FORWARD EVEN AROUND TURNS. I GOT AN ALL TERRAIN HOVERBOARD THINKING THAT IT WOULD KEEP UP WITH MY OTHER ZIPPY FAST HOVERBOARD CART BUILDS. PROBLEM WITH ALL TERRAIN IS IT SLOWS DOWN TO SQUAT SPEEDS WHEN TURNING. THANKS AGAIN ROBO!*******
Hi, Great work! Maybe you can help me with this raspberry pi 3 python code? while 1: ser = serial.Serial( port='/dev/ttyUSB0', baudrate = 19200, parity= "N", stopbits= 1, bytesize= 8, timeout=1 ) ser.write(bytearray([0, 100, 0, 0])) ser.close() break Communication works, but the values I send are not correct. I appreciated all the help I can get !!! / Peter
Hallo ich würde gerne mein Moving Object mit einem Joystick steuern wie in diesem Video ua-cam.com/video/kdshcX9SFF8/v-deo.html. Leider wurde ich durch die ganzen Informationen welche ich in den Komentaren gelesen habe etwas verwirrt und weiß jetzt nicht was ich machen soll damit alles funktioniert. Kann mir jemand helfen?
your awesome thank you so much could you add the Gen2 version of the hoverboards with 2 sided motherboards. I am good at soldering but not at coding stuff
@@robodurden I was wondering if you could help I have finally got my hands on an st32 arm chip controller and was able to flash with your complier on the stock firmware. I am trying to use just Ppm to go forward I dont need steering. I have a flysky 2.4ghz receiver plugged into green for signal, black for ground, and second red for 5v. I turn it on and both wheels test by going back and forth slowly with a bunch of beeps then shuts off. It happens before I can bind the remote. And if I turn it on it just repeats. Any thoughts what I did wrong.
@@plojm123 f**k, UA-cam deleted my long answer because of a AliExpress link to a level converter so you do not let 5V but 3.3V to the green input cable :-( Try running the rc receiver with 3.3 V. Seems you compiled the original config.h with the CONTROL_TEST. Simply click the Load link beside CONTROL_PPM at the Bobby Car preset section at the bottom of my page. Then study the config.h for the XXX changed being made.
Im using your compiler for my rc mower. I tried to compile by clicking The Armchare with ppm link on the bottom and then the compile button but im getting and error. Src/control.c:21:29: error: 'PPM_NUM_CHANNELS' undeclared here (not in a function); did you mean 'IS_TIM_CHANNELS'? uint16_t ppm_captured_value[PPM_NUM_CHANNELS + 1] = {500, 500}; ^~~~~~~~~~~~~~~~ IS_TIM_CHANNELS make: *** [build/control.o] Error 1
As i said in the video: after clicking such a preset 'load', search the page for XXX and you will quickly see that PPM_NUM_CHANNELS needs to be uncommented. And don't forget to set the exact number of channels that your receiver has !
@@robodurden Ok I uncommented PPM_NUM_CHANNELS and left it at 6 because i have a fs-ia6b it compliles but shows this Src/main.c: In function 'poweroff': Src/main.c:85:9: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration] if (abs(speed) < 20) { ^~~ Src/main.c: In function 'main': Src/main.c:151:5: warning: implicit declaration of function 'PPM_Init'; did you mean 'HAL_Init'? [-Wimplicit-function-declaration] PPM_Init(); ^~~~~~~~ HAL_Init Src/main.c:288:7: warning: implicit declaration of function 'setScopeChannel' [-Wimplicit-function-declaration] setScopeChannel(2, (int)speedR); // 3: output speed: 0-1000 ^~~~~~~~~~~~~~~ Src/main.c:294:7: warning: implicit declaration of function 'consoleScope' [-Wimplicit-function-declaration] consoleScope(); ^~~~~~~~~~~~ Src/main.c:207:13: warning: unused variable 'scale' [-Wunused-variable] float scale = ppm_captured_value[2] / 1000.0f; ^~~~~ Src/main.c:148:9: warning: unused variable 'direction' [-Wunused-variable] float direction = 1; ^~~~~~~~~ Src/comms.c: In function 'consoleScope': Src/comms.c:49:12: warning: passing argument 1 of 'memset' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers] memset(uart_buf, 0, sizeof(uart_buf)); ^~~~~~~~ In file included from Src/comms.c:6:0: /usr/arm-none-eabi/include/string.h:33:9: note: expected 'void *' but argument is of type 'volatile uint8_t * {aka volatile unsigned char *}' void * memset (void *, int, size_t); ^~~~~~ Src/comms.c:50:13: warning: passing argument 1 of 'sprintf' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers] sprintf(uart_buf, "1:%i 2:%i 3:%i 4:%i 5:%i 6:%i 7:%i 8:%i ", ch_buf[0], ch_buf[1], ch_buf[2], ch_buf[3], ch_buf[4], ch_buf[5], ch_buf[6], ch_buf[7]); ^~~~~~~~ In file included from Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:52:0, from Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:47, from Inc/stm32f1xx_hal_conf.h:218, from Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:48, from Src/comms.c:1: /usr/arm-none-eabi/include/stdio.h:244:5: note: expected 'char * restrict' but argument is of type 'volatile uint8_t * {aka volatile unsigned char *}' int sprintf (char *__restrict, const char *__restrict, ...) ^~~~~~~ Src/comms.c:54:40: warning: passing argument 1 of 'strlen' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers] UART_DMA_CHANNEL->CNDTR = strlen(uart_buf); ^~~~~~~~ In file included from Src/comms.c:6:0: /usr/arm-none-eabi/include/string.h:41:9: note: expected 'const char *' but argument is of type 'volatile uint8_t * {aka volatile unsigned char *}' size_t strlen (const char *); ^~~~~~ Src/stm32f1xx_it.c: In function 'EXTI3_IRQHandler': Src/stm32f1xx_it.c:224:5: warning: implicit declaration of function 'PPM_ISR_Callback'; did you mean 'PPM_SysTick_Callback'? [-Wimplicit-function-declaration] PPM_ISR_Callback(); ^~~~~~~~~~~~~~~~ PPM_SysTick_Callback
@@andrewkennett940 These all are only Warnings and signal bad programming behaviors. Im am not responible for the code of the different githubs.You should open an issue there. And here you should always state which repo you used for compiling. When the selected repo with no changes compiles and is running successful on your hoverboard but the modified code does not, you should attach a usb-uart dongle to read the log data.
@@robodurden achso nagut, könntest du ein Plan machen von der Verkabelung am Mainboard? Also für Lenkung, vorwärts rückwärts und halt diesen 30 kmh Knopf weil so ganz blick ivh da nicht durch währe sehr interessant und warscheinlich hilfreich nicht nur für mich
@@robodurden If you need any help then it will be an honor for me .I am a big fan of you .I am doing freelance web security and designing work after my spinal injury
@@khanatifali1800 you either help or abuse. Sorry, i am the born loser and losers do not have any friends. So for sure i do not want anyone to be a fan of mine.
@@robodurden Brother you are a hero for me your are far better than those people who keep the knowledge but not share ,Your work and data will help people who are confined in their homes and I am sure they will pray for you like me.By the way I am also a loser but I will not give up I want to make low cost solar powered carried for person with disabilities so everyone can afford it or build it.
Yes when you select my Nunchuck bobycar preset you get the compile error: Inc/config.h:149:4: error: #error CONTROL_NUNCHUCK and DEBUG_SERIAL_USART3 not allowed. it is on the same cable. #error CONTROL_NUNCHUCK and DEBUG_SERIAL_USART3 not allowed. it is on the same cable. So simply put "//" before the "#define DEBUG_SERIAL_USART3" line in the config.h and it will compile. Simply hit strg+F on my page and search for DEBUG_SERIAL_USART3 :-) It is also always good to search for XXX as this will show you the changes my default presets have done. This would have already pointed you to: #define CONTROL_NUNCHUCK //XXX // use nunchuck as input. disable DEBUG_SERIAL_USART3! Have fun :-)
@@robodurden thanks for the fast replay . still cant make it copiling find the define uart3 and putt // before it and define nunchuck and removed // but still cant copiling
@@gonza0076 I now tested both versions NiklasFauth/hoverboard-firmware-hack and p-h-a-i-l/hoverboard-firmware-hack , both with the Bobbycar and the armchair "load". All compile successfully and it always only needed the "//" before the "#define DEBUG_SERIAL_USART3". What browser are you using? When compilation failed you get an error message. Post it here.
@@gonza0076 of course you have to if you don't use my multiple one-click defaults. But now please repeat what i have just tested! Scroll down click on "load", add the "//" to disable serial debug in the config.h and hit compile :-)
hello to you great job because I'm struggling to death because I need you basically I flashed my motherboard and it worked and when I wanted to flash the sideboards I unfortunately made a false manipulation and since the motherboard lights up more on the button and when I try to reinstall a program with st flash utility I have a sentence the elf loader is not accessible could you light me because I dry and the little one would like his hovercar thank you to you to take the time to read me
You are the first one i know that tried github.com/EmanuelFeru/hoverboard-sideboard-hack-STM ?! You can destroy pins of the motherboard with 5 V for example. Maybe something like that happened with your programming pins. Try flashing with the battery power at 36 volt. Sorry i do not think i can be of much help.
indeed we all would need a source of these outdated hoverbard controllers. Maybe we indeed should find a Chinese factory to continue making these old boards..
would you add benjaf /hoverboard-firmware-hack-esk8 to your compiler please i want to modifay lines and with platformIO i coud´t. The file.io is missing and im a rookie in this things i had a problema with VARIENT_SKATEBOARD. (ua-cam.com/video/I_INhBaeQ08/v-deo.html ) same with VARIENT_PWM so i tried esk8 from benjaf but i thing is a bit slow and erratic (ua-cam.com/video/nKo6hYb2jNk/v-deo.html ) so i want to look the code. Thnks
That github has last commit 17 months ago :-( And it is not based on the great Emanuel Feru fork :-/ Try his FOC firmware first: github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/blob/master/Inc/config.h
Hi! Сan anyone help me resolve one issue? I used NiklasFauth / hoverboard-firmware-hack CONTROL_ADC version. I connected simple hall throttle which gives (when powered from 3.3v) 0.8 ... 2.5V. Somehow I need to narrow the range from 0 ... 3.3V (ADC of firmware reaction) to 0.8 ... 2.5V (for moving only forward according to this firmware). I changed #define ADC2_MIN 1215 (its about 1V, if 4095 is equal max 3.3V) and #define ADC2_MAX 3200 (its about 2.5V, if 4095 is equal max 3.3V) lower threshold is working! hoverboard moves only when throttle is slighlty down. but the max speed is still above reachable threshold for throttle on 3.3V. How can I limit the upper limit of the ADC max speed threshold to 2.5V?
Make sure the hall sensor gives analog output values. Common hall sensors only output on or off. I also suggest you connect serial debug output and see what analog values get processed.
Thank you, robo durden!
I used your online compiler for the original Nicklas firmware and worked like a charm with 2 potentiometers.
Next days, I will use your firmware to control the boards with Arduino/Raspberry Pi via serial communication.
Thank you for all the effort you put in this and for all the details and explanation.
Keep up the good work!
check out my fork github.com/RoboDurden/hoverboard-firmware-hack :-)
Superb !
Everything was clear.
I started by watching this video for compiling...
Then read all the comments...
Found your other videos...
And just finished programming my board with the Motor test.
I thank you 1000x for making this process so easy !
Donation coming your way now :) for your work info and keeping Open-Source alive.
Greetings and BIG THANKS !
Peter Lunk
Well actually, the compiler is not open source yet, only the minimal IDE that I did develop for the compiler.
@@robodurden True that but all the used and your firmware are Open ;)
And all your information is free :)
Be well and happy !
Sincerely,
PL.
Great work! I love people like you that act as a link between us in the real world and the ones inside the "nerd garden".
I tested your online compiler with the ADC setup and it worked as a charm. However when I tried to compile any of the PPM presets I always got errors and warnings.
One more problem... To morrow I have to explain to my kids that their hoverboard is in pieces and the will not have it back :-)
When compilation fails I output the error. With ppm you need to uncomment the line
#define PPM_NUM_CHANNELS 6 // total number of PPM channels to receive, even if they are not used.
My presets are made on the source code of others... As I said in the video you should always search for XXX and look what changes my presets have made.
Regarding your kids: build something really useful out of that fun product :-)
@@robodurden I get this warnings...
src/main.c: In function 'main':
src/main.c:235:5: warning: implicit declaration of function 'PPM_Init'; did you mean 'HAL_Init'? [-Wimplicit-function-declaration]
PPM_Init();
^~~~~~~~
HAL_Init
src/main.c:335:13: warning: unused variable 'scale' [-Wunused-variable]
float scale = ppm_captured_value[2] / 1000.0f;
^~~~~
src/stm32f1xx_it.c: In function 'EXTI3_IRQHandler':
src/stm32f1xx_it.c:229:5: warning: implicit declaration of function 'PPM_ISR_Callback'; did you mean 'PPM_SysTick_Callback'? [-Wimplicit-function-declaration]
PPM_ISR_Callback();
^~~~~~~~~~~~~~~~
PPM_SysTick_Callback
Thank you for this video and the online compiler. It will save me so much time! Great job!
you prolly dont give a shit but does anybody know a tool to get back into an Instagram account??
I stupidly lost my account password. I would appreciate any tricks you can offer me
@Casey Ronald Instablaster ;)
@Isaac Lian I really appreciate your reply. I found the site through google and Im waiting for the hacking stuff now.
Takes a while so I will reply here later when my account password hopefully is recovered.
@Isaac Lian It worked and I now got access to my account again. Im so happy:D
Thank you so much, you saved my ass :D
@Casey Ronald happy to help :)
Hi :) I've got a question for you. I'm building an electric scooter for my niece based on Emanuel Feru's software as it seems the best so far. I'm wondering if it's possible to change the code a bit to achieve field weakening but only if a button is pressed (or a key turned more accurately) as I intend to drive it now and then aswell and I'd like to go a little faster^^ I noticed there is a possibility to use right sensor cables as buttons with #define SUPPORT_BUTTONS_RIGHT. However I'm not sure how the code is supposed to look like. Based on some lines in NiklausFauth's code I came up with something like this:
if (button1==1) {
#define FIELD_WEAK_ENA 1
}
else {
#define FIELD_WEAK_ENA 0
}
Do you think it will work?
And if the codes structure is fine, do you think it is better to simply turn on/off field weakening variable or maybe it's safer to just change potentiometer range to make it go slower without actually modifying motor's parameters mid-drive? I'm using a potentiometer which gives 2,82 volts top, which equals to adc1_max=3472. If the value of adc1_max variable would rise to, for example, 6000 and the potis best is 3472, the max speed should be a little above half of what the motors can deliver. So the code would look like this:
if (button1==1) {
#define ADC1_MAX 3472
}
else {
#define ADC1_MAX 6000
}
What do you think? How would you solve it yourself? Thanks for the videos and the compiler. Cheers :))
hi my hoverboard each side single bldc moter how to control with potentiometer which software i can use please guide
Sorry, first rule of project Mayhem: you do not ask questions.
I want to spend a day with the UA-camr. I love the way he thinks :)
Thank you kind sir..been searching all night for this!!
I have tried compiling Bipropellant firmware through the online tool but it gives the following error. The only change I have made this far is low voltage values in config.h.
src/protocolfunctions.c: In function 'setup_protocol':
src/protocolfunctions.c:356:5: error: 'protocol_GetTick' undeclared (first use in this function); did you mean 'protocol_tick'?
protocol_GetTick = HAL_GetTick;
^~~~~~~~~~~~~~~~
protocol_tick
src/protocolfunctions.c:356:5: note: each undeclared identifier is reported only once for each function it appears in
src/protocolfunctions.c:357:5: error: 'protocol_Delay' undeclared (first use in this function); did you mean 'protocol_enable'?
protocol_Delay = HAL_Delay;
^~~~~~~~~~~~~~
protocol_enable
src/protocolfunctions.c:358:5: error: 'protocol_SystemReset' undeclared (first use in this function); did you mean 'protocol_byte'?
protocol_SystemReset =HAL_NVIC_SystemReset;
^~~~~~~~~~~~~~~~~~~~
protocol_byte
make: *** [build/protocolfunctions.o] Error 1
Thank You a lot, had probs to install the recource under windows unbuntu...so you made my day!°°°° THANK YOU!
Mine won't turn off and the speed of the motors is not the same. Won't turn either. Seems a software problem because before flashing the board it was working just fine. Can you help me, please? I want to put the motors on my wheelchair.
What firmware did you compile ? First always flash the original Niklas fauth firmware with no changes and see the test mode. Just as i did in this video.
@@robodurden The only firmware that partially works is github.com/p-h-a-i-l/hoverboard-firmware-hack/tree/bewegungsappar.at/build . With the original Niklas fauth firmware, the board just turns on then off. If I tie the wires together the board constantly turns on then off
@@Diygenes You flashed the original Fauth firmware with no changes, disconnect both motors so only the 36 Volt battery and the on/off button is connected to the board and when you push the onoff button once the boards gets on but immediately turns off again ?
Upload a 60 seconds youtube video !
@@robodurdenI'm going to make a video, thanks for your response! I think I missed something. My battery is a 24 volt one, but the software is for a 36 volt unit
Then of course the firmware will turn off. But usually only after the speed comes back to zero. So you should have been able to at least get the motor running once.
digger! wie geil :-D Du rettest damit mein Projekt!!! Ich hab die zeit nicht für die Linux kacke... und du hast mich grade drauf gebracht warum nix geht mit meiner IDE XD ich dachte ich bin der dumme... aber den deutschen hört man dir an :-D also spaar ich mir das Englische grad :-P
schönen gruß und nochmal danke aus dem Sauerland
Wenn Du die Motoren per Mikrocontroller ansteuern willst empfehle ich Dir meinen Robodurden Form :-)
Very well done tutorial and thank you for your compiler!! I had a question about steering with potentiometers that I REALLY hope you can answer. When using the steer pot, it only incrementally increases the direction it turns left. It wont go the other way. Is there any code I can change to make it turn both left and right?
You should compile the Niclas ADC armchair preset. Attach a USB uart module to get the debug output. First two number are adc1 and adc2. Take a look at main.c to learn how the steer adc effects the speed of left motor and right motor.
@@robodurden Thank you for such a swift response!! Changing the Steer_Coefficient from - to + only changes which wheel rotates, but it is still only able to go in one direction. Do you know if there is a way to make each pot associated with one wheel's speed independent of the other? I don't know if you've already addressed this somewhere else or not. Thank you for your time!
@@dmahoney23 Tale a close look at the main.c and learn how the two adc values and up as speed left and speed right. If course you can modify main.c so speed adc is only for speed left and steer adc will be for speed right.
hello, you do not have the old version of the firmware left, the new version with git when flashing constantly crashes with an error of three signals when flashing usart
(Serial communication timeout)
Sorry i do not understand your question.
Very good you made it easy can I use two potentiometer two control both wheel with different speed to turn lef or right with speed control
May i know what the 3.3V and ground you are using for when controlling using the two potentiometers?
You can get GND on many ports, including the flash header. 3.3V is only on the flash header available. See the nice photo with all the ports and the flash header on the GitHub page :-)
@@robodurden thank you for your help and fast reply : )
Ahh, so the ADC (breadboard) is going to one of the existing cables that would have gone to the tilt sensor board. You are using the "flash" pins to power the ADC and potentiometer. Thank you for posting this video. Any thought about posting your web compiler source code on GitHub?
My online compiler is built on only a few lines php code that executes the makefile via command line. But I already have built on that code for a free Arduino font compiler: pionierland.de/fonts/
Maybe I will put my code on GitHub so others can copy and paste the essential lines of code into their online compilers. I do not yet see the opportunity to build a universal online compiler for all GitHub projects that offer a makefile.
having trouble with potentiometer controls(ADC), motors not moving when turning the pots. I have selected the ###### CONTROL VIA TWO POTENTIOMETERS ###### but no luck. Am i missing something here???
Connect a Usb-uart module and read the debug output. And compile and install the test mode first to see that board and motors are okay. Be sure to only use 3.3 Volt vor the potentiometers ! Same for the usb-uart device. Rx pin might output 5 volt !
@@robodurden finally got it working like a charm:-). Thank you.
Many thanks, very very useful. Helped me a lot!
Great job. I'm excited.
I have a motor mounted on a bicycle but I don't know what parameters to touch to just drive one motor (cancel the other one) and drive speed with an e-bike accelerator or analog potentiometer. Could you help me? Many thanks.
Choose the original Niklas firmware and the Bobbycar ADC preset. That is exactly what I show in this video. Simply connect only one motor. Should work :-)
There is something wrong with EmanuelFeru/hoverboard-sideboard-hack-GD. "compiling succeeded but could not find hover*.bin file :-("
Sorry I forgot. You can now download bin and hex file :-)
@robo_durden great job on the compiler and the firmware. Would you consider adding some comments to the hoverserial.ino example? I am not a complete n00b but frankly I am not 100% sure on what the loop does and not too confident messing with it since they are actual motors on this thing. When I connect arduino to hoverboard with you code running on it, I don't understand the behavior of the motors, seems completely random. My project is based around a blue_pill connected to bno055 , a pwm receiver and well the hoverboard. Once I understand how to interact with the motors from the arduino sketch I am hoping to get the thing to stand still and be able to remote control it before I move on to computer vision and mapping. Any help is much appreciated.
well then simply add the line Serial.println(iSpeed);; before Send(iSpeed,0); to see what speed is sent to the hoverboard.
The default settins are
int iSpeedMax = 1000; // for SPEED_IS_KMH in config.h use 60 for max speed of 6.0 km/h
int iSpeedDelta = 20; // for SPEED_IS_KMH in config.h use 2 for speed steps of 0.2 km/h
So +1000 should be fast forward and -1000 fast backwards.
If you want to send a target speed in kmh, you have to change these defines and activate the SPPED_IS_KMH in the config.h
@robo durden, nice!!! does the board have AT32F403 chip?
Usually, used boards have the stm32F103 or the compatible gd32F103.
I could add this Niklas fork to my compiler: github.com/cloidnerux/hoverboard-firmware-hack
Emanuel Feru was also interested in these new boards: github.com/NiklasFauth/hoverboard-firmware-hack/issues/97
Tell me when/if he succeeded to port his FOC firmware.
It seems that Emanuel succeeded at least with his sinusoidal mode: github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/issues/46
Juodumas wrote: Another spare board that I had is with AT32F403 CPU, so I am currently using it with sinusoidal + voltage. It works perfectly with impressive top speed, but unfortunately current limiting does not work, so I am not sure if it's safe to introduce support for this board to the main repo? When I get a chance, I will try FOC with the changes in #81.
@@robodurden thank you so much for your responses, I'm trying to start flashing and reprogram by using st link, I found that it can be done with github.com/bipropellant/bipropellant-hoverboard-firmware/issues/67#issuecomment-516657520
but sincerely as my first time using the st link and a similar stm32 mcu, it's very hard to understand what the steps I should take. I don't think it follows the step you took on your project(using st32 software). Best would be if there's any video describring the steps detailed.
@@TheLordbruh I suggest you will make such a video once you succeed :-) I am a stm32 beginner as well. And i strongly dislike all this linux commandline nonsense..
Any tips on flashing the GD32F103 based motherboards? Having trouble finding the STM32 based boards.
Apart from different clock they are said to be compatible. In the beginning I succeeded installing an IDE and uploading a blink sketch to a blue pill. Next step would have been to upload the blink code to the hoverboard controller. The some code with uart debug messages. And then the original Niklas firmware. Inside China you can buy blue pills with the GD32 instead of the STM32. So step by step :-)
Hello, you seem to be the only guy who can explain how to make it work, but nevertheless I could not get mine to work.
I opened your online compiler
chose RoboDurden/hoverboard-firmware-hack (as I had no success with compiling other methods)
loaded SIMPLE BOBBYCAR, CONTROL_PPM
downloaded .bin file
flashed downloaded .bin with st-link utility (successfully programmed)
connected RC receiver to +5 and GND of the hall sensor
connected signal pin of my RE receiver to all possible wires (blue and green of both uarts)
but my motor never moved.
I am using 5065BLDC motor with no hall sensor (may it be the reason for not working?)
Do you have any suggestions what I am doing wrong?
With no hall sensors connected the firmware will not work. You should only use this board with the standard hoverboard motors or possibly ebike motors. When I disconnect the hall sensor cables in my setup, the controller will not work. So should your setup not work. With no hall sensors go with an ordinary ESC. Or try a cheap $11 ebike controller that does not need hall sensors.
And anyway when something does not work: always read the serial debug output.
For your 5065 get yourself a "red brick ESC"
@@robodurden Thank you for a quick answer. That's good to hear that it is not supposed to work without hall sensors. I will install an original wheel to test it out, I just don't have access for it right now. I have other ESCs also, I just wanted to get hoverboard ESC to work. Thanks for reply!
I have a hoverboard Skymaster 11 double wheels, the board turns on and after a while it stops working, I disconnect plug from batery to electronics. I take multimetr, and there is a short circuit on the electronics. I take schorcut plus with the minus in electronics plug , after connecting electronic devices it works again, what could be wrong?
do not really understand your text. If you have a shortcut from plus to minus then mostly one pair of mosfets burned. So test the two left pins of the 12 mosfet for a shortcut. And watch my mosfet repair videos..
When two mosfet burned then the connections of the two left pins to the circuit board might have also burned and been interrupted. Then there is no longer a short cut from plus to minus but the attached motor cable will not work..
I have a hoverboard Skymaster 11 double wheels, the board turns on and after a while it stops working, I disconnect plug from batery to electronics. I take multimetr, and there is a shortcut on the electronics. I take schorcut plus with the minus in electronics plug, i take multimetr and i do not have schortcut , after connecting electronic devices it works again, what could be wrong?
@@piotrpawowski6265 first rule of project Mayhem: you do not ask questions.
I have a problem, and that is that after entering my code on the motherboard, the board turns on but does not turn off, that is, it simulates turning off but the red led stays on and you have to disconnect the battery so that it turns off and works again, I have only touched the speed, and the ADC control
If the board also turns on without pushing the on-button, then probably the TO220 transistor is broken and the board always on. Check my second repair video where i show how to test that transistor.
@@robodurden it was not the case, in main.c you have to modify where it puts poweroff, you have to replace the variable CONTROL_MOTOR_TEST by the variable ADC_MIN. This means that the plate does not stay on after pressing the shutdown button.
@@Elec3D sounds like a bug. Then you should open an issue in the firmwares GitHub repo.
Hi @robo durden, can you fully control both hoverboard motors with just 2 analog joysticks, i.e. potentiometers? Forward, left, right, AND reverse?
You only need two potentiometers and the armchair ADC preset at my online compiler :-) for reverse I would advice a digital communication like my uart fork. For analog ADC control you might to adjust the main.c code. Generally, +1000 is full speed forward and -1000 is full speed backwards. The ADC control only maps to 0-1000 and these invert defines make it 0- -1000. But in the main.c you are free to map 0-1000 onto -1000 -+1000. Have a look at the code on my online controller.
Awesome! How exactly are the potentiometers connected to the main board? What are the values of the potentiometers & any pull-up or pull-down resistors?
@@reggieguevara8025 read my other answers here! If backwards is not already supported by the armchair preset I might add a Boolean bBackwards to the main.c and two time variables (or counter values) iTimeFullLeft and iTimeFullRight.
Then you control bBackwards by:
if ((speed-500) && (iTimeFullRight>0) )
{ bBackwards=true; iTimeFullRight=iTimeFullLeft=0;}
To set iTimeFullRight: if (steer>950) iTimeFullRight=iNow;
Code to disable bBackwards would be "speed potentiometer must be zero and first full left then full right within 500 milliseconds :-)
So a digital command to change from forward to backwards. But that depends how often you need backwards. With my solar car (see next video) I only need backwards on a parking lot..
@@robodurden thank you & more power!
Ofcose : ua-cam.com/video/kdshcX9SFF8/v-deo.html
hi Robo, my board beeps and wheels run forward and then backward, and pot doesnt work, like it was a test, with nicklas firmware. any suggestion?
Watch this video. And study your config.h
Hy, I get 4 slow beeps after uploading the software to Hoverboard. I used EFeru at RoboDurden compiler and choosing pwm. I connected 6ch receiver to 3.3v and GND from hoverboard. CH1 to PA2, CH2 to PA3. Also Im using 2x 20v lithium tool battery in series for 40v (do i need to make a change in software?) Thnx.
6ch receiver sound like ppm and not pwm. So you might choose VARIANT_PPM.
Also search main.c for the code that is beeping out the error code.
Then you know what 4 slow beeps mean.
I never used pwm or ppm.
@robodurden Hy, and thank you for your fast reply. I did manage to get it to work, I made some changes before compiling and had to connect to the right cable instead of left. I tried different types of controls: like VLT_mode, SPD_mode and TRQ_mode. But i get violent and fast movement in the beginning of the joystick movement, and it's slower when I move the joystick 🕹 further. May that be the reason because I use only 3.3V for the receiver? Should I use 5V, and do you know what would be the best place to source it from the hoverboard mainboard.
@@mariomlinaric9861 5V would have killed the adc inputs of the long cable. The short cable is 5VT but you should not power your rc receiver with 5V.
Connect a UART dongle to short cable and get serial debug output to see how your joystick movements translate to speed steer -1000 - +1000.
I guess this is only a stupid fun project.
Watch my tutorials and stop asking for personal help.
Hi, I am getting the following error when compiling with PPM.
Src/control.c:21:29: error: 'PPM_NUM_CHANNELS' undeclared here (not in a function); did you mean 'IS_TIM_CHANNELS'?
uint16_t ppm_captured_value[PPM_NUM_CHANNELS + 1] = {500, 500};
^~~~~~~~~~~~~~~~
IS_TIM_CHANNELS
make: *** [build/control.o] Error 1
I think #define PPM_NUM_CHANNELS 6 should also be enabled.
Hi . Is it possible before flashing the motherboard to make a backup of the original file
I don't think that this would be worth a try.
Because it probably won't be successful and not worthful either.
But try you can: stackoverflow.com/questions/43845767/dump-the-current-firmware-from-an-stm32-microcontroller
@@robodurden thanks for tout answer. I think i have destroy m'y board. Because before flashing i have erased memori,bbank, etc.... I dont know why
I'm building an electric scooter and i'm using Feru's firmware. I'd like to use electric bike throttle, and it's working, but there is some interference with ADC1 and ADC2 (i used variant_adc). If i connect both cables to throttle, the ADC values are not same, i don't know why. I don't need steering, so i disabled it, but it won't help. Is there some way to use just ADC1 without ADC2 or do i have to use both?
In this video i too use the Feru firmware with only one potentiometer for speed (=throttle): ua-cam.com/video/DILzw6RzPkE/v-deo.html You simply leave the steer ADC cable unconnected. Better pull it to ground to prevent static overvoltages because any voltage above 3.3V on the two adc pins/cables can destroy the main processor.
@@robodurden Is it ADC1 for speed and ADC2 for steering? I also like to use motors as electric brake, where i need to connect switch and what value i must change to get it working in Feru's firmware with variant_adc? i tried to use standstill and it works, but if you loose throttle too fast it brakes very strong and suddently. i also tried to use torgue mode, but it will not work, also variant_hovercar will not work, i don't know why.
@@jusubbidiy take a look at the wireing image on our githubs. I think green is speed adc but i may be wrong. A scooter is a 2 wheeler. So one motor for back wheel and a motor for front wheel ? Uplaod a video !
Yes, a switch that will pull down the speed adc to gnd would result in an abrupt stop. You could short cut the throttle with another potentiometer to brake down to a slower speed. Or you could switch from the speed potentionmeter to a capacitor that discharges via a resistor withing 2 seconds to 0. When the throttle is active, the capactior would be charged to the same level as the adc input.
Or you abuse the steer potiometer as the brake input and change that analog value in main.c to whatever behavior you like.
@@jusubbidiy You can adjust
#define DEFAULT_RATE 480 // 30.0f [-] lower value == slower rate [0, 32767] = [0.0, 2047.9375]. Do NOT make rate negative (>32767)
#define DEFAULT_FILTER 6553 // Default for FILTER 0.1f [-] lower value == softer filter [0, 65535] = [0.0 - 1.0].
in the config.h to make the brake to 0 affect the speed more slowly. This however also will affect when want to speed up in a flash.
The RATE and FILTER will be used in the main.c here: github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/blob/master/Src/main.c#L254
@@robodurden Blue = ADC1 Green = ADC2 (mine has Grey). Variant_hovercar has #define STANDSTILL_HOLD_ENABLE, i copied this to under variant_adc and used it as brake. It works fine, but you have to loose throttle very gently. I'd like to use #define ELECTRIC_BRAKE_ENABLE, but it will work only with torgue mode and that will not work. I don't know why. That's why i need to use #define CTRL_MOD_REQ VLT_MODE. I make video later today.
cool. Is there a regenerative brake in this program?
Yes the firmware indeed has recuperation ! Don't know why and I haven't yet studied the bldc.c but with my 7s 24V solar car and chain drive (watch my latest video) I can drive as fast as 10 km/h. When I set the speed to zero while driving, the motors brake and a few amps flow back into the battery. Even when I drive downhill at only 3 kmh, the controller manages to step up the motor voltage to charge the battery.
With my own fork (see my online compiler) you have the option to set a max_recuperation in order to not brake too abruptly.
Thanks for everything you do, I wanted to ask you if it is possible to program a sensor pas ?
A pedal assist sensor :-)
It should be possible to detect a periodic current change !!
Simply log the current and do a 3 second fft every 5 seconds. Then you should be able to detect a 120-180 Hz pedaling frequency (two pedals per rev).
And please share your code on success.
@@robodurden Thank you very much, I have no idea how to do it but I am going to investigate it, I love your projects!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Of course, a $7 pas sensor that is mounted to one pedal crank will be far more responsive and stable then a pure software solution.
And if you have a freewheel you would not be able to detect a pedaling before the motor has kicked in :-(
If you don't need the steer value you could take that adc input to read the digital hall sensor. But beware that the adc inputs are not 5v tolerant. The hall sensor of these cheap pas however should also work at 3.3v.
In the main.c it might need an interrupt to count the risings slopes of the pas sensor. I have no experience with stm32 programming. I am only the guy with the online compiler.
You might want to ask Emanuel on his GitHub for help..
It might be best to let an arduino or esp32 read the pas sensor and control the hoverboad controller via uart.
Is it possible to disable the hall sensor, so I can use the hoverboard controller with other none sensored bldc motors? Thanks :)
A lot rc esc also run on a STM32F103 (Or F1 processor on a Naze32 board). So you could ask him to Port his blheli to our boards: github.com/bitdump/BLHeli
I guess it would only need new pin definitions.
And 10s esc are still expensive.
But take a look at my other videos where I test such a cheap "bldc controller" that has the chip for sensorless on the board. Simply search AliExpress for "bldc controller".
Thanks for compiler! I'm trying to get serial communication working with usb-to-ttl converter. It sends data to putty, but it's a mess. COM3 and 9600 baud settings are default. Can you help me?
i guess you do not want to control the hoverboard via serial but only want to read the logging data. With the original Niklas firmware that was indeed asc code which should be received with putty. take a look at the config.h at which baud rate the hoverboard is sending.
With my firmware and i guess also the firmware from Emanuel, the serial data stream is a c-struct which can not be displayed as an ascii stream. Take a look at our arduino .ino example files on our githubs ..
@@robodurden I found out, that correct speed was 38400 baud with Feru firmare. Now logging works and i can read that data. Thanks for a tip!
hello, great tutorial! i have a question, im using 2 hall effect sensors for adc1 and adc2 as throttle and brake/reverse operating them with 5v.
I have the problem when i let go of the throttle the board powers down and i have to turn it back on. The adc values are 1033 min and 4095 max
would giving the throttles 3.3v rather than 5 fix this?
any ideas would be very helpful!
If you let more than 3.3V to the ADC inputs of the controller board you very likely will kill it.
When firmware powers down after speed is set to zero this can be the result of a wrong battery voltage defined at the top of config.h
@@robodurden thank you for your quick reply, ive just looked in the battery section and saw : #define BAT_CALIB_ADC 1704 i havent calibrated that yet, could that cause the powering down issue ?
@@Jason-yd6lb you should not need to calibrate the internal adc with
#define BAT_CALIB_REAL_VOLTAGE 43.0 // input voltage measured by multimeter
#define BAT_CALIB_ADC 1704 // adc-value measured by mainboard (value nr 5 on UART debug output)
but if you keep
#define BAT_NUMBER_OF_CELLS 10 // normal Hoverboard battery: 10s
but only connect a 7s 24 Volt battery, the firmware will shut down when your throttle is telling the firmware to set speed to 0:
#define BAT_LOW_DEAD 3.37 // undervoltage poweroff. (while not driving) [V/cell]
If this does not help you should connect the serial debug output and see what the firmware outputs. Do only connect GND, RX and TX to your computer.
@@robodurden thanks for your help good sir, ive just noticed that my cells is set to 12s instead of 10s for some reason (im using normal hoverboard battery) so ill flash that and hope it works :)
edit: that did the trick, thanks for your advice!
I love the fact that you have made a way to make your own firmware but I do Wonder is there a way to make it run censerless motors
Search eBay for bldc controller.. cheaper and easier
@@robodurden thanks for the response and I understand and have already looked and I know they exist. What I'm trying to ask is can the motherboard of the hoverboard be programmed to run sensorless motors
plis, can tellme the name of the usb devise are beside to the st-link, and how pins are connected?
Look at the image on our GitHubs. Good night.
Hello, thanks for the great video! Is it possible somewhere to set the micro before compilling to at32f403rct6?
No it needs complete new firmware. Search the issues on GitHub. Someone succeeded.to port our firmware but there is no easy tutorial, unfortunately.
@@robodurden Thanks, I'm checking that ;)
hi. how i can connect a pot to control the motors? i have try to find the pins but no lack. can you help plz?
ADC2 is speed and ADC1 is steer: raw.githubusercontent.com/NiklasFauth/hoverboard-firmware-hack/master/pinout.png
Remember to only connect 3.3V to the potentiometers ! Select the ADC preset for the Niklas firmware at my online compiler.
And guys, you should read the GitHub repo !
Sorry I have question how problem My battery level can't show in serial arduino? And can you tell how use PID control for spin wheels run by cm?
You should use my fork as it has reliable serial communication.
Take a look at my Arduino example code and the main.c of my firmware where I define the response communication sruct:
//ROBO begin
typedef struct{
int16_t iSpeedL; // 100* km/h int16_t
iSpeedR; // 100* km/h
uint16_t iHallSkippedL;
uint16_t iHallSkippedR;
uint16_t iTemp; // °C
uint16_t iVolt; // 100* V
int16_t iAmpL; // 100* A
int16_t iAmpR; // 100* A
uint32_t crc;
} SerialFeedback;
When iAmplL + iAmpR == 0 you can take iVolt as the battery level.
Also search in main.c for
#ifdef SPEED_IS_KMH
long iSpeed = abs(HallData[0].HallSpeed_mm_per_s) > abs(HallData[1].HallSpeed_mm_per_s) ? -HallData[0].HallSpeed_mm_per_s : -HallData[1].HallSpeed_mm_per_s;
It should be possible to use HallData[i].HallPosn_mm so the motor speed = cmd2 drives you to the exact position :-)
Hi!
Сan anyone help me resolve one issue?
I used NiklasFauth / hoverboard-firmware-hack CONTROL_ADC version.
I connected simple hall throttle which gives (when powered from 3.3v) 0.8 ... 2.5V.
Somehow I need to narrow the range from 0 ... 3.3V (ADC of firmware reaction) to 0.8 ... 2.5V (for moving only forward according to this firmware).
I changed
#define ADC2_MIN 1215 (its about 1V, if 4095 is equal max 3.3V)
and
#define ADC2_MAX 3200 (its about 2.5V, if 4095 is equal max 3.3V)
lower threshold is working! hoverboard moves only when throttle is slighlty down.
but the max speed is still above reachable threshold for throttle on 3.3V.
How can I limit the upper limit of the ADC max speed threshold to 2.5V?
God damn it, I just caught my self learning ''programing'' just so to turn on 2 ffffuu wheels - by God, out of anger am about to install damn brushes into ffffuu wheels!
Thank you RoboDurden
I do not understand a single word :-)
@@robodurden I don't blame you and I am sorry, thou it's all from a frustration and complicated ''coding'' in which I have no clue!
I started making ''ebike'' and I thought I can use Hboard-board and motors-wheels, - out of my ignorance I thought it will be walk in the park,,, but after building the whole bike construction, I now encounter ''software'' problems that am trying to learn :S
(and all I need its just forward drive no freaking steering nor freaking zurück) and what would be lovely is when I would let go the ''throttle'' the wheels to spin freely!
...anyhow am learning, and I don't dare asking questions coz there's a lot to learn from your channel. THANK YOU for sharing knowledge.
For E-Bike you might want to use a freewheel sprocket: ua-cam.com/video/ux3u7hCExMk/v-deo.html
The motors will not have enough torque without a 1:3 gear ratio. Unless you use both motors and want to drive 50 kmh :-/
@@robodurden I saw that one, its a great video, and yes I will use two motors in a back wheel! today I will get delivered ST Link!
Thanx again.
@@robodurden (I got it working)
...kindly please, in your opinion which one is the best ''.hex'' file just for forward drive Ebike/Scooter - thank you in advance.
Danke tausendmal!
As promised, here is video of my project: ua-cam.com/video/PatJK148ie0/v-deo.html I managed to get Feru's Variant_hovercar working with two throttles. Hand throttle = throttle and thumb throttle = brake. I also make test run, but when i finished it one mosfet blows up (and it's driver Q2CL too). I bought this faulty hoverboard and replaced two mosfets, but now another blow up again. I also noticed that there is high pitch noise coming from mainboard. Earlier i used voltage mode, but now with torque mode this happened. Maeby there was some other faulty components also than mosfets. Maybe drivers?
Very nice project with a lot of love :-)
Yes i too have by now lots of used controller boards where a mosfet burned. Have by now new mosfet from China but had not yet the happiness to replace the burned one. Did that once and then simple another mosfet burned. Try measuring the gate voltage before you solder in a new mosfet. I guess it should not exceed 15 Volt or so.
I have a video on mosfet repair but i fear it will not really help you.
Did the gate pin of the mosfet blow up ? Then it must have been gate over voltage. If one of the others blew up it was over current from the motor ?!
Hi, great tutorial!
I trying to control both motors with one potentiometer.
I'm using your online-compiler with the RoboDurden/hoverboard-firmware-hack.
I encountered 2 issues:
1. I can't get DEBUG_SERIAL_ASCII to work. (It works with the other firmware from NiklasFauth)
What do I need to comment out/in?
2. How do I adjust these parameters correctly?
#define ADC1_MIN 0 // min ADC1-value while poti at minimum-position (0 - 4095)
#define ADC1_ZERO 1100 // ADC1-value while poti at zero-position (0 - 4095)
#define ADC1_MAX 4095 // max ADC1-value while poti at maximum-position (0 - 4095)
#define ADC1_MULT_NEG 1000.0f // Use 1000.0f to calibrate form MIN to MAX
#define ADC1_MULT_POS 1000.0f // Use 1000.0f to calibrate form MIN to MAX
My potentiometer goes from 1010 to 3040. I want the wheels to start turning at 1050 and turn at the highest speed at 3040. I don't want the wheels to spin backwards. I only need one direction.
My fork is only good for uart control (download the Arduino .ino from my GitHub). For potentiometers better use the original Niklas firmware with the ADC preset. Like shown in this tutorial, the Bobbycar adc_control only spins in one direction.
@@robodurden Thanks for the answer. That explains the issue. I'll try to figure it out tomorrow.
@@robodurden Thanks for the response. I got it working yesterday with the original Niklas firmware. The problem was that the analog signal from the potentiometer wasnt good at first. I had to put a 1kOhm pull-down resistor to it.
Simon Hersche good Idea to have an additional resistor to ground in case the potentiometer gets lose and only the 3.3V sets the motors to full power.
I have been trying to hacked i would like to have a forward reverse brake and steering but I'm having issues. Could you set it up copy and paste it underneath my message so I can make sure I have the same settings?
No, you have to learn step by step what you are doing. When one step is not working I might help you with that specific step.
Start by finally watching this video and repeat the Bobbycar adc preset.
And no more 5V to the input cables!
Okay any help would be appreciated. I added 2 // to disabled uart 3 d bug. Removed // from test motors . in failed to compile.
@@speedox3771 error message ?
Guten Abend,
ich habe eine Frage, vielleicht können Sie mir helfen. Ich versuche schon länger mittels PWM (RC-Empfänger) die Motoren anzusteuern. Alles funktioniert so weit aber der linke Motor wirkt sich auf den rechten aus. Wenn ich diesen blockiere, steigt die Drehzahl rapide an und das ganze Teil fährt mir weg ohne Kontrolle. Blockiere ich den rechten passiert nichts.
Haben Sie vielleicht einen Tipp für mich? :)
BTW: Vielen Dank für die Videos und den Compiler, das hat mich schon sehr weiter geholfen.
Beste Grüße!
Welche Firmware? Was sagt der USB dongle Log Output ?
Bei EFeru kann man einzelne Motoren disablen. Das Mal testen.
egal welche Firmware, immer das selbe. Switche aber jetzt immer zwischen EFeru FOC und Ihrer FOC. Nach dem Flash? Die genau Meldung muss ich raus kopieren. Motoren habe ich schon untereinander getauscht (hab 4 liegen) immer das selbe. Habe aber die 10" Motoren :)
@@thomasgrabner3909 vertausche Mal zwei der Motorphasen bei beiden Motoren. Das Phänomen dass plötzlich die Motoren viel zu schnell laufen kann dadurch bedingt sein. Mir die dicken Kabel
Die Hall Kabel weiterhin nach gleichen Farben belassen.
I did the first one it does not seem to be changing for me sorry about the late reply. I'm trying to use the hoverboard motors for my mom's wheelchair to help her be mobile.
Is there any way you can go through the firmware? Set it up to use the Wii nunchuck that way I can go through the entire thing and make sure it matches? Any help would be greatly appreciated.
You have to disable debug output by putting // at the beginning of the definition in config.h :
//#define DEBUG_SERIAL_USART3
// right sensor board cable, disable if I2C (nunchuck or lcd) is used!
Then it compiles. With a lot warnings but the .bin file should work.
@@speedox3771 pwm is no good for steering and speed. You would need two servo tester. Better take two potentiometers.
There is no brake but recuperation. Simply set the speed low and the motors will brake and push energy back into the battery.
The label is only for you to remember what settings you used when compiling the firmware.
Seems that most of you haven't even watched this video..
Hello
I want to use this with only one motor with thorttle e bike
It's possible to have information for programming optimized current speed ?
Thanks for explaining me
For ebike controller and throttle grip read my today's answers in my previous video ua-cam.com/video/UOGolEJIfsc/v-deo.html !!!
But with a 1000 Watt hub motor you could use both motor drivers of the hoverboard controller in parallel ! For safeness the bldc should be modified that only one hall input drives all 12 mosfets. With such a rear or front hub motor you would benefit from the recuperation and have an electric brake Wich would charge the battery down to about 3 km/h :-)
Robo you are such a strong developer
i follow your projects specially hoverboard firmware
but i did stuck in the middle of way
flashed bipropellant firmware on my hoverboard main pcb
seems two side boards also need to be flashed by some firm ware cause it doesnt work!
any idea?
i compiled and tried Feru version too
on github feru has said is workin on side board codes for making a hacked version of firmware
but im hoping there is a way right now i be able to use my hoverboard again... ;)
p.s. i compiled on your great website :))) 👍👍👍
Sorry i will not help you. I have never tested these sideboards. And i do not really like the idea to put all the parts back together to get a functional hoverboard again, when you can simply buy an original hoverboard controller for less then $20.
It may be nice to use the sideboards for new purposes and the Feru firmwares might help for that.
Forget about being able to use your hoverboard again and do something better with the parts.
@@robodurden well im from persia and it costs about 10000000 iranRial (~150$) here in iran!
i tried to compile feru side firmware on your web and faced this message:
latest commit on github.com/EmanuelFeru/hoverboard-sideboard-hack-GD to source code: 2020-06-25T18:18:36Z
local source code is up to date :-)
compiling source/emanuelferu_hoverboard-sideboard-hack-gd
could not parse original config.h
compiling succeeded but could not find hover*.bin file :-(
could not parse original config.h
i just uncommented
//varient_hoverborad
line on config.h
Will answer tomorrow.
Why waste money on a hoverboard if that is a lot of money ?
@@robodurden yeah you r right but actually i wanna try to add some feature to its code
not a normal hoverboard again
as it was yesterday untill i changed it few hours ago to start a new journey :>
1. auto self balance when i turn it on
2. self movement (you know like 9bot Segway Xiaomi that you can move scooter by your smartphone which has its app installed on)
for this feature may i need to add an handle like xiaomi`s hoverboard that helps system to manage weight difference between front and back in order to make a little unbalancement and moves hoverboard !
3. and i dont know yet what other feature i will go for adding :))))))
@@mirahdicano9275 still this will not make the world a better place :-(
But i have been thinking.. i could turn www.pionierland.de into an expert forum where all you tinkeres can register and select how you can tribute to the hoverboard community:
1. which firmwares you have successfully tested
2. which use cases you have succeeded: wheelchair, 4-wheeler, recumbent bike, wind turbine, water turbine, hoverboard, etc.
3. what special features you realized: recuperation/electrice brake, etc.
4. what control methods you successfuly implemented: ppm, serial, adc, etc.
5. would you accept paid jobs ?
That could become a worldwide expert community..
And with car companies desperately searching for programmers, this forum could be a career starting point for all of you.
Would only take me a day to set up a futuristic forum with my oo-database, see for instance www.scriptdoctors.org.
And then i could run a USD 500 Kickstarter to rent another v-server for $4/month only for the online compiler. Right now i only allow only one compilation at a time because i use that vserver for other things too.
With all the different firmwares and different control types, an expert forum in addition to my online compiler could become a very fruitful place - that even could make the world a better place.
So will you back my Kickstarter campaign with USD $10 within the first 24 hours ?
Thx i find it very useful
Hello, very nice video. I am having problem on ST link connection. I have done all the connections right. but i receive the error as " cannot connect to target". The board is powered from 36V battery, DIO, CLK, GND connections are done right. STlink dongle firmware up to date. I also tried powering the board from 3.3V from the dongle(cutting the battery power off.) what do you propose i should do? Thanks
You should shortcut the power button like shown in my video. I too had problems with connecting the dongle :-( There are some different settings in the ST-link app that you could try - but did not really help me. If nothing works then try to connect the dongle to a cheap "blue pill". If that works, than your hoverboard controller might be broken :-/ Sorry that i can not help you better :'(
@@robodurden Thanks for very fast reply. I am shunting the power button as instructed. Do you think that this might be related to different mainboard than the ones used for this firmware? Or is it because it needs unlocking? (they explain that for first flashing unlocking is necessary but no clear tutorial is available for that.)
@@alicangoncu522 i have already flashed two or three boards (gd32 and stm32) without any unlocking. I have no experience with stm32 chips. You might need to ask in a stm32 forum. If you have a DSO oscilloscope you could check the wires. And as i said, try to source a $2 blue pill..
@@robodurden Hi!!!! I bought bunch of new boards and one of them has worked out. (the others have some kind of hardware locks i presume.)
I flashed the firmware using your nice compiler, but cannot get the wheels to run or steer. I am using an RC remote, connected channel 1 and 2 as instructed, powered the RC receiver via 3.3V from the board. Did i make some mistake on the config file can you help out? cheers!
// Battery voltage calibration: connect power source. see . write value nr 5 to BAT_CALIB_ADC. make and flash firmware. then you can verify voltage on value 6 (devide it by 100.0 to get calibrated voltage).
#define BAT_CALIB_REAL_VOLTAGE 43.0 // input voltage measured by multimeter
#define BAT_CALIB_ADC 1704 // adc-value measured by mainboard (value nr 5 on UART debug output)
#define BAT_NUMBER_OF_CELLS 10 // normal Hoverboard battery: 10s
#define BAT_LOW_LVL1_ENABLE 0 // to beep or not to beep, 1 or 0
#define BAT_LOW_LVL1 3.6 // gently beeps at this voltage level. [V/cell]
#define BAT_LOW_LVL2_ENABLE 1 // to beep or not to beep, 1 or 0
#define BAT_LOW_LVL2 3.5 // your battery is almost empty. Charge now! [V/cell]
#define BAT_LOW_DEAD 3.37 // undervoltage poweroff. (while not driving) [V/cell]
#define DC_CUR_LIMIT 15 // DC current limit in amps per motor. so 15 means it will draw 30A out of your battery. it does not disable motors, it is a soft current limit.
// Board overheat detection: the sensor is inside the STM/GD chip. it is very inaccurate without calibration (up to 45°C). so only enable this funcion after calibration! let your board cool down. see . get the real temp of the chip by thermo cam or another temp-sensor taped on top of the chip and write it to TEMP_CAL_LOW_DEG_C. write debug value 8 to TEMP_CAL_LOW_ADC. drive around to warm up the board. it should be at least 20°C warmer. repeat it for the HIGH-values. enable warning and/or poweroff and make and flash firmware.
#define TEMP_CAL_LOW_ADC 1655 // temperature 1: ADC value
#define TEMP_CAL_LOW_DEG_C 35.8 // temperature 1: measured temperature [°C]
#define TEMP_CAL_HIGH_ADC 1588 // temperature 2: ADC value
#define TEMP_CAL_HIGH_DEG_C 48.9 // temperature 2: measured temperature [°C]
#define TEMP_WARNING_ENABLE 0 // to beep or not to beep, 1 or 0, DO NOT ACTIVITE WITHOUT CALIBRATION!
#define TEMP_WARNING 60 // annoying fast beeps [°C]
#define TEMP_POWEROFF_ENABLE 0 // to poweroff or not to poweroff, 1 or 0, DO NOT ACTIVITE WITHOUT CALIBRATION!
#define TEMP_POWEROFF 65 // overheat poweroff. (while not driving) [°C]
#define INACTIVITY_TIMEOUT 8 // minutes of not driving until poweroff. it is not very precise.
// ############################### LCD DEBUG ###############################
//#define DEBUG_I2C_LCD // standard 16x2 or larger text-lcd via i2c-converter on right sensor board cable
// ############################### SERIAL DEBUG ###############################
#define DEBUG_SERIAL_USART3 // right sensor board cable, disable if I2C (nunchuck or lcd) is used!
#define DEBUG_BAUD 115200 // UART baud rate
//#define DEBUG_SERIAL_SERVOTERM // Software for plotting graphs: github.com/STMBL/Servoterm-app
#define DEBUG_SERIAL_ASCII // "1:345 2:1337 3:0 4:0 5:0 6:0 7:0 8:0
"
// ############################### INPUT ###############################
// ###### CONTROL VIA UART (serial) ######
////XXX #define CONTROL_SERIAL_USART2 // left sensor board cable, disable if ADC or PPM is used!
#define CONTROL_BAUD 19200 // control via usart from eg an Arduino or raspberry
// for Arduino, use void loop(void){ Serial.write((uint8_t *) &steer, sizeof(steer)); Serial.write((uint8_t *) &speed, sizeof(speed));delay(20); }
// ###### CONTROL VIA RC REMOTE ######
// left sensor board cable. Channel 1: steering, Channel 2: speed. Use a very short cable!
#define CONTROL_PPM //XXX // use PPM-Sum as input. disable CONTROL_SERIAL_USART2!
#define PPM_NUM_CHANNELS 6 // total number of PPM channels to receive, even if they are not used.
// ###### CONTROL VIA TWO POTENTIOMETERS ######
// ADC-calibration to cover the full poti-range: connect potis to left sensor board cable (0 to 3.3V) (do NOT use the red 15V wire in the cable!). see . turn the potis to minimum position, write value 1 to ADC1_MIN and value 2 to ADC2_MIN. turn to maximum position and repeat it for ADC?_MAX. make, flash and test it.
////XXX #define CONTROL_ADC // use ADC as input. disable CONTROL_SERIAL_USART2!
#define ADC1_MIN 0 // min ADC1-value while poti at minimum-position (0 - 4095)
#define ADC1_MAX 4095 // max ADC1-value while poti at maximum-position (0 - 4095)
#define ADC2_MIN 0 // min ADC2-value while poti at minimum-position (0 - 4095)
#define ADC2_MAX 4095 // max ADC2-value while poti at maximum-position (0 - 4095)
// ###### CONTROL VIA NINTENDO NUNCHUCK ######
// left sensor board cable. keep cable short, use shielded cable, use ferrits, stabalize voltage in nunchuck, use the right one of the 2 types of nunchucks, add i2c pullups. use original nunchuck. most clones does not work very well.
////XXX #define CONTROL_NUNCHUCK // use nunchuck as input. disable DEBUG_SERIAL_USART3!
// ###### MOTOR TEST MODE ######
// slowly move both wheels forward and backward, ignoring all inputs
//XXX #define CONTROL_MOTOR_TEST
//XXX #define CONTROL_MOTOR_TEST_MAX_SPEED 300 // sweep slowly from -MAX_SPEED to MAX_SPEED (0 - 1000)
// ############################### DRIVING BEHAVIOR ###############################
// inputs:
// - cmd1 and cmd2: analog normalized input values. -1000 to 1000
// - button1 and button2: digital input values. 0 or 1
// - adc_buffer.l_tx2 and adc_buffer.l_rx2: unfiltered ADC values (you do not need them). 0 to 4095
// outputs:
// - speedR and speedL: normal driving -1000 to 1000
// - weakr and weakl: field weakening for extra boost at high speed (speedR > 700 and speedL > 700). 0 to ~400
#define FILTER 0.05 //XXX // lower value == softer filter. do not use values
@@alicangoncu522 first flash the CONTROL_MOTOR_TEST to verify that your board and motors are functional. Another user succeeded with PPM and learned that With CONTROL_PPM you need to set PPM_NUM_CHANNELS in config.h to those of your PPM transmitter (like 10 for example).
can you help me how to connect Arduino with hoover board wiring diagram and code for Arduino for speed control
so i select the file that i want and just press the compile buton, i dont have to modify the code??
You at least have to choose an input method by uncommenting a variant_xy in config.h
Simply try an error or Watch my latest ide tutorial
You don't select a file, you select a firmware and then modify the file config.h to finally hit compile :-)
@@robodurden Yes, that the problem, I dot know what configuration I need because I don't understand
@@gianlucadionisi6730 first you need to know how you want to control the motors. Then look at the config.h and choose a variant_xy.
Go with the Emanuel Feru firmware.
Watch my absolute beginners video :-)
@@robodurden want to control it with Potis
Have you tried flashing the split-motherboard version? I tried and it display programming error @ 0x08000000.
I don't know what a split version is. Furthermore my compiler should output more information on error.
Like you I have also the separated type of mainboards which have 4 pins for ST-LINK connection each of them. Do you have any suggestions for those type?
@@WhyNotCycles no I have only one stlink socket. Don't know what you are talking about. Read the entire readme of the original Niklas GitHub.
Upload a video describing your Problem.
@@robodurden there are some hoverboards out there working with two mainboards, one per bldc motor. Each of those boards have the 4pin holes and i m not sure if i should flash the new filmware to each of them.
For now i have connection issues i have to solve. My target is to power both bldc's with one throttle signal...
Thank you for your very helpful video tutorial!
@@WhyNotCycles if you don't have the identical Motherboard the firmware will probably not work anyway.
can i use two potentiometer for left and right for different speed
That would be a tank mode. Go to the Emanuel Ferry FOC github und study the different VARIANT_XYZ. If you don't find such a tank mode you can modify the main.c
thanks a lot
Hi I'm working on the same type of project but Im having one problem after uploading the .bin file it upload fine but when its done I get a continuous beep can you help
Get a second board to check the first one is not broken. Is it exactly the same board as on the GitHub ? Different board might have different pins connected.. Did you install one of my presets ? The adc- bobbsCar works fine on my board.
@@robodurdenYes I have a different board. But I'll try another board and let you know thx
@@brooklyn_uav4589 Check if your board has the identical STM32F103RCTx processor ! And even if same mcu, the pins could be mapped differently. You could help others (.... !) in learning the pin assignment of your board. Is the serial debug output still working on your board (besides the continuous beep.) Then you could check whether the two adc inputs are also mapped correctly. Then take a look into the source code to find all the pins used by the firmware (input: hall sensors, output: mosfet drivers..) It might only need a few changes in the pin setup to make your board work. We could modify the firmware to set all pins to input but the TX of the debug serial. Then logging all the new input pins to the serial and you could quickly identify the hall sensor inputs. Same could be done for the mosfet pins by setting all mcu pins to output..
hello, how could I decompile a binary file, to modify and recompile it?
It very very like is not worth the labour. Even if you could somehow download the binary from the board.
@@robodurden is that I have a binary file that someone published for a homemade electric bicycle, and the user only started a motor, and I would also be interested in turning the direction of rotation of the motor
@@robodurden you could guide me on the way to generate the program for my bike, I'm not very involved in programming
@@Elec3D I don't see why I should help you.
You are a legend 👍😏
Hey Robo Durden, thank you so much for one of the best video. I'm new here , I have one hoverboard card and one STM32 link , whenever I try to connect using stmcube programmer or STM32 utility. It always give me the error, target not found . Kindly can you give me the brief idea of wire diagrams for power supply to hoverboard. thx lot
No you have try more yourself. Check that the stm32 dongle is properly installed and working, check that hoverboard controller board is powered by 36V, check that the power on switch is bridged. If nothing works, get yourself a plue pill and try to connect to this stm32. I have made several beginner videos. This is not the absolute beginners video. bye and good luck 🙂
You are a super man 👨 ❤ 💙. it's working. God bless you for great help. Thank you so much
@@ahmadhussainwebshare1001 See how many men have been killed in the name of god. God for sure must be evil. Please no blessing of whatever god is yours !
thanks robo for you great online compliler I am using phail firmware need your help please if I want to to steer a high speed at the same place without going forward or backward .. so I need to increase steering speed how could I do it and what line need to be modified in the code. thanks and regards
For questions concerning the different firmwares better open an issue at the corrosponding githubs. to steer without moving forward you normaly set speed to 0 and steer to how fast you want to steer. so +1000 should be fasted steering to the right. or spinning right at full speed in place.
I think the phail firmware is no longer updated. Either follow the creator to biporpellant, use the original niklas, my better serial or give the new Feru firmware a try.
Thanks for your fast replay I tried to compile feru using your online complier without making any modifications but it turns error could not parse original config.h
@@mohammedmy you have to uncomment one of these lines at the beginning of config.h :
//#define VARIANT_ADC // Variant for control via ADC input
//#define VARIANT_USART // Variant for Serial control via USART3 input
//#define VARIANT_NUNCHUK // Variant for Nunchuk controlled vehicle build
//#define VARIANT_PPM // Variant for RC-Remote with PPM-Sum Signal
//#define VARIANT_PWM // Variant for RC-Remote with PWM Signal
//#define VARIANT_IBUS // Variant for RC-Remotes with FLYSKY IBUS
//#define VARIANT_HOVERCAR // Variant for HOVERCAR build
//#define VARIANT_HOVERBOARD // Variant for HOVERBOARD build
//#define VARIANT_TRANSPOTTER // Variant for TRANSPOTTER
You are a great man thank you will try it now
what the name and where you buy this interfaces usb to comunicate with hoverboard?
i buy on ebay and aliexpress. If you plan to use an arduino mini which has no usb interface, get yourself an usb-uart dongle with 6 pins = DTR for automatic upload.
If you plan to use uart2 of the hoverboard controller which is NOT 5V tolerant, you need an usb-uart dongle that can output 3.3V on the RX line !! a 3.3V/5V switch on the usb-uart dongle mostly only changes the VCC voltage, NOT the RX voltage. You have to buy several cheap dongles with a 3.3/5 V switch to be lucky enough to get one that can output 3.3V on the RX line.
But when you only use uart3 = the short cable, you can go with any usb-uart dongle.
watch my latest tutorial for absolute beginners !
@@robodurden produto.mercadolivre.com.br/MLB-1617322234-modulo-conversor-usb-serial-rs232-ttl-ft232-5v-33v-arduino-_JM?matt_tool=79246729&matt_word=&matt_source=google&matt_campaign_id=6542746973&matt_ad_group_id=82254694281&matt_match_type=&matt_network=u&matt_device=c&matt_creative=385099301982&matt_keyword=&matt_ad_position=&matt_ad_type=&matt_merchant_id=118715425&matt_product_id=MLB1617322234&matt_product_partition_id=472057081367&matt_target_id=pla-472057081367&gclid=Cj0KCQiA3NX_BRDQARIsALA3fIL3QP554Nqn1NFe15pvg1pbwqN8vc--W_xRzHsAJPufzR9FjzDu0ZwaAt-MEALw_wcB
this switch to 5v and 3v output ?
3V and only attach dongle to short cable !!
its possible with FT232RL FTDI USB?
what is possible ?
You can not flash a stm32 with UART, you need a ST-Link V2 usb dongle.
If you want to control the hoverboard via uart serial connection, of course a usb uart dongle could help you to control the board from a pc
I would like to use a 2 Channel RC remote control for a rc car. Any ideas?
Choose CONTROL_PPM and Connect the Receiver to the Green cable of left Sensor Board: raw.githubusercontent.com/NiklasFauth/hoverboard-firmware-hack/master/pinout.png
@@robodurden Hey, Just want to thank you for your work. The online compiler is a great help.
Hi, did you get it to work?
Gd work Durden! I have been testing the roboDurden hoverboard-firmware-hack for a while and everything thing is working fine. But when I uncommented #define KMH line to work with KMH, the arduino does not work as it should. For EXAMPLE, sending Send(whatever more than 3 for the speed, 0 for the steer) run the wheels at the highest speed. And sending whatever after that the hoverboard will not react at all. So it is reacting with the first sended command and also incorrectly. Do u know what the problem could be!?
This is a long known bug which i thought i had solved by in main.c with:
if (abs(HallData[0].HallSpeed_mm_per_s) > abs(HallData[1].HallSpeed_mm_per_s))
{
#ifdef INVERT_L_DIRECTION
iSpeed = -HallData[0].HallSpeed_mm_per_s;
#else
iSpeed = HallData[0].HallSpeed_mm_per_s;
#endif
}
else
{
#ifdef INVERT_R_DIRECTION
iSpeed = -HallData[1].HallSpeed_mm_per_s;
#else
iSpeed = HallData[1].HallSpeed_mm_per_s;
#endif
}
When the speed goes to max, the control loop had the inverted max speed because of different INVERT_X_DIRECTION ..
Do you have my latest version installed ??
Also give my FOC fork a try. I am no longer using the Niklas fork and the Emanuel fork is compatible to my old fork.
@@robodurden yes I belive it is the latest one cause I downloaded yesterday from the compiler. I have tried ur FOC version with the USART but it is not working as I wanted. It run for some milli seconds and then stops, then u have to use Send() again. It behaves as the orginal Emanuel one. It send correct spedds but it runs just for some milliseconds.
@@mazenbahy5012 I would be happy if you continue to resolve the bug :-)
Try commenting/uncommenting INVERT_L_DIRECTION and INVERT_R_DIRECTION to see if my SPEE_IS_KMH control loop then works.
Concerning the Emanuel fork, i send Send() every 100 ms and have no problems. You should do that too unless you verfiy with the returned SerialFeedback that your send command indeed got accepted. As i have this nasty noise on INPUT_PULLUP lines (so also the RX line), i can not rely on reading the struct SerialFeedback :-/
@@robodurden Hello Again!
I did some testing regarding the points you said about.
For all the cases are tested I hade Send(40,0); delay(3000);Send(0,0); in the Arduino setup(){}.
- Uncommented both R, L ----> Both wheels start fast, the same direction, and continue forever without reacting with the Send(0,0).
- Commented both R, L ----> Both wheels start fast, the same direction, and continue forever without reacting with the Send(0,0).
- Commented R, Uncommented L ---> Both wheels start fast, different directions, and continue forever without reacting with the Send(0,0).
- Commented L, Uncommented R ---> Both wheels start fast, different directions, and continue forever without reacting with the Send(0,0).
Could you activate your settings and then change the minus signs in the main.c code I posted here those lines that are active for your invert defines
Are you working on my old Niklas fork or the new Emanuel fork ?
you are the best your friend from morocco
Hi!
I have tried ur firmware and ur arduino code example and it working very well and I can steer the robot. But I wanna to steer the robot by giving it vr and vl by myself or by giving it angular and linear speed. I tried to search into the firmware code to see where you convert speed and angle to vr and vl so I can send them the values directly but I can see nothing. Can u give some ideas! or solution! Best Regards and thanks again.
speedL and speedR are set in main.c: at lines 472+ github.com/RoboDurden/hoverboard-firmware-hack/blob/master/src/main.c#L472
But you should stay with speed and steer and send speed = (vr+vrl)/2 and steer = (vr-vl)/2
@@robodurden Thank you so much for the fast and interesting reply. The problem is that I have just the linear and angular speed (I am working with ROS). According to your recommendation I did not change speed and angle . Without I convert them in arduino like this:
float linear_speed = cmd_vel.linear.x;
float angular_speed = cmd_vel.angular.z;
vl=(linear_speed-e*angular_speed)/r;
vr=(linear_speed+e*angular_speed)/r;
localSpeed=(vr+vl)/2;
localSteer=(vr-vl)/2;
Send(localSpeed,localSteer);
The linear and angular speed in my example are in m/s so localSpeed are also in m/s so would it feets with the -1000 and 1000 that u have? I mean how should I convert them ?
Do you think it is good solution!
@@mazenbahy5012 if you want to dictate an absolute speed in m/s or km/h you should uncomment my SPEED_IS_KMH define. Then i guess the -1000 to +1000 for the steer will be -100% to +100% of the speed value where 60 would be 6 km/h and 150 would be 15 km/h. You would need to multiply by 3.6 to get from m/s to km/h.
But i have no idea if this will work. I calculate the real speed for the closed loop to be the maximun of either the left wheel or the right wheel.
So when you would do Send(140,-500); that should/could result in the right wheel to spin at 14 km/h and the left wheel at 7 km/h.
I suggest you restart from where you calculate cmd_vel.linear.x; and change that calculation to a speed and steer that our firmwares can handle.
And definitely move on to the Emanuel Feru firmware !!! It too has serial communicaton and absolute speed. And it is about 23 % more energy efficient while beeing about 16% faster and on top way more silent.
Watch my next video coming today or tomorrow !
I will move on too and stop maintaining my firmware.
Please help how use app for ASCII protocol and pid control..sorry I'm newbe
SUBBED!! THANK MY FRIEND!
*******I AM TRYING TO HACK HOVERBOARD TO KEEP CONSISTENT SPEEDS FORWARD EVEN AROUND TURNS. I GOT AN ALL TERRAIN HOVERBOARD THINKING THAT IT WOULD KEEP UP WITH MY OTHER ZIPPY FAST HOVERBOARD CART BUILDS. PROBLEM WITH ALL TERRAIN IS IT SLOWS DOWN TO SQUAT SPEEDS WHEN TURNING. THANKS AGAIN ROBO!*******
My Feru fork is complete and also features constant speed in curves. The FOC bldc control is far superior to the original Fauth firmware !
Hi,
Great work!
Maybe you can help me with this raspberry pi 3 python code?
while 1:
ser = serial.Serial(
port='/dev/ttyUSB0',
baudrate = 19200,
parity= "N",
stopbits= 1,
bytesize= 8,
timeout=1
)
ser.write(bytearray([0, 100, 0, 0]))
ser.close()
break
Communication works, but the values I send are not correct.
I appreciated all the help I can get !!!
/ Peter
Отлично. Осталось самому это сделать.
I finally got it work
Hallo
ich würde gerne mein Moving Object mit einem Joystick steuern wie in diesem Video ua-cam.com/video/kdshcX9SFF8/v-deo.html.
Leider wurde ich durch die ganzen Informationen welche ich in den Komentaren gelesen habe etwas verwirrt und weiß jetzt nicht was ich machen soll damit alles funktioniert. Kann mir jemand helfen?
Watch my absolut beginners Video. There i too Talk about such a Joystick with two Potentiometers.
@@robodurden Kann ich auch die Version benutzen? RoboDurden/hoverboard-firmware-hack
@@chrisxcube9831 die ist nur für serial communication und obendrein ziemlich veraltet. Für Joystick nimm definitv das Original von Emanuel Feru !
will chek in to this when i aquire motors (Y)
oh Didier Super !!
your awesome thank you so much could you add the Gen2 version of the hoverboards with 2 sided motherboards. I am good at soldering but not at coding stuff
You must ask Niklas on his GitHub. He made the original firmware. I only made the online compiler.
@@robodurden is this not the actual firmware github.com/flo199213/Hoverboard-Firmware-Hack-Gen2 ?
@@robodurden I was wondering if you could help I have finally got my hands on an st32 arm chip controller and was able to flash with your complier on the stock firmware. I am trying to use just Ppm to go forward I dont need steering. I have a flysky 2.4ghz receiver plugged into green for signal, black for ground, and second red for 5v. I turn it on and both wheels test by going back and forth slowly with a bunch of beeps then shuts off. It happens before I can bind the remote. And if I turn it on it just repeats. Any thoughts what I did wrong.
@@plojm123 thanks for the Hoverboard-Firmware-Hack-Gen2 link. I will try to add that repo to my online compiler in a few days :-)
@@plojm123 f**k, UA-cam deleted my long answer because of a AliExpress link to a level converter so you do not let 5V but 3.3V to the green input cable :-(
Try running the rc receiver with 3.3 V.
Seems you compiled the original config.h with the CONTROL_TEST.
Simply click the Load link beside CONTROL_PPM at the Bobby Car preset section at the bottom of my page. Then study the config.h for the XXX changed being made.
Im using your compiler for my rc mower. I tried to compile by clicking The Armchare with ppm link on the bottom and then the compile button but im getting and error.
Src/control.c:21:29: error: 'PPM_NUM_CHANNELS' undeclared here (not in a function); did you mean 'IS_TIM_CHANNELS'?
uint16_t ppm_captured_value[PPM_NUM_CHANNELS + 1] = {500, 500};
^~~~~~~~~~~~~~~~
IS_TIM_CHANNELS
make: *** [build/control.o] Error 1
As i said in the video: after clicking such a preset 'load', search the page for XXX and you will quickly see that PPM_NUM_CHANNELS needs to be uncommented. And don't forget to set the exact number of channels that your receiver has !
@@robodurden Ok I uncommented PPM_NUM_CHANNELS and left it at 6 because i have a fs-ia6b it compliles but shows this
Src/main.c: In function 'poweroff':
Src/main.c:85:9: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
if (abs(speed) < 20) {
^~~
Src/main.c: In function 'main':
Src/main.c:151:5: warning: implicit declaration of function 'PPM_Init'; did you mean 'HAL_Init'? [-Wimplicit-function-declaration]
PPM_Init();
^~~~~~~~
HAL_Init
Src/main.c:288:7: warning: implicit declaration of function 'setScopeChannel' [-Wimplicit-function-declaration]
setScopeChannel(2, (int)speedR); // 3: output speed: 0-1000
^~~~~~~~~~~~~~~
Src/main.c:294:7: warning: implicit declaration of function 'consoleScope' [-Wimplicit-function-declaration]
consoleScope();
^~~~~~~~~~~~
Src/main.c:207:13: warning: unused variable 'scale' [-Wunused-variable]
float scale = ppm_captured_value[2] / 1000.0f;
^~~~~
Src/main.c:148:9: warning: unused variable 'direction' [-Wunused-variable]
float direction = 1;
^~~~~~~~~
Src/comms.c: In function 'consoleScope':
Src/comms.c:49:12: warning: passing argument 1 of 'memset' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
memset(uart_buf, 0, sizeof(uart_buf));
^~~~~~~~
In file included from Src/comms.c:6:0:
/usr/arm-none-eabi/include/string.h:33:9: note: expected 'void *' but argument is of type 'volatile uint8_t * {aka volatile unsigned char *}'
void * memset (void *, int, size_t);
^~~~~~
Src/comms.c:50:13: warning: passing argument 1 of 'sprintf' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
sprintf(uart_buf, "1:%i 2:%i 3:%i 4:%i 5:%i 6:%i 7:%i 8:%i
", ch_buf[0], ch_buf[1], ch_buf[2], ch_buf[3], ch_buf[4], ch_buf[5], ch_buf[6], ch_buf[7]);
^~~~~~~~
In file included from Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_def.h:52:0,
from Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal_rcc.h:47,
from Inc/stm32f1xx_hal_conf.h:218,
from Drivers/STM32F1xx_HAL_Driver/Inc/stm32f1xx_hal.h:48,
from Src/comms.c:1:
/usr/arm-none-eabi/include/stdio.h:244:5: note: expected 'char * restrict' but argument is of type 'volatile uint8_t * {aka volatile unsigned char *}'
int sprintf (char *__restrict, const char *__restrict, ...)
^~~~~~~
Src/comms.c:54:40: warning: passing argument 1 of 'strlen' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
UART_DMA_CHANNEL->CNDTR = strlen(uart_buf);
^~~~~~~~
In file included from Src/comms.c:6:0:
/usr/arm-none-eabi/include/string.h:41:9: note: expected 'const char *' but argument is of type 'volatile uint8_t * {aka volatile unsigned char *}'
size_t strlen (const char *);
^~~~~~
Src/stm32f1xx_it.c: In function 'EXTI3_IRQHandler':
Src/stm32f1xx_it.c:224:5: warning: implicit declaration of function 'PPM_ISR_Callback'; did you mean 'PPM_SysTick_Callback'? [-Wimplicit-function-declaration]
PPM_ISR_Callback();
^~~~~~~~~~~~~~~~
PPM_SysTick_Callback
I uploaded that bin file and im not getting a response.
@@andrewkennett940 These all are only Warnings and signal bad programming behaviors. Im am not responible for the code of the different githubs.You should open an issue there.
And here you should always state which repo you used for compiling.
When the selected repo with no changes compiles and is running successful on your hoverboard but the modified code does not, you should attach a usb-uart dongle to read the log data.
I will checkout gethub again.
Hi möchtest du dsd ganze nochmal auf deutsch machen?? Währe sehr nice!!!
Eigentlich nicht. Hat auch seinen Grund warum ich bei deutschen Videos die Kommentarfunktion abschalte..
@@robodurden achso nagut, könntest du ein Plan machen von der Verkabelung am Mainboard? Also für Lenkung, vorwärts rückwärts und halt diesen 30 kmh Knopf weil so ganz blick ivh da nicht durch währe sehr interessant und warscheinlich hilfreich nicht nur für mich
@@quartzii_uwu Sorry.
@@robodurden oder gibts irgendwo nen kompletten Schaltplan?
@@quartzii_uwu github.com/NiklasFauth/hoverboard-firmware-hack
Hi the compiler link is not opening.
Confirmed. Maybe I forgot to pay the monthly fee or my server is under attack. But I am still in bed :-)
i needed to restart my server. Will keep an eye on it's performance today..
@@robodurden If you need any help then it will be an honor for me .I am a big fan of you .I am doing freelance web security and designing work after my spinal injury
@@khanatifali1800 you either help or abuse. Sorry, i am the born loser and losers do not have any friends. So for sure i do not want anyone to be a fan of mine.
@@robodurden Brother you are a hero for me your are far better than those people who keep the knowledge but not share ,Your work and data will help people who are confined in their homes and I am sure they will pray for you like me.By the way I am also a loser but I will not give up I want to make low cost solar powered carried for person with disabilities so everyone can afford it or build it.
cant make a hex that work with the ninchuck what am i doing wrong?
Yes when you select my Nunchuck bobycar preset you get the compile error:
Inc/config.h:149:4: error: #error CONTROL_NUNCHUCK and DEBUG_SERIAL_USART3 not allowed. it is on the same cable.
#error CONTROL_NUNCHUCK and DEBUG_SERIAL_USART3 not allowed. it is on the same cable.
So simply put "//" before the "#define DEBUG_SERIAL_USART3" line in the config.h and it will compile.
Simply hit strg+F on my page and search for DEBUG_SERIAL_USART3 :-)
It is also always good to search for XXX as this will show you the changes my default presets have done. This would have already pointed you to:
#define CONTROL_NUNCHUCK //XXX // use nunchuck as input. disable DEBUG_SERIAL_USART3!
Have fun :-)
@@robodurden thanks for the fast replay . still cant make it copiling find the define uart3 and putt // before it and define nunchuck and removed // but still cant copiling
@@gonza0076 I now tested both versions NiklasFauth/hoverboard-firmware-hack and p-h-a-i-l/hoverboard-firmware-hack , both with the Bobbycar and the armchair "load". All compile successfully and it always only needed the "//" before the "#define DEBUG_SERIAL_USART3". What browser are you using? When compilation failed you get an error message. Post it here.
@@robodurden so i dont have to remove the // before define nunchuck?
@@gonza0076 of course you have to if you don't use my multiple one-click defaults. But now please repeat what i have just tested! Scroll down click on "load", add the "//" to disable serial debug in the config.h and hit compile :-)
hello to you great job because I'm struggling to death because I need you basically I flashed my motherboard and it worked and when I wanted to flash the sideboards I unfortunately made a false manipulation and since the motherboard lights up more on the button and when I try to reinstall a program with st flash utility I have a sentence the elf loader is not accessible could you light me because I dry and the little one would like his hovercar thank you to you to take the time to read me
You are the first one i know that tried github.com/EmanuelFeru/hoverboard-sideboard-hack-STM ?! You can destroy pins of the motherboard with 5 V for example. Maybe something like that happened with your programming pins. Try flashing with the battery power at 36 volt. Sorry i do not think i can be of much help.
@@robodurden ah ok thin because its me embete a lot else what does mean blink with the battery
@@babayaga5976 Sorry, ask the creator of the firmware with a github issue at his repo.
And better let your words run through the google translator.
if you want to sell this hoverboard and STM32 link so I can buy from you.Need help .
indeed we all would need a source of these outdated hoverbard controllers. Maybe we indeed should find a Chinese factory to continue making these old boards..
this guy is high as fuck XD
this is not meant as a hate comment I'm high as well just in a different level i guess XD
would you add benjaf
/hoverboard-firmware-hack-esk8 to your compiler please
i want to modifay lines and with platformIO i coud´t. The file.io is missing and im a rookie in this things
i had a problema with VARIENT_SKATEBOARD. (ua-cam.com/video/I_INhBaeQ08/v-deo.html ) same with VARIENT_PWM so i tried esk8 from benjaf but i thing is a bit slow and erratic (ua-cam.com/video/nKo6hYb2jNk/v-deo.html ) so i want to look the code.
Thnks
That github has last commit 17 months ago :-( And it is not based on the great Emanuel Feru fork :-/
Try his FOC firmware first: github.com/EmanuelFeru/hoverboard-firmware-hack-FOC/blob/master/Inc/config.h
Hi!
Сan anyone help me resolve one issue?
I used NiklasFauth / hoverboard-firmware-hack CONTROL_ADC version.
I connected simple hall throttle which gives (when powered from 3.3v) 0.8 ... 2.5V.
Somehow I need to narrow the range from 0 ... 3.3V (ADC of firmware reaction) to 0.8 ... 2.5V (for moving only forward according to this firmware).
I changed
#define ADC2_MIN 1215 (its about 1V, if 4095 is equal max 3.3V)
and
#define ADC2_MAX 3200 (its about 2.5V, if 4095 is equal max 3.3V)
lower threshold is working! hoverboard moves only when throttle is slighlty down.
but the max speed is still above reachable threshold for throttle on 3.3V.
How can I limit the upper limit of the ADC max speed threshold to 2.5V?
Make sure the hall sensor gives analog output values. Common hall sensors only output on or off.
I also suggest you connect serial debug output and see what analog values get processed.