Hacked Recording IMU System for less than $20

The Rocketry Forum

Help Support The Rocketry Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

ecarson

Well-Known Member
Joined
Mar 21, 2017
Messages
111
Reaction score
18
I described my recent exploits with Arduino and the Visuino programming environment on another thread.

Today, I pieced together a working system, albeit in development still, but capable of being flown in a rocket payload after
hardening connections and some more software tweaking. My main objective here is to show the possibility for instrumentation
at low hardware costs.

Starting with the Arduino Nano, which I got at 3 for $11, or $3.67 each as the base.

https://www.amazon.com/gp/product/B0713XK923/?tag=skimlinks_replacement-20

Then a MPU-6050 6DOF accelerometer/gyroscope module.

https://www.ebay.com/itm/3-Axis-Acc...e=STRK:MEBIDX:IT&_trksid=p2060353.m2749.l2649

Finally, an OpenLog SD serial recording breakout.

https://www.ebay.com/itm/Openlog-Se...hash=item25d8cad41d:m:mj6idSOxWAU2TZPea2HPo-A

I used the Visuino recording tutorial to hook up the Arduino Nano to the MPU-6050 and generate the sketch. I described all that in the other thread.

https://www.rocketryforum.com/showt...l-Automatic-Coding-for-Arduino-Visuino-System

After getting this operational, I probed the TX port on the Nano to see what was happening. I was getting a string of logic level pulses, but had no idea of what they consisted of. On a whim, I hooked up the TX1 to the RX1 pin on the OpenLogger, with 9V and ground from the breadboard bus powering the OpenLogger (datasheet shows 3.3 to 12V at VCC OK there).

The Nano is powered by the same 9V to it's VCC port, however the MPU-6050 is powered by the 5V from the Nanos 5V pin. Again, that system is described in more detail by the Visuino site, with a youtube video explaining that part of the system.

I plugged in the battery, and the LED's on the SD logger indicated activity. I let it run for a few seconds, and then picked up the breadboard and rotated it around. Then unplugged the battery, pulled the micro-SD card from the logger, and put it into my desktop.
I had quite the shock, when I found that the logfile on the SD card was in the same formatted text as the serial window on the Visuino terminal. From there, it was a simple matter to import the text file off the SD card into Excel, and generate the charts you see below.

I am sitting here in a bit of disbelief, but it worked. A few item notes for further development.

1. The MPU-6050 has a maximum of ±16G, and right now is set at ±2G maximum for bench test work.
2. MPU-6050 gyro set currently set at 250 deg/s maximum. That can be modified though up to 2000 deg/s.
3. The entire system is set at 9600 baud, and I had to modify the config.txt file on the SD logger to work at that speed.
4. I'm using an 8GB micro SD card, completely reformatted to FAT32 in the logger.
5. I still need to measure current draw, but it may be on the order of less than 100 mA even with SD writing.
6. I see no reason why this would not work with the higher G-level breakouts.
7. Possibility for adding temperature with current MPU-6050, and magnetometer with a MPU-9250.
8. Implementing a real time clock, and recording that data with each sample is a future project.
9. Powering using a 2S LiPo, instead of a 9V alkaline definitely possible.

Here is photo of the working bench system, and a couple of charts taken directly from the SD logfile just a few minutes ago.

AccelGyroHack.jpgSDLA100917.jpgSDLR100917.jpg
 
Last edited by a moderator:
Eureka!

I've been following your work. Nice job! This is the kind of ingenuity I like to see!
 
Last edited:
Having to push all of the data through that 9600bps port limits the sample rate to something that isn't especially useful. I figure about 60SPS if you record binary data.

I went with the Teensy 3.6 (the 3.5 would also work) because it integrated the SD interface on the card. The result is that I can record MPU-9250 data just as fast as it can' spit it out: 32,000SPS for the gyro. Overkill for most purposes of course.

As for clock accuracy, if the MPU is configured to source its clock from one of the gyro channels it does pretty well. At least my particular MPU-9250 did. Attached is a plot showing the number of timer clock ticks between acceleration samples which ran at 4,000SPS. Perfect would have been 15,000.

clock.png
 
Eureka!

I've been following your work. Nice job! This is the kind of ingenuity I like to see!

Now you're gonna flip when you see this:

I signed up for a notification on this project and received the below notification just today! This guy has been developing the ULTIMATE flight computer! Crazy stuff here, and although on the opposite end of the price spectrum, quite the functionality list! Vectored thrust control? Check. Active stabilization? Check. Tilt inhibition? Check. And the list goes on! I am definitely in on this one!

See more here: https://www.bps.space/signal/#signal-avionics

Email message 10/09/17:

"Joe,


We’re go for flight.

View attachment 329800


After months of testing and development, Signal Avionics is ready for an experimental release to the public! This release, nicknamed Signal Alpha, will be available for $299 USD. Pre-orders open up next week on October 17th, 2017, and will ship in early November. Here is what the Signal Alpha package includes.



Signal Alpha flight computer

  • Thrust vectoring, data logging, quad deployment flight computer
  • 40hz vectoring control loop
  • Customizable gear ratio for use with 3rd party or custom built TVC mounts
  • Course correction, for mid-flight reorientation to vertical after inclined launch
  • In-flight abort. In case of a flight anomaly exceeding user-set safety criteria, parachutes can be deployed to protect the rocket, range, and launch personnel
  • Static fire and ground testing mode, for safely verifying TVC gains and deployment events before launch
  • MicroSD slot for CSV file output of flight data, flight settings, and user configuration

Signal Vectoring mount

  • User’s choice of pre-built thrust vectoring mount for 29mm or 24mm motors, or…
  • STL files and build guidelines for 3d printing and assembly of TVC mount by the user. This is beneficial for long term use, or highly experimental flights, which may involve harder landings. The user will need access to a 3D printer, and a few common hobby servos and push rods for this option.
  • Both options will be available for an additional price in future production cycles, but are free and included for this round of early adopters.

BPS rocket tuning

  • Not all rockets fly the same, most don’t. If your rocket doesn’t closely match a design known to work with a specific tuning, BPS offers tuning services. These services will be available for an additional cost in future production cycles, but one tuning will be available for free for early adopters. Tunings will remain the same for a single rocket over time, so as the user-base grows, so will general knowledge on ideal parameters for specific builds.



Sales of Signal Alpha are limited to United States citizens and residents right now. I’m working hard to expand availability beyond this, but can’t offer sales outside of the US currently, my apologies for the limitation.


There are 30 units available for purchase in this first production round. Availability will be first come, first served. By becoming an early adopter of Signal Avionics, you’ll be at the bleeding edge of this tech. I’ve worked hard to remove every bug I can find, but there may be more. If you’re able to find a bug, I’ll work with you to fix or patch it. You’ll be the first in the hobby to own this tech, previously reserved for those with massive budgets and teams of engineers.


I believe deeply in the work I’ve done, enough to finally share it with others. If you have any questions about Signal, BPS, or rocketry in general, please email me at [email protected]. Below is the reservation form. Please fill it out only if you intend to purchase Signal Avionics next week. It’s not a binding commitment, but will help me begin production in order to ship on time.


bps.space/go-signal-alpha



Thank you,
Joe

-mind blown-
 
This is awesome stuff. Nice work!

Edit: I did something similar using a quadcopter flight control board (with a built in gyro/accelerometer/barometer & data logging) running iNav software. That board & the rocket attached to it is now a smoking hole in the Nevada desert, so my project is kinda on pause for now. :)
 
Last edited:
Nice work. Have you thought of using a sensor that has a barometer on it as well? This could fill in the gap for flights with higher acceleration.
 
Nice work. Have you thought of using a sensor that has a barometer on it as well? This could fill in the gap for flights with higher acceleration.

Thank you, and the others for the good words. I'm a recent retiree, and have just begun on this journey. In my previous life in industry, I was an engineering manager, mostly involved with financial transactions. Somehow I got channeled from process control to quality control into bean-counting management along the way. For the last 30-odd years, I always dreamed of getting back to some sort of technical engineering in the hobby sense. Aircraft and rocketry were my main interests, as my degree was in aerospace engineering.

Catching up with developments in the last few decades has been a lot of fun. Resources I could only dream about in 1970's and 80's, are now inexpensive. I remember pleading with a computer system operator for an additional 30KB of VAX-11 memory in 1982, so I could run a matrix library program for an advanced course. Now I can get 32GB at Walmart on a micro-SD.

First computer I ever worked with was the IBM-360 back in 1975. I played with an IMSAI-8080 around 1982. An accountant doing audit work at a Radio Shack in Oklahoma let me play that ancient "Star Trek" game on it. Interface was a teletype machine.

Anyway, yes I am looking at barometric sensors, along with other types. Right now, I'm experimenting with GPS NMEA strings copied onto micro-SD and just today translated NMEA strings into a KML file. I am currently waiting on a delivery of some DS3231 real time clock modules for another project. 5 for less than $10. Amazing. Whenever I get a bit burned out on one facet of rocketry, I go to another. I'm in process of building a Level 1 totally from scratch, and avionics is the "bright shiny object" of current fascination.
 
Back
Top