Blueprint

Self Balancing Robot

Self Balancing Robot

Created by Anirudh Anirudh 🚀

Tier 4

19 views

0 followers

Anirudh Anirudh 🚀 added to the journal ago

Fine tuning the PID and making the motors work with MPU

PLEASE SEE THE VIDEOS!!
VIDEOS:
https://github.com/user-attachments/assets/c89bb0b9-8fde-477a-9b1f-8c3182f0837f
https://github.com/user-attachments/assets/e8a45102-77c9-4b75-9c57-6067076b8ff2

So after spending way too much time actually getting it to work, because the code was not working very well, I just got it to work and I'm syncing it and controlling the PID took way too longer than I expected because it was just falling and falling and falling. I started up and it just falls. I also had to replace the battery once because I thought my motor died or something died, but it was the battery that was drying out. So I had to replace the batteries and continue with the fine tuning. I won't say it's way to fine tune right now because it definitely needs a lot more training, but it's at least usable right now that I could define it as something a little bit working. I do need to work a lot more on making it look good and covering it totally and upgrading the code and firmware part.

image

Anirudh Anirudh 🚀 added to the journal ago

trying to code functionalities and got it working

So after each component was working fine, I faced into another issue that my MPU was not working. I don't know how I tried it, but I had to use a new one. And for the motor, the speed control thing was not working very well, so it did require some tweaking. I was not very familiar with coding parts, so I took help with AI, but it was taking too many iterations because AI was not giving very good results, so I had to fall back to documentation because I don't know why and how it was always giving me error and Arduino takes too much time to compile everything also. But after endless struggles, I finally managed to get the code working and the website running, and now everything is correct and the MPU gives good results. Here is a demo video of it as well, of showing everything working.

image

See the video of everything working here:
https://github.com/user-attachments/assets/c7c59b8b-4fc7-4ee1-8911-51263bc7b427

Anirudh Anirudh 🚀 added to the journal ago

Combine the electronics and work on firmware

So now that everything was set up, I started working on the electronics and website. I gathered all the electronics parts and started the assembly. Initially, I started with ESPC3 Mini due to the space constraints, but after a while it just fried up and it was created on breadboard and all. Though I don't have any proof that I worked on it because I forgot to take any photos of the ESPC3 Mini one, but I think you could trust me that I really did. But after that I had to switch to another MCU to create the circuit, but this was a very long one. I again took many photos in between because I was too locked in. But after everything, I am happy that at least some things are working right now. The balancing and all, nothing is working very well, but the good thing is I could control stuff and I could see everything is working fine. The assembly part took a while because of the laser dart and I had to use nuts and stuff. But after all, I am happy.

imageimage

image

Anirudh Anirudh 🚀 added to the journal ago

Laser cutting and fixing tolerances

So, continuing on the previous one, I created a DXF file. I noticed while cutting, after cutting it just there that there were some tolerance issues, so I fixed them there itself and then we cut it then. And seems like now it's much better and I could actually use these and move on to the electronics part. I also learned about the curve correction for laser cutting, which I was unaware of, due to which the tolerance were messing up. But this was more of a hit and try one and a bit more uh little research on curve corrections and all. And now I believe everything is worth it. It did took a while because I had to uh do the changes, go to the laser cutter, give it them, align it, and then cut it, and then again go back and do the changes and then come back to the laser cutter and cut it. So that's why this took a while.
image
image

image
image
image
image

image

Anirudh Anirudh 🚀 added to the journal ago

Reworked on the Model design and finger joints

So after laser cutting the first design, I found many major issues. The main one was that the finger joints were not at all good and were very loose, so I couldn't really use them. So what I did was to start working on the model itself again. I found that the dimensions were also wrong, it doesn't have to be that big. So I reworked on everything and created a new model with new finger joints. The finger joints took a while due to the tolerance and all, but now I believe the model looks good. Here's the before and after with finger joints. Now next step would be to get these laser cutted and to create a DXF file for these.

Before finger joints:
image

After finger joints:
image

Anirudh Anirudh 🚀 added to the journal ago

Redesigned for Laser cutting and created finger joints

So now that the main part was over, I started designing the mounts for the 3D design. I also created some grooves for the ESP to fit and the motor to fit and I cut out the holes for the motors and I added fillets and made it perfect for the 3D printing. But later I realized that to make it more efficient we won't be doing 3D printing, we would be using laser cutting. So I had to transform my design from 3D to laser. Initially, I thought it would be easy and we would just use Feviquick or something. But later I realized that Feviquick is not the best approach to deal with such situations, so I need to create some joints for it. And I started to learn more about joints and I found tab joints, finger joints, crisscross joints, head joints, and we have already tried those, I don't know exactly what you call, but there's a slot that I use for the partitions, the bottom and top partitions that I've used. We have created those slots previously but they didn't work really well and they were really really loose. So we tried using the finger joints. So I had no idea about how to make finger joints but it was kind of easy. So I just created a new sketch on my existing body and made the rectangles and the issue was with the dimension as I was not familiar with fusions, most of the tools. So I took help with GetGPT and it told me that it has those rectangular pattern tools. So I started to use that tool and it had some really great results. So then I mirrored everything and for each of my part I had to think where should the joints will go and then I manually created all the joints and yeah then it was ready for the cutting. I wasn't really sure about the dimension as this was the first prototype. So I hadn't selected any dimensions for any of the parts. It was a rough estimate depending on the items that we were using. So I went over CO2 laser cutting machine and it was really really big. So I had to set it up and initiate some of the things and then clean its lance and then load up the board and then the box testing. I also did some few design changes before printing in the laser cut software itself. So it took a bit time to understand how exactly the laser cutter is working but then I understood and I loaded up the designs and created exports for each of the files. So we had around five to six exports and then just exported up and cut it up and the results were good. But as soon as the print finished it looked good but in reality the finger joints were really really loose. I thought that I was familiar with 3d printing but not with laser cutting. So I left some 0.05 mm tolerance. So that was the main issue as after some time I got to know that laser has its own curve connections. So it's around 0.1 mm. So the gap just became 0.15 mm. So it was really really bad but still the design was good and the idea of finger joints was also good. So if I adjust the finger's length then it would work very great. But this one took a lot of time as I had to research about a lot of stuff and the laser cutting was kind of very new to me. I've still not perfected it but I learned a lot.

WhatsApp Image 2025-12-09 at 08.33.01_6b33e2fc

Screenshot 2025-12-04 144357Screenshot 2025-12-04 144026
image
image
image
image
image
image
image
image

image
WhatsApp Image 2025-12-09 at 08.33.38_2a7f1302

WhatsApp Image 2025-12-09 at 08.33.14_8075d2ba

Anirudh Anirudh 🚀 added to the journal ago

Started the initial design & components selection

Initially I wanted to make the design a bit unique and cute first I thought of a ninja style but then I switched to a more cuter version! I used gemini to generate the images for the prototype but right now I started working on making a working model of it first then I will work on making it look good!!

Components

  • I will be using the drv8833 for its compactness and effictivness for this project
  • for the MCU I will consider using esp32 c3 mini to make it a bit light and not loaded with extra unused pins!
  • for motors instead of N20 I will be using BO motors only cause I need to fit this in a good budget
  • for the gyro I'll use the GOAT MPU6050

Design

as a normal balancer bot I kept the design as a box with head simple but selecting the right design was a little bit tough

image
image

Screenshot 2025-12-04 141720
Screenshot 2025-12-04 141524Screenshot 2025-12-04 141702
Screenshot 2025-12-04 141449
Screenshot 2025-12-04 141106dgdfgd

image

CAD

image

I started the 3D modelling and sketches. I grabbed all stl from grabcad and then started to make the sketch, I followed the design intitally taken but after making my first design I noticed that this feels too compact and might be hard to actually balance so I switched to a more wide design and extruded stuff and placed all the components on there respective places

Anirudh Anirudh 🚀 started Self Balancing Robot ago

12/4/2025 - Started the initial design & components selection

Initially I wanted to make the design a bit unique and cute first I thought of a ninja style but then I switched to a more cuter version! I used gemini to generate the images for the prototype but right now I started working on making a working model of it first then I will work on making it look good!!

Components

  • I will be using the drv8833 for its compactness and effictivness for this project
  • for the MCU I will consider using esp32 c3 mini to make it a bit light and not loaded with extra unused pins!
  • for motors instead of N20 I will be using BO motors only cause I need to fit this in a good budget
  • for the gyro I'll use the GOAT MPU6050

Design

as a normal balancer bot I kept the design as a box with head simple but selecting the right design was a little bit tough

image
image

Screenshot 2025-12-04 141720
Screenshot 2025-12-04 141524Screenshot 2025-12-04 141702
Screenshot 2025-12-04 141449
Screenshot 2025-12-04 141106dgdfgd

image

CAD

image

I started the 3D modelling and sketches. I grabbed all stl from grabcad and then started to make the sketch, I followed the design intitally taken but after making my first design I noticed that this feels too compact and might be hard to actually balance so I switched to a more wide design and extruded stuff and placed all the components on there respective places

12/9/2025 - Redesigned for Laser cutting and created finger joints

So now that the main part was over, I started designing the mounts for the 3D design. I also created some grooves for the ESP to fit and the motor to fit and I cut out the holes for the motors and I added fillets and made it perfect for the 3D printing. But later I realized that to make it more efficient we won't be doing 3D printing, we would be using laser cutting. So I had to transform my design from 3D to laser. Initially, I thought it would be easy and we would just use Feviquick or something. But later I realized that Feviquick is not the best approach to deal with such situations, so I need to create some joints for it. And I started to learn more about joints and I found tab joints, finger joints, crisscross joints, head joints, and we have already tried those, I don't know exactly what you call, but there's a slot that I use for the partitions, the bottom and top partitions that I've used. We have created those slots previously but they didn't work really well and they were really really loose. So we tried using the finger joints. So I had no idea about how to make finger joints but it was kind of easy. So I just created a new sketch on my existing body and made the rectangles and the issue was with the dimension as I was not familiar with fusions, most of the tools. So I took help with GetGPT and it told me that it has those rectangular pattern tools. So I started to use that tool and it had some really great results. So then I mirrored everything and for each of my part I had to think where should the joints will go and then I manually created all the joints and yeah then it was ready for the cutting. I wasn't really sure about the dimension as this was the first prototype. So I hadn't selected any dimensions for any of the parts. It was a rough estimate depending on the items that we were using. So I went over CO2 laser cutting machine and it was really really big. So I had to set it up and initiate some of the things and then clean its lance and then load up the board and then the box testing. I also did some few design changes before printing in the laser cut software itself. So it took a bit time to understand how exactly the laser cutter is working but then I understood and I loaded up the designs and created exports for each of the files. So we had around five to six exports and then just exported up and cut it up and the results were good. But as soon as the print finished it looked good but in reality the finger joints were really really loose. I thought that I was familiar with 3d printing but not with laser cutting. So I left some 0.05 mm tolerance. So that was the main issue as after some time I got to know that laser has its own curve connections. So it's around 0.1 mm. So the gap just became 0.15 mm. So it was really really bad but still the design was good and the idea of finger joints was also good. So if I adjust the finger's length then it would work very great. But this one took a lot of time as I had to research about a lot of stuff and the laser cutting was kind of very new to me. I've still not perfected it but I learned a lot.

WhatsApp Image 2025-12-09 at 08.33.01_6b33e2fc

Screenshot 2025-12-04 144357Screenshot 2025-12-04 144026
image
image
image
image
image
image
image
image

image
WhatsApp Image 2025-12-09 at 08.33.38_2a7f1302

WhatsApp Image 2025-12-09 at 08.33.14_8075d2ba

5/1/2026 10:23 AM - Reworked on the Model design and finger joints

So after laser cutting the first design, I found many major issues. The main one was that the finger joints were not at all good and were very loose, so I couldn't really use them. So what I did was to start working on the model itself again. I found that the dimensions were also wrong, it doesn't have to be that big. So I reworked on everything and created a new model with new finger joints. The finger joints took a while due to the tolerance and all, but now I believe the model looks good. Here's the before and after with finger joints. Now next step would be to get these laser cutted and to create a DXF file for these.

Before finger joints:
image

After finger joints:
image

5/1/2026 10:27 AM - Laser cutting and fixing tolerances

So, continuing on the previous one, I created a DXF file. I noticed while cutting, after cutting it just there that there were some tolerance issues, so I fixed them there itself and then we cut it then. And seems like now it's much better and I could actually use these and move on to the electronics part. I also learned about the curve correction for laser cutting, which I was unaware of, due to which the tolerance were messing up. But this was more of a hit and try one and a bit more uh little research on curve corrections and all. And now I believe everything is worth it. It did took a while because I had to uh do the changes, go to the laser cutter, give it them, align it, and then cut it, and then again go back and do the changes and then come back to the laser cutter and cut it. So that's why this took a while.
image
image

image
image
image
image

image

5/1/2026 10:34 AM - Combine the electronics and work on firmware

So now that everything was set up, I started working on the electronics and website. I gathered all the electronics parts and started the assembly. Initially, I started with ESPC3 Mini due to the space constraints, but after a while it just fried up and it was created on breadboard and all. Though I don't have any proof that I worked on it because I forgot to take any photos of the ESPC3 Mini one, but I think you could trust me that I really did. But after that I had to switch to another MCU to create the circuit, but this was a very long one. I again took many photos in between because I was too locked in. But after everything, I am happy that at least some things are working right now. The balancing and all, nothing is working very well, but the good thing is I could control stuff and I could see everything is working fine. The assembly part took a while because of the laser dart and I had to use nuts and stuff. But after all, I am happy.

imageimage

image

5/1/2026 10:39 AM - trying to code functionalities and got it working

So after each component was working fine, I faced into another issue that my MPU was not working. I don't know how I tried it, but I had to use a new one. And for the motor, the speed control thing was not working very well, so it did require some tweaking. I was not very familiar with coding parts, so I took help with AI, but it was taking too many iterations because AI was not giving very good results, so I had to fall back to documentation because I don't know why and how it was always giving me error and Arduino takes too much time to compile everything also. But after endless struggles, I finally managed to get the code working and the website running, and now everything is correct and the MPU gives good results. Here is a demo video of it as well, of showing everything working.

image

See the video of everything working here:
https://github.com/user-attachments/assets/c7c59b8b-4fc7-4ee1-8911-51263bc7b427

5/1/2026 10:44 AM - Fine tuning the PID and making the motors work with MPU

PLEASE SEE THE VIDEOS!!
VIDEOS:
https://github.com/user-attachments/assets/c89bb0b9-8fde-477a-9b1f-8c3182f0837f
https://github.com/user-attachments/assets/e8a45102-77c9-4b75-9c57-6067076b8ff2

So after spending way too much time actually getting it to work, because the code was not working very well, I just got it to work and I'm syncing it and controlling the PID took way too longer than I expected because it was just falling and falling and falling. I started up and it just falls. I also had to replace the battery once because I thought my motor died or something died, but it was the battery that was drying out. So I had to replace the batteries and continue with the fine tuning. I won't say it's way to fine tune right now because it definitely needs a lot more training, but it's at least usable right now that I could define it as something a little bit working. I do need to work a lot more on making it look good and covering it totally and upgrading the code and firmware part.

image