Very nice tutorial. I would like to make just one comment, on the line const int WHEEL_CIRCUMFERENCE = 10.0531 should probably be correct const float WHEEL_CIRCUMFERENCE = 10.0531
I can't believe i missed that! Thank you! It is chopping off the .05 with the int type which will become noticeable the longer the robot travels. No idea why I typed int there.
Best explanation I have found to date on using encoders to control (fairly) precise navigation. Since I am new the fact that you explain everything in detail is helpful. Your explanation around avoiding an additional 'while loop' to determine the stopping point was instructive. I am looking forward to the remaining videos in the series. Many thanks!
I might be very late to get an answer but how to know the tick per rotation of the motor?? I am not using Pololu product but an offbrand N20 with a magnetic encoder.
That is a great idea for the next robotics series. remember that if you want to try this on a raspberry pi you would only have to simply convert the algorithms to Python or whatever programming language you're using from C. The math is all the same.
Great video so far. Just one thing to note: your robots shown at the 3:00-4:00 mark aren't holonomic. Skid/tank steer is still considered nonholonomic.
Hi Great video! Thanks a lot. I have a question, how the robot knows to stop exactly on the blue sticker on the floor? Is this a RFID sensor? Color sensor? Or are you using some kind of geo-localization? I would really appreciate your help. Thanks
wheel odometry.. The robot has a goal location in x,y space, say 100, 100 and starts at a location like 0,0 with a starting angle say 0. From there It is all math. The feedback loop is the amount of rotation of the wheels.
The environment's the same they both use similar Arduino based processors. The big difference though is that the 3pi does not have wheel encoders. And I use them extensively.. The zumo is another good option and I believe that one has wheel encoders.
please create more video on this series without use of pololo robot just simple robot with bldc motor rotary encoder and ultrasonic sensor with servo pololo is costly and most of us are not having it that's why at a cheaper rate please try same video with bldc motor and ultrasonic sensor with servo
That is a good idea, I know that many enjoy building the robot. I have this video on the assembly of the elegoo smart car: ruclips.net/video/5CNjEY0LCwA/видео.html but the fact it has 4 wheels does not make it a good candidate even if you add encoders. When I am done with the initial series I will do a video on the $15 2 wheeled chassis I showed in the video with the elegoo parts on it and the encoders. As I mentioned in the video remember you can use any similar robot for this series it does not have to be the pololu. The algorithms discussed will be the same any the tuning of the robot will be different. Thank you for the feedback!
I want to build a robot that will chase my cat by sensing him but it won't hit him. It retreats when he approaches it and it plays sounds of a cat meowing. Infact, it can follow me around too just like he does. We had to move into an apartment and gave up his brother and sister that he played with. Now he's getting fat and lonely. I thought building him a companion would be perfect for him and I get to learn how to build a robot - something I always wanted to do. I'm 63, teach middle school and needed a hobby to destress after working with screaming kids all day. Can you help me out with this? Thanks, Mike
You mention the number of clicks per one revolution of the motor shaft, but I lost you on how to figure what number was needed for the Turtle or Hyper Edition! And even how you got 12 for the Standard Edition. How did you come up with these numbers?
Good question! Starting here: www.pololu.com/docs/0J83/5.4 "he encoders provide a resolution of 12 counts per revolution of the motor shaft when counting both edges of both channels. To compute the counts per revolution of the wheels, multiply the gearboxes’ gear ratios by 12. For example, if 30:1 motors (which have gear ratios more accurately specified as 29.86:1) are used, the encoders provide 29.86 × 12 ≈ 358.3 CPR. The exact gear ratios of our Micro Metal Gearmotors are specified on their product pages." The product pages for the motors on the standard edition (30:1): www.pololu.com/product/2364 "This gearmotor is a miniature medium-power, 6 V brushed DC motor with a 29.86:1 metal gearbox" and the turtle edition (75:1): www.pololu.com/product/2366 "This gearmotor is a miniature medium-power, 6 V brushed DC motor with a 75.81:1 metal gearbox" Note, i did not include the hyper edition here, but if you have it just look up the 15:1 ratio motor 6v
@@CodingCoach I guess my real question was about the number "12." Is that a fixed number for all motors? A comment, or a way you made reference to CLICK_PER_ROTATION, gave me the impression that this number might be different for different editions of the 3Pi+. But I saw no way to derive a different number. Is that number based on the encoder itself and remains the same for all editions. Thanks for the quick reply by the way!
@@CodingCoach Well the answer was staring me in the face the whole time! "The encoders provide a resolution of 12 counts per revolution of the motor shaft..." The encoders refer to the encoder used and have nothing to do with the motors themselves! Blind in one eye and can't see out of the other!
Hi Sir! I would like to ask if what sensor will be use in order to move in different direction such us in hospital. There will be a button or a remote that dictates where the robot will go. For example, I click on room number 101, how will the robot detects a room and deliver the food inside of it(room). First we will use the line follower robot then we don't have an idea on how the robot will go inside the room because of the different direction. Thank you in advance Coach
I'm running into an error. I followed the entire video and I got everything to work, but in the end, I unplugged the USB from my robot because I wanted it to run without being tethered to the computer. When I unplugged I received this error: avrdude: ser_open(): can't set com-state for "\\.\COM3" An error occurred while uploading the sketch Error while setting serial port parameters: 57,600 N 8 1 It's not recognizing the port I plugged into anymore. I tried to run the same code again on a different file, but I still ran into the same error. Any advice on how to go about fixing this?
1. In Arduino studio, sure to double check tools -> board and make sure it is set to "Pololu A-Star 32u4" and also tools -> port and make sure you select the correct one. Also it never hurts to reboot your computer and start fresh. 2. If that does not work, try opening an example sketch (like blink) and see if you can flash that. 3. If none of that works, let me know you might have to reset the bootloader see : www.pololu.com/docs/0J83/10.1
@@CodingCoach I just finished going through the uploading-before-bootloader method from Pololu and I got everything back to normal! Thank you for the assistance. I'm looking forward to the upcoming semester!
Very nice tutorial.
I would like to make just one comment,
on the line
const int WHEEL_CIRCUMFERENCE = 10.0531
should probably be correct
const float WHEEL_CIRCUMFERENCE = 10.0531
I can't believe i missed that! Thank you! It is chopping off the .05 with the int type which will become noticeable the longer the robot travels. No idea why I typed int there.
lol... this kind small errors happens so often in our programming world while troubleshooting, it is so funny.
This content should be much more watched on RUclips. Sometimes even better than the content of the 'big' robotic chanels. Great work 👍
Glad you enjoy it!
most under rated channel on RUclips regarding electronic stuff. Highly appreciate your work!!!!
Thanks!
this pokemon (kindaa) music hooked me as well as explanation ofcourse :)
I am building an autonomous mower and your video has helped me tremendously. Thank you!
Best explanation I have found to date on using encoders to control (fairly) precise navigation. Since I am new the fact that you explain everything in detail is helpful. Your explanation around avoiding an additional 'while loop' to determine the stopping point was instructive. I am looking forward to the remaining videos in the series. Many thanks!
This is an exceptionally good tutorial on robot programming. Thank you. I will be watching more as I have purchased the robot you show in your video.
You are welcome!
Great video!
Thanks! Happy New Year, hope all is well!
@@CodingCoach waiting foe new videos😊
I try to add the time of flight sensor opt3101, thanks for your example, lets see what i'll come up with :)
Thank you so much
Thank you for your time n efforts!
I was looking for gradual increase/decrease in motor speed for an input trigger which your video covered.
I might be very late to get an answer but how to know the tick per rotation of the motor?? I am not using Pololu product but an offbrand N20 with a magnetic encoder.
awesome video
please start series with raspberry Pi
That is a great idea for the next robotics series. remember that if you want to try this on a raspberry pi you would only have to simply convert the algorithms to Python or whatever programming language you're using from C. The math is all the same.
@@CodingCoach I have subscribed your channel hopeing for long learning series with you. your way of teaching is awesome please make a series of this.
Great video so far. Just one thing to note: your robots shown at the 3:00-4:00 mark aren't holonomic. Skid/tank steer is still considered nonholonomic.
Buen video, gracias por la explicación 🦾
you are welcome!
thank you so much sir.
Hi
Great video! Thanks a lot. I have a question, how the robot knows to stop exactly on the blue sticker on the floor? Is this a RFID sensor? Color sensor? Or are you using some kind of geo-localization?
I would really appreciate your help. Thanks
wheel odometry.. The robot has a goal location in x,y space, say 100, 100 and starts at a location like 0,0 with a starting angle say 0. From there It is all math. The feedback loop is the amount of rotation of the wheels.
@@CodingCoach Thanks ! I think i got it
how to do the getcountsandreset(); for an individual arduino with motos with free encoders..!
still works even using Pololu 3pi? Not with a plus (+) variant?
The environment's the same they both use similar Arduino based processors. The big difference though is that the 3pi does not have wheel encoders. And I use them extensively..
The zumo is another good option and I believe that one has wheel encoders.
Im a computer engineering interested in robotics and embbed systems and CAD design
please create more video on this series without use of pololo robot just simple robot with bldc motor rotary encoder and ultrasonic sensor with servo
pololo is costly and most of us are not having it that's why at a cheaper rate please try same video with bldc motor and ultrasonic sensor with servo
That is a good idea, I know that many enjoy building the robot. I have this video on the assembly of the elegoo smart car: ruclips.net/video/5CNjEY0LCwA/видео.html but the fact it has 4 wheels does not make it a good candidate even if you add encoders. When I am done with the initial series I will do a video on the $15 2 wheeled chassis I showed in the video with the elegoo parts on it and the encoders. As I mentioned in the video remember you can use any similar robot for this series it does not have to be the pololu. The algorithms discussed will be the same any the tuning of the robot will be different. Thank you for the feedback!
I want to build a robot that will chase my cat by sensing him but it won't hit him. It retreats when he approaches it and it plays sounds of a cat meowing. Infact, it can follow me around too just like he does.
We had to move into an apartment and gave up his brother and sister that he played with. Now he's getting fat and lonely. I thought building him a companion would be perfect for him and I get to learn how to build a robot - something I always wanted to do. I'm 63, teach middle school and needed a hobby to destress after working with screaming kids all day. Can you help me out with this? Thanks, Mike
You mention the number of clicks per one revolution of the motor shaft, but I lost you on how to figure what number was needed for the Turtle or Hyper Edition! And even how you got 12 for the Standard Edition. How did you come up with these numbers?
Good question!
Starting here: www.pololu.com/docs/0J83/5.4
"he encoders provide a resolution of 12 counts per revolution of the motor shaft when counting both edges of both channels. To compute the counts per revolution of the wheels, multiply the gearboxes’ gear ratios by 12. For example, if 30:1 motors (which have gear ratios more accurately specified as 29.86:1) are used, the encoders provide 29.86 × 12 ≈ 358.3 CPR. The exact gear ratios of our Micro Metal Gearmotors are specified on their product pages."
The product pages for the motors on the standard edition (30:1): www.pololu.com/product/2364
"This gearmotor is a miniature medium-power, 6 V brushed DC motor with a 29.86:1 metal gearbox"
and the turtle edition (75:1): www.pololu.com/product/2366
"This gearmotor is a miniature medium-power, 6 V brushed DC motor with a 75.81:1 metal gearbox"
Note, i did not include the hyper edition here, but if you have it just look up the 15:1 ratio motor 6v
@@CodingCoach I guess my real question was about the number "12." Is that a fixed number for all motors? A comment, or a way you made reference to CLICK_PER_ROTATION, gave me the impression that this number might be different for different editions of the 3Pi+. But I saw no way to derive a different number. Is that number based on the encoder itself and remains the same for all editions. Thanks for the quick reply by the way!
@@CodingCoach Well the answer was staring me in the face the whole time! "The encoders provide a resolution of 12 counts per revolution of the motor shaft..." The encoders refer to the encoder used and have nothing to do with the motors themselves! Blind in one eye and can't see out of the other!
@@codecage9333 you got it!
Hi Sir! I would like to ask if what sensor will be use in order to move in different direction such us in hospital. There will be a button or a remote that dictates where the robot will go. For example, I click on room number 101, how will the robot detects a room and deliver the food inside of it(room). First we will use the line follower robot then we don't have an idea on how the robot will go inside the room because of the different direction. Thank you in advance Coach
You could use predefined coordinate for each room as an address for the robot
Nice video!! But why did you stopped uploading new videos?
It is cool robot
I'm running into an error. I followed the entire video and I got everything to work, but in the end, I unplugged the USB from my robot because I wanted it to run without being tethered to the computer. When I unplugged I received this error:
avrdude: ser_open(): can't set com-state for "\\.\COM3"
An error occurred while uploading the sketch
Error while setting serial port parameters: 57,600 N 8 1
It's not recognizing the port I plugged into anymore. I tried to run the same code again on a different file, but I still ran into the same error.
Any advice on how to go about fixing this?
1. In Arduino studio, sure to double check tools -> board and make sure it is set to "Pololu A-Star 32u4" and also tools -> port and make sure you select the correct one. Also it never hurts to reboot your computer and start fresh.
2. If that does not work, try opening an example sketch (like blink) and see if you can flash that.
3. If none of that works, let me know you might have to reset the bootloader see : www.pololu.com/docs/0J83/10.1
@@CodingCoach All the settings I have match up with what you stated above and I received the same error again when I ran the blink program.
@@CodingCoach I just finished going through the uploading-before-bootloader method from Pololu and I got everything back to normal! Thank you for the assistance. I'm looking forward to the upcoming semester!
great work!
do you have a video on waypoint finding?
Please make the same project in arduino