Transmitter for chute deploy WaterRocket

Goal: to send signal from the ground to my water rocket for chute deployment below 500 feet, using Arduino mini
BASIC PROJECT Questions:

  1. Can I use a FS1000A transmitter/receiver w/antenna such that when I see the rocket at top of it's arc, I can send a signal for the servo in the rocket?

  2. Alternatively, instead of a transmitter, can I use a MPU6050 altimeter that may (?) sense zero velocity at the top of the arc, such that it signals the servo automatically?

Thank You All for your help/assistance, Richard

The MPU6050 is not an altimeter but you could use it to detect that the rocket had reached the top of its arc

Thanks for your reply. So I can use it on the Arduino Mini (w/o any other components....except of course the servo).
Being a novice at Arduino, would you know it there is a CODE that does this ?

Thanks for your reply. So I can use it on the Arduino Mini and MPU6050 (w/o any other components....except of course the servo).
Being a novice at Arduino, would you know it there is a CODE that does this ?

Turn your echo off! How far did you look for possible code and if you find it can you adapt it to your project?

Do not expect to find a sketch that does exactly what you want but here is an an example that reads the acceleration values from an MPU6050 and prints to the Serial monitor

The link will open in a browser and allow you to compile and run it. To see the effect on the Z axis value click on the MPU6050 board and adjust the Z acceleration slider. I assume that your rocket will have positive Z acceleration when going up and negative once it starts to come down. Detect that change and you will know when to deploy the chute

Thank you. I found this website (https://www.instructables.com/Arduino-Based-Model-Rocket-Parachute-Deployment-Sy/) that had the code below.

I ordered the MPU6050 so I can't do anything until it arrives. But I will lay it out on a breadboard so when it comes in I can simply add it.

I assume (?) this one line from his code is asking if the the pressure is "decreasing", implying the peak altitude, hence chute deploy:

if(abs(a.acceleration.x) + abs(a.acceleration.y) + abs(a.acceleration.z) > 15.0){
delay(2000); //set your time delay
for (pos = 130; pos <= 0; pos += 1); //you can also change the pos it turns to
Serial.println(" deployment succsesfull");
servo.write(pos);

Anyway, below is his full code. I have to try to figure out how to adapt it to my situation. BTY he is using Adrafruit and I assume could "basic MPU6050" from the library. (I don't know the difference)

#include #include #include #include

Servo servo;
int pos = 0;
Adafruit_MPU6050 mpu;

void setup(void) {
servo.attach(8);
Serial.begin(9600);

if (!mpu.begin()) {
Serial.println("No MPU6050 found please check wiring!");
while (1) {
delay(50);
}
}
Serial.println("Found MPU6050");

mpu.setAccelerometerRange(MPU6050_RANGE_2_G); //you can change this range

mpu.setGyroRange(MPU6050_RANGE_500_DEG); //same here

mpu.setFilterBandwidth(MPU6050_BAND_21_HZ);

delay(5);

pinMode(2, OUTPUT);

}

void loop() {
sensors_event_t a, g, temp;
mpu.getEvent(&a, &g, &temp);

Serial.print("Acceleration X: ");
Serial.print(a.acceleration.x);
Serial.print(", Y: ");
Serial.print(a.acceleration.y);
Serial.print(", Z: ");
Serial.print(a.acceleration.z);
Serial.println(" m/s^2");

Serial.print("Rotation X: ");
Serial.print(g.gyro.x);
Serial.print(", Y: ");
Serial.print(g.gyro.y);
Serial.print(", Z: ");
Serial.print(g.gyro.z);
Serial.print(" rad/s");

Serial.print("Temperature: ");
Serial.print(temp.temperature);
Serial.print(" degC");

Serial.println("");
delay(500);

if(abs(a.acceleration.x) + abs(a.acceleration.y) + abs(a.acceleration.z) > 15.0){
delay(2000); //set your time delay
for (pos = 130; pos <= 0; pos += 1); //you can also change the pos it turns to
Serial.println(" deployment succsesfull");
servo.write(pos);
}else{
}
}

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum

Please post your full sketch, using code tags when you do

Posting your code using code tags prevents parts of it being interpreted as HTML coding and makes it easier to copy for examination

In my experience the easiest way to tidy up the code and add the code tags is as follows

Start by tidying up your code by using Tools/Auto Format in the IDE to make it easier to read. Then use Edit/Copy for Forum and paste what was copied in a new reply. Code tags will have been added to the code to make it easy to read in the forum thus making it easier to provide help.

It is also helpful to post error messages in code tags as it makes it easier to scroll through them and copy them for examination

I meant "increasing" not "decreasing"

I meant "increasing" not "decreasing"

Sorry, here is the code, reformatted and from "Copy for forum)

#include <Adafruit_MPU6050.h>
#include <Adafruit_Sensor.h>
#include <Wire.h>
#include <Servo.h>

Servo servo;
int pos = 0;
Adafruit_MPU6050 mpu;

void setup(void) {
  servo.attach(8);
  Serial.begin(9600);

  if (!mpu.begin()) {
    Serial.println("No MPU6050 found please check wiring!");
    while (1) {
      delay(50);
    }
  }
  Serial.println("Found MPU6050");

  mpu.setAccelerometerRange(MPU6050_RANGE_2_G); //you can change this range

  mpu.setGyroRange(MPU6050_RANGE_500_DEG); //same here

  mpu.setFilterBandwidth(MPU6050_BAND_21_HZ);

  delay(5);

  pinMode(2, OUTPUT);

}

void loop()  {
  sensors_event_t a, g, temp;
  mpu.getEvent(&a, &g, &temp);

  Serial.print("Acceleration X: ");
  Serial.print(a.acceleration.x);
  Serial.print(", Y: ");
  Serial.print(a.acceleration.y);
  Serial.print(", Z: ");
  Serial.print(a.acceleration.z);
  Serial.println(" m/s^2");

  Serial.print("Rotation X: ");
  Serial.print(g.gyro.x);
  Serial.print(", Y: ");
  Serial.print(g.gyro.y);
  Serial.print(", Z: ");
  Serial.print(g.gyro.z);
  Serial.print(" rad/s");

  Serial.print("Temperature: ");
  Serial.print(temp.temperature);
  Serial.print(" degC");

  Serial.println("");
  delay(500);

  if (abs(a.acceleration.x) + abs(a.acceleration.y) + abs(a.acceleration.z) > 15.0) {
    delay(2000); //set your time delay
    for (pos = 130; pos <= 0; pos += 1); //you can also change the pos it turns to
    Serial.println(" deployment succsesfull");
    servo.write(pos);
  } else {
  }
}



This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.