DIY DAQ - Open sourcing our Arduino data acquisition box

The Rocketry Forum

Help Support The Rocketry Forum:

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

AllDigital

Well-Known Member
TRF Supporter
Joined
Jun 14, 2013
Messages
618
Reaction score
774
Location
SoCal
TRF,

About three years ago, my son and I built the first version of this DAQ to support load testing of small 29mm KNSB motors for one of his school science projects. We have since improved it and scaled it up to support pressure and load testing on our 75mm motors, but it can really be used for any (amateur) motor large or small. We also added temperature probes to the testing, but removed it in this version, as our probes had too much latency (researching IR probes next). We did a write-up, posted the code to GitHub, and are open sourcing it so others can use it as a starting point. Enjoy and test safe!

Here is the GitHub link to the code: https://github.com/AllDigital33/diyDAQ


Overview

This DAQ uses a small inexpensive LCD screen, so that results and graphs are immediately available in the field, and detailed raw data is available on an SD card for review on a computer. It has a friendly interface to monitor, sample, or review past tests on the box.

You should have a basic knowledge of how to code and load libraries in Arduino and how to solder/connect small components. The code is a hack and Arduino provides a lot of latitude for things like sloppy string handling, but it is battle tested and the code should be easy to follow. It is a good starting point for schools or student groups that want to build their own DAQ on the cheap.

This version samples at a rate of about 85 Hz. It is limited by the Load Test amplifier, so if you only use pressure you can get much faster sampling. We’ve found that 85 samples a second is fine for our needs and it gives us a very accurate profile of the burn with very small anomalies and events showing up in the raw data. You can choose to only test pressure, load, or both. One or the other is usually enough to characterize the motor, but having both side-by-side gives you a lot more information about your motor.

Functionality

The DAQ has three modes set by a toggle switch: 1) monitor mode 2) sample mode 3) review mode.

In monitor mode it will just monitor the load cell and the pressure transducer in real-time and provide the weight and pressure readings. You can also tare the load cell (press select) or display the config file off the SD card (press scroll) in this mode.

In Sample mode, you start sampling by pressing the select button. This will put it into active sampling. In this mode it will: a) capture a “pre-sample” for three seconds b) main sample (up to ten seconds) and c) post sample ten seconds. Each of these is configurable. In pre-sample it is keeping a rolling three seconds of data while it monitors the load cell and pressure sensor to come up to threshold. After either one crosses the starting threshold it will go into “main sampling”, while watching for both pressure and load to drop below the stopping threshold. The main sampling will timeout after ten seconds (configurable) and has a minimum burn time set (2 seconds configurable). After the main event it will post sample for another ten seconds, just in case we had a false start or chuffing. So far, we haven’t needed to fall back on the pre data or post data, but good to know it is there. At the conclusion of sampling, it will display burn time, max pressure, avg pressure, max load, total impulse, avg load, motor common name, and more. While it is actively sampling a large LED will change colors between Green (pre sample, Red (main sample), Blue (post sample), and White (all done). This allows you to visually see what state it is in from a distance.

Switching to Review Mode, allows you to scroll through the last five tests to see summary data, a pressure graph, and a load graph. While in Review mode, the second toggle switch allows you to move between summary, pressure graph, and load graph.

All of the settings for the DAQ are stored on a file (config.txt) on the SD card. This allows for easy changes without having to open up and recompile Arduino code. This includes turning on/off load or pressure, calibration settings for the pressure sensor and load cell, as well as all the timings and thresholds.

Equipment and Libraries

We chose to build this using an Arduino Mega, as it is a 5v board and most of the analog pressure transducers operate 0-4.5v DC. The Mega is also really flexible with input voltage and has plenty of CPU to drive the TFT and sensors.

For the display we are using an Adafruit 3.5" TFT touchscreen HXD8357D 320x480 with SD card. We are not actually using the touchscreen features, but this is a good quality inexpensive display that doesn’t require any additional hardware. It has basic graphing capability, colors and fonts, and is easy to code. It also has a built-in SD card, since both use the Arduino SPI bus that is convenient. Library: https://learn.adafruit.com/adafruit-3-5-color-320x480-tft-touchscreen-breakout/adafruit-gfx-library

For the load cell we have a range of strain gauge cells that connect to an HX711 amplifier. Our smallest cell is 100Kg and largest 1000Kg. Each of these need their own simple calibration and the HX711 needs its own library: https://github.com/bogde/HX711

For the pressure sensor, we are just using a cheap three wire 1/8” NPT sensor from eBay that has an analog range of 0-4.5v. We are currently using a 1600psi sensor, but again you can get them in just about any value. These will also need a calibration factor. For our sensor, the base analog value is 100 (at 0.0v) and 50 for each 100psi. We use a grease gun with an analog pressure gauge to verify/calibrate the pressure transducer. It is an easy way to simulate a range of psi values up to 2000+ psi. When testing big motors we put a little grease in the hole, before screwing in the sensor, to protect it from the heat. Surprisingly, these little sensors do just fine under the heat and stress of the motor.

The other components are all pretty standard switches, push buttons, or LEDs. We use a 7.4v Lipo battery, but you could use a few standard 9v batteries in parallel (we did that on our first build). We added a volt meter read-out to our box to monitor the battery voltage.

We extend the sensors 30 feet from the box using Cat6 ethernet cable. The pressure sensor runs the whole length back to the Arduino analog input, but the HX711 for the load sensor is on the “business end” of the 30 foot cable to minimize noise during testing. If you are testing smaller motors you don’t need that much cable. On earlier versions we used RJ45 connectors on each end for the cable, but we found that during large tests they jiggled loose, so no we cut the cable and soldered on both ends.

Shopping List

Arduino Mega ($38):
https://www.amazon.com/dp/B0046AMGW0/ref=cm_sw_em_r_mt_dp_JXTvFb2R2KDRK

Arduino Mega shield($12):
https://www.amazon.com/dp/B00UYO4VWA/ref=cm_sw_em_r_mt_dp_yYTvFbYCPX2B9

Adafruit 3.5" TFT touchscreen HXD8357D 320x480 ($40 digi-key)
https://www.adafruit.com/product/2050

HX711 amplifier ($6):
https://www.amazon.com/dp/B010FG9RXO/ref=cm_sw_em_r_mt_dp_IITvFbDPTNS30

(2) SPDT three way toggle switches ($12):
https://www.amazon.com/dp/B07PDQN6P8/ref=cm_sw_em_r_mt_dp_WDTvFbDR72Z4J

(2) Momentary push button switches ($8)
https://www.amazon.com/dp/B01G821G92/ref=cm_sw_em_r_mt_dp_MHTvFbE78DQX2

Three color large LED ($1)
https://www.amazon.com/dp/B01CI6EWHK/ref=cm_sw_em_r_mt_dp_v0TvFb9VB34HS

(3) 330 ohm resistors ($3):
https://www.amazon.com/dp/B072L4B7W7/ref=cm_sw_em_r_mt_dp_a2TvFbS55HZT7

Battery 7.4v Lipo($20):
https://www.amazon.com/dp/B07NRM7HFZ/ref=cm_sw_em_r_mt_dp_X2TvFbKQR6PXH

Battery switch ($4):
https://www.amazon.com/dp/B008UTX208/ref=cm_sw_em_r_mt_dp_H3TvFb511478D

Pressure Transducer ($20):
https://www.ebay.com/itm/UNIVERSAL-...I-OIL-FUEL-AIR-WATER-W-CONNECTOR/223214955490

Load Cell ($30):
https://www.amazon.com/dp/B07RL2D2JQ/ref=cm_sw_em_r_mt_dp_WeUvFb94D6PFH

White ammo box ($10):
https://www.amazon.com/dp/B07M5VB1G5/ref=cm_sw_em_r_mt_dp_pbUvFbMNRBB08

30 ft of Cat6 cable ($16):
https://www.amazon.com/dp/B07KX26QWJ/ref=cm_sw_em_r_mt_dp_QfUvFbZE87JDV

Battery volt display ($9.00):
https://www.amazon.com/dp/B078LVLHNF/ref=cm_sw_em_r_mt_dp_LiUvFbRPHSXNG

Note: This is about $200+ in supplies, but if you get generics or lower cost components you can probably cut the price in half.

Here is the Grease gun info for calibrating/testing the pressure guage (McMaster-Carr Order):

1060K52 Compact Pistol-Grip Grease Gun for Standard Fitting, 6" Long Nozzle (21.53)
4089K64 Single Scale Pressure Gauge with Plastic Case, 1/4 NPT Male ($12.17)
4112T23 Compact High-Pressure Brass Ball Valve with Lever Handle ($12.18)
45525K552 High-Pressure 304 Stainless Steel Pipe Fitting, Cross Connector ($28.50)
4443K722 High-Pressure 316 Stainless Steel Pipe Fitting, Plug with External Hex Drive 50785K61 High-Pressure Brass Pipe Fitting, Bushing Adapter with Hex Body, 1/4 Male x 1/8
48805K571 Precision Extreme-Pressure 316 Stainless Steel Fitting, Right-Angle Tee Adapter,


IMG_4211.jpeg IMG_4224.jpeg
IMG_4672.jpeg IMG_4673.jpeg IMG_4674.jpeg IMG_4675.jpeg
IMG_4677.jpeg
IMG_4679.jpeg IMG_4680.jpeg IMG_4667.jpeg
 
Last edited by a moderator:
Thank you so much for posting all of this, I was about to start designing the same but having it all here is amazing. ...I know enough of Arduino to get up uploaded right, but hacking it together wasn't going to happen.
 
TRF,

About three years ago, my son and I built the first version of this DAQ to support load testing of small 29mm KNSB motors for one of his school science projects. We have since improved it and scaled it up to support pressure and load testing on our 75mm motors, but it can really be used for any (amateur) motor large or small. We also added temperature probes to the testing, but removed it in this version, as our probes had too much latency (researching IR probes next). We did a write-up, posted the code to GitHub, and are open sourcing it so others can use it as a starting point. Enjoy and test safe!

Here is the GitHub link to the code: https://github.com/AllDigital33/diyDAQ


Overview

This DAQ uses a small inexpensive LCD screen, so that results and graphs are immediately available in the field, and detailed raw data is available on an SD card for review on a computer. It has a friendly interface to monitor, sample, or review past tests on the box.

You should have a basic knowledge of how to code and load libraries in Arduino and how to solder/connect small components. The code is a hack and Arduino provides a lot of latitude for things like sloppy string handling, but it is battle tested and the code should be easy to follow. It is a good starting point for schools or student groups that want to build their own DAQ on the cheap.

This version samples at a rate of about 85 Hz. It is limited by the Load Test amplifier, so if you only use pressure you can get much faster sampling. We’ve found that 85 samples a second is fine for our needs and it gives us a very accurate profile of the burn with very small anomalies and events showing up in the raw data. You can choose to only test pressure, load, or both. One or the other is usually enough to characterize the motor, but having both side-by-side gives you a lot more information about your motor.

Functionality

The DAQ has three modes set by a toggle switch: 1) monitor mode 2) sample mode 3) review mode.

In monitor mode it will just monitor the load cell and the pressure transducer in real-time and provide the weight and pressure readings. You can also tare the load cell (press select) or display the config file off the SD card (press scroll) in this mode.

In Sample mode, you start sampling by pressing the select button. This will put it into active sampling. In this mode it will: a) capture a “pre-sample” for three seconds b) main sample (up to ten seconds) and c) post sample ten seconds. Each of these is configurable. In pre-sample it is keeping a rolling three seconds of data while it monitors the load cell and pressure sensor to come up to threshold. After either one crosses the starting threshold it will go into “main sampling”, while watching for both pressure and load to drop below the stopping threshold. The main sampling will timeout after ten seconds (configurable) and has a minimum burn time set (2 seconds configurable). After the main event it will post sample for another ten seconds, just in case we had a false start or chuffing. So far, we haven’t needed to fall back on the pre data or post data, but good to know it is there. At the conclusion of sampling, it will display burn time, max pressure, avg pressure, max load, total impulse, avg load, motor common name, and more. While it is actively sampling a large LED will change colors between Green (pre sample, Red (main sample), Blue (post sample), and White (all done). This allows you to visually see what state it is in from a distance.

Switching to Review Mode, allows you to scroll through the last five tests to see summary data, a pressure graph, and a load graph. While in Review mode, the second toggle switch allows you to move between summary, pressure graph, and load graph.

All of the settings for the DAQ are stored on a file (config.txt) on the SD card. This allows for easy changes without having to open up and recompile Arduino code. This includes turning on/off load or pressure, calibration settings for the pressure sensor and load cell, as well as all the timings and thresholds.

Equipment and Libraries

We chose to build this using an Arduino Mega, as it is a 5v board and most of the analog pressure transducers operate 0-4.5v DC. The Mega is also really flexible with input voltage and has plenty of CPU to drive the TFT and sensors.

For the display we are using an Adafruit 3.5" TFT touchscreen HXD8357D 320x480 with SD card. We are not actually using the touchscreen features, but this is a good quality inexpensive display that doesn’t require any additional hardware. It has basic graphing capability, colors and fonts, and is easy to code. It also has a built-in SD card, since both use the Arduino SPI bus that is convenient. Library: https://learn.adafruit.com/adafruit-3-5-color-320x480-tft-touchscreen-breakout/adafruit-gfx-library

For the load cell we have a range of strain gauge cells that connect to an HX711 amplifier. Our smallest cell is 100Kg and largest 1000Kg. Each of these need their own simple calibration and the HX711 needs its own library: https://github.com/bogde/HX711

For the pressure sensor, we are just using a cheap three wire 1/8” NPT sensor from eBay that has an analog range of 0-4.5v. We are currently using a 1600psi sensor, but again you can get them in just about any value. These will also need a calibration factor. For our sensor, the base analog value is 100 (at 0.0v) and 50 for each 100psi. We use a grease gun with an analog pressure gauge to verify/calibrate the pressure transducer. It is an easy way to simulate a range of psi values up to 2000+ psi. When testing big motors we put a little grease in the hole, before screwing in the sensor, to protect it from the heat. Surprisingly, these little sensors do just fine under the heat and stress of the motor.

The other components are all pretty standard switches, push buttons, or LEDs. We use a 7.4v Lipo battery, but you could use a few standard 9v batteries in parallel (we did that on our first build). We added a volt meter read-out to our box to monitor the battery voltage.

We extend the sensors 30 feet from the box using Cat6 ethernet cable. The pressure sensor runs the whole length back to the Arduino analog input, but the HX711 for the load sensor is on the “business end” of the 30 foot cable to minimize noise during testing. If you are testing smaller motors you don’t need that much cable. On earlier versions we used RJ45 connectors on each end for the cable, but we found that during large tests they jiggled loose, so no we cut the cable and soldered on both ends.

Shopping List

Arduino Mega ($38):
https://www.amazon.com/dp/B0046AMGW0/ref=cm_sw_em_r_mt_dp_JXTvFb2R2KDRK

Arduino Mega shield($12):
https://www.amazon.com/dp/B00UYO4VWA/ref=cm_sw_em_r_mt_dp_yYTvFbYCPX2B9

Adafruit 3.5" TFT touchscreen HXD8357D 320x480 ($40 digi-key)
https://www.adafruit.com/product/2050

HX711 amplifier ($6):
https://www.amazon.com/dp/B010FG9RXO/ref=cm_sw_em_r_mt_dp_IITvFbDPTNS30

(2) SPDT three way toggle switches ($12):
https://www.amazon.com/dp/B07PDQN6P8/ref=cm_sw_em_r_mt_dp_WDTvFbDR72Z4J

(2) Momentary push button switches ($8)
https://www.amazon.com/dp/B01G821G92/ref=cm_sw_em_r_mt_dp_MHTvFbE78DQX2

Three color large LED ($1)
https://www.amazon.com/dp/B01CI6EWHK/ref=cm_sw_em_r_mt_dp_v0TvFb9VB34HS

(3) 330 ohm resistors ($3):
https://www.amazon.com/dp/B072L4B7W7/ref=cm_sw_em_r_mt_dp_a2TvFbS55HZT7

Battery 7.4v Lipo($20):
https://www.amazon.com/dp/B07NRM7HFZ/ref=cm_sw_em_r_mt_dp_X2TvFbKQR6PXH

Battery switch ($4):
https://www.amazon.com/dp/B008UTX208/ref=cm_sw_em_r_mt_dp_H3TvFb511478D

Pressure Transducer ($20):
https://www.ebay.com/itm/UNIVERSAL-...I-OIL-FUEL-AIR-WATER-W-CONNECTOR/223214955490

Load Cell ($30):
https://www.amazon.com/dp/B07RL2D2JQ/ref=cm_sw_em_r_mt_dp_WeUvFb94D6PFH

White ammo box ($10):
https://www.amazon.com/dp/B07M5VB1G5/ref=cm_sw_em_r_mt_dp_pbUvFbMNRBB08

30 ft of Cat6 cable ($16):
https://www.amazon.com/dp/B07KX26QWJ/ref=cm_sw_em_r_mt_dp_QfUvFbZE87JDV

Battery volt display ($9.00):
https://www.amazon.com/dp/B078LVLHNF/ref=cm_sw_em_r_mt_dp_LiUvFbRPHSXNG

Note: This is about $200+ in supplies, but if you get generics or lower cost components you can probably cut the price in half.

Here is the Grease gun info for calibrating/testing the pressure guage (McMaster-Carr Order):

1060K52 Compact Pistol-Grip Grease Gun for Standard Fitting, 6" Long Nozzle (21.53)
4089K64 Single Scale Pressure Gauge with Plastic Case, 1/4 NPT Male ($12.17)
4112T23 Compact High-Pressure Brass Ball Valve with Lever Handle ($12.18)
45525K552 High-Pressure 304 Stainless Steel Pipe Fitting, Cross Connector ($28.50)
4443K722 High-Pressure 316 Stainless Steel Pipe Fitting, Plug with External Hex Drive 50785K61 High-Pressure Brass Pipe Fitting, Bushing Adapter with Hex Body, 1/4 Male x 1/8
48805K571 Precision Extreme-Pressure 316 Stainless Steel Fitting, Right-Angle Tee Adapter,


View attachment 431048 View attachment 431047
View attachment 431046 View attachment 431045 View attachment 431044 View attachment 431043
View attachment 431042
View attachment 431041 View attachment 431040 View attachment 431038
This looks very close to exactly what I was wanting to build for my rocket motor testing. I'll be needing to learn more about how I can get or make something like this for myself.
 
Oh, and the Fritzing schematic...

View attachment 431049
Hi Mike,

I've had all of the parts for this for over a year and I am finally attempting to put this together for a thrust stand to test my J-L rocket KNER motors.
For background I'm a retired engineer and have done full electronics instrumentation designs with 4-layer boards and 0604 parts. I've also done a number of Arduino test projects.

But there are a number of gaps in the schematic for this project, like where the battery and power switch connect. Can you help me out on this?

Thanks,

Dan Griffing
 
But there are a number of gaps in the schematic for this project, like where the battery and power switch connect. Can you help me out on this?
I haven’t looked at this version in a few years, but I recall that arduino board has a barrel connector for power input. You’d go from the lipo to the barrel with a switch in between.
 
I haven’t looked at this version in a few years, but I recall that arduino board has a barrel connector for power input. You’d go from the lipo to the barrel with a switch in between.
There should also be a pin on the Mega labeled Vin for unregulated voltage input if you don't want to use the barrel plug.
 
I am going to build one of these. What parts did you use to build your test stand?
 
Wondering if there has been any enhance to this project that can be posted. I'm also thinking about building one. The OP did a great job on this.
 
Wondering if there has been any enhance to this project that can be posted. I'm also thinking about building one. The OP did a great job on this.
Yes, I've done a few major rebuilds of this, but honestly this first version is "good enough" and served us well in the field.

My current version uses a Teensy 4.1, a custom PCB, and I upgraded the MCU ADC to use an ADS1115 chip which is a 4-channel, 16 bit, 860sps ADC. I also switched out the HX711 for a Futek CSG110 strain gauge amplifier (eBay used $70) that outputs into the ADC. The Futek is more reliable (zero noise/drops) and the new setup allows for me to sample two PTs and the load cell at 200hz. The real big advantage of my current version is everything is soldered onto a single board (including the LCD), providing more reliable connections and simple dip switch settings in the field. It also has super bright green/red vehicle strobe lights to indicate status long distances. I have not posted it previously, because it is so custom and is only marginally better than the original 1.0 version above. Here is a photo of the 3.0 version... -Mike

IMG_6611.JPG
 
I am going to build one of these. What parts did you use to build your test stand?
Chuck,

I test out at FAR on permanent I-beams, so I’m spoiled that way. But, I do have a “sled” for different motor sizes that is just a 1/4” or 3/8” aluminum back plate, a steel angle for the load cell, and then I use round pipe holders made for docks that retain the motor but allow it to slide. These are perfect for 3” and 4” motors. Here is an example:

https://www.dockhardware.com/product-tag/4-pipe-holder/
 
Chuck,

I test out at FAR on permanent I-beams, so I’m spoiled that way. But, I do have a “sled” for different motor sizes that is just a 1/4” or 3/8” aluminum back plate, a steel angle for the load cell, and then I use round pipe holders made for docks that retain the motor but allow it to slide. These are perfect for 3” and 4” motors. Here is an example:

https://www.dockhardware.com/product-tag/4-pipe-holder/
Thank. That is what I thought those were.
 
Wondering if there has been any enhance to this project that can be posted. I'm also thinking about building one. The OP did a great job on this.
I uploaded the code from the archive and tried to compile it with Arduino, but not all of the header files and libraries were available.

The Arduino environment isn’t quite as easy as Keil or other firmware development environments handling for complex projects.
 
I want to get started in EX but I'm frozen in analysis paralysis right now when it comes to ground testing and data acquisition. The last few posts here have only made the paralysis more severe. :oops::oops:
 
I want to get started in EX but I'm frozen in analysis paralysis right now when it comes to ground testing and data acquisition. The last few posts here have only made the paralysis more severe. :oops::oops:
Don’t get too discouraged. Analog gauges and cellphone on a tripod can get you rolling while you dip your toes in.
7E8A5AEB-1FDC-45FB-B27A-30CC77237770.jpeg
 
I was finally able to get everything I needed from the github archive and to compile and download it into my Mega2560 with Arduino.
The problem had been mine because I was only roughly familiar with the Arduino development environment.
 
I was finally able to get everything I needed from the github archive and to compile and download it into my Mega2560 with Arduino.
The problem had been mine because I was only roughly familiar with the Arduino development environment.
Although the archived DIY DAQ Arduino software compiles and loads into my Mega2560, the display shield doesn’t work.

It’s been a couple of years since I’ve worked with the Arduino. Is there a way to set debug breakpoints and single-step through the code?
 
Curious if you modified the forward closure to thread in the pressure line or if you are using an o-ring to seal on the face of the closure?
It’s CTI hardware on KNSB. I filled the forward closure with JB weld then tapped it for 1/4” NPT. You can’t just tap their phenolic forward closures, they’re too thin and get melty, guess how I know :)
 
It’s CTI hardware on KNSB. I filled the forward closure with JB weld then tapped it for 1/4” NPT. You can’t just tap their phenolic forward closures, they’re too thin and get melty, guess how I know :)
Nice, thanks for the info. Nearly all of my hardware is aerotech except for a few loki cases.
 
Move to electronics. I see no reason why this needs to be restricted.
 
Back
Top