Jump to content

Questions about Discovery 2 and Open Logger


Recommended Posts

Not long ago, I purchased the Ham Radio workbench bundle (what a great deal!) for an upcoming project. Later, I learned about the Open Logger, which actually sounded more applicable for what I have planned.  If possible, I'd like to detail the experiment I'm preparing and get a professional opinion from one of the experienced and talented folks here about choosing the right equipment.

Generally, I'm trying to measure two types of "harmonics" as they apply to the barrels of rifles.

The first type is the "whipping" movement, like you'd see a tuning fork exhibit w/ a high speed camera. To measure this, I'd like to place 3 accelerometers along the barrel to capture their relative motion and measure the amount and direction of movement at the base, middle and end of the barrel while firing.

The second type is circumferential. When a round is fired, the chamber portion of the barrel expands slightly. This can be measured with a piezo strain gauge and is used to measure chamber pressure. There's a theory called Optimal Barrel Time which claims that a circumferential harmonic wave travels up and down the barrel, creating moments of disruption at the muzzle, leading to poor performance. Again, I'd like to place 3 strain gauges along the barrel to capture this, if possible.

So far, that's 6 high-speed sensors that I'd like to capture. I'd also like to record directly from the sensor unit of a MagnetoSpeed chronograph. which uses two hall-effect sensors to measure bullet velocity. The purpose of adding this sensor to the mix is to help correlate the time of bullet-exit to the relative positions of other sensors along the barrel.

Ideally, I'd prefer to have something I can easily turn on and off that will reliably record a time series of events for every sensor, without requiring a laptop.

I'd love to get some advice/suggestions on this. Any help would be greatly appreciated!  Thank you!

-Eric

Link to comment
Share on other sites

Hi @ammolytics,

This forum section will work. It definitely sounds like an interesting project. The main hurdle that I'm seeing with this project is that you will either need multiple Discovery's and OpenLogger to collect all of the analog inputs and the digital inputs. Accelerometers tend to provide their information in a digital fashion (such as through SPI or I2C) so while the Analog Discovery 2 can read in this data, the OpenLogger is not able to directly interpret protocol messages. However, the Analog Discovery 2 needs to be connected to a laptop to store the data, which you stated you do not need.

The 3 strain gauges will likely have analog outputs as well as the output from the Magnetospeed Chronograph that you linked, though I don't know if it provides 1 or 2 analog outputs (since it uses 2 hall effect sensors). So that is 3 analog inputs required, plus 2 digital inputs (from the 2 hall effect sensors), as well as 3 digital inputs that will likely require interpretation. Looking at the sources you linked, it does not appear the required sample rate will need to be incredibly fast (guessing based the links where it said the stress wave travels from receiver to muzzle in about 0.12 mS, or 120 microseconds). Based on this, you likely could use a 1 MHz sampling rate (1 microsecond resolution) to capture all of the data you needed, of which the Analog Discovery 2 can achieve, while the OpenLogger will be limited (while using 3 analog inputs) to 166.7 kS/s (6 microsecond resolution), though depending on how many sample points you need, this may be sufficient for you.

The main thing I'm getting at is that I don't think that either the OpenLogger or the Analog Discovery 2 will an all-in-one solution for you; the Analog Discovery 2 because it only has 2 analog inputs and you need at least 3 (and it can't store data to an SD card), and the OpenLogger because it doesn't directly interpret data protocols that will likely be coming from the accelerometers. To be fair, the OpenLogger could in theory receive all of the bit-banged data accelerometer data on digital inputs and then you interpret them later, but the logging functionality (or at least the ability to read the logged data) isn't integrated yet and this also presumes that accelerometers will power on and start sampling data in the exact configuration you want upon start-up with no instructions provided to them which is not a guarantee.

What I would probably recommend looking into would be using a microcontroller or microprocessor to collect the data and store it on an SD card, since there are a number of microcontollers that have both enough analog and digital inputs and you can program them to to interpret the protocol data from the accelerometers for you and send only the relevant data to an SD card. You'll likely need to use an external analog-to-digital converter if the voltages you are measuring are outside of the ranges that the on-board ADC can accept (usually either 0V to 3.3V or 0V to 5V and Magnetospeed sensor you linked was showing 7.6V to 9V readings).

Let me know if you have any questions about this.

Thanks,
JColvin

Link to comment
Share on other sites

Thank you, @JColvin, this is incredibly helpful!

 

On 5/24/2019 at 2:07 PM, JColvin said:

The main hurdle that I'm seeing with this project is that you will either need multiple Discovery's and OpenLogger to collect all of the analog inputs and the digital inputs. Accelerometers tend to provide their information in a digital fashion (such as through SPI or I2C) so while the Analog Discovery 2 can read in this data, the OpenLogger is not able to directly interpret protocol messages. However, the Analog Discovery 2 needs to be connected to a laptop to store the data, which you stated you do not need.

Ok, that makes sense. FWIW: Avoiding the need for a laptop is more of a nice-to-have than a strict requirement. 

 

On 5/24/2019 at 2:07 PM, JColvin said:

The 3 strain gauges will likely have analog outputs as well as the output from the Magnetospeed Chronograph that you linked, though I don't know if it provides 1 or 2 analog outputs (since it uses 2 hall effect sensors). So that is 3 analog inputs required, plus 2 digital inputs (from the 2 hall effect sensors), as well as 3 digital inputs that will likely require interpretation. Looking at the sources you linked, it does not appear the required sample rate will need to be incredibly fast (guessing based the links where it said the stress wave travels from receiver to muzzle in about 0.12 mS, or 120 microseconds). Based on this, you likely could use a 1 MHz sampling rate (1 microsecond resolution) to capture all of the data you needed, of which the Analog Discovery 2 can achieve, while the OpenLogger will be limited (while using 3 analog inputs) to 166.7 kS/s (6 microsecond resolution), though depending on how many sample points you need, this may be sufficient for you.

What I know for certain is that the Magnetospeed unit has two sensors -- each is a magnet surrounded by a coil, similar to those used in an electric guitar pickup. My understanding is that these are essentially hall-effect sensors, but I could be mistaken.  The unit has a single audio-jack connector, and a continuity check asserts that it's a single wire. Since the expectation is that the first sensor will be triggered before the second (as the metallic bullet passes over), it makes sense that they could use a single connection instead of needing two. My running assumption is that I can treat this as a single analog sensor -- I may try the Discovery 2 on it just to verify.

 

On 5/24/2019 at 2:07 PM, JColvin said:

 The main thing I'm getting at is that I don't think that either the OpenLogger or the Analog Discovery 2 will an all-in-one solution for you; the Analog Discovery 2 because it only has 2 analog inputs and you need at least 3 (and it can't store data to an SD card), and the OpenLogger because it doesn't directly interpret data protocols that will likely be coming from the accelerometers. To be fair, the OpenLogger could in theory receive all of the bit-banged data accelerometer data on digital inputs and then you interpret them later, but the logging functionality (or at least the ability to read the logged data) isn't integrated yet and this also presumes that accelerometers will power on and start sampling data in the exact configuration you want upon start-up with no instructions provided to them which is not a guarantee.

Ok, this is great feedback -- thanks!  For this experiment, I'd rather get one unit that can record all of the data simultaneously rather than compromising on the number of sensors or trying to correlate mismatched timestamps from multiple devices. Out of curiosity, would using analog 3-axis accelerometers make the OpenLogger more suitable (or maybe I'm misunderstanding how analog accelerometers provide the data)?

 

On 5/24/2019 at 2:07 PM, JColvin said:

 What I would probably recommend looking into would be using a microcontroller or microprocessor to collect the data and store it on an SD card, since there are a number of microcontollers that have both enough analog and digital inputs and you can program them to to interpret the protocol data from the accelerometers for you and send only the relevant data to an SD card. You'll likely need to use an external analog-to-digital converter if the voltages you are measuring are outside of the ranges that the on-board ADC can accept (usually either 0V to 3.3V or 0V to 5V and Magnetospeed sensor you linked was showing 7.6V to 9V readings).

Great suggestion! Do any existing microcontrollers on the market come to mind which would be suitable for this purpose? I'm mostly familiar with things like Arduino, Pi, and Beaglebone, but none of them seemed to be a particularly good fit.

Thanks again for the detailed and thoughtful reply -- it really was exceptionally helpful!

-Eric

Link to comment
Share on other sites

Hi @ammolytics,

That's interesting for the Magnetospeed only having one input; usually you would expect two separate outputs so that there is no conflicting voltages with the two of them. But if it works, it works I suppose.

If the accelerometers you have are all analog (which I guess I didn't realize was a thing), the OpenLogger would be a lot more suitable for this. The only concern I would have then is that the OpenLogger can manage the aggregate sample rate to keep up with all of the analog inputs that are being measured (6 analog inputs for an aggregate 83 kS/s, equating to 12 microseconds between each sample) which equates to about 10 samples per a single stress wave traversing the distance. Depending on your application, this may be sufficient for you though.

As for the microcontroller/microprocessor board that could work, an Arduino styled board could work, though both the sample rate and the voltage range for the analog inputs; I'm only familiar with Arduino style of boards and Digilent's own brand of microcontrollers (which are similar but have different specifications in terms of number of IO and speed and some peripherals, but will still potentially have the voltage input range issue depending on the signals being provided from the source. I haven't used the Raspberry Pi or BeagleBone boards so I can't really comment on the effectiveness of those.

Thanks,
JColvin

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...