No video

Hoverboard Robotics Tutorial Part 3B: Hoverboard Robot Drive with Joystick Potentiometers

If you find my videos helpful, you can say thank you and help me to make more tutorials with a cup of coffee or by picking up a copy of Practical Robotics in C++. Thank you for your support!
www.buymeacoff...
Practical Robotics in C++: amzn.to/3CJAqHs
Joystick: amzn.to/3qvE579
ST-Link V2 programmer: amzn.to/3wb43R0
Hoverboard Robotics Tutorial Part 3B: Hoverboard Robot Drive with Joystick Potentiometers
In this video, we apply the skills we learned in video 2 to configure and flash the control board with new firmware for use with a joystick or other potentiometers. We then cover in detail how to wire the potentiometers to the hacked hoverboard control board, and how to make some optional changes to the firmware
** LINKS FROM THE VIDEO **
Part 2 of this series - in case you still need to understand how to flash the firmware on the hoverboard control board : • Hoverboard Robotics Tu...
Alex Makarov hoverboard Firmware fork: github.com/ale...
Emanuel Feru Hoverboard Firmware: github.com/EFe...
Potentiometers and voltage dividers: • Potentiometers and Vol...
********************************
Practical Robotics in C++ : learn to build autonomous robots. Now available on Amazon in most markets, or the publisher's web store!
Amazon U.S.: www.amazon.com...
Barnes and Noble:
www.barnesandn...
BPB Publications:
bpbonline.com/...
Amazon Canada:
www.amazon.ca/...
Amazon UK:
www.amazon.co....
Amazon Germany:
www.amazon.de/...
Amazon Italy:
www.amazon.it/...
Amazon Mexico:
www.amazon.com...
Amazon Japan:
www.amazon.co....
Amazon Australia:
www.amazon.com...
Practical Robotics in C++ teaches real autonomous robotics without the reader needing a university degree to follow the tutorials. Features the Raspberry Pi. Topics covered include:
- Choosing and setting up a computer for robotics
- Electronics for Robotics
- Buying, building, and hacking robots
- Motors: Different types, how to control them
- Communications with sensors and other devices
- Robot control theory and controller design
- Mapping and Autonomous Path-Planning
- Autonomous motion
- Robot tracking and localization
- Sensors for robotics
- Computer Vision
- Sensor Fusion
- Final project: Build and program a complete autonomous robot!
*****************************************************************************

Пікірлер: 57

  • @TheOldKid
    @TheOldKid2 жыл бұрын

    All of this is pretty new to me. I have been looking for 4 to 5 days for some info that would seem to be common sense to people experienced in this area. Based on this video in pretty sure ill find what im looking for in one or more of your other videos. If after watching all videos I still haven't found it ill ask. The least I can do is watch your videos. After all you're the most promising I have found. Im sure ill learn other things ill need to know at a later date. Thanks

  • @victorreppeto7050
    @victorreppeto70504 ай бұрын

    I am so excited to find a video that explains how to use a normal joystick to control a rather inexpensive controller for wheelchairs. I love Fixing old Wheelchairs and getting them to people that can't afford one. I hope it turns out to be predictable.

  • @cemyasam
    @cemyasam2 жыл бұрын

    10 NUMBER 5 STAR . EXCELLENT EXPLAINED THANKS SO MUCH. I WANTED TO BUY YOUR BOOK BUT IT IS NOT IN TURKISH

  • @MrBurakko
    @MrBurakko9 ай бұрын

    Thank you - great tutorial. I have a question: I Build an ADC-controlled electric scooter. If I want to control both motors at the same time, I only need to use one potentiometer on first input. And for the second input, solder GND->5k->ADC

  • @uumotor
    @uumotor3 ай бұрын

    Does any knows how to make the motor start softer?

  • @petarilic6207
    @petarilic62072 жыл бұрын

    Hi Candas, great project, ya saved me money and time by doing the nice code for better commutation and free wheeling. I menaged to programe and uppload the firmware to several boards, but mu knoweledge is wery little, and i would like to know how i can connect a single hall efect throttle to control the motors to use it as an e bike controller, since foc frewhelling allows that. Thank you for opensource sharing.

  • @george701122
    @george7011222 жыл бұрын

    Thank you for the detailed information on the code changes the complete setup, I really like the speed limit in the Low Pass Filter ( main.c ) as gratitude of your work I just purchased an e-copy from your book Practical Robotics with C++ I am sure will be very useful and will learn a lot. Have one question if you can advise? ADC with speed mode and with mid type potentiometer joystick ( 10K the same joystick you show in your video ) control limiting the steering value to 0.1 from mac in low pass filter really helped to reduce the speed but would like to do some extra modifications - would like to keep the forward speed on maximum value but to limit only the reverse speed to be not bigger to 5 km/h ? will appreciate you advice

  • @PracticalRobotics

    @PracticalRobotics

    2 жыл бұрын

    Hi, and thank you! I'm going a bit off of memory but first: change the multiplier I added in the low pass filter until you find the value that gives the reverse speed you want. If we pretend that value is -0.4, then I think could replace the speed *= .1; with if (speed speed = -0.4; } I haven't tested this yet or had coffee - let me know if it works!

  • @george701122

    @george701122

    2 жыл бұрын

    Good morning and thank you for your help I have done the modification in the low pass filter following your recommendation and YES it works perfectly now I can get the maximum forward about 620 RPM speed and reduced reverse speed of 40RPM and also reduced the steering to 25RPM however I have lost the beeping sound on reverse I guess the RMP is too low and the firmware doesn't capture it. Is there any way to fix the beeping sound on reverse and also add beeping sound on steer ?@@PracticalRobotics

  • @PracticalRobotics

    @PracticalRobotics

    2 жыл бұрын

    @@george701122 Very cool. For the beeping it looks like in main.c there is a if statement: else if (BEEPS_BACKWARD && ((speed I imagine you should be able to that

  • @george701122

    @george701122

    2 жыл бұрын

    ​@@PracticalRobotics Thanks again for your valuable input it help a lot, I followed your recommendation and indeed works perfectly also added BEEPS on steer. So far have noticed only one issue when fast releasing the joystick in a neutral position ( from forward to neutral ( pot. mid. point ) with 120KG load ) in 80% of the cases the hoverboard is automatically shutting down I have measured voltage pick over 70V I guess battery BMS is engaging automatically overvoltage protection any idea how to overcome this ? is there any algorithm that can change the status of the speed potentiometer from Max to Mid more gradually to avoid that voltage pick?

  • @PracticalRobotics

    @PracticalRobotics

    2 жыл бұрын

    @@george701122 That's an interesting problem. I think something like the solution I use in this program: github.com/lbrombach/practical_chapters/blob/master/chapter12/simple_diff_drive.cpp would work for this too. That program makes sure that sudden changes to motor speed commands happen gradually by comparing the requested value to a static variable holding the last commanded value. Look starting on line 209. leftPwmReq is the value currently being requested. leftPwmOut is the last value actually published. If the request does not equal the last value already out, it only changes what is being published by PWM_INCREMENT. Hope it helps, Lloyd.

  • @fedemon76
    @fedemon76 Жыл бұрын

    Hello, maybe a stupid questions...I have the same joystick and I'd like to put inside a case. How did you dismount the upper part to make possible through a little hole? Which are the push button wires? Thanks and congrats for your job

  • @PracticalRobotics

    @PracticalRobotics

    Жыл бұрын

    I don't think I did... I think the hole is big enough for the joystick and then you a ring or rubber boot to cover the hole. My memory of that detail is quite fuzzy.

  • @candas1
    @candas12 жыл бұрын

    It's true the inputs are not scaled in speed mode to reach the maximum rpm set in config.h when the input is at maximum. But you can use speed_coefficient parameter for that. This value is in fixed point so it might be counter intuitive. Great video, do you mind if I add a link to it in the wiki for adc variant?

  • @PracticalRobotics

    @PracticalRobotics

    2 жыл бұрын

    That's a good tip - thanks! I somehow manage to not see that parameter. And absolutely, we all benefit from freely sharing.

  • @PracticalRobotics

    @PracticalRobotics

    2 жыл бұрын

    I just realized that you are Emanuel. Man, thank you very much for your work on your awesome project. Particularly for robotics where the rest of the project already takes a long time, you've saved many of us a lot of time just getting locomotion done. I am very grateful to both you and Alex.

  • @candas1

    @candas1

    2 жыл бұрын

    @@PracticalRobotics No I am not Emanuel, I am Candas 😅. I did small contributions to the firmware, but spent most of the time enriching the wiki. Don't hesitate if you have comments, questions, ideas. There is also a telegram channel linked in the repository main page.

  • @PracticalRobotics

    @PracticalRobotics

    2 жыл бұрын

    @@candas1 Usernames can be mysterious and confusing 😂 great work on the documentation - that's a huge part of the usefulness but you know that!

  • @WhyNotCycles
    @WhyNotCycles Жыл бұрын

    Very useful tutorials! Do you have any way to work the motors with a potentiometer and direction change option? Thanks!

  • @PracticalRobotics

    @PracticalRobotics

    Жыл бұрын

    I'm not certain what you mean by direction change option? The wheels will reverse when the pot is moved past the center. I also think I saw a reverse direction parameter but it might be easier to reverse the potentiometer wires.

  • @WhyNotCycles

    @WhyNotCycles

    Жыл бұрын

    @@PracticalRobotics Thanks a lot! I found the way for the rear drive as provided by the ADC mode and mid pots. However, I am looking for a solution for my own application and I am having a hard time. I want to have low rpm (about 100) and high torque. When I drop the rpm from "define N_MOT_MAX" the torque also decreases a lot. Is there any option to have low rpm and high torque?

  • @PracticalRobotics

    @PracticalRobotics

    Жыл бұрын

    @@WhyNotCycles That's getting a bit out of my area of expertise, but these aren't known for having much in the way of low-end torque. You might try increasing the voltage - I think the original guys that did the hacking said they've applied up to 60v before things started burning. Maybe 48 or so would be useful without being dangerous... but I don't promise anything. I would usually look at gearing and a different motor if I really need more torque.

  • @user-oi8il7uz7n
    @user-oi8il7uz7n3 ай бұрын

    I am frankly impressed with what you do, I am a newbie to all this but I have reproduced your system and it works perfectly for me. I only have one problem, it doesn't have strength, if you put a person (me) on it it won't be able to move 80 kilos. Maybe there is something in code to increase strength. When I was a hoverboar I moved around without a problem. I hope you can help me. Thanks in advance

  • @3phasetinkerer
    @3phasetinkerer2 жыл бұрын

    Thank you. I have two motors set with rpi and working great and now wondering 4 motors. Is it ok to independently flash two boards and parallel wire RPI to control both boards (4 motors) ? Does Makarov's driver have a function for 4WD? I couldn't really find in config variants. Thanks in advance.

  • @PracticalRobotics

    @PracticalRobotics

    2 жыл бұрын

    Great question! There isn't a specific firmware variant intended for 4WD, probably because each control board can only handle two motors. If you mean wiring two board to the same serial TX from the raspberry pi, I can't be certain but I think it might work (controlling two might work but obviously not getting debug data back from two devices on the same wire). If you have reliability problems you can run your program twice (to two different serial ports). I would think the easiest way to do this is with ROS and Alex Makarov's hoverboard driver. Since I recorded the ROS hoverboard tutorial (3A in this series), Alex has parameterized the serial port in the ROS hoverboard driver. Instead of changing the port in config.h, you can now pass the port as a parameter in the launch file. This makes it easier to run two instances of the hoverboard driver at the same time. He has an example launch file on the front page of his project repository. github.com/alex-makarov/hoverboard-driver. If you do try it with two boards "listening" to a single serial wire, please let me know whether it works or not. I have been curious but time has been short for me to do curiosity experiments.

  • @3phasetinkerer

    @3phasetinkerer

    2 жыл бұрын

    @@PracticalRobotics thanks for the epic info, I really appreciate it!

  • @PracticalRobotics

    @PracticalRobotics

    2 жыл бұрын

    Happy to help!

  • @3phasetinkerer

    @3phasetinkerer

    2 жыл бұрын

    Another thing, according to Makarov’s driver github, teleop-twist-keyboard should also work. I successfully run it but the motors won’t move. Does it need a tweak? Have you tried it?

  • @3phasetinkerer

    @3phasetinkerer

    2 жыл бұрын

    Ok you need it with hoverboard velocity control now i make it move with keyboard yay

  • @designbyakr
    @designbyakr Жыл бұрын

    is it possible to replace hoverboard motherboard with arduino or raspberry pi?

  • @PracticalRobotics

    @PracticalRobotics

    Жыл бұрын

    Technically yes, but this would be exceedingly difficult and also require a lot of electronics that would cost more than the complete board. I definitely would not want to spend that much time to create something that can be purchased cheaper than the parts.

  • @limpiz076
    @limpiz076 Жыл бұрын

    Hi, thanks for this! Awesome stuff! Question, can I use one pot just to control throttle, for both motors? I am thinking about a scooter of some Kind! :-)

  • @PracticalRobotics

    @PracticalRobotics

    Жыл бұрын

    For sure - that's how it works by default. One will pot will control speed of both motors and the other controls steering. Just leave the steering pot centered or even replace it with a fixed pot. However, I wonder if it might interfere with tight turns if speed mode is selected because turning requires different wheel speeds and speed mode will resist this. One of the other modes (go kart mode, or something) I think will not have that problem - read the descriptions in the docs or the firmware.

  • @limpiz076

    @limpiz076

    Жыл бұрын

    @@PracticalRobotics thanks for your answer my dude! Greatly Appreciated! I was thinking of using two motors for the same wheel and then speed mode and a set resistor for steering sound kinda nice. I think. Thanks again for your work and nice videos!

  • @Yuuki1942
    @Yuuki19422 жыл бұрын

    hi. nice tutorial. Do you know how to connect a brake to the board? I mean i enable the brake but it does not work in adc mode. I use a throttle handle with hall sensor in it. But the problem is the steering coeficient if i put it to 0 the motors dont start at all.And sometime if just move the motor by hand it just stalls and runs in a loop but only one motor. I dont need steering at all.

  • @PracticalRobotics

    @PracticalRobotics

    2 жыл бұрын

    That is strange about the steering coefficient.in main.c lines 304/305 you can see the formula applied is effectively cmdR = speed * SPEED_COEFFICIENT - steer * STEER_COEFFICIENT and cmrL = speed * SPEED_COEFFICIENT + steer * STEER_COEFFICIENT... so it a coefficient of 0 should only result in 0being added or subtracted. You could try adding steer*=0 in the low pass filter a few lines up (line 288) where I've made changes before. I'm afraid I cannot help with the brakes..I have not tried that.

  • @Yuuki1942

    @Yuuki1942

    2 жыл бұрын

    @@PracticalRobotics thanks.i got it to work but it goes only in reverse. if i disable reverse the motor dont spin at all

  • @SpeegleSphere
    @SpeegleSphere2 жыл бұрын

    How do you change this key? #define FLASH_WRITE_KEY 0x1002 // Flash memory writing key. Change this key to ignore the input calibrations from the flash memory and use the ones in config.h

  • @Wydryszek
    @Wydryszek2 жыл бұрын

    Hi and big thanks at the beginning. I'll try to make it as short as possible. Trying to build a dual motor powered scooter (two rear motors) and can't get it work. Everything in the code changed with your directions, ADC variant, flashed firmware, passed auto calibration procedure and my problem is that only at some point on the throttle motors go 100% without any control on power level. Standard board, two electric scooter throttle/brake pots (hall) wired as on the diagram (except 100k pull-ups for now). Throttle/brak potes checked already using multimeter and powered 5v gave from 1,13v to 4,2v output from start to the end of throttle range. Tried the same with hovercar version and the same effect. I'm losing my mind. No beeps after calibration and works perfect, except 0/1 state, no power/full throttle. What am I doing wrong? :) Thanks for any advice.

  • @Wydryszek

    @Wydryszek

    2 жыл бұрын

    Ok, I think I got this finally. Now switched to HOVERCAR mode but changed PRI_INPUT1 and PRI_INPUT2 to "3, 0, 0, 4095, 0" and there's a small difference in behaviour...now I can speed up slower or faster but still it's just a part of the throttle movement, let's say between 30% and 50% of pressed throttle. before that it's no throttle and over that is full throttle.

  • @PracticalRobotics

    @PracticalRobotics

    2 жыл бұрын

    Hi, the first thing that stands out is that the board ADC takes 0 to 3.3 volts, not 0 to 5. Anything over 3.3 volts is going to be full-throttle, and that will be a significant portion of your range of travel. Over 3.3 volts can also damage the inputs as only the right side connector is rated for 5 volts. I'm not sure yet if anything else is wrong but I suggest you start there, recalibrate and re-assess. Crossing my fingers that's it and there is no board damage.

  • @Wydryszek

    @Wydryszek

    2 жыл бұрын

    @@PracticalRobotics Am I right thinking that if I for example power the hall sensor with 5v from left or right motor hall sensor 5v and 3d print a kind of physical throttle limiter so that it will not let it go further than 3.3v, it should result in bigger range of throttle readings?

  • @PracticalRobotics

    @PracticalRobotics

    2 жыл бұрын

    @@Wydryszek I'm not sure what you mean when you say "bigger range of throttle readings." Compared to using 3.3 volts on the pot? The voltage is converted to a value from 0 to 4096. 0 volts reads raw value of 0 and 3.3 volts is read as 4096. You can't get more range than that. What you suggest I guess could work, although since your low end you said was 1.2 volts that leaves your range of values read by the chip at something like 1500 to 4096. Calibration should be able to handle this but it cuts down on your resolution..it'll be harder to precisely control the output with the pot. I think the best way to tell what is happening is to uncomment #define DEBUG_SERIAL_USART3 and use an FTDI and a serial program like minicom to read what the chip is thinking it sees.

  • @Wydryszek

    @Wydryszek

    2 жыл бұрын

    @@PracticalRobotics What I meant to say is that I was thinking on physically limiting thumb throttle working range and power it up using 5v so that it should work from start to some poimt that I wanted to measure with multimeter (throttle output voltage) that will result in 3.3v output, not more to avoid burning the chip but that's not a problem already. I've finished first "stage" of my scooter and with a huge load that I am (110kg's 2 meters tall ;) it speeds up quite fast, but not that fast to be dangerous for me. What I need now is to check if changing values for amps and rpms for motors, will result in a bit more speed because what I get now is 22.5km/h, not more on 10.5" wheels. And again thanks for your interesting step by step videos that guide through that process and every single thing explained.