Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    Need tips on working with high sampling rates with the AKU340

    unbnerds
    Member

    Need tips on working with high sampling rates with the AKU340

    Hello everyone,

    I've been working on an application that uses the AKU340 acoustic sensor to get readings on ambient noise (and eventually send it to a VPS).

    Reading the sensor's datasheet did not give me any information about the highest sampling rate it can achieve, but the sample acoustic sensor code sets it to 22.05kHz which should be enough if I were to run an FFT to analyze the signal's frequency components.

     

    I've been reading the sensor values via FreeRTOS soft-timer callback functions, but the highest sampling frequency I'm able to get is 1kHz and that's not enough to get a good spectrum analysis for sound.

     

    Are there hardware timers I can use? Is there some kind of buffer on the sensor I can read multiple data points from? What would be the most efficient way of doing this?

     

    Thanks in advance,

    Leonardo

     

    5 REPLIES 5
    unbnerds
    Member

    Re: Need tips on working with high sampling rates with the AKU340

    I've been trying to use the Hardware timers described in https://developer.bosch.com/web/xdk/timer-and-countern. But reading the RMS values from the sensor from inside the interrupt function doesn't seem to work. It stops the kit from booting up...

     

    I'm out of ideas

    LlobetAtWork
    Long-established Member

    Re: Need tips on working with high sampling rates with the AKU340

    Hello Leonardo,

    I recommend to read https://developer.bosch.com/web/xdk/acoustic and https://developer.bosch.com/web/xdk/analog-to-digital-converter

    Basically high-performing use cases for the ADC (and not exclusive to the XDK hardware) include chaining the ADC, DMA (memory transfer controller) and HW-Timers together with the interrupt engine.

    The main issue with the XDK Accoustic Sensor is that the HW connection between AKU340 and the microcontroller is not optimal and due to this, the signal levels coming to the XDK are quite limited in time and signal characteristics.

    the experience here is quite mixed with some frequency limitations (f<1kHz) and nowhere the posibilities the AKU340 will give you with the right connections

    Best regards,

    Francisco Llobet

    unbnerds
    Member

    Re: Need tips on working with high sampling rates with the AKU340

    Hi Francisco,

     

    Thank you for replying.

     

    So do you think connecting an external acoustic sensor to the ADC pins and getting readings during HW-Timer interrupts would work? Also, how do I access/configure the DMA controller on the XDK? Is there even such a feature on this kit? If so, is there documentation I can take a look at? I have never worked with DMA before so any directions would be appreciated.

    Regards,

    Leonardo

     

    Tags (2)
    LlobetAtWork
    Long-established Member

    Re: Need tips on working with high sampling rates with the AKU340

    Hello Leonardo,
    basically the code would look the same as with the AKU340 ADC, just with the pins reconfigured to go to the extension bus. 

    Best regards,

    Francisco Llobet

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist