Orbit
An esp-32-based drone that follows you using UWB sensors to triangulate your position.
Created by
DynamicWhiteHat
Tier 2
4 views
0 followers
Timeline
DynamicWhiteHat
submitted Orbit for review ago
DynamicWhiteHat
added to the journal ago
Added more to repo
My first design review asked for an in-depth explanation of my project in the README. I have added this in, explaining every part of the drone PCB.

The PCB schematics are already located in the README. I had them as dropdowns under the image gallery section to keep the README clean.
funkeudo
requested changes for Orbit ago
Cool project! Could you please include an image of your PCB schematic as well as a more in-depth explanation of how your project works to your README? Thanks!
DynamicWhiteHat
added to the journal ago
Worked on firmware
I decided to work on the firmware today. I started with the esp-drone code and decided to use that as my base, adding in the DWM1000 ranging as a flight mode. However, I quickly found out that the structure of the code, which itself was based on crazyflie code, was too hard for me to understand. This, as well as being inexperienced with the ESP idf or C, made it very difficult to add functionality. The docs weren't much help either, as this is pretty much all they gave me:

It probably can be implemented by someone who is experienced with this, but I gave up. I decided to search online for an arduino-based drone firmware, and I found this, which is firmware for an esp32-based drone written in the arduino IDE. This is great because I can use the arduino DWM1000 library without having to write my own drivers for it. I got to work by cloning the repo. I began by adding the MPU-6050, the barometer, and the compass. These were simple enough to add, as I found good examples online. Then, I added the DWM1000 code. This was more difficult, as although there was code online, it was not meant for two ranging modules pinging a single tag. This took me some time, but I finally got my code to coompile. Now I just need to wait for parts to being testing. My code is now on the same GitHub repostitory as well.
DynamicWhiteHat
added to the journal ago
Forgot to order stencil

I forgot to order a stencil along with the PCB. This changed the price of the JLCPCB order from $5.30 to $31.01. If a reviewer is reading this, would a fund adjustment be possible?

DynamicWhiteHat
submitted Orbit for review ago
DynamicWhiteHat
added to the journal ago
Better image
I just wanted to put a better cover image.
ABCDEFGHIJKLMNOPQRSTUVWXYZ
ZYXWVUTSRQPONMLKJIHGFEDCBA
Alphabet Soup
Hello traveller, how are you doing today
Word Count Reached!

DynamicWhiteHat
added to the journal ago
Finished Repo
I put everything required in the GitHub repo and combined my 3 PCBs using mousebites. This is what I have now:

I think my project is ready to submit for review.
DynamicWhiteHat
added to the journal ago
Yet another PCB Redesign
Today I was working on finishing the BOM for my project. I went through each of the BOMs in my three PCBs and added each part to an LCSC cart. I decided that it would be cheaper to solder the parts myself than to get PCBA (this assumption was later proven correct). I made some PCB corrections while working on this, such as switching out two diodes for a single BAT54c diode, and changing the footprint of another diode. The LCSC order totaled out to be $36.17 with shipping, which was much cheaper than JLCPCB PCBA. I than moved on to the other parts that I would require for my project. I was looking into how I would double-sided solder my PCB when I asked in the HackClub slack, and I was told to just make my PCB single sided, as soldering two sides without a hot air rework station is very difficult. So, I once again got to work on redesigning my PCB. I moved the components on the back off the board and moved the central components away too. I placed them strategically to make routing easier. After about 30 minutes, I ended up with this:



I'm proud of it, since I thought it wouldn't be possible for me, and the routing is much cleaner than my previous double-sided design. This does mean that I have to redo my CAD again, but its just a small change, since all I did was move one of the screw holes. I have finished my BOM, and it comes out to $121.00. I just need to redo the CAD and create the REPO, and I think I'm ready to submit!
DynamicWhiteHat
added to the journal ago
Final Case Redesign
Today, I worked on finishing the case. I began by splitting the case from its arms and scaling it vertically by a factor of 0.75, as this matched my PCB. However, I realized that with my lofting and screw holes and whatnot from my earlier design, the scaling was messed up and no longer fit. More importantly, the loft created unclosed geometry that prevented me from extruding any of the case:

I tried a few different things to fix this, and I was able to get the left half hole filled, but I never got the right hole fixed. I even attempted to create a mirror after splitting it in half, but that didn't help. So, I gave up on this and decided to remodel the case. I moved the original over and began the new case by projecting the PCB and a 2mm offset to give the case 2mm width. This was my setup:

I used the project tool a lot to get the features of the PCB so I could speed up my design. I made the top case again, and used the Voronoi generator from last time to make the holes again. However, this time I decided to let the holes run from the top to the bottom, as I was inspired by this design from a YouTube video:

I also took the design for the arms from the video, and ended up with this:

I designed the arms by using arcs and the offset tool to create 4 mm-thick arms that surrounded the motor holders. This is the sketch I made:

Next, I stopped working on CAD for a while and decided to work on the math for the triangulation. This is where I realized that I wouldn't need 3 UWB modules on the drone and that 2 would suffice, assuming that the person is always in front of the drone. The math works by creating a circle for each UWB module on the drone based on the distance it measures. Then, you use a systems of equations to calculate the intersection between the two circles, which gives you two points. The points have the same coordinates, just flipped on the y-axis. The coordinates give the position of the beacon relative to the drone, and using arctan you can get the angle as well. An example is available here

After this realization, I decided to remove the third UWB module from my drone, which helped me drop $15 from the total cost. I once again had to redesign my PCB, which didn't take too long. I decided to use the space that used to be for the rear UWB module for some SK6812 mini e instead of using an external neopixel stick. I decided to use the reverse mount ones since I had some left over from hackpads and keyboards. Finally, I created the arms to connect the UWB modules to the drone. I wanted these to be modular, so I made this design:

It has a cutout to sit on the existing arms and a hole in the top and bottom case to fit two extrusions to hold it in place, which should keep the whole thing sturdy. Now I just need to prepare a BOM and I think I'm done.
DynamicWhiteHat
added to the journal ago
Day 4: Redesign
Today, I started working on the BOM to see how much this project would cost because I was bored with working on CAD. However, once I started adding my parts into a spreadsheet, I realized that the shipping cost for the DFRobot MCU was $15, for a $9 product. I looked online elsewhere to try and find the MCU, but I wasn't able to find it, so I decided to just make my own. This was an idea I had from the start of the project, to use the ESP-32 SoC instead of a premade MCU, but I thought it would take too long. I pulled up the schematic for a few DFRobot Firebeetles and this Instructables tutorial which I always use for making ESP-32 boards, and I got to work. I decided to use the ESP32 S3 Wroom 1u since it was an S3, the same chip I used earlier, and the u meant it needed an external antenna, so I could by a proper one instead of the integrated one I had with the Firebeetle. I started with the USB connections, and I used "Korean Hroparts Elec TYPE-C-31-M-12," which is my go-to for USB-C. This is what my USB schematic looked like:

The LESD5D5 is an ESD protector, which is commonly omitted in most USB circuits. After I made the USB circuit, I moved on to the charging circuit. Historically, I have had trouble with making a battery charging circuit, as I never found any good tutorials online. However, the Firebeetle schematic provided a good reference, and combined with the datasheet, I was able to come up with this:

Next, I brought in an LDO to bring the voltage down to 3.3v to power the ESP-32. I usually use an AMS-1117 to do the job, but I read online that there were better alternatives. I forget the reason why, but I did a quick search and found that the AP7361C was a good replacement. This is my LDO circuit, which I just used the datasheet for:

After that, the ESP-32 was mostly done and ready to be dropped in as a replacement for the Firebeetle I was using. I swapped out the pins connected to the Firebeetle to the ESP-32 SoC I was using, which ended up like this:

Then, I began routing the PCB. I completely deleted the old PCB, since the routing was bad and most of the new parts didn't fit anyway, and began routing the new one. I decided to make the board outline a bit smaller this time since I had smaller parts. I multiplied the outline vertically by 0.75, so that way I could still use my current CAD by just shrinking it. I placed my parts, keeping the sensors and the motor drivers in the same spots, and began routing. It was easy at first, but once I started running out of room, I resorted some extreme measures, like 90-degree traces and very tight vias. I forgot to take a screenshot of my PCB when I finished, as I made later changes, but this is my current one:



DynamicWhiteHat
added to the journal ago
Day 3: CAD + PCB Reroute
Today, I began working on the CAD. I had initially wanted to use generative design to make me the lightest frame with the shape I was working with, so I followed this tutorial from Autodesk. However, once I ran generative design, I did not get good results. I think this is because I didn't give it enough loads and a good starting shape, as I ended up with this:

For reference, this is what I started with:

After that failure, I decided to just model the drone manually, which wouldn't give me the best weight, but would still allow me to model the drone how I wanted. This is where I realized that I would need to swap out the holes I had earlier for soldering the DWM module wires to the main PCB for some JST connectors, as I wanted the DWM panels modular. I redid the PCBs, and it now looks like this:

I then continued with making my drone. I looked online for some tutorials, but found no good ones. I just decided to make some sketches and see what I would get. I began with the arms, which look like this:

I then added some slots for the motor wires, cut some holes in the motors, and added some final details to the arms. Then, I worked on the body. Previously, the body had been very cubical and I didn't like that look. So, I messed around with the loft tool and made some extrusions and ended up with this:

I got the Voronoi pattern from an online generator and used that as an extrude. Next, I need to add some top covers for the motors and make the arms for the DWM modules.
DynamicWhiteHat
added to the journal ago
Finished All PCB Work
I began by finishing the routing for the beacon PCB and rounding the edges. This is what it looks like now:

After I finished routing the beacon, I started on the main drone controller PCB. I initially wanted to use a Xiao ESP32 for their small form factor, but I realized that I would run out of GPIO pins for the DWM1000 UWB modules. After doing some research online for boards with LIPO charging built in, and ESP-32, and plenty of GPIOs, I settled on the DFRobot Firebeetle S3. They have multiple Firebeetle variants, such as the C3, C6, and S3, but the S3 had the most GPIO, so I chose it. This is what the board looks like:

There was not a footprint for this exact board, but I found one for another Firebeetle, so I used that as the base and modified it. For the schematic, I began with the motor controllers. I plan to use some small brushed motors that don't require an ESC, so I followed Max Imagination's Tutorial on making brushed motor drivers using MOSFETS. This was simple enough and looks like this:

Next, I added the sensors for the drone. For the ESP-Drone firmware, a mpu6050 is required to balance the drone. While looking through the documentation, I also found that it can do altitude hold with a barometer and has compass compatibility, so I added those in as well. This is what the sensors look like:

Finally, I added connector holes for the DWM1000 modules, as I want to be able to remove them whenever I want, and I added connectors for a stick of neopixels, which will serve as status lights. This is the final schematic:

I then began routing the PCB. I initially planned to put all the components on one side under the header-mounted MCU, but I changed my mind and made it a double-sided PCB. I began by routing the small sensor ICs first, which was pretty easy since I placed the parts in spots that corresponded to their connections. I then routed the motor controllors and finally the connectors for the LEDs and the DWM1000 boards. This is the final PCB:

Finally, I made the PCB module for the DWM1000. I wanted this to be removable, so I made it on a separate PCB. This was simple enough since I just copied the DWM1000 from the beacon, so the schematic was the same:

Then, I routed the PCB, which was easy as well, though I might redo it because it takes up a lot of room:

DynamicWhiteHat
added to the journal ago
Day 1: Created beacon schematic and began routing
I decided to start with the beacon for the drone. This will have a UWB module that sends out a signal to the drone, which will then use triangulation to find where the beacon is. I did some reasearch and found the DWM1000 module, which is a powerful and "cheap"-ish device to send out UWB data. I decided to connect this to a xiao esp32 for wireless data transmitting to a device, such as a laptop. The schematic was easy enough to create, as I followed the MakerFabs design for a reference schematic. This is my schematic:

I also began the PCB routing. I originally created a 35x35 rounded rectangle but found it hard to place the components, so I upgraded to a 38x38 rectangle. I want the beacon to fit into a watch shape so I can strap it to my hand, hence the small size. This is what I have so far:



DynamicWhiteHat
started Orbit ago