Forum Rule: Always post complete source code & details to reproduce any issue!
Page 6 of 6 FirstFirst ... 4 5 6
Results 126 to 131 of 131

Thread: Audio Recording / Logging to SD card --> microSoundRecorder

  1. #126
    Senior Member
    Join Date
    Oct 2015
    Location
    Vermont, USA
    Posts
    180
    I just found this thread while looking for how to write WAV rather than just RAW to an SD card. What a great project! (And thanks for using the Tympan BTW.)

    And, Walter, thanks for packaging up your code on GitHub so that I can learn from it.

    Chip

  2. #127
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    424
    We now use a total of 12 microSoundRecorders for recording nocturnal Crex crex (corn crake). Thank you again, Walter, for providing us with this Teensy 3.6 recording tool with your software!

    Our hardware setup now consists of a plastic lunch box with:

    * two LiIon batteries of type 18650 with 3.7 Volts and 3.4Ah each
    * two battery protection chips (AliExpress)
    * integrated -USB charge module (AliExpress)
    * Teensy 3.6 using the integrated SD card slot
    * one ICS43434 I2S microphone on a separate tiny PCB (if you do not dare to solder this mic, the ready-to-use PCB can be purchased from onehorse / Pesky products on tindie)

    Click image for larger version. 

Name:	microSoundRecorder DD4WH 2019_06_25.jpg 
Views:	11 
Size:	128.7 KB 
ID:	16841Click image for larger version. 

Name:	microSoundRecorder2 DD4WH 2019_06_25.jpg 
Views:	6 
Size:	80.9 KB 
ID:	16842

    A zip plastic bag makes the whole thing waterproof. The thin plastic does not alter the sound characteristics or the sound level significantly in our experience.

    We use a PCB originally designed for the PassiveRecorder, an ultrasound recording device for bats. We just leave the ultrasound specific parts (preamp) and the display/joystick etc. unmounted.

    https://framagit.org/PiBatRecorderPo...eensyRecorders

    Our hardware setup for the Audio Recorder is the same as shown in the Wiki, but we use an additional RC (470 Ohms, 470F) combination to filter the power supply of the ICS43434 microphone.

    You can imagine that the amount of wav file audio recordings very quickly grows into tens or hundreds of Gigabytes. So it will very quickly be impossible to listen to all the recordings. So we need artificial intelligence!

    I added some open source tools which can automatically classify audio recordings to species using different artifical intelligence algorithms in the microSoundRecorder WIKI.

    https://github.com/WMXZ-EU/microSoun...stic-resources

    Have fun with the microSoundRecorder! All the best,

    Frank DD4WH

  3. #128
    Senior Member
    Join Date
    Oct 2015
    Location
    Vermont, USA
    Posts
    180
    Walter and/or Frank,

    I've recently updated my Arduino IDE / Teensyduino. Unfortunately, the SD writing via the greiman library doesn't work anymore.

    As you know, your fast SD writing is enabled by using the Greiman SD library in place of the default Sd library. The problem is that there is a conflict over the function sdhc_isr(), which is present in both libraries. The greiman library has always defined this function sdhc_isr(), so I don't know why the compiler is only now having a problem with there being multiple definitions. Why has it worked before but has stopped working now?!? Grr.

    In compiling your own microSoundRecorder, here is the error shown in the Arduino IDE (I have verbose output enabled)...

    Code:
    C:\Users\wea\AppData\Local\Temp\arduino_build_187894\libraries\SD\utility\NXP_SDHC.cpp.o: In function `sdhc_isr':
    
    C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SD\utility/NXP_SDHC.cpp:911: multiple definition of `sdhc_isr'
    
    C:\Users\wea\AppData\Local\Temp\arduino_build_187894\libraries\SdFs\SdCard\SdioTeensy.cpp.o:C:\Users\wea\Documents\Arduino\libraries\SdFs\src\SdCard/SdioTeensy.cpp:210: first defined here
    I'm having a hard time figuring out how to get around this error. Do you have any suggestions so that I can resume using high speed SD routines for writing audio to SD?

    (Yes, I realize that I could just delete the reference from the default SD library, but I'm trying to figure out how to solve this problem more generally for my Tympan library [which uses the Greiman library, too] without asking users to make edits to the underlying Arduino/Teensyduino installation.)

    Is there anything to the Greiman library that I can do? Or is there a change that I/we can do a pull-request for in the Teensy build of the default SD library?

    Chip
    Arduino IDE 1.8.9
    Teensyduino 1.46

  4. #129
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,282
    Quote Originally Posted by chipaudette View Post
    Is there anything to the Greiman library that I can do?
    does it compile if you declare in sdio_Teensy.cpp sdhc_isr as static ?
    Code:
    static void sdhc()
    {...
    }

  5. #130
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,282
    Quote Originally Posted by WMXZ View Post
    does it compile if you declare in sdio_Teensy.cpp sdhc_isr as static ?
    Code:
    static void sdhc_isr()
    {...
    }
    Noted that this does not compile, as sdhc_isr is in kinetis.h declared as extern without the static attribute
    So I ended up to modify Greiman's code by simply adding a 'm' as in

    Code:
    static void msdhc_isr()
    {...
    }
    [/QUOTE]

    and also changed the attach interrupt line

  6. #131
    Senior Member
    Join Date
    Oct 2015
    Location
    Vermont, USA
    Posts
    180
    and also changed the attach interrupt line
    When I renamed the Greiman sdhc_isr() to another name (like was suggested above), nothing worked...presumably because the sdhc_isr was a special name that was being attached to an interrupt somewhere. I could never find where this isr was attached to the interrupt.

    Where do I find the attach interrupt line so that I can change it? This would be great!

    Chip

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •