Это видео недоступно.
Сожалеем об этом.
#35 Inside an Autonomous Self Balancing Robot #1 (Tutorial)
HTML-код
- Опубликовано: 17 авг 2024
- In this first episode, I show how I build my self-balancing robot based on an Arduino pro mini compatible MultiWii board. It consists of 3D printed parts and uses stepper motors. In the next episodes, I will continue and extend it with a remote control based on NRF24L01 chips and ultrasonic sensors to enable autonomous driving.
I am a proud Patreon of @GreatScott!, @ElectroBOOM , @Electronoobs , @EEVblog , and others. No Docker, No Microsoft Teams, Zoom
Links mentioned in the video:
MultiWii Flight Controller: s.click.aliexp...
A4988 Stepper Motor Controller: s.click.aliexp...
PID controller: • #28 Tutorial: PID cont...
B-Robot: github.com/JJu...
Wiring tips: Wiring: • #12 Five Tricks for wo...
Code: github.com/Sen...
The links above usually are affiliate links that support the channel (no additional cost for you).
Supporting Material and Blog Page: www.sensorsiot.org
Github: www.github.com...
My Patreon Page: / andreasspiess
Discord: / discord
If you want to support the channel, please use the links below to start your shopping. No additional charges for you, but I get a commission of your purchases to buy new stuff for the channel
My Amazon.com shop: www.amazon.com...
For Banggood bit.ly/2jAQEf4
For AliExpress: bit.ly/2B0yTLL
For Amazon.de: amzn.to/2r0ZCYI
For Amazon UK: amzn.to/2mxBaJf
For ebay.com: ebay.to/2DuYXBp
www.facebook.c...
/ spiessa
www.instructab...
Please do not try to email me. This communication channel is reserved for my primary job
As an Amazon Associate, I earn from qualifying purchases
#no#midroll#ads
Hi Andreas, again a very nice video! Wow those big stepper motors shure do look good on the robot. Looking forward on you next video with the nrf chip.
+Javier Palla Lorden The steppers only look big. Actually, they are not very powerful, but very easy to control...
Fascinating. You explain things so well. You must be, or have been a teacher.
Best wishes
Art
I was teaching at universities a bit, but never full-time. But I like making complex things understandable also in other parts of my profession...
PID is quite a complex process but you certainly make it accessible. I must watch your other videos about building this robot. I was a surveyor by profession and now retired I'm really into designing and building ESP8266 devices after watching your videos.
Thanks for doing such a good job.
Best wishes
Art
You're welcome. The Robot is not an easy one. It took me a while... You need also the remote to change the parameters on the fly. Otherwise, you have no chance to get it stable...
Great video and project! Looking forward to the next episodes. I finally bought a 3d printer and have been keeping it very busy with projects.
+Jon Raymond Congratulations! I am sure, you have many applications as I did when I got it. Hope, you are already ok with the 3d construction part. This was the biggest learning for me and took a lot of time.
This is really great! Thank you for going into detail with everything.
You are welcome!
Great...great...great..!!! Thank you so much for the video that I've been waiting for. There are lot of similar videos but the way you explain is different.
+Mugi Raharjo Thank you very much for your compliment. I am glad to hear that!
Hello andreas, I loved the project, it's very good. congratulations
Thanks! I enjoyed it also a lot
thank you so much.. have a great new year!!!
+Venkatesh E Happy New Year to you, too
Great, thanks
You are welcome!
Sir do we expand this two a lad carrying robot which carry almost 2 kg weight
So usefull and interesting, thanks alot for sharing,
You are welcome!
Great work! I am making a similar robot as this.I use pro mini and mpu 6050.Also I have some question : In your project if the arduino intrupt pin is linked to the mpu6050 int pin, and in your code the mpu.setXAccelOffset(),...mpu.setYGyroOffset() are not used to set the offset, is these not needed? Thx for your help.
Thanks. I am using a special board used for quadcopters to control the robot (it has the 328 and the 6050 on the same board). I think, I did not use the interrupt mechanism, however, it would be better. I used another project as a basis and did not everything myself. This project also did not use offsets. Because the robot does some self adjustment it is probably not so important.
If you want to know more about the offset you can also look my video about the racing simulator. here, I hadto use it. And with this knowhow I would for sure use it also for a robot.
Sir, Can you please post the frame's dimensions, or give a link to them ?
I would be really grateful
thank you
Great video. Love your Swiss accent.
+Gary Grotsky Thank you for your nice comment!
Does the integral part not matter at all in a self balancing robot? I suppose a small steady state error is not important when the angle is constantly changing anyway
Yes, you are right.
I need a bit clarity. What are the RPM of stepper motors ? If I replace them with geared motors what would be the desired RPM ?
I never checked the RPM. So, I do not know. Maybe you find info about max. RPM of NEMA17 stepper motors elsewhere
Hello andreas does it matter if you use a mwc multiwii se v2.5 flight controller or a mpu6050 accelerometer ?
No. This controller just has everything on it...
Thanks
Hello andreas this project looks great. i'm thinking to make my own self balacing robot for my school project. are there any tips you can give for a new user of arduino ?
+FreshPrunce It will take much more time than you think. Finding the right parameters needs a lot of time. I even had to build this remote display and potentiometers, because you have to have a possibility to play with them during operation of the robot. And every robot has very different parameters, because they depend on many things.
As a new user, it is a challenging project. It took me at least half a year...
My Programming teacher will help me with my project and there are lots of tutorials on the internet that can help me build the robot. I have most of the part already i just need the motors and the drivers. i'm just a bit scared of the program, its hard to understand it most of the time.
Really great work. Any chance to have the exact same 3d parts for printing? Thank you
+Matej Petráš Look at github.com/SensorsIot/Self-Balancing-Robot. I uploaded the STL files
+Andreas Spiess thank you very much. I started building my own robot. I can read right angle from my MPU6050. I am just worried about stepper motors. Typical NEMA motors have 1.8 degrees per impuls and without any gear isnt that too many? I can see on other videos that results with stepper motors are pretty good
+Matej Petráš The NEMA17 motors are not very powerful, so you cannot increase their speed with a gear. If you look at my sketch you see, that the driving of the motor is quite special. I did not understand it completely.
Normal stepper driver boards have several modes. You have to experiment to find out which one is the best. If I remember right, it was the one which produced the fastest speed with a defined frequency of pulses, but I am no more sure.
+Andreas Spiess Thank you very much for your info I am getting into it. My last question is about brain shield. Do I have to buy it or is it ok If I put all parts together myself without their board. I read somewhere that wifi part comes with some software but maybe that is not true. I have arduino uno and mini. Will the code work on both of them?
+Matej Petráš You need an Arduino and an accelerometer chip. The NRF chip is not a wifi chip, it only works in the same band.
My first prototype consisted also of a arduino mini and a breakout board, so the code will work on both.
The board I used now was just more convenient.
Great job Thanks
:-)
may i know torque of the stepper u used in that.thnks
and cool project
keep it up
I use standard Nema steppers. And the torque is quit small. I never measured it.
sir what stepping/microstep are you using?
The one which creates the fastest movement with the least pulses, because I do not want to load the MCU more than necessary. Speed here is more important than precision.
Thanks a lot Andreas
i like ur video a lot
thanks for such a decent and nice explanation
but i want to know that
how much time you have taken for writing the code.
full code is written by you only or u have taken help from other codes.
because when i saw the code i became mad that is it possible to write the whole code by a single person.
I only want to know that i'm making a self balancing bot but i am a complete beginner
and i know a little bit of c language but even i can't able to understand ur programme
so as a complete beginner i don't like to copy the code because i want to learn it ,not to copy and paste
so how much time i would take to have a cammand over my codes and write by my own.
please clear this i have been headache regarding this thought a lot .
Thanks
+Subham Kumar It is my hobby, so I do not count hours ;-) But it was a long project. As written in the comment I used the b-robot code as a basis, but changed a lot.
A self-balancing robot is probably not the best project for a beginner. It is more a goal you want to reach. Maybe you plan a few steps in between.
+Andreas Spiess thanks a lot
great video
sir it's been a while i am working on this project but my robot falls down as soon as i leave it, i am using 60 rpm motors, could you please tell me the rpm of your motors
I use NEMA17 motors. But if it falls down, the reason is not the RPM, it is the controller which not yet works properly (or the accelerometer). It took me a few month till it worked...
Dear andreas i liked your video but why did you choose for a steppe motor and not for a dc motor.
They are easy to control (for me). And I had an example to start with (you see the reference link).
the example is that Mr Julio's link that hellped you ?
+MrOw OW yes
Sir please make a video on self balancing robot using esp32 dev board
There is no big difference. It would run very similar programs.
@@AndreasSpiess can we power esp32 with an powerbank. Is there any problem of doing that
No problem. But the steppers need more voltage.
Hi Andreas.. Have you enabled microstepping in A4988?
Yes
Thank you. Please can you confirm whether it is sixteenth step (i.e. MS1, MS2 and MS3 are logic high)?
I do not remember. You just have to try. The maximum speed of the steppers is important. So, if your clock signal is fast, you can use smaller steps and if not, you have to use bigger steps.
Thanks a lot. I enjoy your videos very much.
I didn't quite understand the purpose of the subperiods in the code.
I also do not understand them. I based my project on another one and did not change this part.
Ok, thanks. Great project though! Are you planning to do more robotics?
+SirArghPirate Not for the moment. But this can change...
so is it possible that I can make a self balancing bot by my own ,with my own code as a beginner
and if not how many years it would take me to do that
it is also a hobby of mine.
+Subham Kumar I am sure you can if you want. I just proposed you put a few steps in between to learn the programming, the dealing with stepper motors, to read the accelerometers, to build PID controllers and so on. Then, you should be able to put it together and build your self-balancing robot. Take your time and enjoy the way!
Thanks a lot for ur guidance
I'm currently working on a balancing robot too!
The motors I am using a servo motors for easy control. Video is on my channel so if anyone has tips let me know!
Uploading my second prototype soon as it's currently almost finished and working.
Looks good. My prediction: Almost finished might be less than 50% ;-) Keep up and post, if it runs.
Thanks! Will definitely upload a better version too.
Biggest problem I found about the servo's is the limited speed they have. That means bigger wheels is key to succes in this case. continuous non servo motors are still the best way to go.
sir...can i know the wiring diagram plz?
I do not have a diagram. It is just wiring the different parts according their diagrams: Arduino, MPU and stepper motor drivers. Should be simple.
sir its expensive making for student ,we are going to make self balencing robot with mpu 6050 3axis gyro : 3 axis acce: sensor and using l293 motor driver and arduino uno r3 .its college projects sir. can you help us sir ? we need schematic .
If you use different parts, my schematic would not help you.
sir i got this after coping the libraries, please help?
C:\Users\Gabri\Downloads\Self-Balancing-Robot-master\Self-Balancing-Robot-master\Robot14\Robot14.ino:35:20: fatal error: I2Cdev.h: No such file or directory
#include
^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.
The library should be here:
github.com/jrowberg/i2cdevlib
Sir, i am also not using the Crius SE 2.5 MultiWii Flight Controller, will the project still work with the stepper motors and the arduino and the mpu6050?:)
and i did copy the library to the libraries but when i refresh the arduino, there is no libraries to be found, what should i do now? thanks:)
Did you see, that inside the library files, there are many libraries for different devices. Did you only install the one for Arduino?
Andreas Spiess Sir, I installed all the folders into my library, but nothing comes out
Please read my former comment. You do not need all libraries. I cannot guide you to all steps, you have to google and think yourself a little. Otherwise, you will learn nothing ;-)
Start with google "install libraries". There are many tutorials in the internet. This is an important concept if you want to proceed with Arduinos.
great video sir . nice work too. sir can you plz send me the programming of this robot .
+Talha Pervez There is a link in the comment
I have watched many of your videos. They are GREAT!! Thanks for sharing them.
I have a problem with many stepper motor on a single Raspberry Pi.
raspberrypi.stackexchange.com/questions/56390/software-for-stepper-controller-via-usb
Maybe you have an idea where to find software examples for this?
I have ordered both the CNC 5 stepper breakout board and the Raspberry Pi CNC Hat V2.58 - GRBL Compatable. (odd to use an Arduino on top of a Raspberry Pi)
But I have not received them yet. I would love to share my findings with you when they arrive.
Thanks again,
Thomas Jam Pedersen
I do not know a lot about the raspberry. The board in the link is really only for Mach3, because I do not know of any other software which still uses parallel port.
You have to search for a Mach3 replacement software, but this most probably will not run on a raspby, but on your PC. To control your motors, you have to buy a compatible board to this software, which usually also has a processor on it. I would start with the CNC software and then go on in the direction to the motors. But it will not be cheap. Maybe you have a look at LinuxCNC. I think, this is the newer EMC 2.
Sir its too confusing:(
So, maybe you have to start slowly. I also was not capable to understand everything when I started...
Sir, do i use BRobot arduino file? or the robot14 file? cos there are two different files in your comments
thanks:)
My files are in my github repositories.I started my project based on the B-robot.
Andreas Spiess sir, the B robot has servo arm and Sonar?
Yes
Sir do we expand this two a lad carrying robot which carry almost 2 kg weight
Sir do we expand this two a lad carrying robot which carry almost 2 kg weight
I do not plan any new design of this robot for the moment.