Data Acquisition System

Discussion in 'The Projects Forum' started by Highlight, Nov 26, 2010.

  1. Highlight

    Thread Starter New Member

    Nov 26, 2010
    28
    0
    I need some help choosing the right microcontroller for my project. Im building a data acquisition system which will measure the electricfield and pressure changes resulting from an explosion. It will interface with two sensors(one pressure, one electricfield) and the two 12-bit ADC's. The sampling rate im using is about 400Ksps and i need to write the data to an SD card pretty fast so i can get all the data. My question is how do i know which MCU is best in terms of specs?..like how fast does the clock rate need to be, or how fast the write speeds need to be for the SD card. Is the SPI bus fast enough? :confused:
    I will be recording for about 100ms.
     
  2. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    I think you are going to have a problem writing that fast.

    You will need to use something with enough ram to buffer the writing process.

    What you should actually do , it get enough ram to hold the entire sample length, if you want 3 seconds, get enough ram for 1200 samples (Or 2400 for both sensors) Start, fill the ram, then write it to the SD card.

    SD is Serial, and I dont think you will be able to achieve more than 115,000/s. You need 400,000 a sec. You are begging for missed packets and corrupt data.

    Is this device, or sensors going to be destroyed in the process?

    You may consider using a laptop as a datalogger and connect the sensors via USB, serial, or parallel port.
     
  3. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    Get yourself a good quality digital camera with RAW capability, and interface your sensors to replace the CCD. Everything your looking for.
     
  4. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Thats a good idea.
     
  5. Highlight

    Thread Starter New Member

    Nov 26, 2010
    28
    0
    Say i want to record 1 second of data. I would need enough RAM for (400,000 samples/second)*(1second)*(12bits/sample)(1byte/8bits)=600KB*2 = 1.2MB of data?

    Since i dont know the exact time the explosion will go off i thought of continuously writing data to a circular buffer, then use a trigger(amplitude triggered from E-field) to write to memory for a nominal amount of time AFTER the trigger is received, say 1 second then stop. This way i can conserve memory and also obtain the pre-trigger data.

    Are you saying SPI can only achieve transfer rates of 115,000bits/second? that seems slower than i expected. The device will be placed in a protective casing designed to survive the blast, but its no guarantee. I expect the sensors to be destroyed, but the data must survive!..this is why i think i should write directly to removable storage and not to RAM.
     
  6. Highlight

    Thread Starter New Member

    Nov 26, 2010
    28
    0
    I have to design an embedded standalone device from scratch.
     
  7. Dream-

    Active Member

    Nov 26, 2010
    69
    0
    Look into the architecture of Digital Oscilloscopes, it may provide some hints. Your problem is not the microprocessor but the actual logging i.e. fast memory access.
     
  8. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    School assignment?
     
  9. Highlight

    Thread Starter New Member

    Nov 26, 2010
    28
    0
    Yes........
     
  10. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    How far from the detonation will the device be? What order explosives? Big difference between 5,000ft/s and 25,000 ft/s for measurements.
     
  11. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    OP should ask for a more realistic assignment.
     
  12. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    What school are you going to that blows stuff up?

    Is this salt miners school?

    Or Explosive Plating school?
     
  13. Highlight

    Thread Starter New Member

    Nov 26, 2010
    28
    0
    It will be about 10meters away. They will be high explosives.

    This was actually the easiest project.

    Its a research school that specializes in science and engineering. They also do a bunch of explosives testing, i dont know why.
     
  14. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    What volume of a C4 analog will be detonated 10m away?

    Will this actually be built, if so, what is the cost limit?

    What is your location? Some things are available in the US and not in other countries, and vice-versa.

    You will probably want faster ADCs with more resolution than those provided on a microcontroller as well.
     
  15. Dream-

    Active Member

    Nov 26, 2010
    69
    0
    Yes independent ADCs are probably a good idea. But the problem still is the storage, you will definitely need to do buffering to RAM, but I am sure that is covered in your budget.
     
  16. Highlight

    Thread Starter New Member

    Nov 26, 2010
    28
    0
    I dont know what explosives will be used or the weight, but it will be a strong, High Explosive detonation. Yes, this device has to be built and tested, i have all the funding i need to build it.Im in the usa. Yeah im using two external ADC's, with 12-bit rez and about 400Ksps.
     
  17. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    clocking ADC data through a circular buffer is no big deal. A controller wouldn't be required to participate in that activity. One could be used to initiate and terminate the acitivity.

    The way I see it, you'll select your ADCs and buffers that can handle your required speed, then a dedicated circuit (asic) to tie the two together. A controller can be used to resolve some trigger, at which time it transfers the buffer to hard storage. This transfer doesn't have the time requirements of the data aquisition, so most any controller would work, depending of course on how your need to access your buffer.
     
Loading...