diff --git a/docs/final_project/final_project.md b/docs/final_project/final_project.md index a0ffd1b..164b523 100644 --- a/docs/final_project/final_project.md +++ b/docs/final_project/final_project.md @@ -408,10 +408,25 @@ I tested the power consumption on the matrix by setting the brightness to 100 an ![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. Unfortanetly 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 + + ## TODO * [ ] Matrix panel subsystem diff --git a/docs/final_project/image-43.jpg b/docs/final_project/image-43.jpg new file mode 100644 index 0000000..3313799 Binary files /dev/null and b/docs/final_project/image-43.jpg differ diff --git a/docs/final_project/image-44.jpg b/docs/final_project/image-44.jpg new file mode 100644 index 0000000..006b869 Binary files /dev/null and b/docs/final_project/image-44.jpg differ diff --git a/docs/final_project/image-45.jpg b/docs/final_project/image-45.jpg new file mode 100644 index 0000000..a93dd3a Binary files /dev/null and b/docs/final_project/image-45.jpg differ diff --git a/docs/final_project/image-46.jpg b/docs/final_project/image-46.jpg new file mode 100644 index 0000000..131b841 Binary files /dev/null and b/docs/final_project/image-46.jpg differ diff --git a/docs/final_project/image-47.jpg b/docs/final_project/image-47.jpg new file mode 100644 index 0000000..923e659 Binary files /dev/null and b/docs/final_project/image-47.jpg differ diff --git a/docs/final_project/image-48.jpg b/docs/final_project/image-48.jpg new file mode 100644 index 0000000..3e8b878 Binary files /dev/null and b/docs/final_project/image-48.jpg differ diff --git a/src/drone/src/main.cpp b/src/drone/src/main.cpp index 79703f7..40dc609 100644 --- a/src/drone/src/main.cpp +++ b/src/drone/src/main.cpp @@ -321,8 +321,6 @@ void IMUinit(); void getIMUdata(); void calculate_IMU_error(); void calibrateAttitude(); -void Madgwick(float gx, float gy, float gz, float ax, float ay, float az, float mx, float my, float mz, float invSampleFreq); -void Madgwick6DOF(float gx, float gy, float gz, float ax, float ay, float az, float invSampleFreq); void getDesState(); void controlANGLE(); void controlANGLE2(); @@ -1429,6 +1427,8 @@ void commandMotors() { uint32_t m5_duty = map(m5_command_PWM, 125, 250, 1100, 2000); uint32_t m6_duty = map(m6_command_PWM, 125, 250, 1100, 2000); + //may need to add pulsewidth to duty cycle conversion + // Write the duty cycle values directly to each pin ledcWrite(m1Pin, m1_duty); ledcWrite(m2Pin, m2_duty);