stacking LCD over datalogger

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
tultalk
 
Posts: 64
Joined: Thu May 14, 2020 7:00 pm

stacking LCD over datalogger

Post by tultalk »

How do I stack 1602 lcd shield over datalogger. Have not received datalogger yet. Is pin spacing same as uno and since preassembled, I will need to unsolder headers and install extenders, correct? Or are the headers not part of the preassembled shield? I ordered extenders just in case.

Thanks
Robert

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: stacking LCD over datalogger

Post by adafruit_support_bill »

The pre-assembled shield has all the surface-mounted parts pre-assembled. The headers are separate, so there is no de-soldering to do. You just need to install stacking headers if you want to stack another shield on top.

User avatar
tultalk
 
Posts: 64
Joined: Thu May 14, 2020 7:00 pm

Re: stacking LCD over datalogger

Post by tultalk »

Thanks. That is what I thought but was unsure because of the description.
Best regards
Robert

User avatar
tultalk
 
Posts: 64
Joined: Thu May 14, 2020 7:00 pm

Re: stacking LCD over datalogger

Post by tultalk »

Hi: Me again.
0-5000 psig transponder
Short term pressure pulse. Maybe .5 ms peak
Is there a way in the Arduino program to freeze the LCD display at max pressure?
Alternatively looking at SD data logger to see if I can record profile of pressure pulse.
Thanks
Robert

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: stacking LCD over datalogger

Post by adafruit_support_bill »

To catch a .5ms pulse, you will want to be sampling at 4KHz or better. To record a profile of that with any resolution, you will need to sample faster.

The basic AnalogRead() function is capable of sampling at nearly 10KHz in a tight loop. With some lower-level coding, there are ways to sample considerably faster. Here is an example of some high speed sampling:
https://www.hackster.io/ArduinoKoen/ard ... 154%20kHz).

Also keep in mind that writing data to the SD card takes some time. And this can vary depending on the card used. That may be your limiting factor for longer-term data capture. HEre is an example of logging at 100KHz.
viewtopic.php?f=31&t=30557&p=153175&hil ... ps#p153175

User avatar
tultalk
 
Posts: 64
Joined: Thu May 14, 2020 7:00 pm

Re: stacking LCD over datalogger

Post by tultalk »

Perhaps I could store the later.on a memory chip then copy to the SD card.
Any examples around?
Thanks
Robert

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: stacking LCD over datalogger

Post by adafruit_support_bill »

What processor are you using? And how long of a time period do you need to log?

Older processors like the Atmega328 on the Arduino UNO don't have much RAM to work with (2K). More modern processors like the M0 or M4 ARM processors have a lot more RAM (32K for the M0 and 192K for the M4)

https://www.adafruit.com/product/3505
https://www.adafruit.com/product/3382

They are also much faster processors, so you can sample at a higher rate and have plenty of space for buffering.

User avatar
tultalk
 
Posts: 64
Joined: Thu May 14, 2020 7:00 pm

Re: stacking LCD over datalogger

Post by tultalk »

So these are used instead of the Uno (which I just bought 2 of). Wish I had known.
I am trying to catch pressure profile in a silencer prototype just outside the muzzle and then at the end of the silencer. Testing different configurations of interior baffle made with 3D printing. I have a long way to go on this project. Have most everything I need but a clear path forward.
I can use the UNO's to capture audio (which I was going to get 2 more UNO's for) and get your suggestions for pressure spike/profile.
Thanks
Robert

User avatar
tultalk
 
Posts: 64
Joined: Thu May 14, 2020 7:00 pm

Re: stacking LCD over datalogger

Post by tultalk »

So is this one the champion?

Adafruit Metro M7 with AirLift - Featuring NXP iMX RT1011
Thanks
Robert

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: stacking LCD over datalogger

Post by adafruit_support_bill »

Yea, the M7 will have several orders of magnitude more speed and space than an UNO.

To capture a short duration event, a common technique is to use a 'circular buffer'. You collect data continuously in a fixed-size buffer. When you reach the end of the buffer, the data just wraps around to the start again and starts over-writing the oldest data at the beginning of the buffer. This process can cycle as long as necessary.

When you detect the pressure pulse event, you continue collecting just enough to capture the rest of the pulse, then stop. Assuming that your buffer is large enough, you will end up with the complete waveform captured in memory.

There are several Arduino implementations of this out there. Here's a couple:

https://www.megunolink.com/documentatio ... ar-buffer/
https://github.com/rlogiacco/CircularBuffer

User avatar
tultalk
 
Posts: 64
Joined: Thu May 14, 2020 7:00 pm

Re: stacking LCD over datalogger

Post by tultalk »

Hi:

Will use the M7's for detonation capture and the UNO's for audio.
Should I use circular buffer to capture the detonation profile then get the MAX value for the buffer for the LCD display? Send buffer profile over wifi to computer.
I note the wrap around warning. So I need high sampling rate and buffer big enough to prevent wrap around.
Is there a shield to add memory to M7?
Thanks
Robert

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: stacking LCD over datalogger

Post by adafruit_support_bill »

I note the wrap around warning. So I need high sampling rate and buffer big enough to prevent wrap around.
The wrap-around is the whole point of a circular buffer. You record data continuously - wrapping around as needed - until you detect the peak. At that point, you have captured the rising edge of the wave.

Then you continue recording - wrapping around as needed - to capture the falling edge. Just be sure to stop before you over-write the rising edge & peak. When you are done, you will have the whole wave in memory. But the start/end point may be somewhere in the middle of the buffer.

To read-out - start where recording left off and read to the end of the buffer. Then wrap around and read from the beginning of the buffer up to the begin/end point.

User avatar
tultalk
 
Posts: 64
Joined: Thu May 14, 2020 7:00 pm

Re: stacking LCD over datalogger

Post by tultalk »

Thanks for response.
I understan you comment: The wrap-around is the whole point of a circular buffer. You record data continuously - wrapping around as needed - until you detect the peak. At that point, you have captured the rising edge of the wave.
But doesn't that lose the rise before the peak? I think I would like to record starting electrical initiation of detonation or the first sign of a small rise in the pressure.

Thanks
Robert

User avatar
adafruit_support_bill
 
Posts: 88037
Joined: Sat Feb 07, 2009 10:11 am

Re: stacking LCD over datalogger

Post by adafruit_support_bill »

But doesn't that lose the rise before the peak? I
No. Because you are recording constantly, you have already captured the rise at the time you detect the peak.

Assume that you have a buffer that capable of storing 2 full seconds worth of data. You record constantly into that buffer - wrapping around as necessary. When you detect the peak, you already have a full 2 seconds worth of the leadup to the peak.

So now you continue recording for one more second. That will overwrite the first second of the leadup and replace it with one second of the falling edge of the pulse. When you stop, you will have one second of data from before the pulse and one second from after the pulse.

User avatar
tultalk
 
Posts: 64
Joined: Thu May 14, 2020 7:00 pm

Re: stacking LCD over datalogger

Post by tultalk »

Thanks.

Recording detonation results.

Simulating detonation using paint ball burst disk (5000psi) and 5000 psi pressure transducer to create a waveform reflecting the spike and decay of the pressure.

I want to lock a local 1602 display at highest pressure level while sending response spectrum of the simulated detonation over wifi to computer.

The issue is how to lock the 1602 display at the highest pressure reading. I assume this can be done programatically.

Do you know of any examples of this kind of capture?

Thanks
Robert

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”