5 ms·
Show HN: I Put a Raspberry Pi in a Rocket
- Jugurtha 6y agoHi, do you have technical details for that? I don't really see any. >There must be a buffer that holds a certain amount of camera footage before saving it to disk. Because the battery disconnected in-flight, no flight video saved. I'd like to figure out how to write video data more frequently in case the battery issue happens again. Disk or SD card? I'm seeing RSSI. What signal are you measuring the strength of? Given that you talked about problems losing footage and buffering, I suppose you are not transmitting in near real-time but instead save to disk and get the data afterwards? Given that you have a link, why not send the video stream to your ground station directly? I worked with Raspberry PI to acquire data from fitness trackers with Bluetooth Low Energy (BLE), then transmit using 4G dongles. We serialized the data into protobufs and used Kafka in the backend. We also used the setup for other things. >The software performed well, but I'd still like to increase the data capture rate. There are Adafruit libraries for the components I'm using in C++, so I'm considering rewriting air.py in C++, but I'd really love it if someone talked me out of that. I don't think you have to re-write anything in C++. I'm pretty sure the bottleneck is not the language.
- johnjones4 6y agoHi! Here's the post where I document my build process: https://johnjonesfour.com/2020/10/03/model-rocket-telemetry-part-1/ https://johnjonesfour.com/2020/10/03/model-rocket-telemetry-... Happy to answer any questions about that! For the video issue, I need to do some homework and figure out what the issue is. It's just speculation at this point. Yes, I am saving the Pi's microSD card. Telemetry transmission and reception is done by an Adafruit RFM95W, and I'm using this library to interface with it: https://github.com/adafruit/Adafruit_CircuitPython_RFM9x https://github.com/adafruit/Adafruit_CircuitPython_RFM9x. It handles data just as Python byte arrays, and I only transmit data from the senors (in real time) but not video. I use that library to determine RSSI as well. Thanks for the note on the language idea. Like I said in the post, I want to be talked out of that :-)
- cconcepts 6y ago400 feet doesnt seem very high (to a bystander like me). I made a 19mm diameter sugar rocket with my kids, tied it to a bamboo stick for stability and electrically started it. The thing went so high that we visually lost sight of it. Is this because my power to weight ratio is so much lower?
- ConceitedCode 6y agoDifferent aerodynamics probably had a little impact but it's mostly just a much better power to weight ratio. It helps that you didn't launch a raspberry pi and battery :)
- johnjones4 6y agoThat's exactly it. This thing was pretty heavy with a battery, Pi, sensors, mounting components, etc. I used an Estes D12-5 engine, which is fairly powerful but there are wayyy more powerful model rocket motors out there that I'd like to try in the future with this.
- cconcepts 6y agoThanks for clarifying. As a total noob I was staggered by those little sugar rockets, as soon as the thing left the ground I thought "uh oh, what have I done?"
- johnjones4 6y agoHaha that's awesome. Do you have a link for a good tutorial on them?
- cconcepts 6y agohttps://youtu.be/12fR9neVnS8 https://youtu.be/12fR9neVnS8
- jsjohnst 6y ago
- mch82 6y agoCurious what other boards you considered? You mention using Adafruit libraries & working in Python. The Adafruit feather boards focus on low power situations & some include battery slots. https://www.adafruit.com/feather https://www.adafruit.com/feather
- johnjones4 6y agoI looked into the Feather for a bit, but my experience with the Pi is much stronger, so I felt more comfortable working with that after I determined the battery I'd need to power it wouldn't be too heavy to lift.
- mch82 6y agoBeagleBoard is similar to RaspberryPi, but focused on embedded robotics vs desktop PC alternative. The PocketBeagle is similar to a Pi Zero. Fully open source hardware. Smaller community though, so harder to find examples/capes. http://beagleboard.org/boards http://beagleboard.org/boards Artemis seems to be Sparkfun’s new line of Feather-compatible boards. They target a pro-level audience vs Feather’s edu audience. The OpenLog Artemis looks interesting for logging telemetry. https://www.sparkfun.com/news/tags/artemis https://www.sparkfun.com/news/tags/artemis
- johnjones4 6y agoThanks!
- bennathanson 6y agoHey I know this guy! Nice work, John. YITBOS
- johnjones4 6y agoHey man! I hope you're doing well! Maybe I'll paint the next one green and white! (For the rest of the world who's confused by this: college fraternity colors.)
- johnchristopher 6y ago> The software performed well, but I'd still like to increase the data capture rate. There are Adafruit libraries for the components I'm using in C++, so I'm considering rewriting air.py in C++, but I'd really love it if someone talked me out of that. Would that really improve data capture ? How much throughput is it captured that python can't keep up (is that even the right kind of questions) ?
- johnjones4 6y agoI'm not totally certain. I could do a quick C++ POC to see if that improves throughput a bit, but I've got doubts. My other thought is that the SPI interface only can go up to a certain speed. If anyone has deeper knowledge of that protocol I'd love to hear their thoughts.
- mch82 6y agoDonkeycar might give you some ideas... it logs still images with a RaspberryPi camera module. The frames can be stitched into video afterward (though maybe lower frame rate/resolution than what you want). If it crashes, logged frames are on disk.
- johnjones4 6y agoThanks!
- chrisdalke 6y agoYou should try doing some profiling on each part of your system and find where the bottlenecks are. anecdotally, I built a telemetry system for an electric boat with very similar architecture (RPi, python script for telemetry collection, 433Mhz telemetry radio) and were pretty easily able to push on the scale of ~100 data points at 100hz. Part of that was efficiently (and manually) packing each data point into the minimum space required, pretty much just the raw data and a checksum. But from what you’re describing I definitely think you can push your system further without rewriting significantly.
- Mister_Snuggles 6y agoThis is very cool! At first, I had some questions about why you'd use a Raspberry Pi for this, but once I realized that video was being recorded as well it made more sense. I'm quite impressed. For increasing sample rate, it really depends on where the problem is. The Pi is recording video and managing the sensors - are these two tasks competing with each other? Perhaps using another controller to deal with the sensors and telemetry transmission could help (if contention is actually the problem). Something like the ESP32 in the D1 Mini form factor would easily fit in the rocket. If I was doing this, I'd ignore the ESP32's onboard radios and use the LoRa module since it seems to work quite well in this application. [0] https://johnjonesfour.com/2020/10/03/model-rocket-telemetry-part-1/ https://johnjonesfour.com/2020/10/03/model-rocket-telemetry-...
- johnjones4 6y agoGood idea! I'd want to do some research and simulations to figure out how much of an altitude hit I'd take with the added weight of an additional controller.
- Mister_Snuggles 6y agoThis[0] is the ESP32 module that I keep on hand. The seller doesn't list any information that would help with your simulations, but the photos can give you a rough idea of the physical size. Other than a bare ESP32 module[1] I don't think I've seen a physically smaller ESP32 board. You can program these with the Arduino IDE, so they're quite easy to use and there are tons of libraries available for interfacing with sensors, etc. [0] https://www.aliexpress.com/item/32834982479.html https://www.aliexpress.com/item/32834982479.html [1] https://www.aliexpress.com/item/1005001271041790.html https://www.aliexpress.com/item/1005001271041790.html
- johnjones4 6y agoThank you!
- 6y ago
- watersb 6y agoThe company that sold the first generally available "Personal Computer" started as a club that got into telemetry rigs for model rockets.
- plugger 6y agoWe're using a ESP32 as the "brains" of a Rocket tracker. Having Wifi to confirm GPS lock is pretty nice. I flew it yesterday with a Quectel L-80/MediaTek 3339 chipset, seems to have performed fairly well. https://forum.ausrocketry.com/viewtopic.php?f=32&t=6547 https://forum.ausrocketry.com/viewtopic.php?f=32&t=6547