Rocket Software Tips/Advice

The Rocketry Forum

Help Support The Rocketry Forum:

Bowen Everitt

New Member
Joined
Mar 5, 2019
Messages
3
Reaction score
0
Hey Rocketeers,

I'm on a mission to write some software to control a small thrust vectoring mount. I need some tips and advice for writing flight software. Anyone know any good books videos or anything to help me on this quest???

Thanks!!!
 

DaveW6DPS

Well-Known Member
Joined
May 28, 2013
Messages
472
Reaction score
224
Location
Barstow, CA
You might look at some of the open source projects that have done, or are doing, similar things. Usually control surfaces are used, since thrust vectoring is only effective for such a very short time.

There are several sensor chips with gyro and accelerometer signals. More chips with one or the other. Pulse width modulation pins from an Arduino can directly connect to a servo t move the mount.

What platform are you planning to program for?

These might give you some ideas:
https://www.instructables.com/id/Arduino-Powered-Rocket-Guidance-System/

https://workshopscience.com/arduino-rocket-stabilization/
 

Bowen Everitt

New Member
Joined
Mar 5, 2019
Messages
3
Reaction score
0
I am planning to use an arduino nano with an MPU6050 and a BMP280 for Barometer and a SPI flash chip for data logging. The problem will be writing the software... I am pretty lost on this one.
 

DaveW6DPS

Well-Known Member
Joined
May 28, 2013
Messages
472
Reaction score
224
Location
Barstow, CA
I am planning to use an arduino nano with an MPU6050 and a BMP280 for Barometer and a SPI flash chip for data logging.
Good choices. I have used both of those sensors, but only for data logging. The only issue with the MPU6050 is the max range for acceleration is +/-16Gs. You may get interrupts during boost if it over-ranges. For stabilizing you would most likely want to use the gyro function anyway, so I would turn off the accelerometer functions.

I do like the Nano, but generally use an Arduino Uno for prototyping, and then just recompile for the Nano. Incidentally, since it is open hardware some of the knock-off arduinos work identically to the actual, but are much cheaper. Here is the Nano that I use:
https://www.amazon.com/dp/B0713XK923/ref=sspa_dk_hqp_detail_aax_0?psc=1

The problem will be writing the software... I am pretty lost on this one.
Reading and storing the data is fairly easy. You might want to start with that and then work up to control functions.
 

Bowen Everitt

New Member
Joined
Mar 5, 2019
Messages
3
Reaction score
0
Yes, thank you. Since my post I have just wired up an MPU6050 because I am not going to be doing much HPR just low power stuff. With motors like an Estes F-10, averaging 14.38 newtons. So I won't be getting close to 16Gs. Eventually I might create a version of my flight computer with a more precise and hardy IMU.
 

DaveW6DPS

Well-Known Member
Joined
May 28, 2013
Messages
472
Reaction score
224
Location
Barstow, CA
It can be interesting to just play with the MPU6050 using the serial monitor to see how the values change. Turn and shake it and see how the six signals interact...
 

Chad

Well-Known Member
Joined
Jul 23, 2018
Messages
237
Reaction score
81
Location
Dallas
I would look into the flight controllers used on racing drones. They're cheap, small, and have very good sensors and everything else. Also, lot's of the drone flight controller software is open source and so can at least give you a start on how code is compiled, built, loaded, and started plus accessing the various buses and sensors.

Here's some docs on the Naze32 which is very popular and usually costs around $30-40. You wouldn't use the PPM/PWM input because you're not making a radio controlled rocket ( or maybe you are idk ) but the PWM outputs would be used to drive servos which you're probably going to need. Also, there's I/O for SPI and Serial buses so you can add other sensors if you want + tons of other stuff. One thing is nice, it has power regulation built in which is often overlooked.

https://www.robotshop.com/media/files/pdf/Naze32_rev6_manual_v1.2.pdf

BUT: you'll be writing everything from pretty much scratch so you better know C and the various tool chains for embedded software dev
 

Latest posts

Top