Тёмный
No video :(

#35 Inside an Autonomous Self Balancing Robot #1 (Tutorial) 

Andreas Spiess
Подписаться 477 тыс.
Просмотров 45 тыс.
50% 1

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.aliexpress.com/e/_Am4oKh
A4988 Stepper Motor Controller: s.click.aliexpress.com/e/_9gUq8N
PID controller: • #28 Tutorial: PID cont...
B-Robot: github.com/JJulio/b-robot
Wiring tips: Wiring: • #12 Five Tricks for wo...
Code: github.com/SensorsIot/Self-Ba...
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/sensorsiot
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/shop/andreassp...
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
profile.php?...
/ spiessa
www.instructables.com/member/...
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

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

 

31 июл 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 137   
@h4tt3n
@h4tt3n 4 года назад
This is really great! Thank you for going into detail with everything.
@AndreasSpiess
@AndreasSpiess 4 года назад
You are welcome!
@javierpallalorden
@javierpallalorden 8 лет назад
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.
@AndreasSpiess
@AndreasSpiess 8 лет назад
+Javier Palla Lorden The steppers only look big. Actually, they are not very powerful, but very easy to control...
@barakamultiteknika4480
@barakamultiteknika4480 8 лет назад
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.
@AndreasSpiess
@AndreasSpiess 8 лет назад
+Mugi Raharjo Thank you very much for your compliment. I am glad to hear that!
@jon_raymond
@jon_raymond 8 лет назад
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.
@AndreasSpiess
@AndreasSpiess 8 лет назад
+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.
@venkateshe7506
@venkateshe7506 8 лет назад
thank you so much.. have a great new year!!!
@AndreasSpiess
@AndreasSpiess 8 лет назад
+Venkatesh E Happy New Year to you, too
@tecnotubeplus
@tecnotubeplus 7 лет назад
Hello andreas, I loved the project, it's very good. congratulations
@AndreasSpiess
@AndreasSpiess 7 лет назад
Thanks! I enjoyed it also a lot
@asiw
@asiw 7 лет назад
Fascinating. You explain things so well. You must be, or have been a teacher. Best wishes Art
@AndreasSpiess
@AndreasSpiess 7 лет назад
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...
@asiw
@asiw 7 лет назад
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
@AndreasSpiess
@AndreasSpiess 7 лет назад
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...
@zyroxiot9417
@zyroxiot9417 Год назад
Great, thanks
@AndreasSpiess
@AndreasSpiess Год назад
You are welcome!
@ahmedallam9612
@ahmedallam9612 4 года назад
So usefull and interesting, thanks alot for sharing,
@AndreasSpiess
@AndreasSpiess 4 года назад
You are welcome!
@udith-pz4tv
@udith-pz4tv 6 лет назад
Great job Thanks
@AndreasSpiess
@AndreasSpiess 6 лет назад
:-)
@garygrotsky4081
@garygrotsky4081 8 лет назад
Great video. Love your Swiss accent.
@AndreasSpiess
@AndreasSpiess 8 лет назад
+Gary Grotsky Thank you for your nice comment!
@ahmedhenteti7600
@ahmedhenteti7600 7 лет назад
Thanks
@amarnathsingh4146
@amarnathsingh4146 7 лет назад
Sir do we expand this two a lad carrying robot which carry almost 2 kg weight
@OmarAQQ
@OmarAQQ 7 лет назад
Sir, Can you please post the frame's dimensions, or give a link to them ? I would be really grateful thank you
@BjarkeHellden
@BjarkeHellden 6 лет назад
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
@AndreasSpiess
@AndreasSpiess 6 лет назад
Yes, you are right.
@djwfly1
@djwfly1 8 лет назад
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.
@AndreasSpiess
@AndreasSpiess 8 лет назад
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.
@DIKxKOPxHEL
@DIKxKOPxHEL 7 лет назад
Hello andreas does it matter if you use a mwc multiwii se v2.5 flight controller or a mpu6050 accelerometer ?
@AndreasSpiess
@AndreasSpiess 7 лет назад
No. This controller just has everything on it...
@shashisuman8302
@shashisuman8302 7 лет назад
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 ?
@AndreasSpiess
@AndreasSpiess 7 лет назад
I never checked the RPM. So, I do not know. Maybe you find info about max. RPM of NEMA17 stepper motors elsewhere
@DIKxKOPxHEL
@DIKxKOPxHEL 7 лет назад
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 ?
@AndreasSpiess
@AndreasSpiess 7 лет назад
+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...
@DIKxKOPxHEL
@DIKxKOPxHEL 7 лет назад
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.
@markchristiancabrera5892
@markchristiancabrera5892 8 лет назад
sir what stepping/microstep are you using?
@AndreasSpiess
@AndreasSpiess 8 лет назад
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.
@reactorscience
@reactorscience 7 лет назад
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
@AndreasSpiess
@AndreasSpiess 7 лет назад
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...
@8BitNeuron4808
@8BitNeuron4808 7 лет назад
may i know torque of the stepper u used in that.thnks and cool project keep it up
@AndreasSpiess
@AndreasSpiess 7 лет назад
I use standard Nema steppers. And the torque is quit small. I never measured it.
@ThePrashanth4
@ThePrashanth4 7 лет назад
Hi Andreas.. Have you enabled microstepping in A4988?
@AndreasSpiess
@AndreasSpiess 7 лет назад
Yes
@ThePrashanth4
@ThePrashanth4 7 лет назад
Thank you. Please can you confirm whether it is sixteenth step (i.e. MS1, MS2 and MS3 are logic high)?
@AndreasSpiess
@AndreasSpiess 7 лет назад
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.
@ThePrashanth4
@ThePrashanth4 7 лет назад
Thanks a lot. I enjoy your videos very much.
@subhamkumar7424
@subhamkumar7424 8 лет назад
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
@AndreasSpiess
@AndreasSpiess 8 лет назад
+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.
@subhamkumar7424
@subhamkumar7424 8 лет назад
+Andreas Spiess thanks a lot
@subhamkumar7424
@subhamkumar7424 8 лет назад
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.
@AndreasSpiess
@AndreasSpiess 8 лет назад
+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!
@subhamkumar7424
@subhamkumar7424 8 лет назад
Thanks a lot for ur guidance
@matejpetras2016
@matejpetras2016 8 лет назад
Really great work. Any chance to have the exact same 3d parts for printing? Thank you
@AndreasSpiess
@AndreasSpiess 8 лет назад
+Matej Petráš Look at github.com/SensorsIot/Self-Balancing-Robot. I uploaded the STL files
@matejpetras2016
@matejpetras2016 8 лет назад
+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
@AndreasSpiess
@AndreasSpiess 8 лет назад
+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.
@matejpetras2016
@matejpetras2016 8 лет назад
+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?
@AndreasSpiess
@AndreasSpiess 8 лет назад
+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.
@nipunrathnayake6200
@nipunrathnayake6200 7 лет назад
sir...can i know the wiring diagram plz?
@AndreasSpiess
@AndreasSpiess 7 лет назад
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.
@HASIBSTECHS
@HASIBSTECHS 7 лет назад
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 .
@AndreasSpiess
@AndreasSpiess 7 лет назад
If you use different parts, my schematic would not help you.
@face2992
@face2992 7 лет назад
Dear andreas i liked your video but why did you choose for a steppe motor and not for a dc motor.
@AndreasSpiess
@AndreasSpiess 7 лет назад
They are easy to control (for me). And I had an example to start with (you see the reference link).
@face2992
@face2992 7 лет назад
the example is that Mr Julio's link that hellped you ?
@AndreasSpiess
@AndreasSpiess 7 лет назад
+MrOw OW yes
@SirArghPirate
@SirArghPirate 7 лет назад
I didn't quite understand the purpose of the subperiods in the code.
@AndreasSpiess
@AndreasSpiess 7 лет назад
I also do not understand them. I based my project on another one and did not change this part.
@SirArghPirate
@SirArghPirate 7 лет назад
Ok, thanks. Great project though! Are you planning to do more robotics?
@AndreasSpiess
@AndreasSpiess 7 лет назад
+SirArghPirate Not for the moment. But this can change...
@millenia2222
@millenia2222 7 лет назад
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.
@AndreasSpiess
@AndreasSpiess 7 лет назад
The library should be here: github.com/jrowberg/i2cdevlib
@millenia2222
@millenia2222 7 лет назад
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:)
@AndreasSpiess
@AndreasSpiess 7 лет назад
Did you see, that inside the library files, there are many libraries for different devices. Did you only install the one for Arduino?
@millenia2222
@millenia2222 7 лет назад
Andreas Spiess Sir, I installed all the folders into my library, but nothing comes out
@AndreasSpiess
@AndreasSpiess 7 лет назад
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.
@talhapervez5886
@talhapervez5886 8 лет назад
great video sir . nice work too. sir can you plz send me the programming of this robot .
@AndreasSpiess
@AndreasSpiess 8 лет назад
+Talha Pervez There is a link in the comment
@mechatronix3754
@mechatronix3754 7 лет назад
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.
@AndreasSpiess
@AndreasSpiess 7 лет назад
Looks good. My prediction: Almost finished might be less than 50% ;-) Keep up and post, if it runs.
@mechatronix3754
@mechatronix3754 7 лет назад
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.
@ftrstudio7557
@ftrstudio7557 3 года назад
Sir please make a video on self balancing robot using esp32 dev board
@AndreasSpiess
@AndreasSpiess 3 года назад
There is no big difference. It would run very similar programs.
@ftrstudio7557
@ftrstudio7557 3 года назад
@@AndreasSpiess can we power esp32 with an powerbank. Is there any problem of doing that
@AndreasSpiess
@AndreasSpiess 3 года назад
No problem. But the steppers need more voltage.
@etjamdk
@etjamdk 7 лет назад
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
@AndreasSpiess
@AndreasSpiess 7 лет назад
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.
@millenia2222
@millenia2222 7 лет назад
Sir its too confusing:(
@AndreasSpiess
@AndreasSpiess 7 лет назад
So, maybe you have to start slowly. I also was not capable to understand everything when I started...
@millenia2222
@millenia2222 7 лет назад
Sir, do i use BRobot arduino file? or the robot14 file? cos there are two different files in your comments thanks:)
@AndreasSpiess
@AndreasSpiess 7 лет назад
My files are in my github repositories.I started my project based on the B-robot.
@millenia2222
@millenia2222 7 лет назад
Andreas Spiess sir, the B robot has servo arm and Sonar?
@AndreasSpiess
@AndreasSpiess 7 лет назад
Yes
@amarnathsingh4146
@amarnathsingh4146 7 лет назад
Sir do we expand this two a lad carrying robot which carry almost 2 kg weight
@amarnathsingh4146
@amarnathsingh4146 7 лет назад
Sir do we expand this two a lad carrying robot which carry almost 2 kg weight
@AndreasSpiess
@AndreasSpiess 7 лет назад
I do not plan any new design of this robot for the moment.
Далее
I Built a Ball Balancing Robot
8:55
Просмотров 1 млн
Balancing Robot with PID - Mini Robot PCB
17:29
Просмотров 45 тыс.
кукинг с Даниилом 🥸
01:00
Просмотров 2 млн
Вопрос Ребром - Субо
49:41
Просмотров 1,6 млн
Arduino BLDC balancer robot - Tutorial
14:15
Просмотров 32 тыс.
#37 Advanced Tutorial for NRF24L01 and Arduino #1
10:49
Self balancing bike
2:30
Просмотров 41 тыс.
DIY sonar scanner (practical experiments)
14:30
Просмотров 1 млн
BalancingWii 1.0 - self balancing robot
3:48
Просмотров 48 тыс.