Compare commits

...

72 Commits

Author SHA1 Message Date
774f7f41d6 extra notes 2025-06-23 10:01:50 +02:00
2a585ff318 fix wrong information in research 2025-06-23 09:56:40 +02:00
e700818a2f edit flowchart 2025-06-17 12:41:03 +02:00
6be2d84f05 3d files 2025-06-17 11:51:20 +02:00
d943d6239e fix image tag 2025-06-10 13:34:46 +02:00
7a4b75c0a3 3d printing 2025-06-10 13:33:25 +02:00
a46ad186db schedule 2025-06-07 16:43:41 +02:00
7b3c164c6d docs 2025-06-04 16:35:06 +02:00
9da84bb7a8 fix accidentally overwritten image 2025-06-04 16:33:51 +02:00
1009a14673 docs 2025-06-04 16:26:30 +02:00
2d1a6ae1f6 stable flight in theory been achieved 2025-06-03 12:26:06 +02:00
d099aac466 fix controller so middle of joystick is actually 1500 now 2025-06-03 11:36:33 +02:00
c4c56efb7a typos 2025-06-02 15:52:28 +02:00
e975e5a93b BOM 2025-06-02 15:10:52 +02:00
e43a469647 docs 2025-06-02 10:33:53 +02:00
f156423f8b change video links 2025-06-02 10:19:17 +02:00
f892d78745 docs motor burnout 2025-06-02 09:55:00 +02:00
5adf888713 code update and presentation stuff 2025-05-28 12:23:32 +02:00
2dd30990bc added useless boot sequence 2025-05-27 15:29:12 +02:00
5104f71dc6 fix scrollingtext function for matrix controller 2025-05-27 14:50:37 +02:00
7b81c1dda8 link fix 2025-05-27 10:00:40 +02:00
a1d488be28 Killswitch drone 2025-05-26 14:50:47 +02:00
27935b52fb added code for matrixes 2025-05-22 17:20:14 +02:00
c3a9ff919d docs update 2025-05-22 13:43:13 +02:00
7cea94942a BOM 2025-05-22 11:47:32 +02:00
66a25a0606 docs! 2025-05-21 16:24:36 +02:00
2440990a6e docs 2025-05-21 15:22:18 +02:00
b231e7228b updated music 2025-05-21 15:04:30 +02:00
009f4d1861 docs 2025-05-21 12:14:51 +02:00
3e94aa1e00 docs 2025-05-20 15:11:20 +02:00
9b30fba225 docs 2025-05-15 15:06:15 +02:00
7f79189c49 docs wildcard week 2025-05-15 14:59:16 +02:00
0620e8ef26 fix math 2025-05-14 12:14:46 +02:00
24292d2e9b math 2025-05-14 12:13:09 +02:00
ce91a4b418 final project 2025-05-12 16:51:27 +02:00
a2111224b3 replace how data get's received and passed on the rest of the code 2025-05-08 16:02:04 +02:00
1519d1adad trashed all the servo stuff 2025-05-08 15:26:33 +02:00
cd215c317c docs update 2025-05-08 11:07:28 +02:00
ed2e686233 typo 2025-05-08 10:45:01 +02:00
e4ab6273b2 checklist 2025-05-08 10:41:43 +02:00
f9cec7ea35 fix docs 2025-05-07 17:46:10 +02:00
a0477deb64 docs 2025-05-07 17:43:01 +02:00
5161756aa1 typos 2025-05-07 12:50:39 +02:00
a3957aa47d fix image 2025-05-07 12:47:22 +02:00
3008b5dd95 burnout! 2025-05-07 12:46:55 +02:00
1e3dd04ba7 3d modeling docs 2025-05-06 22:15:12 +02:00
957926cca2 added docs 2025-05-06 20:26:50 +02:00
73bea72ae4 added gif 2025-05-06 16:41:02 +02:00
a27535e901 styling 2025-05-06 16:27:02 +02:00
d1780d7134 checklist 2025-05-06 16:23:22 +02:00
ef8daf1a2a styling 2025-05-06 16:22:31 +02:00
a20e4ef745 docs 2025-05-06 16:19:13 +02:00
8be0cb4a13 unfinished docs 2025-05-06 13:48:44 +02:00
a33daf2a01 updated code to use internal pwm timers of esp instead of software pwm 2025-05-06 13:48:27 +02:00
e5fbd9143c files 2025-05-06 11:38:42 +02:00
b7040826db styling 2025-05-06 11:22:34 +02:00
fd41c9bbdf fix images and docs 2025-05-06 11:20:36 +02:00
0c2f5f6064 styling 2025-05-06 11:17:58 +02:00
b11ed673ef Generative design 2025-05-06 11:14:24 +02:00
7087a257c3 docs 2025-05-05 14:44:31 +02:00
2d060cbb15 add code to read buttons and to read joystick X axises as 0 or 1 2025-05-01 16:40:03 +02:00
d588ab6c6e todo 2025-04-30 15:19:24 +02:00
37a453fd4e todolist 2025-04-30 15:18:52 +02:00
66eb28f496 docs 2025-04-30 12:39:06 +02:00
b9a6f40e11 molding and casting docs (: 2025-04-30 12:10:13 +02:00
e12e552bb6 docs 2025-04-30 11:27:02 +02:00
d2fb4972e9 fr1 2025-04-30 11:16:55 +02:00
7303af6f30 typo 2025-04-29 16:33:26 +02:00
fd7be4083a extra thoughts 2025-04-29 16:21:08 +02:00
df2b821da4 more docs 2025-04-29 16:17:46 +02:00
e3a4a53347 extra research 2025-04-29 16:16:59 +02:00
9c7f966ad6 docs 2025-04-29 10:31:36 +02:00
120 changed files with 2947 additions and 458 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

View File

@@ -0,0 +1,64 @@
# FR-1 Trace lengths
## The experiment
For the experiment, I used FR-1 that has a thickness of 35µm. On there I will mill 4 trace sizes (0.4 mm, 0,6 mm, 0,8 mm and 1 mm) and they all have the same length of 7.5 cms. The traces are separated by 1 Cm.
![alt text](FR-1-Traces.jpg)
In this experiment I will measure the temperature of the traces with a multimeter and a thermal laser. I will also watch the board closely for any damage. Since it is FR-1 I expect it to shows signs of damage under heat
## Some background information
### Resistance
When you decrease a PCB trace width, the resistance of the trace increases.
Imagine a trace like a water pipe. Whenever you make it smaller the water needs more pressure to flow with the same amount of water.
The same analogy goes for electricity. So for longer traces this is also the case that the amount of resistance increases with length.
Whenever the resistance increases different things happen when voltage travels trough them. A higher resistance causes a voltage drop.
This can be explained using Ohm's law
$$V = I \cdot R$$
The Voltage drop is Amperage $$I$$ times the Resistance $$R$$. So if you have a higher resistance or a lower Amperage you will get a voltage drop.
Another side effect of having a higher resistance is that the resistor or trace will heat up more easily.
### Capacitance
The capacitance of a PCB trace is the amount of energy it can hold. It works like a capacitor it stores a small amount of energy.
The capacitance is determined by the amount of copper is in the trace. So length, width and the thickness. When working with low frequency signals the capacitance is not super important.
But when working with higher speed frequencies the capacitance can actually mess up the signal integrity.
## Heat generation
Heat within traces is generated by the current flowing through it. Not the wattage. A good example of the is train lines. These run on 230.000 volts on thin wires while being able to supply multiple trains. The higher the voltage the easier it is the transport a higher amount of wattage.
## Results
the power. So I grabbed an old robot with 4 stepper motors attached but I could not get them to draw more than 1.6 Amperage. So that is why the maximum in this test is 1.6 Amperage. I also had a hard time finding a way to measure the temperature of the traces because we only had a heat gun here and the laser was not the place it was actually measuring. So 0,4 mm is not measured properly.
| Trace Width Trace | Resistance | Maximum safe Current in Ampere | Burn out Ampere |
| :---------------- | ---------- | ------------------------------ | --------------- |
| 0,4mm | 3.1Ω | 0.7 | 0.85 |
| 0,6mm | 2.7Ω | 0.9 | 1.05 |
| 0,8mm | 2Ω | 1.6 | ?? |
| 1mm | 1.85Ω | ?? | ?? |
| | | | |
* The 0,4 mm trace was the first one I tested. I started with 0.7 amps for a few seconds. After that I increased the wattage to 0.85 amps and the trace instantly exploded and burned so I could not get temperature readings there.
* The 0,6 mm trace it held up well up to 0.9 amps where it started getting burn marks within a 5-10 seconds. The temperature rose to 50 degrees celsius. At 1.05 amps the pcb burned out at 68 degrees celsius.
* When testing the 0,8 mm trace I hit a roof with how much power I could consume with the robot. I could only get up to 1.6 amps and I did not manage to break the trace after powering it for a few minutes. The maximum I found before it started discoloring was 24 watts at 54 degrees celsius. This was measured after it was left on for 2 minutes.
* I could not get to the 1mm trace because the robot could not draw more than 1.6 Amperage. So thats why these are not filled in the table.
## Extra notes on temperature
When something keeps fluctuating in heat it will increase in size and shrink again. This can make it so your board deteriorate faster and make traces break faster. So it isn't recommended to use high wattages in pcb traces.
## Recommendations for next time
Make bigger pads to hookup the power easier to the pcb and maybe remove all the excess copper but that takes a super long time.
![alt text](image.jpg)
![alt text](image-1.jpg)
## Files
* [KiCad](TraceThicknesTest.zip)

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

View File

@@ -559,4 +559,8 @@ I double, triple checked every connection and grabbed new wires in case that was
![alt text](image-13.jpg)
After going to Henk and reading the datasheet he said I needed to use 5 volts instead of 3.3 volts
When I changed that connection it worked.
When I changed that connection it worked.
## The result of the robot
[https://fabacademy.org/2025/labs/waag/img/FINAL_XIAO_DONE.mp4](https://fabacademy.org/2025/labs/waag/img/FINAL_XIAO_DONE.mp4)

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@@ -80,6 +80,17 @@ This was my second attempt which has gone a lot better.
![alt text](image-17.jpg)
This is the `Mold Star 16 Fast`
I also made 2 other moulds for the group assignment so we knew what every material was.
Dragon Skin
* translucent
* super flexible
//todo:add images
SORTA-Clear
* translucent
* A bit more flexible
## Making our own moulds
To create our own moulds we first need to create a block where we can cut in.
@@ -129,8 +140,18 @@ Here is the fixed design with 5mm thick walls.
## Milling the moulds
Milling the moulds didn't go that straight forward for me. Henk thought us how to mill the moulds and it was a bit different than milling wood. For example the residu of the milling we where going to use to melt into a new block.
After we have fastened the block using the wood we need to turn down the spindle speed for 18000 RPM to 6000 RPM
![alt text](image-30.jpg)
We also needed to change this in Vcarve otherwise the toolpaths won't 't get calculated properly.
To mill a wax block it first needs to be fastened. We did that using 4 pieces of wood.
Another thing is the placement of the milling bit job home.
![alt text](image-29.jpg)
Because the milling bit is dead centre on the corner in the software it should also be placed half on the corner and half off. When working with super tight tolerances and smaller things it is super important to place the job home perfectly. I learned that the hard way by almost cutting into the wood.
### Small accident
![alt text](image-24.jpg)
While fastening the wood push it into the wax block. Otherwise it may get loose during milling and this can happen.
@@ -154,4 +175,5 @@ Here you can see the part that broke off during the milling accident. Then I use
![alt text](image-28.jpg)
For next time: I should've poured slower and more gentle because there are a lot of air bubbles and be more careful when milling and better inspect the block and if its mounted well.
For next time: I should've poured slower and more gentle because there are a lot of air bubbles and be more careful when milling and better inspect the block and if its mounted well.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

View File

@@ -0,0 +1,9 @@
# System integration
For system Integration is this my system design.
![alt text](Screenshot_20250512_095023.jpg)
So I will have 2 power systems in my drone. High voltage and low voltage. High voltage 16,8V will be for the motors while the 5v will be for the MCU's and the LED matrixes.
I found out from the page from the ESC's that they output 5v at 3 amps each. Which is in total $5V \cdot 3A \cdot 4ESC = 60Watts$
In one of my projects earlier I have ran 2 LED matrixes from a 60 watt power supply and it could easily power them. The mcu's don't consume a lot of power so the power situation should be good.

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -0,0 +1,39 @@
# Wildcard week - Compositing
## Group assignment
For this week we started out on compositing. First I didn't really know what it was and a bit confused. But through the day I started picking up more and more and starting to find it more fun.
In the morning I didn't know anything about compositing aside from Neil's lecture from yesterday. So I started clicking links on the compositing page.
![alt text](image.jpg)
[https://academy.cba.mit.edu/classes/composites/index.html](https://academy.cba.mit.edu/classes/composites/index.html) In there I saw some of the methods and some tips. After I went looking if Neil had a full lesson and luckily he had one from 2016. So I watched that and learned a lot from there.
[https://vimeo.com/165323734](https://vimeo.com/165323734)
So for the group assignment we first started out cleaning the table and covering it in plastic because we where going to be working with epoxy
![alt text](image-1.jpg)
After that I started cutting up some fabrics to make some coupons. I chose to do 3 layers everywhere because Neil recommended that in his video lecture. Since the top and bottom of the coupon are really what is making it able to bend and go back.
![alt text](image-2.jpg)
After a lunch break we started mixing the epoxy and pouring over the coupons layer by layer.
![alt text](image-3.jpg)
![alt text](image-4.jpg)
We used little coffee sticks to spread the epoxy on the fabrics.
![alt text](image-5.jpg)
After that we put it in the chamber
![alt text](image-6.jpg)
And now we wait for 24 hours till it is fully hardened
### The result
The result
![alt text](image-7.jpg)
I expected the result to be stiff and more compact like in Neil's compositing lecture from 2016 but then I probably would've needed to use the vacuum bag.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
docs/final_project/arm.stl Normal file

Binary file not shown.

Binary file not shown.

View File

@@ -1,29 +1,29 @@
# Idea final project
# Final project
## Introduction
I wanted to combine 2 random objects that interest me into one project. A drone and a jumbotron. So im gonna make a drone with multiple screens on it that could for example be used for traffic control or entertainment purposes.
I wanted to combine 2 random objects that interest me into one project. A drone and a jumbotron. So im gonna make a drone with multiple screens on it that could for example be used for traffic control or entertainment purposes. There is no real reason why I chose to make this beside it looking and sounding fun to design and build.
## What does the drone do?
The drone needs to be able to fly for at least 20 minutes. It needs 2 screens on both side so it can display images or video. I wanna program the drone myself so I know how drones work and how they keep themselves upright.
## Drone Requirements
### basic requirements
* 2 screens
* Speakers
* 20 min flight time
* custom microcontroller pcb that controls the drones and screens
* 50 meter range from controller
??? Drone Requirements
### basic requirements
* 2 screens
* Speakers
* 20 min flight time
* custom micro controller pcb that controls the drones and screens
* 50 meter range from controller
### Sensors
* GPS
* IMU/rotation sensor
* Read voltage from battery know battery percentage
### Sensors
* GPS
* IMU/rotation sensor
* Read voltage from battery know battery percentage
### Requirements when far ahead
* Docking station
* Automatic docking
* Automatic pathing
* Design own electronic speed controllers
### Requirements when far ahead
* Docking station
* Automatic docking
* Automatic pathing
* Design own electronic speed controllers
## Images
@@ -50,19 +50,19 @@ When designing the drone I wanted to do everything parametric. So im going to tr
### Designing the drone parametrically
Designing parametrically is very hard because every constraint needs to be perfect. Otherwise when changing lengths the design will fold into itself like this.
![alt text](../assets/assets_week_2/fusion360/image.jpg)
I've spend one day getting the constraints perfect for the sketch so it scales well with everything. And this is the result of that. When I change one parameter in the variable menu the entire body scales with it. This is the final result of my design. I've made the body myself and I've imported the components from grabcad. So I had more time for blender and Onshape and so I could visualize it better.
I've spend one day getting the constraints perfect for the sketch so it scales well with everything. And this is the result of that. When I change one parameter in the variable menu the entire body scales with it. This is the final result of my design. I've made the body myself and I've imported the components from GrabCad. So I had more time for blender and Onshape and so I could visualize it better.
![alt text](../assets/assets_week_2/fusion360/image-18.jpg)
### Rendering
I've also made a render of the drone to visualize it for other people. Making this was kind of a pain because blender is a gigantic program. You can see my [docs](../Assignments/week_2_computer_aided_design_(cad)/drone_designing.md) to see where I struggled. This is my final result of the render. I've wished it looked nicer but I didn't have enough time to dive deeper into blender.
<video controls src="../assets/assets_week_2/blender/droneRender.mp4" title="Title"></video>
<video controls src="../../assets/assets_week_2/blender/droneRender.mp4" title="Title"></video>
## Feedback from Bas and Henk
I've gotten some feedback on my design and about the use of screens. Maybe I should only use speakers or use LED matrixes. After thinking about it I think im going to give LED matrixes a spin.
## Drone electronics
For the drone I will need a lot of electronics. But I will also need a pcb for inside the drone so I don't have any loose connections. The main board needs a couple of components. Something to step down the voltage from the big battery or I will use two separate batteries one for the motors one for the control board. I will also need a sensor to know the position of the drone and a microcontroller. I also need a lot of power to power the screens so that will also be something interesting.
For the drone I will need a lot of electronics. But I will also need a pcb for inside the drone so I don't have any loose connections. The main board needs a couple of components. Something to step down the voltage from the big battery or I will use two separate batteries one for the motors one for the control board. I will also need a sensor to know the position of the drone and a micro controller. I also need a lot of power to power the screens so that will also be something interesting.
### Components
* MCU
@@ -74,14 +74,14 @@ For the drone I will need a lot of electronics. But I will also need a pcb for i
### Drone remote electronics
I'm also building the remote for the drone
* Potslider for the throttle
* Potentiometer slider for the throttle
* Joystick for left-right-forward-backwards
* battery
* screen to see status of drone
* LED (mandatory)
#### Joystick
I really wanna use a joystick for this project because having 2 potmeters under each other looks a bit weird.
I really wanna use a joystick for this project because having 2 potentiometers under each other looks a bit weird.
### KiCad
The first thing I did was import the design rules for our milling machine. I used the file from the lecture to import it from because there we set everything up together.
@@ -143,13 +143,15 @@ For the drone I will be using the [dRehmFlight VTOL program](https://github.com/
```mermaid
classDiagram
namespace Drone {
class ESPC6 Thread 1{
class ESPC6{
+Control Motors
+keep drone in the air
+Receive communication from controller
Flightcontroller()
}
class MatrixControllerThread2 {
class MatrixControllerRP2040 {
+Receive communication from ESPC6 for Matrix data
ShowMatrix()
}
@@ -164,17 +166,370 @@ namespace Controller {
}
}
ESPC3 --> ESPC6 Thread 1 : Send data to flight controller using ESPNOW
ESPC3 --> ESPC6 : Send data to flight controller using ESPNOW
ESPC6 --> MatrixControllerRP2040 : Serial communication
```
Now that I am in week 15 this has changed. The change is on the drone are going to be 2 mcu's. One for the matrixes and one for the flight controller. So they are both separate systems and can't interfere with each other.
I've already gotten the motors to spin in [week 10](../Assignments/week_10_output_devices/output_devices.md) using the script in there. Now I also need to modify the driver so my ESC's can properly understand it's instructions.
![alt text](image-30.jpg)
I have already gotten the motors to spin in [week 10](../Assignments/week_10_output_devices/output_devices.md) using the script in there. Now I also need to modify the original VTOL driver so my ESC's can properly understand it's instructions.
There's one specific function I need to change.
??? Old code
```cpp
void commandMotors()
{
// DESCRIPTION: Send pulses to motor pins, oneshot125 protocol
/*
* My crude implementation of OneShot125 protocol which sends 125 - 250us pulses to the ESCs (mXPin). The pulse lengths being
* sent are mX_command_PWM, computed in scaleCommands(). This may be replaced by something more efficient in the future.
*/
int wentLow = 0;
int pulseStart, timer;
int flagM1 = 0;
int flagM2 = 0;
int flagM3 = 0;
int flagM4 = 0;
int flagM5 = 0;
int flagM6 = 0;
// Write all motor pins high
digitalWrite(m1Pin, HIGH);
digitalWrite(m2Pin, HIGH);
digitalWrite(m3Pin, HIGH);
digitalWrite(m4Pin, HIGH);
digitalWrite(m5Pin, HIGH);
digitalWrite(m6Pin, HIGH);
pulseStart = micros();
// Write each motor pin low as correct pulse length is reached
while (wentLow < 6)
{ // Keep going until final (6th) pulse is finished, then done
timer = micros();
if ((m1_command_PWM <= timer - pulseStart) && (flagM1 == 0))
{
digitalWrite(m1Pin, LOW);
wentLow = wentLow + 1;
flagM1 = 1;
}
if ((m2_command_PWM <= timer - pulseStart) && (flagM2 == 0))
{
digitalWrite(m2Pin, LOW);
wentLow = wentLow + 1;
flagM2 = 1;
}
if ((m3_command_PWM <= timer - pulseStart) && (flagM3 == 0))
{
digitalWrite(m3Pin, LOW);
wentLow = wentLow + 1;
flagM3 = 1;
}
if ((m4_command_PWM <= timer - pulseStart) && (flagM4 == 0))
{
digitalWrite(m4Pin, LOW);
wentLow = wentLow + 1;
flagM4 = 1;
}
if ((m5_command_PWM <= timer - pulseStart) && (flagM5 == 0))
{
digitalWrite(m5Pin, LOW);
wentLow = wentLow + 1;
flagM5 = 1;
}
if ((m6_command_PWM <= timer - pulseStart) && (flagM6 == 0))
{
digitalWrite(m6Pin, LOW);
wentLow = wentLow + 1;
flagM6 = 1;
}
}
}
```
What this function does is generate PWM values in software which is super inefficient. The esp32C6 according to it's datasheet supports 6 separate PWM clocks in hardware.
![alt text](image-pc-4.jpg)
So I wanna use these to reduce the overhead and so the loop doesn't have to run 20 times a second but faster making the drone respond faster. To use these I need to use this library.
Right link: [https://docs.espressif.com/projects/arduino-esp32/en/latest/api/ledc.html](https://docs.espressif.com/projects/arduino-esp32/en/latest/api/ledc.html)
When first looking at the documentation I got super confused why nothing was working but that was because I was looking at the documentation for the wrong framework. I was looking at the ESP-IDF framework instead of the Arduino framework.
Wrong link: [https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/ledc.html](https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/peripherals/ledc.html)
So I really needed 2 functions of the library.
* To set pwm channel, pin and resolution (ledcAttach)
* To set the PWM frequency (ledcWrite)
![alt text](image-pc-5.jpg)
![alt text](image-pc-6.jpg)
## Generative design
Online I saw a lot of organic designs that where created by generative design.
![alt text](image-12.jpg)
Credits: [FormLabs](https://formlabs.com/eu/blog/generative-design/)
I wanted to do this myself for the drone arms. So I started messing around in the generative design tab of my drone arm model.
![alt text](image-13.jpg)
I've already designed the base of the arm. What generative design does is either add or remove material based on parameters you give it.
I've already prepared my model by created some parts as separate bodies. So I can preserve them during the generation process.
When creating a Study you need to assign which parts to groups.
![alt text](image-14.jpg)
* The preserve Geometry group where loads get applied
* Obstacle Geometry gets avoided and no loads get placed on there.
* Obstacle offset increases the size of a body by an x amount of mm.
* Starting shape is the group that is mainly going to get modified
* Unsigned geometry are bodies that are not assigned yet
* symmetry planes are a way to define a plane where both sides need to be mirrored (symmetrical)
So after assigning everything this is my result.
![alt text](image-15.jpg)
After that you can open the Objectives tab to see what you wanna do and set more limits.
![alt text](image-16.jpg)
The only things I understand from this menu is the Objectives and the Displacement. The objective is straight forward and the Displacement is the amount of millimeters it is allowed to fluctuate from the original design in said direction.
Now it's time to add the loads on the part. So the amount weight and force the part needs to be able to handle.
For that there's a keybind `L`
![alt text](image-17.jpg)
After you've pressed that you can click a face and add force to it. In my instance it needs to withstand at least 2 kg in all directions.
The formula for Kg to Newton is. `Earths gravity * Kg = Newton`. So 9.81 * 2 = 19.62N.
After adding all of that there are 2 steps left over.
Adding the place where it is locked in place and materials we wanna study.
Over in the Manufacturing tab we can select materials.
![alt text](image-18.jpg)
I've added PET since there isn't PLA in the library.
![alt text](image-19.jpg)
Also make sure you have a constraint.
![alt text](image-20.jpg)
This can be added by pressing `C`.
Now we can run the case!
When running a study I first recommend running the pre-check.
![alt text](image-21.jpg)
In my case I am not milling it and the part that's hidden is the motor itself so that's fine.
So now I am ready for generation.
![alt text](image-22.jpg)
Once I press that button this will pop up and I can press Generate 1 Study.
This does cost money If you don't have unlimited cloud tokens. With my education license I do have unlimited.
![alt text](image-23.jpg)
Once it starts generating this will pop up. These are the finished results. The generation process can take about an hour.
## Full redesign
I started a full re-design from the ground up because the old design was too cluttered and it didn't scale properly anymore parametrically. I first started off with the first sketch from the original design.
![alt text](image-pc.jpg)
From there I extruded the body symmetrically so they are always the exact same size on both sides.
![alt text](image-pc-1.jpg)
I made a sketch on the side of the drone making place for the LED matrix and all its cables
![alt text](image-pc-2.jpg)
After that I used the mirror tool to mirror the features over to the other side using the axes as the tool since they are dead centre. I did the same for the holes for the wiring
![alt text](image-pc-3.jpg)
After that I dragged the motor arm design into the designing window and jointed it to the body of the robot.
![alt text](image-pc-4.jpg)
Then that I jointed the arm to the robot in the corner.
![alt text](image-pc-5.jpg)
Now I needed to make the same holes through the case itself in the same location. So I choose edit in place from the menu.
![alt text](image-pc-6.jpg)
From this tab I can edit the body with all the references in place. So I could use the holes in the drone arm as reference for my cuts for in the drone body.
![alt text](image-pc-7.jpg)
## 3D printing
I chose to fully 3D print my drone due to it's complex shape and time constraints. I still had a lot of work from university to do. We got encouraged to do compositing but that is super hard with the current design. However it would have been better since it is often lighter and more durable while being a lot more eco friendly. For 3D printing I am planning on using PLA because it has a lower carbon footprint than ABS and it releases less toxic fumes.
![alt text](image343.jpg)
## Burnout!
### Part 1
One of my motors during testing burned out completely when it was attached to the printed arm. I think the cause for this is overheating due to a propellor that's too big.
![alt text](image-27.jpg)
These motors where originally made for 5 inch propellors instead of 8 inch so that's kinda a big difference.
![alt text](image-28.jpg)
Another thing that also could be the issue is that my ESC was surging above 40 Amps and the motors could only take up to 40 amps.
![alt text](image-29.jpg)
I think the main reason was heat and the coating on the motors evaporating causing a chain reaction.
### Part 2
This time it was completely my fault for not paying attention to the wires when connecting them to the right terminals. I had all other motors taped off like this but I forgot to do that for one motor I was testing.
![alt text](imag1.jpg)
<video controls src="../PXL_20250528_093723437(1)(1).mp4" title="Title"></video>
## Cables
The drone needs lots of cables to get power to the places where they need to be. I first started out by laying out everything that needed to be connected.
![alt text](image-31.jpg)
I first wanted to solder all the joints together but then I remembered how it looked in the past and then decided on using clips.
![alt text](image-32.jpg)
![alt text](image-33.jpg)
After cutting cables and soldering for a while I made this cable harness.
![alt text](image-34.jpg)
I still need to make a new board for both MCU's. The flight controller and the matrix controller.
## New board!
### Layout
So my new board needs to handle 60 watts of power and a lot of wiring. So I am first going to make a rough sketch of where I want every connector.
![alt text](image-35.jpg)
I first came up with this. But then I realized how complicated this wiring on a one side board is going to be. So I split it up in 2 boards and then I will stack them on top of each other with standoff screws.
![alt text](image-36.jpg)
### Schematic
I made both boards in the same file.
![alt text](image-39.jpg)
The upper board is the flight controller and the bottom board the matrix controller. I made them in the same file so I could easily copy over the edge cuts so I could stack the boards above each other.
#### Flight controller
* 4 outputs for ESC's
* One communication pin to other Matrix controller with power and ground
* Input BNO085
#### Matrix controller
* Communication from flight controller
* 2 output LED Matrixes
#### PCB
![alt text](image-40.jpg)
![alt text](image-41.jpg)
These are the 2 pcb's I designed I first thought it would be handy to make them both in the same file. So I could align the holes so they could be stacked. But later on I realized that was a bad idea because I couldn't export them individually. So my solution was to cut them in gimp for each layer. When cutting you have to make sure to cut every layer in the same place otherwise during milling the layers may not match.
## Matrix subsystem
### Power
I tested the power consumption on the matrix by setting the brightness to 100 and the colors to white since white consumes the most amount of power.
![alt text](image-37.jpg)
![alt text](image-38.jpg)
The result of this is that a single matrix consumed 3,8 amps at 5 volt. With 4 ESC's providing a total of 12 amps at 5 volts I should be easily able to power the mcu's and the matrixes.
## Assembly
Here I started assembly of the drone. I printed the motor arms and screwed all the motors into them and soldered pogo pins to each to connect them to the esc's. Unfortunately I don't know how to connect them yet because the wires aren't labeled. 2 motors need to spin left and the other 2 right for stability.
![alt text](image-43.jpg)
I also saw during assembly that the drone body warped a bit but that isn't going to ruin the fun. It will still fly.
![alt text](image-44.jpg)
![alt text](image-46.jpg)
![alt text](image-45.jpg)
The weight without the propellors and batteries is 1347 grams. The propellors weight a few grams and each battery weighs 183
$$1347 + 183 * 2 = 1713 grams $$
## Kaboom
I accidentally killed an esp C6 due to short in between the PWM output pin of the mcu and the 5v inputs of all electronic speed controllers. That's 5V 12Amps running through the mcu. The first few tests I was lucky that I didn't plug anything into the shorted connector but when connecting everything the mcu got killed. I sadly can't repair the board since there is hot glue everywhere to keep the connectors on the board.
![alt text](image-42.jpg)
![alt text](image-47.jpg)
![alt text](image-48.jpg)
Later on I realized I also killed my IMU. Because there wasn't any resistance between the 3v3 and the GND
## Stripped screws
Quick tip. When tightening screws do not do it at an angle otherwise you may strip the screw or dislodge the heated insert. Learned that the hard way. ;-;
And when doing heated inserts make sure to do a couple of extra wall layers. So the heated insert can latch onto the plastic.
![alt text](imag2.jpg)
## TODO
* [ ] Matrix panel subsystem
* [x] Rewrite PWM esc control system in driver
* [ ] Does it fly? (No it didn't)
* [x] Power distribution system (for matrixes and mcu's)
* [x] Test physical controller
## Testing the drone(V1)
The first test of the drone went horribly wrong. This was a first test with analog control with not stabilization feedback from the IMU to see if it would come off the ground. Sadly it did not go as expected.
<video controls src="../PXL_20250604_121528011(1).mp4" title="Title"></video>
### What went wrong
* The drone was not balanced
* The drone was a bit too heavy
* The drone didn't have good footing to the ground
* Motors recalibrating themselves at some startups (Last startup that didn't happen)
* The drone arm was too weak to resist the impact of the motors
* The batteries weren't fastened inside the drone
### Improvements for next design
* Proper legs so the drone doesn't fall over during takeoff
* Lighter design while being as strong as possible with the least amount of material
* A power switch because everything instantly starts once it gets power and that could be dangerous with extremely fast spinning propellors.
* Fastened batteries
![alt text](imaged.jpg)
### The damage
![alt text](imaged-1.jpg)
One matrix board got a few ripped of leds and capacitors but I think I am able to repair that.
![alt text](imaged-2.jpg)
2 ESC's and motors got completely tangled wires. I expect them to still work since they where still spinning after the impact.
3/4 arms got ripped off due to the crash.
![alt text](imaged-3.jpg)
![alt text](imaged-4.jpg)
Luckily we placed cardboard under the drone incase something would happen. The propellors completely mauled the cardboard away where it hit.
Now that the drone is ripped into several pieces I will be abandoning this design and start from scratch on a second design. From this point on I can only go up.
## BOM (bill of materials)
| item | price | link |
| :---- | ----- | -------- |
| item1 | 999 | link.com |
### Drone
#### Parts
| item | price | link |
| :-------------------- | ------- | -------------------------------------------------------------------------------------------------------- |
| 700 grams of filament | € 14 | Any PLA |
| Matrix panel * 2 | € 17,78 | [https://aliexpress.com/item/4001296811800.html](https://aliexpress.com/item/4001296811800.html ) |
| BLDC ESC * 4 | € 26,76 | [https://aliexpress.com/item/1005006947824850.html](https://aliexpress.com/item/1005006947824850.html ) |
| BLDC Motor 1500KV | € 34,39 | [https://aliexpress.com/item/1005006859037930.html](https://aliexpress.com/item/1005006859037930.html) |
| 4S Li-Po * 2 | € 15,86 | [https://hobbyking.com/en_us/turnigy-nano-tech-plus-1400mah-4s-70c-lipo-pack-w-xt60.html](https://hobbyking.com/en_us/turnigy-nano-tech-plus-1400mah-4s-70c-lipo-pack-w-xt60.html) |
| Propellors 7040 | € 6,99 | [https://aliexpress.com/item/1005008125599756.html](https://aliexpress.com/item/1005008125599756.html) |
| XT-60 connectors | € 1,40 | [https://aliexpress.com/item/1005007228544590.html](https://aliexpress.com/item/1005007228544590.html) |
| Wiring 26 AWG | € 1,63 | [https://aliexpress.com/item/1005007213319794.html](https://aliexpress.com/item/1005007213319794.html) |
| seeed XIAO RP2040 | $ 3,99 | [https://www.seeedstudio.com/XIAO-RP2040-v1-0-p-5026.html](https://www.seeedstudio.com/XIAO-RP2040-v1-0-p-5026.html) |
| seeed XIAO ESP-C6 | $ 5,20 | [https://www.seeedstudio.com/Seeed-Studio-XIAO-ESP32C6-p-5884.html](https://www.seeedstudio.com/Seeed-Studio-XIAO-ESP32C6-p-5884.html) |
| smd male header pins | € 2,99 | [https://aliexpress.com/item/32796117265.html](https://aliexpress.com/item/32796117265.html) |
| M4 screws and nuts | | [https://aliexpress.com/item/4001072025844.html](https://aliexpress.com/item/4001072025844.html) |
| M4 Threaded inserts | | [https://aliexpress.com/item/1005003582355741.html](https://aliexpress.com/item/1005003582355741.html) |
| | | |
#### Files
* [Drone main body F3Z](DroneMain.f3z)
* [Drone arm F3D]("New DroneArm v5.f3d")
* [Drone main body STL](DroneMainBody.stl)
* [Drone main arm STL](arm.stl)
* [Drone side panel STL](SidePanel.stl)
* [Drone PCB's KiCad](drone_control_board.zip)
* [Drone Software]()
* [Matrix Software]()
### Drone controller
#### Parts
| item | price | link |
| :-------------------- | ------- | ---------------------------------------------------------------------------------- |
| XIAO ESP-C3 | $ 4,99 | [https://www.seeedstudio.com/seeed-xiao-esp32c3-p-5431.html](https://www.seeedstudio.com/seeed-xiao-esp32c3-p-5431.html) |
| Hall effect joysticks | € 11,99 | [https://aliexpress.com/item/1005007462081151.html](https://aliexpress.com/item/1005007462081151.html) |
| Analog Multiplexer IC | $ 0,57 | [https://www.digikey.com/en/products/detail/texas-instruments/CD74HC4067M96/1507236](https://www.digikey.com/en/products/detail/texas-instruments/CD74HC4067M96/1507236) |
| | | |
#### Files
* [Handheld controller PCB](Drone%20controller.zip)

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Some files were not shown because too many files have changed in this diff Show More