No video

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

  Рет қаралды 77,394

Joop Brokking

Joop Brokking

Күн бұрын

Пікірлер: 161
@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.
@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!
@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.
@4lexDeLaCruz
@4lexDeLaCruz 7 жыл бұрын
Good job, this is one of the best arduino videos I've ever seen.
@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
@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.
@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 2 жыл бұрын
Can you show it in program? :D
@GRIDSLER
@GRIDSLER 4 жыл бұрын
Man: your channel es incredibly serious and rigorous. MY RESPECTS !!
@solidhit2
@solidhit2 7 жыл бұрын
Your videos are among the best, please don't stop making them.
@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.
@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.
@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.
@mostafaelshafie4550
@mostafaelshafie4550 2 жыл бұрын
You're THE best at this!
@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...
@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.
@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
@ahmedallam9612
@ahmedallam9612 6 жыл бұрын
Hello there Mr Joob, u are more than professional, thanks so much , keep uploading, great work
@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.
@benjaminmclaws3477
@benjaminmclaws3477 6 жыл бұрын
I am curious what the 400 means in the code.
@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 !
@ycmgxekwa
@ycmgxekwa 6 жыл бұрын
Brilliant tutorial and your editing skills are impressive.
@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.
@Pavana_sai
@Pavana_sai 7 жыл бұрын
No doubt zoop you are rocking once again..
@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 KZfaq BOLE UMA MANEIRA DE TRADUZIR OS VÍDEOS EM ÁUDIO, SERIA FANTÁSTICO
@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
@pr.ahmedgaga5264
@pr.ahmedgaga5264 6 жыл бұрын
good job and interesting explanation of this part of code
@panamera970
@panamera970 4 жыл бұрын
Thanks for very detailed video.
@SamuelSoare
@SamuelSoare 7 жыл бұрын
outstanding work! you convinced me to subscribe
@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
@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
@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!!
@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 :-)
@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.
@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
@franscornel6734
@franscornel6734 3 жыл бұрын
You are the best.....
@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?
@SithaSek
@SithaSek 5 жыл бұрын
Can you make the detail explaination about the step motor driver chip you used? thank for your great tutorials.
@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?
@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?
@manishamalshanrajapaksha2841
@manishamalshanrajapaksha2841 6 ай бұрын
in my robot the moving forward and backward works fine...but when turning its shaking....why is that?
@MrFaresProduction
@MrFaresProduction 6 жыл бұрын
God bless you!
@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
@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!
@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.
@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?
@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.
@kj4051
@kj4051 2 жыл бұрын
sir.... why the angle is always increase (I copied your code and follow all your step.)
@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 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.
@ahmetpehlivan5494
@ahmetpehlivan5494 4 ай бұрын
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?
@drumbum7999
@drumbum7999 7 жыл бұрын
fantastic
@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?
@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!
@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: kzfaq.info/get/bejne/aqiffKhpvrfbfWw.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?
@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?
@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?
@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
@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.
@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 :-)
@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.
@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 !!
@karthickpaneerselvam2108
@karthickpaneerselvam2108 5 жыл бұрын
great video nice
@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.
@fahimshahriar6572
@fahimshahriar6572 7 жыл бұрын
Thank u Joop Brokking :D
@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??
@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.
@igort5418
@igort5418 6 жыл бұрын
How to get PWM values for motors speed from your PID, to use a dc motors
@nicshan
@nicshan 4 жыл бұрын
hi! I've found some parameters were not declared in the code. e.g. TWBR, TCCR2A, TCCR2B , any reason? thanks.
@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!
@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?
@anderskihlstrom9777
@anderskihlstrom9777 7 жыл бұрын
Hi, I am following your interesting MPU6050-projects on KZfaq. 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 :-)
@benzmer6337
@benzmer6337 4 ай бұрын
Dear can I use arduino nano?
@kayisimuhendisi1573
@kayisimuhendisi1573 6 жыл бұрын
if you are making robots then my projects are just toys..Take me as a padawan
@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!
@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
@CorruptName1
@CorruptName1 5 жыл бұрын
thanks for the great video! how can i change the code for a4988 driver? i already changed circuit. thanks again!
@minhvu8893
@minhvu8893 6 жыл бұрын
I don't get this line: *if(pid_output > 10 || pid_output < -10)pid_error_temp += pid_output * 0.015 ;*
@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.
@poweredbysergey
@poweredbysergey 7 жыл бұрын
Cool
@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.
@joaosantos-61
@joaosantos-61 4 жыл бұрын
Hi Is possible to use arduino Nano in this project?
@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.
@osamamahmoud8508
@osamamahmoud8508 3 жыл бұрын
bro please help me i am facing some problems with my project can i contact you, please
@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?
@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?
@JyskMaker
@JyskMaker 6 жыл бұрын
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 :-)
@ElectroIoT
@ElectroIoT 6 жыл бұрын
If I use A4988 is there any problem
@qigao5458
@qigao5458 7 жыл бұрын
nice!
@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?
@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...
@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.
@derarty4290
@derarty4290 3 жыл бұрын
What i learned: You should not change values if you don't know what you are doing
@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...
@cy8berpunk831
@cy8berpunk831 7 жыл бұрын
Love you ;)
@cy8berpunk831
@cy8berpunk831 7 жыл бұрын
I want a baby...
@matiashubert4256
@matiashubert4256 7 жыл бұрын
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 7 жыл бұрын
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 7 жыл бұрын
Joop Brokking lowest loop frequency, increase the error
@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
@stevenlee1726
@stevenlee1726 6 жыл бұрын
Try to listen the video at 0.25 speed. LMAO!
@praveenrock7410
@praveenrock7410 6 жыл бұрын
bro send me link for downloading code
@framespersecondfps5256
@framespersecondfps5256 7 жыл бұрын
joop please help me out
Tightrope-walking powered Gyroscope
12:42
Hyperspace Pirate
Рет қаралды 612 М.
Parenting hacks and gadgets against mosquitoes 🦟👶
00:21
Let's GLOW!
Рет қаралды 13 МЛН
The Joker saves Harley Quinn from drowning!#joker  #shorts
00:34
Untitled Joker
Рет қаралды 66 МЛН
Little brothers couldn't stay calm when they noticed a bin lorry #shorts
00:32
Fabiosa Best Lifehacks
Рет қаралды 18 МЛН
BUILDING a Self-Balancing Robot | PART 3 - Remote & Code!
18:15
Noah Zipin
Рет қаралды 23 М.
Another Arduino project - Your Arduino Balancing Robot (YABR) - Part 1
11:49
Hacking a weird TV censoring device
20:59
Ben Eater
Рет қаралды 3 МЛН
Self Balancing Robot Tips that will Save your project
5:36
Mouad Boumediene - Hobby Coding
Рет қаралды 27 М.
Balancing Robot with PID - Mini Robot PCB
17:29
Electronoobs
Рет қаралды 45 М.
Magnetic rotary encoder vs stepper motor accuracy
5:41
Matthias random stuff
Рет қаралды 144 М.
#35 Inside an Autonomous Self Balancing Robot #1 (Tutorial)
9:51
Andreas Spiess
Рет қаралды 45 М.
HAL9000 : Ball Balancing Robot
13:25
James Bruton
Рет қаралды 190 М.
One-Wheel Balancing Robot Can Stand Still
12:22
James Bruton
Рет қаралды 375 М.
Parenting hacks and gadgets against mosquitoes 🦟👶
00:21
Let's GLOW!
Рет қаралды 13 МЛН