Тёмный

Arduino project - Your Arduino Balancing Robot (YABR) - Part 3 - explaining the code 

Joop Brokking
Подписаться 79 тыс.
Просмотров 77 тыс.
50% 1

In this video I explain the main loop of the balancing robot program.
Arduino Balancing Robot Part 1
• Another Arduino projec...
Arduino Balancing Robot Part 2
• Another Arduino projec...
My video about PID controllers for quadcopters
• YMFC-3D part 5 - Quadc...
MPU-6050 IMU accelerometer and gyro fusion part 1
• MPU-6050 6dof IMU tuto...
MPU-6050 IMU accelerometer and gyro fusion part 2
• MPU-6050 6dof IMU tuto...

Наука

Опубликовано:

 

31 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 161   
@richardfirthucsb
@richardfirthucsb 6 лет назад
Thanks again for making this. I made this robot and haven't got it working yet, but the process of going through your code has already taught me a lot of new stuff.
@IncroyablesExperiences
@IncroyablesExperiences 7 лет назад
Great video as always! You must be the only guy in the world who really make true engineering with Arduino... Both in coding and physics, it's pretty cool, congrats ;)
@hidoHido-vm4en
@hidoHido-vm4en 7 лет назад
vous n'avez pas poster des nouveaux vidéos, j'ai attendu et je vois conditionnement vos vidéos, tes calculs la façons d’expliqué pas seulement théoriquement comme a enseignement marocain , mais aussi pratiquement, avez vos des nouveaux? un contact ? virement, vous nos manquer.
@solidhit2
@solidhit2 7 лет назад
Your videos are among the best, please don't stop making them.
@GRIDSLER
@GRIDSLER 4 года назад
Man: your channel es incredibly serious and rigorous. MY RESPECTS !!
@KarstenFuhst
@KarstenFuhst 7 лет назад
Electronic stuff has partly arrived, rest is in transit from China. I have made the frame from PMMA yesterday with the lasercutter at Hafven, the maker space in Hannover. Thanks for the teaching!
@Optasia3D
@Optasia3D 7 лет назад
Really a incredible work. Will try make it. Have ordered parts. Till now all other discriptions give me less information. Great job.
@4lexDeLaCruz
@4lexDeLaCruz 7 лет назад
Good job, this is one of the best arduino videos I've ever seen.
@mostafaelshafie4550
@mostafaelshafie4550 2 года назад
You're THE best at this!
@pircdcd
@pircdcd 6 лет назад
Thank for your share, I'd like to make an auto balancing robot for educational purpose and your code is the most efficient and clear I ever seen. Congrats.
@ahmedallam9612
@ahmedallam9612 6 лет назад
Hello there Mr Joob, u are more than professional, thanks so much , keep uploading, great work
@plymouthrovadventures.646
@plymouthrovadventures.646 3 года назад
A fantastic set of videos on building this Balancing robot. Parts ordered. Will try and add a App control device to the code. Maybe a RC option as well.
@Pavana_sai
@Pavana_sai 7 лет назад
No doubt zoop you are rocking once again..
@ycmgxekwa
@ycmgxekwa 6 лет назад
Brilliant tutorial and your editing skills are impressive.
@SamuelSoare
@SamuelSoare 7 лет назад
outstanding work! you convinced me to subscribe
@feferos78
@feferos78 3 года назад
Thanks joop for your vidéos, great PID code, i have made one with a pro mini 8mhz drived with bluetooth /android and an other with DC motors. Great job !
@sharedinventions
@sharedinventions 7 лет назад
Very nice explanation. Thanks! I might recommend you my SoftTimer Arduino library as you can set a Task there to be run at every 4ms.
@panamera970
@panamera970 4 года назад
Thanks for very detailed video.
@pablocarlini8217
@pablocarlini8217 7 лет назад
Greate Video. Building one today. One thing about diode current, motor current and diode current are not correlated as you explain because motor voltage is much lower than battery voltage...
@pr.ahmedgaga5264
@pr.ahmedgaga5264 6 лет назад
good job and interesting explanation of this part of code
@franscornel6734
@franscornel6734 3 года назад
You are the best.....
@MrFaresProduction
@MrFaresProduction 6 лет назад
God bless you!
@fahimshahriar6572
@fahimshahriar6572 7 лет назад
Thank u Joop Brokking :D
@anonymus6267
@anonymus6267 3 года назад
This is great. I will totaly 3D print some kind of robot and do somthing like this. I will try to combine this with ROS. The robot will then be able to map the room and travel from point A to B. Thanks
@medvidekkrupicka1404
@medvidekkrupicka1404 7 лет назад
One more thing to code: The postiton of the robot must only reflect the commads from the radio control, nothing else should matter. So if the robot is moved by external force (pushed or by gravity on a slope), it should remeber the number of steps needed to stabilize and move the same exact number of steps in oposite direction. Very nice video series. Very explanatory. Kudos!
@Joop_Brokking
@Joop_Brokking 7 лет назад
I made the code as easy as possible so others can understand it and make there own features. The code is just to get you started and motivated to explore and learn.
@saxmanjosh
@saxmanjosh 6 лет назад
You can't do that using only the hardware shown here. You would need encoders on each wheel
@ghanshyambhat9978
@ghanshyambhat9978 5 лет назад
Have you considered adding velocity feedback using the pulse count that drives the wheels as a proxy for velocity? Velocity feedback may improve stability of the robot and perhaps allow you to set velocity as a control input to the robot.
@karthickpaneerselvam2108
@karthickpaneerselvam2108 5 лет назад
great video nice
@drumbum7999
@drumbum7999 7 лет назад
fantastic
@CreativeProductionzz
@CreativeProductionzz 7 лет назад
It would be really interested if you could make a video about sending video from a camera with an arduino and a wifi chip or Bluetooth.
@eamonnculliton100
@eamonnculliton100 5 лет назад
Hi, I was just wondering how to use the code you just want the bot to stand and not use a remote. say move forward from within the code. Its for a project I'm doing. I'm fine with it all except I'm not sure how to separate the controller pid code from the rest. Thanks
@he1i0s
@he1i0s 7 лет назад
Hey Joop, I found that system looks smoother (especially on low speeds) when I use 'left_motor = 5000/(pid_output_left);' (same for right) instead of piece of code with '405 - (1/(pid_output_left + 9)) * 5500; ... 400-pid_output_left etc'. I was confused about 405, 9, 5500 and figured out that it is better to use pid output as frequency (which is linear function of speed!) instead of pulse length (which is non-linear). So, after that we have freq like 5..400, and calculate pulse length=(1/freq)*1000 miliseconds, and step count: pulse_length/(20 microseconds). 20 microseconds is period of interrupt. In other words, it is 5000/pid_output_left. Why it is not 50000? it should be 50000, but we need extra speed, so we just use 10x faster, 5000.
@pawes7476
@pawes7476 Год назад
Can you show it in program? :D
@poweredbysergey
@poweredbysergey 7 лет назад
Cool
@dave-j-k
@dave-j-k 3 года назад
Great project and great video - very open and easy to follow, thanks. How easy would you feel it is for a beginner to port this to MicroPython on a Pi Pico?
@keesnuyt8365
@keesnuyt8365 7 лет назад
This is what your brain learns to do when you balance a broomstick ;) Again, an excellent video in this series.
@Joop_Brokking
@Joop_Brokking 7 лет назад
The beauty is that the brain is indeed self learning. How cool is that ;-)
@thunderbolt997
@thunderbolt997 7 лет назад
the brain is a very good programmer :D
@ranulfo102
@ranulfo102 7 лет назад
AMIGO VOCÊ REALMENTE É UM EXPERT NESSE ASSUNTO, ADMIRO MUITO SUA INTELIGENCIA, TE DOU OS PARABÉNS POR SEUS VÍDEOS. SÓ FICO TRITE É PELO FATO DE NÃO ENTENDER SUA LÍNGUA. QUERIA MUITO MONTAR ESSE ROBÔ. ESPERO QUE O RU-vid BOLE UMA MANEIRA DE TRADUZIR OS VÍDEOS EM ÁUDIO, SERIA FANTÁSTICO
@SithaSek
@SithaSek 5 лет назад
Can you make the detail explaination about the step motor driver chip you used? thank for your great tutorials.
@qigao5458
@qigao5458 7 лет назад
nice!
@benjaminmclaws3477
@benjaminmclaws3477 6 лет назад
I am curious what the 400 means in the code.
@steverichab
@steverichab 4 года назад
Hello, I just completed both the balancing robot and the nun chuck. Both the robot and the remote pass the hardware test and the robot balances very well at start up. When I try the nun chuck control the robot does not respond. I know this a 2 year old project but I just discovered it and love it. I suspected it is the 2.4 gig serial transmitter so I replace them and still get no response and I am having trouble finding example programs to test them. Note I am using exactly the units specified and would really appreciate some advice on troubleshooting this last problem. Thanks in advance!
@jorenbuyens3316
@jorenbuyens3316 3 года назад
ik heb 1 klein vraagje. Is er een reden dat het laatste gedeelte, namelijk het stuk dat de puls uitvoert en de richting verandert, niet meer in de void loop staat?
@thaibinhtangoc4495
@thaibinhtangoc4495 6 лет назад
Great project! I love this! I'm making the balance robot using DC servo motor. I'm using data reading from DMP of MPU6050. It currently can balance itself but I feel it's not perfect and there is many thing to do with it. In of them is that when I pushed it in a direction with plenty of force it was easily fallen or it moved with max speed til falling. Could you please help me to implement the brake function for my robot. I didn't use remote control as I will be next goal after the balancing work without problem. Thanks in advance!
@muhammadtarek5592
@muhammadtarek5592 4 года назад
Hi Joop, thank you for that great video ,I wonder if I can use steppers with 3.75 degrees step, if yes, are there any modifications that should be applied to the code?
@ghanshyambhat9978
@ghanshyambhat9978 5 лет назад
Hi Joop: My robot balances, but does not stay balanced. After a couple of minutes, it takes off, though I am using your code. I am wondering if I need to add velocity feedback using encoders or as I suggested in my earlier comment use the pulse count as a proxy for velocity feedback. I have tried using the pulse count as velocity feedback, but have not had any luck. I may have to spend more time fine tuning it. Your comments will be appreciated.
@billkendall7464
@billkendall7464 6 лет назад
Thanks for the video! This really helps understand how your code works. That said, I do have a minor issue. When my robot reaches max speed, suddenly the control loop seems to stop the motors and the robot falls over. This happens bot forward and backward. If I increase the max speed, it happens at a faster speed. Any idea what might be causing this?
@cy8berpunk831
@cy8berpunk831 7 лет назад
Love you ;)
@cy8berpunk831
@cy8berpunk831 7 лет назад
I want a baby...
@EdwinFairchild
@EdwinFairchild 3 года назад
great video, unfortunately for those of us not looking to copy and paste his code , some parts specially the mathematics is left unexplained.
@nicshan
@nicshan 4 года назад
hi! I've found some parameters were not declared in the code. e.g. TWBR, TCCR2A, TCCR2B , any reason? thanks.
@cagneymoreau4216
@cagneymoreau4216 5 лет назад
7:02 is a bit confusing because it uses the number 8200. This number is approximately 8,192 according to mpu documents and I believe should be calibrated? or it may change the angle calculation. Took me a second to figure out that this number was coming from page 13 of mpu 6050 datasheet BTW, another awesome video!!
@user-hu8cn9uj4t
@user-hu8cn9uj4t 3 года назад
Hi Joop. This is great tutorial. Appreciate so much! I used Arduino Mega for my robot. Can you help me what should I change in code if I still use Mega board instead of Nano?
@phil9808
@phil9808 7 лет назад
Hi Joop First of all I would like to thank you, this is brilliant, I built one. But, Can I ask if it is possible to change the 2.4ghz transceiver to a normal hobby R/C transmitter/receiver, Instead of the nunchuck and if so how ?, I am new to code and not very good Thank You
@darrendas5645
@darrendas5645 4 года назад
Can anyone tell me how he got the equation for linear compensation of the stepper motor?....im using a 5.18 : 1 planetary geared nema 17...is it the same equation?
@Ultronzler
@Ultronzler 2 года назад
Hi joop. I am building this robot for a school project however I am using NEMA 17 instead of NEMA 14 motors like you use. They are 0.8 amp instead of 1.2a. what do I have to change to make it work. I have made it but the motors get stuck and don't move properly. Is it possible to send yo a video so you can give me a diagnosis. Thank you in advance
@hamidhamouchi4437
@hamidhamouchi4437 5 лет назад
Nice Woork Mr. Joop You're awsome ! How I can control this project with an Android application instead of the joystick :) Plz help me ! Go On !!
@igort5418
@igort5418 6 лет назад
How to get PWM values for motors speed from your PID, to use a dc motors
@tienievanrooyen1580
@tienievanrooyen1580 4 года назад
Good day Joop I realy like your projects, I am building the same robot that you have build but I want to run the robot with Bluetooth from my phone ,,,,,, is it possible to install HC-05 Bluetooth instead of the serial connection and do I still have to put the R1 resistor in line ore can I remove it what part of the code do I have to change or remove to replace with Bluetooth code Ad again thank you for your good projects
@steve8939123
@steve8939123 7 лет назад
Hello, your explanation of your code was very good, thanks for your hard work and sharing it with us. I do have a question if the robot travels on a surface that is not level say the right wheel is elevated above the left ( not front to back level, but right to left unlevel) will the software compensate to this and keep the robot balanced? Again thanks.
@Joop_Brokking
@Joop_Brokking 7 лет назад
No, the robot is made for flat surfaces only.
@ryanruthrhona
@ryanruthrhona 6 лет назад
Hi Joop. So I ended up building the robot a little modified in terms of the structure but almost similar. I have not place the battery yet at the top (so it is not top heavy) as I am testing the robot using an external power supply. What I have noticed is while the robot balances, it seems to be running forward continuously. How can i prevent this from happening? One more thing I have noticed is that the hardware calibration value for the MPU6050 keeps changing every time I run the hardware test code. Any idea why?
@Joop_Brokking
@Joop_Brokking 6 лет назад
Make sure it's completely still when running the calibration. And it's normal that you get slight variations when you do this. The robot can only work when it's not connected to any wires. So make sure you get a battery and place it on top. Otherwise the robot will keep moving.
@joaosantos-61
@joaosantos-61 4 года назад
Hi Is possible to use arduino Nano in this project?
@gyoosuhnjee8698
@gyoosuhnjee8698 7 лет назад
Hello. Thanks a lot for you. I've done YABR about 10 days ago. It's a good balancing car!!! I used RF trans&receiver with joystick as signal sender. The Kysan_Nema17_stepper motor as a actuator. The rest is same with you. Ah, The timer interrupt is good idea! (Very sorry not to be about YABR area) I have a question about YMFC auto altitude process. I had totally understood your YMFC code. Its flying is perfect! I've got data from barometer according to its sample rate . . . about 50hz. And calculated PID value, which is 'pid_output_altitude' . I've added the value each esc_1, 2, 3, 4. esc_1 = throttle - pid_output_pitch + pid_output_roll - pid_output_yaw + pid_output_altitude; esc_2 = throttle + pid_output_pitch + pid_output_roll + pid_output_yaw + pid_output_altitude; esc_3 = throttle + pid_output_pitch - pid_output_roll - pid_output_yaw + pid_output_altitude; esc_4 = throttle - pid_output_pitch - pid_output_roll + pid_output_yaw + pid_output_altitude; Is it right process? Thanks a lot although any other trivial help!
@Joop_Brokking
@Joop_Brokking 7 лет назад
You have to fix the throttle first and then change it with the calculated PID value.
@gyoosuhnjee8698
@gyoosuhnjee8698 7 лет назад
I did it already through try and errors. Thanks. Because of your advice and hints in the video and blog, I always obtain energy. Thanks again. Nowadays I am writing RTH function with HMC5883 & GPS. It's hard to write my own code without any help. (In fact your help is only one.) When I calculate the direction of Quad, the PID control is likely also needed. Is it right?
@TheSpyderRoque
@TheSpyderRoque 6 лет назад
Your Videotutorial is probably the best and most thorough I have ever seen. Keep up the great work! What I do not understand is, however, why it is important for you to keep the frequence of loop() constant. Is there any specific reason?
@Joop_Brokking
@Joop_Brokking 6 лет назад
Otherwise the PID controller is getting really confused. It's fixed on 4ms and will react different on a different loop time.
@MateuszKryszczak
@MateuszKryszczak 7 лет назад
Have you checked, that the main loop executes in less than 4ms (osciloscope or signal analyzer)? It's seems to be quite long and there is a lot of floating point math, which is really slow. Great project, congrats.
@Joop_Brokking
@Joop_Brokking 7 лет назад
Yes, I checked it. Floats are slow but not that slow :-)
@nickldominator
@nickldominator 6 лет назад
Hey, Awesome video! I plan to make a system similar to this, but I want to mount my board Horizontally rather than vertically. All the components will be in the same orientation as your board though. Looking at the code, all I would have to change are the I2C Registers we pull data from 3F -> 3B (To pull Accel Data from X axis rather than Z) and then the Gyro Registers (which I'm not entirely sure about what I need to change from, as it makes my head spin a bit at the moment, haha). Does this sound correct to you? Thanks for the awesome videos!
@saragomez2829
@saragomez2829 5 лет назад
What have you do to solve this problem??
@steve8939123
@steve8939123 6 лет назад
Hello, Can I substitute the Pro Mini in the robot for a Nano without making any software changes? Thanks.
@Joop_Brokking
@Joop_Brokking 6 лет назад
Yes, that should be possible.
@anderskihlstrom9777
@anderskihlstrom9777 7 лет назад
Hi, I am following your interesting MPU6050-projects on RU-vid. I am currently building a Segway clone, using MPU6050. But I try to use the onboard Digital Motion Processor to read the filtered pitch angle directly. I am curious why people dont seem to be using the DMP-values. What are your experiences? Is there a catch maybe?
@Joop_Brokking
@Joop_Brokking 7 лет назад
I never tried the DMP because when I was starting with the MPU-6050 the library was reversed engineered and not very stable. And more important, I like to make/write my own IMU :-)
@CorruptName1
@CorruptName1 5 лет назад
thanks for the great video! how can i change the code for a4988 driver? i already changed circuit. thanks again!
@shivaprasad3378
@shivaprasad3378 6 лет назад
Thanks for the great tutorial. I did build the robot and am facing some challenges. MPU is working fine. The pid_output increases and clamps at 400 all the time it never comes down even if i change the robot orientation manually. Any pointers to see what could be wrong. angle_gyro responds well. The other problem that i have is my stepper motor stops responding when the throttle variable is beyond 325 i just hear the PWM sound. Thanks in advance for any directions.
@Joop_Brokking
@Joop_Brokking 6 лет назад
It's normal the the PID output is maximum all the time. This is because the robot is never in a 100% horizontal position and the I-gain is really high. Best way to test the PID controller is to set the I- and D-gain to 0. This way you only see the error. This might help you. If you only hear the PWM sound it means that the stepper motor cannot keep up with the signal and comes to a standstill. Make sure to set the correct stepper modes.
@rave5636
@rave5636 7 лет назад
Hey Joop, your work is realy the best ever. I build this bod and now it is running. But i used finlay a Bluetooth module and a handy app to control. One question i would have. Your code use the motors with 1/4 steps. If i change the motor controller to 1/16 steps, the bod is not able to be at zero. I assume it have to do with the 20ms IRQ routine? My reason to try 1/16 steps is the noise of 1/4 steps configuration. Could you give an hint on what would be necessary to change on the code, to can use the motor controller with 1/16 step configuration? Many thanks Rainer
@Joop_Brokking
@Joop_Brokking 7 лет назад
You cannot run this robot on 1/16. The motors will simply not produce enough speed to balance the robot.
@ElectroIoT
@ElectroIoT 5 лет назад
If I use A4988 is there any problem
@benzmer6337
@benzmer6337 3 месяца назад
Dear can I use arduino nano?
@makersgeneration3739
@makersgeneration3739 5 лет назад
Good project! 😉 What software did you used to design the the frame for the plywood? If not open source, what open source software do you advise for that type of job?
@Joop_Brokking
@Joop_Brokking 5 лет назад
I use LibreCad for the drawings. It's free :-)
@yuchoy1
@yuchoy1 7 лет назад
Hi Joop! I love your videos, and I love the YABR especially. What an amazing design! Mine is completely built and working now (happily balancing!) but I have not yet connected the radios for remote control, because I would prefer to use a bluetooth radio or NRF24L01 radios. Have you tried these or is there a reason not to? Thanks!!!
@Joop_Brokking
@Joop_Brokking 7 лет назад
The modules that I used are plug and play and don't consume any microcontroller calculation power. The is why I did not use the NRF modules.
@yuchoy1
@yuchoy1 7 лет назад
Joop Brokking thanks Joop 😊
@yuchoy1
@yuchoy1 7 лет назад
Joop Brokking I can't believe how well the robot can balance even on loose bed covers on a mattress!
@minhvu8893
@minhvu8893 6 лет назад
I don't get this line: *if(pid_output > 10 || pid_output < -10)pid_error_temp += pid_output * 0.015 ;*
@ulf8468
@ulf8468 5 лет назад
Wow. Really impressive implementation. Where did you get the informations about the formulars for the motor pulse calculation? I would like to comprehend why you choosed numbers like the 400.
@Joop_Brokking
@Joop_Brokking 5 лет назад
It's all done by: while (fail == 1){ think again; try again; if(succes)fail = 0; }
@ulf8468
@ulf8468 5 лет назад
Are you refering your answer just to the numbers or also to the formular self?
@wolfgangklenner6996
@wolfgangklenner6996 5 лет назад
Great project! I build your robot from steppermotors I had from other project and printed the frame with 3D. All other parts are as your robot. I have a problem regarding the stepper motor frequency. My stepper motor work with a max. stepper frequency of about 2kHz. If I measure the stepper motor frequency of your software it is in a max. about 5.6kHz. So motor does not rotate and robot is not working. I measured ISR tick, which is the 20microsec and also the main loop is 4millisec. I tried to find a parameter to limit the max. stepper frequency to 2kHz but couldn't solve the search . Any help from the experts, which parameter I can align. Thank's Wolfgang
@Joop_Brokking
@Joop_Brokking 5 лет назад
The robot won't work at 2kHz. You really need the maximum speed to make it balance correctly. If you use the same motors as I did it should work fine.
@Kadeshy
@Kadeshy 5 лет назад
Hi Joop! Great video and very educative! I have made an auto-balancing robot inspired in yours for a project for a class. The only differences are: -> I am using arduino Nano instead of mini pro ->My motor is not a Nema (your motor doesn't have specs, but looks like a NEMA). My stepper motors are Mitsumi M42sp-6tg from old printers wreckage. -> I have built the rest of the project just like yours, using the same pinouts in the board. My project is simpler than yours, I don't have the remote control stuff and my objective is to only get the robot balancing to stand still alone. Apparently, running your code makes my robot to keep the wheels stuck, but with no movement at all. Could you help me, please? Thank you!
@Ultronzler
@Ultronzler 2 года назад
Same bro
@alivelinaveenchawdary6657
@alivelinaveenchawdary6657 6 лет назад
can we take any Chassis measurements as our wish or we is there any ratio of mesasurements..
@Joop_Brokking
@Joop_Brokking 6 лет назад
It's best to start with the ratios that I used so you got a working model. After that you can change anything you like and try to make it work.
@pintokitkat
@pintokitkat 7 лет назад
I built the robot and it balances beautifully, but I'm struggling hopelessly with the remote. I've now bought eight of the transceivers from three different suppliers in two countries and I cannot get any of them to talk to each other. The nunchuck is sending 1, 2, 4 and 8, but I might as well have a piece of damp string between the remote and the robot as the transceivers, for all the good they do. Did you have to make sure your transceivers had the same IDs or change any other settings to get them to talk to each other? Do you have any suggestions for how I might test them? Sadly, these transceivers do not feature much on the internet - everything seems to be more centred on the NRF24L01. I've downloaded the manual for the Open Smart ones, but that hasn't been any real help at all.
@Joop_Brokking
@Joop_Brokking 7 лет назад
There is a blue led on the transceivers that will lit when they receive or transmit data. So you can send data via the serial output of the Adruino and check if the led on the other tranceiver starts to flash. I bought 4 of them and they all worked fine without any settings. Make sure you use 9600bps.
@pintokitkat
@pintokitkat 6 лет назад
Sorry it's been so long in following your suggestion (but I've been building a copy of Ben Eater's 8 bit computer - brilliant!). However, I'm back struggling with the remote again. Yes, both the transmitter and the receiver blue LEDs flash when I operate the nunchuck, but the robot does nothing other than balance itself. The LEDs aren't very bright, but they do light up
@paulgregory8846
@paulgregory8846 4 года назад
Joop Brokking Hi Joop I have the same problem the robot stands still the remote is making connection flashes blue on robot and Nunchuck but there is no movement at all can you please advise
@makarthur4618
@makarthur4618 6 лет назад
Hi Joop, Thank you very much for your effort in producing the entertaining and educating videos. I learnt a lot. After watching all three YABR videos, I realize that so long as the robot is self balancing on the pitch axis, the hardware setup procedure will take care of the normal balance position. so no code change is needed even the MPU6050 is positioned horizontally at setup (instead of vertical). Grateful if you could confirm my understanding. Thanks,
@Joop_Brokking
@Joop_Brokking 6 лет назад
The position of the MPU-6050 is very important because the accelerometer is needed for compensating the gyro's drift. As explained in detail in this video: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-4BoIE8YQwM8.html
@makarthur4618
@makarthur4618 6 лет назад
thanks for your reply. Lucky that I have not soldered my mpu to pcb.
@makarthur4618
@makarthur4618 6 лет назад
ok, I mounted the MPU6050 vertically. Another question - will e the robot's weight distribution along the pitch axis affect the performance. I could imagine the power use is increased, pls share your thoughts.
@makarthur4618
@makarthur4618 6 лет назад
Hi Joop, Completed the built, hardware test program run ok, and generated a balancing value -1319 (negative). My MPU5060 is setup vertically by attaching it to an angled stand, the pcb and other components are mounted horizontally. Wondering why a negative value?! Followed the procedure to limit DVR8825 current. After changing the balance value in the Balancing robot program and upload. Powered the robot by 12V lipo, the robot cannot balance. Try to reload the hardware test program, but this time, encountered upload error: "Verification error content not match". Research the web indicates an upload reset issue, what is your view on this?
@makarthur4618
@makarthur4618 6 лет назад
one more question, the diode becomes burning hot when 12V power is connected for a brief while. Is it normal?
@manishamalshanrajapaksha2841
@manishamalshanrajapaksha2841 6 месяцев назад
in my robot the moving forward and backward works fine...but when turning its shaking....why is that?
@matiashubert4256
@matiashubert4256 6 лет назад
Hello, i have a question. In your case, the main loop frequency its 250Hz, but in my case, im datalogging in SD Card the MPU and GPS, what means the main loop frequency isnt 250Hz, so, i can calculate the angles with my own frequency loop, right? the only thing that means, ill have a bit more error if the frequency be higher than 250Hz?
@Joop_Brokking
@Joop_Brokking 6 лет назад
If you are using a higher refresh rate the calculations need to be optimized for this refresh rate. Make sure that you have a constant refresh rate/loop time.
@matiashubert4256
@matiashubert4256 6 лет назад
Joop Brokking lowest loop frequency, increase the error
@pisitnakjai1219
@pisitnakjai1219 6 лет назад
Thank you for your video. I have some question. Can I put the difference MPU-6050 alignment on my robot? I mean, your video put in a vertical line but I have to put mpu-6050 in a horizontal line.
@Joop_Brokking
@Joop_Brokking 6 лет назад
Change/swap the axis in the code via the trail and error method.
@saragomez2829
@saragomez2829 5 лет назад
Joop, how can i chage the axis in the code?
@JAMBILOO66
@JAMBILOO66 7 лет назад
This is amazing! As somebody who knows little about this kind of programming, do you think it could be scaled up to a robot approx. 30cm tall? I want to create a working model of the robot from my comic strip. Thanks!
@Joop_Brokking
@Joop_Brokking 7 лет назад
Yes, it will work if it is larger. You might need to tune the PID values but it should work fine.
@JAMBILOO66
@JAMBILOO66 7 лет назад
Thanks!
@sebek531
@sebek531 7 лет назад
Hello. Thank you for your great video. I have build my balancing robot based on your documentation. I use NEMA17 SX17-1005LQCEF engines - 1.8 ° (200 Steps on full rotation). Will they be good for this project?. If not, could you tell me how to make the correct code for these motors?
@Joop_Brokking
@Joop_Brokking 7 лет назад
If you use the same stepper controllers it should work fine.
@oleksandrgrytsenko
@oleksandrgrytsenko 7 лет назад
Is it able to work with horizontally changed center of mass? I mean some weight moved out of axis/lipo line.
@Joop_Brokking
@Joop_Brokking 7 лет назад
As long as you set the correct balance calibration value.
@oleksandrgrytsenko
@oleksandrgrytsenko 7 лет назад
And how about dynamic calibration? The goal is to grab some object from the floor and counterweight it with own mass by doing some tilt.
@1969mrd
@1969mrd 5 лет назад
Does anyone have an issue with the stepper motors? They don’t seem to have enough torque and stop and make a whirring noise!
@SaurabhRastogiRC
@SaurabhRastogiRC 4 года назад
yes same happening with my motors ( took from dot matrix printers) ... did you find the solution?
@carronhi
@carronhi 7 лет назад
Hello Joop, I'm your big fan and I'm about to buy all the components necessary to build my balancing robot and also a drone. Just as a doubt, If I want to build an overboard, do you think that this code could works? Of course, adjusting the diameter of the wheels and big battery. Also, which drone do you prefer, the octocopter or the quadcopter? Which one provides you a better performance? I really appreciate your help, thank you regards!
@Joop_Brokking
@Joop_Brokking 7 лет назад
The code can be used to measure the angle but not for controlling a hoverboard. You have to modify the code yourself. Quad or octo depends on what you are going to do with it. If you are starting I would suggest a quadcopter. This is cheaper to fix when you crash.
@carronhi
@carronhi 7 лет назад
Joop Brokking awesome, thank you for all you have shared. regards
@kj4051
@kj4051 2 года назад
sir.... why the angle is always increase (I copied your code and follow all your step.)
@BrandonByrne
@BrandonByrne 6 лет назад
Hi Joop, can you expand on the part about "logarithmic behavior of stepper motor speed vs pulse train"? I'm trying to figure out what this line means: if(pid_output_left > 0)pid_output_left = 405 - (1/(pid_output_left + 9)) * 5500; Where do the 405, the 9, and the *5500 come from? What is this equation derived from? Thanks
@Joop_Brokking
@Joop_Brokking 6 лет назад
You can find it in the Excel sheet. The equation is the result of trying to compensate the behavior of the stepper motor.
@BrandonByrne
@BrandonByrne 6 лет назад
Ah I see, it is non-linear because you are changing the period between pulses correct? ie, your output is 1/x. If I am varying the frequency of pulses, that should already be linear right? Since varying the frequency is directly varying how many steps per second the motor is receiving?
@zx10rheinzi
@zx10rheinzi 5 лет назад
Sorry Joop, I appreciate your work and your very good explanation but the schematic here in your Part 3 - YABR-Video(3:56min) is NOT the same like the schematic in your web-site...! Here is the "FAULT"-PIN connected and at the schematic in your web-site the FAULT-PIN is NOT connected ! ...... Wich one should I use ? .......The web-site schematic don't work, connections are checked many times....current is set to 150mA....MPU-value is about 865.....-but motors do not move(NEMA17) . Now I'm not shure if I followed the "incomplet" schematic or the bigger Steppers are the reason for not working........Tomorrow I will try the Part3-Video-Schematic...........
@Joop_Brokking
@Joop_Brokking 5 лет назад
Download the schematics from here: www.brokking.net/yabr_downloads.html The fault pin should not be connected. If you Google "DRV8825" you will find schematics that you can try.
@kayisimuhendisi1573
@kayisimuhendisi1573 6 лет назад
if you are making robots then my projects are just toys..Take me as a padawan
@ahmetpehlivan5494
@ahmetpehlivan5494 3 месяца назад
whats this guys profession, how can i be like him like knowing all this stuff about microprocessors and electronics; should i apply for embedded systems jobs or i dont know who does that white good companies, aerospace companies. Can anyone help?
@JyskMaker
@JyskMaker 5 лет назад
Hi i Like all you videos. :-) But i have a quistin. I like to use BL but my BT app can only send karakter, like a "a" "b" "c" and so one, how do i convert them to bit.?? And also what do the line. if(!(received_byte & B00001100)){ //Slowly reduce the setpoint to zero if no foreward or backward command is given if(pid_setpoint > 0.5)pid_setpoint -=0.05; //If the PID setpoint is larger then 0.5 reduce the setpoint with 0.05 every loop else if(pid_setpoint < -0.5)pid_setpoint +=0.05; //If the PID setpoint is smaller then -0.5 increase the setpoint with 0.05 every loop else pid_setpoint = 0; //If the PID setpoint is smaller then 0.5 or larger then -0.5 set the setpoint to 0 } You skip this part :-)
@plymouthrovadventures.646
@plymouthrovadventures.646 3 года назад
Hi. this was not exclaimed in the description. if(!(received_byte & B00001100)){ as the nunchuck is not sending this. Anybody...
@bobyla13
@bobyla13 4 года назад
battery_voltage = (analogRead(0) * 1.222) + 85 if analogRead(0) = 1023 then battery_voltage = (1023 * 1.222) + 85 = 1335.106 does that mean battery voltage equals 13.35 V?
@muhammed_genco
@muhammed_genco 4 года назад
Here we added (+85) for the diode voltage drop, where the highest voltage that will come to the analogRead will be (5V - 0.85V) = 4.15V...
@aparnaprabhune6951
@aparnaprabhune6951 7 лет назад
where did you learn such complex coding?
@Joop_Brokking
@Joop_Brokking 7 лет назад
From the datasheet of the ATmega328P.
@markgreco1962
@markgreco1962 7 лет назад
Deal extreme is out of the stepper motors. Maybe someone could list the nema14 motors they used from Banggood or a different source like Amazon. I have everything made I'm just waiting on the motors.
@Joop_Brokking
@Joop_Brokking 7 лет назад
You could also use these: www.dx.com/p/geeetech-3d-printer-reprap-1-8-degree-anti-slip-42yb-stepper-motor-black-370044 But please note that these are 42mm in stead of 35. So you have to modify the frame.
@gyoosuhnjee8698
@gyoosuhnjee8698 7 лет назад
I've done with Nema17 which is 42mm. And the size of frame is not important just like Joop's saying!
@markgreco1962
@markgreco1962 7 лет назад
Back in stock !!! Ordering today
@osamamahmoud8508
@osamamahmoud8508 3 года назад
bro please help me i am facing some problems with my project can i contact you, please
@derarty4290
@derarty4290 3 года назад
What i learned: You should not change values if you don't know what you are doing
@praveenrock7410
@praveenrock7410 5 лет назад
bro send me link for downloading code
@stevenlee1726
@stevenlee1726 5 лет назад
Try to listen the video at 0.25 speed. LMAO!
@framespersecondfps5256
@framespersecondfps5256 7 лет назад
joop please help me out
Далее
Tightrope-walking powered Gyroscope
12:42
Просмотров 610 тыс.
Ne jamais regarder une fille à la plage 😂
00:10
Просмотров 526 тыс.
Meninas na academia
00:11
Просмотров 1,7 млн
Balancing Robot with PID - Mini Robot PCB
17:29
Просмотров 45 тыс.
Magnetic rotary encoder vs stepper motor accuracy
5:41
self balancing robot | Simulink basics series
18:15
Просмотров 60 тыс.
Arduino BLDC balancer robot - Tutorial
14:15
Просмотров 32 тыс.
КРУТОЙ ТЕЛЕФОН
0:16
Просмотров 6 млн