Skip to content

cwyatt29/Cyrus_Wyatt_Engineering_4_Notebook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Engineering_4_Notebook

 

Table of Contents

 


LED Blink

Assignment Description

use vs code to make the onboard LED on the Rasberry Pi Pico blink.

Evidence

Blink

Wiring

No wiring was needed because the Pico has an onboard LED which can blink.

Code

Code

Reflection

This assignment was very simple most of the command scripts we needed were in the instructions so all that was needed was to order them correctly and run the code. This code would be useful if you want to make sure your pico is functioning properly before launching a rocket or another flying projectile. I also added a switch to my wiring which isn't necessary but it makes it easier to turn on and off.


Launch Pad Part 1

Assignment Description

Create a code that will print a countdown into the serial monitor. Code should start at 10 and stop at 0.

Evidence

Countdown

Wiring

No wiring was needed for this because it is only in a serial monitor

Code

Code

Reflection

The command N -= 1 is used to minus one from the value of N every loop. This is useful to know because N - 1 will just print 9 and N = -1 will print -1. Other than that the code is simple. Also remember to use if N = 0 break which will prevent the code from going into negative values.


Launch Pad Part 2

Assignment Description

Blink a red light each second of the countdown, and turn on a green LED to signify liftoff.

Evidence

Lights

Wiring

Wires

Code

Code

Reflection

The Pico uses GP ports instead of D ports it is important to remember to name them as GP. The long leg of the LED is the positive side. The green LEDs are very hard to see when it is bright so I used a blue LED that shows up better.


Launch Pad Part 3

Assignment Description

We need to add a button to our launch pad instead of using our code to begin the countdown. When the button is pressed we need to start the countdown. We don't have a saftey in place but we could make it so that if it is pressed again it will stop the countdown and reset it.

Evidence

LaunchPad3

Wiring

Wires

Code

Code

Reflection

This was a good refresher for how button code works. This will be nice to look back at when we are making our projects later in the year. It is important to know whether you're pulling up or pulling down. Pull up means when you aren't pressing the button its seeing a true value. When you are Pulling down it means it will get a true value when the button is depressed.


Launch Pad Part 4

Assignment Description

Building off of the previous assignments, add a servo that rotates 180 degrees when the countdown reaches zero to mimic the movment of a support tower breaking away when launching a rocket.

Evidence

LaunchPad4

Wiring

Wires

Code

Code

Reflection

all of the commands we needed were already provided on canvas but its important to understand what they're actually doing.

pwm_servo = pwmio.PWMOut(board.GP5, duty_cycle=2 ** 15, frequency=50) 
servo1 = servo.Servo(pwm_servo, min_pulse=500, max_pulse=2500)        
servo1.angle = 0                

the first line is defining the servo and telling the code which pin the servo is on. Duty cycle is the maximum frequency the servo will receive and frequency is the width of the pulses that the servo receives. The second line is making the 180 servo know that it can't go past a certain degree of rotation.


Crash Avoidance System Part 1

Assignment Description

We were assigned to code and wire an accelerometer that returns us its x, y, and z values in the serial monitor. This will be useful when we are doing our project because will will be able to look at our data and see how quickly our object moved. It would also be good for making a crash avoidance system.

Evidence

Evidence

Wiring

Wiring

Code

code

Reflection

This assignment was fun for me because I got to use a sensor that I hadn't used before. It was a good refresher for using I2C which I had done before when using LCDs. Its important to note that the Z value is around 8.3 while the others are 0. this is because of the gravity of the earth which messes with the sensor causing it to not give us a 0.


Crash Avoidance System Part 2

Assignment Description

We needed to make a light turn on if our gyro is tilted at a 90 degree angle. We also had to make it so that our device would work without being powered from the computer. This is essentially a warning system, If our helicopter is at 90 degrees something is definitely wrong.

Evidence

Evidence

Wiring

Wiring

Code

code

Reflection

I learned how to round values which is very useful and I wish that I had learned it sooner. This makes if statements so much easier and also makes it easy to look at data and read it. I also learned more about F strings which let us print things more easily. I had a refresher on and and or statements and when the right time to use them is.


Crash Avoidance System Part 3

Assignment Description

Add an onboard screen that will report values of angular velocity back to the pilot. We are using an OLED screen and wiring it through the same serial clock and serial data pins. We want to round these values because it will be simpler for the pilot to read while flying the helocopter.

Evidence

Evidence

Wiring

Wiring

Code

code

Reflection

We got to use a new screen which I liked more than the LCD screens we had been using because this was able to print more information on one screen. The quality on the OLEDs is better than the LCD and you dont have to adjust the brightness on the device which is nice. This was the first time that I had two devices on one I2C which was important to learn because it lets me greatly condense my wiring and not run out of ports which I have done before on projects with lots of inputs and outputs.


Crash Avoidance System Part 4

Assignment Description

This was an optional assignment in which we were tasked with adding a altimeter to our crash avoidance system. If our system was above 3 meters the light would not come on.

Evidence

Evidence

Code

code

Reflection

In this assignment we got to use a third sensor on the same I2C the altimeter, is a useful sensor because it can measure temp, altitude, and barometric pressure. This will be useful for our project later because it will let us measure differnt data. The sensor is also compact which is very important because we can't have a very heavy payload.


FEA Beam Assignment Parts 1 & 2

Assignment Description

Lucia Whitmore and I were tasked with making a 3d printed beam that could support the most weight. The parameters were that the beam had to hold the weight 180mm from the start of the beam, it couldn't weight more than 13g and it couldn't use any support material. Lucia and I started by brainstorming some ideas and researching bridges and cranes which had already achived the goal we were working towards. Next we both picked a design to work on and made it in OnShape, I choose to do a truss and Lucia made a triangle but switched to a box design because the triangle weighted far too much.

Part Link

FEABEAM

Part Image

Images

PartImage1 PartImage2

Reflection

I think that Lucia and I chose a good method of design which let us complete two different designs at the same time and more options mean more better. Lucias design was better than mine because she was able to make small adjustments which mine couldnt do as well. My design was more complicated than Lucias which meant it took more time to do and didn't necessarily make it any better. If I was going to do this again I wouldve started by making my original extrusion from the mounting peice more adjustable because that would have allowed me to cut the most weight quickly.


FEA Beam Assignment Part 3

Assignment Description

We were tasked with using onshape simulation tools to test our beams before printing them. By using the force tool we can simulate how our beam would react to having a weight on the end of it. This is useful for picking the best beam and for knowing where we need to make adjustments.

Part Link

FEABEAM

Part Image

Part 1 Images

Stress Image

PartImage1a

Displacement Image

PartImage1b

Part 1 Analysis

To improve this design it would be good to remove material from the dark blue areas and add it to the red. This would involve removing parts off the side skirts and adding more to the spine that is close to the holder. There is the most stress there so it will also be good to use filets and chamfers to get rid of weak 90 degree points.

Part 2 ImagesStress Image

PartImage2a

Displacement Image

PartImage2b

Part 2 Analysis

This design will need more changes than design 1. It would be benfitial to angle the fins to create more rigidity. It would be good to remove some material from the end of it and beef up the part close to the mounting point. If you look at the stress image you can see where it had the weakest point.

Reflection

The FEA is very useful for this assignment, without it we would have to wait for our printers to print before we could test. This would also be more expensive than FEA. FEA will be useful in the future because we will be able to test different materials before we launch rockets or balloons.


FEA Beam Assignment Part 4

Assignment Description

After completing part 3 we need to take what we learned and put it into our model. We are supposed to run multiple simulations after each change that we make to see if we have any improvement. Our design is pretty good right now but we will have to make small but important changes to the weak points to improve our design.

Part Link

Part1Link Part2Link

Part Image

Improvements

Because Lucia was out for most of the week we did this the main changes were all done by me but on the last day we decided to divide and conquere to see who could make a better design. As it turns out Lucia's design beat mine by a stress factor of 1 point so we decided to go with hers. Our maxium improvement was improved by a factor of 36.27% which is good considering that our design was already at a stress factor of 11.57.

Part 1 ImagesLucia's Stress Image

Lucia's Improvements

Lucia's Displacement Image

Lucia's Improvements

Part 2 ImagesCyrus's Stress Image

Cyrus's Improvements

Cyrus's Displacement Image

Cyrus's Improvements

### Reflection

I had a hard time using the built in OnShape FEA tool because when I made upates it would take a long time for the simulation to tell me if it improved or not. I wish Lucia had been here for more time because we would've been able to improve our design a lot more. I Think that if we had more time I would have started a new design and remove the side peices because most of our strength came from our spine. We were able to get a single digit stress factor which I am happy with and I feel that we have a good chance of having one of the strongest beams in the class.


FEA Beam Assignment Part 5

Assignment Description

After breaking our beams we got to see where they would break in real life and we were tasked once again with improving our design. Lucia and I decided to scrap most of our last design because there were multiple issues with it.

Part Link

Link1

Part Image

Part ImagesStress Pic Displacement Pic

Improvements

We kept the spine shape of it but instead of adding triangluar supports along the sides we added a long top beam that we chamfered so there was no overhangs where we would need support material. We also decided to add a support to the area where the beam slotted into the holder because many other teams had their parts break there and if we could fix the front portion where ours broke last time we should beef up the back too. We removed material using diamonds which were stronger than the square cut outs that we had used before. The most important change we made was making the head much bigger. We did this because on our last design it was extremely thin and snapped instantly. By making these changes we were able to get our stress factor down to 6.45 which is a 43% decrease from our original design.

Reflection

If I was to do this again I would have trusted my intution over the FEA more. I also would have started over a lot sooner than I did because the originally design got to a point where it couldn't be any more improved. I am happy with the design that I have come up with and I think that when we break the beams this will perform better than my first design.


Landing Area Part 1

Assignment Description

We were tasked with making a code that could find the area of a triangle based off of 3 points. We were required to use functions and also needed the code to return an error instead of crashing if the wrong data was input (if you put a letter instead of a number). Data need to be input in the for (x,y) so you couldn't just do each point indivdually.

Evidence

Evidence

Wiring

There was no wiring for this assignment.

Code

code

Reflection

This assignement was more chalenging than previous assignments because we were learning skills that I had never done before. I liked doing this because I got to learn more about using math and logic and code. It was also useful to learn about try and except commands which would be very nice if we were making something where you have to input values. Without these it would cause the whole code to crash when data was input wrong. Making Our own functions is also very useful and a good way to make code more compact. This assignment could've been done without using functions but now that I know how to use them I wouldn't do it a different way.


Landing Area Part 2

Assignment Description

For this assignment we were tasked with adding a picture of our theoretical landing area onto our OLED screens. We would still input our 3 verticies and calculate the area and print the triangle and its area on the graph. Our area must be accurate for any input and our output should be displayed as kilometers squared.

Evidence

Evidence

Wiring

Wiring

Code

code

Reflection

This was a challenging assignment because the code that is used with OLED screens is fairly new to me. The wiring was very simple, only requiring the OLED and the PICO. I had issues because I would fail to index lists in the correct places which was very annoying becauses there are a lot of lists. Also in the begining I still had my inputs in the "try except" which caused the code to not let me bail out or save new code. To not have this problem only put the parts the could cause an error in the try except.


Morse Code Part 1

Assignment Description

We were tasked with creating code that would translate our message in english into morse code. I utilized functions, and inputs which I had learned about in the last two assignments. I also used a dictionary which I hadn't used before.

Evidence

Evidence

Wiring

No wiring was required for this assignment.

Code

code

Reflection

doing this assignment was important because it taught us useful code skills such as the hash. We also got more practice with writing multi-step functions and collecting user inputs. This assignment caused me some confusion because I didn't understand where I needed to put my input line. I had orginally had it inside of the function which cause the code to run errorless but wouldn't let me input my message. I fixed this by creating a new function that would run separately from the translator code. This function was responsible for collecting the inputs when code was run.


Morse Code Part 2

Assignment Description

We were assigned with used our morse code part one and making the result blink out on an LED. Once I understood how to get started this wasn't very complicated.

Evidence

Evidence

Wiring

Wiring

Code

code

Reflection

I used a for loop which took the result of the morse code generation and read it. Then I used if and elifs to tell the code what to do with the inputs. The most annoying part was getting the timing correct with the spaces between taps and between letters. I used variables which I defined at the to make it easy to edit.


Data Part 1

Assignment Description

We were tasked with reusing our previous crash avoidance assignment and recording its data on a spread sheet. It was also required that we make it headless which means that it can be powered without being attached to the computer.

Evidence

Evidence

Wiring

Wiring

Code

code

Data

data.csv link

Reflection

This will be useful when we start making our final projects because we will need to record data from our projectile. This would be important for determining distance speed and orientation of our object.


Data Part 2

Assignment Description

We were tasked with creating graphs for the data that we had collected in the prevoius assignment. We will import the date into a google sheets and use the graph tool. This will be useful later in the year when we come back and analyze collected data.

Link to Google Doc

Evidence

Evidence

Wiring

No wiring needed for this assignment

Code

code

Reflection

This is an important skill to know. Data is useful in numbers but it is more useful if we can look at it in the form of a graph. THis will be important later in the year when we need to analyze collected data and make adjustments to our project. They will also be good for documentation because they are easy to read and display a good amount of important information.


Hidden

About

Documentation for my Engineering 4 DE Class 23-24

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages