Forum Rule: Always post complete source code & details to reproduce any issue!
Page 3 of 3 FirstFirst 1 2 3
Results 51 to 60 of 60

Thread: A few questions regarding FFTs and performance

  1. #51
    Member
    Join Date
    Jun 2018
    Location
    Netherlands
    Posts
    37
    And here is the schematic with all values corresponding to what I am using now, I will delete the previous schematics

    Click image for larger version. 

Name:	Screenshot from 2018-06-21 22-30-01.png 
Views:	3 
Size:	90.2 KB 
ID:	14057

    Edit: it seems that this forum does not allow to remove/change earlier messages.

  2. #52
    Senior Member
    Join Date
    Jul 2014
    Posts
    1,712
    Here is the LTspice simulation
    Click image for larger version. 

Name:	LTsim.jpg 
Views:	2 
Size:	209.8 KB 
ID:	14058
    I replaced the BC250C by an 2N5089 (also an 100 mA collector current type).
    blue is input
    red is output (differential)

    here comes your latest schematic
    Click image for larger version. 

Name:	LTSpice2.jpg 
Views:	2 
Size:	193.2 KB 
ID:	14059
    It definitely worse than the one published in the link.
    reason is biasing second transitor is explicit in original.

  3. #53
    Member
    Join Date
    Jun 2018
    Location
    Netherlands
    Posts
    37
    Hi

    Thanks for that, I have loaded LTSPice some time ago but never got anything working in it ...

    I always wondered about his latest schematic. I allready have build the scheme in the middle several time. I will see if I can add the two resistors at the base of Q2. Should be possible.

    On the good side, I just done a testdrive in our garden, Common pipistrelle was as expected around and I could hear it to at least 10-15meters (tested without any controls on the detector and a fixed frequency at 45Khz). The wind has lowered this evening and it was hunting around. Next to adding the resistors I will also start working on the controls/display.

    regards
    Cor

  4. #54
    Junior Member
    Join Date
    Dec 2016
    Posts
    1

    op amps etc.

    Hi Guys
    I have been trying to work out how to make a data recorder for bat calls for a couple of years, I have been studying stm32f boards because of their low cost but the coding is beyond me. I have made a couple of different bat detectors (from other peoples designs) and have experience using different commercial bat detectors.
    I will share what I know in case its of any help to you guys.
    Heterodyning is good in the field because you can hear the change in frequencies but it is very difficult to identify different species as their calls can be very similar. For analysis back at home a recording of the frequencies is desirable. In the field a frequency divided sound alert and a flashing led is enough for me but I would like to record the frequencies and time stamp the calls. I had been thinking of just using two timers to measure the frequencies to keep things simple and using a DS3231 to give the time and a lcd keypad to set wake up and sleep times.
    Regarding microphones and opamps. I know the SPU0410 works up to 65khz and that some commercial detectors use them. I have picked up Noctules 18 Ė 20khz which you canít pick up using the cheap mics used in range finders. I have yet to test the spu any higher than 65khz because I have never come across anything higher yet.
    Sparkfun make a few opamp boards
    LMV 358 they say they work over 100khz with a couple of filter caps removed and people say they have used them for ultrasound. I have got one but not been able to test it yet. So we can expect that even if you design a different board LMV 358 will be ok and I know for definite that OPA322 will work. They must have a fast-enough slew rate.
    How does the ICS43434 microphone work with ultrasound, can frequencies lower than 15khz be filtered out.
    Regards David

  5. #55
    Member
    Join Date
    Jun 2018
    Location
    Netherlands
    Posts
    37
    Hi,

    Thanks for joining in. I have the feeling that this thread has allready changed a bit from its original main topic. But the starter (@foaly) of this thread can best decide if it can be turned into a wider discussion on building a bat-detector otherwise it might be good to create one. That way people that want to build a bat detector will easier find sources/ideas and the stuff we are trying to improve.
    I am interested to hear/see how you are going to use a teensy to hear/record bats.

    For me this was the thread that brought me to this forum : https://forum.pjrc.com/threads/38988-Bat-detector
    another important thread: https://forum.pjrc.com/threads/52175...oSoundRecorder

    As you will see from looking at above threads a lot of work has been done allready to save raw data to an SD for later processing. The bat-detector design of Frank allows us to not only listen heterodyne but simultaneously look at a spectrum/waterfall graph. So a lot of things are allready very usable.

    My current aim is to get a working bat-detector that works at least as good as some heterodynes I have made but additionally has:
    - as little noise as possible
    - more accurate and easier frequency control for the heterodyne part, in my analog heterodyne the frequency is controlled by a potentiometer and I have no screen to see what frequency I am actually using. So I am just looking at a calibrated dial where the difference between tuning to 40Khz or 50Khz is just a small turn of a knob.
    - allows me to easier see what the peak-frequency or frequency range of a bat-call is
    - allows automatic tuning (user selected) to the peakfrequency

    And thats enough for now as I first want it to work really good before I allready become too creative, stereo-batdetector etc etc

    Cor

  6. #56
    Senior Member
    Join Date
    Jul 2014
    Posts
    1,712
    CorBee, you should open a new thread on Bat detection.

  7. #57
    Member
    Join Date
    Jun 2018
    Location
    Netherlands
    Posts
    37
    Hi Walter,

    I am OK with that, but my main aim is to have good cooperation/sharing of ideas/codes problems. If others that are participating currently are also happy with it I will open a new thread or we can migrate to Franks (DD4WH) teensy-bat-detector thread. For me that was the real starting point.

    My progress this morning is that I got the spectrum-function working on the FFT. The image below shows in white a live full spectrum (10-96Khz), The orange vertical line is drawn from the axis to the peakvalue, so in this case its far above the noiselevels. The peak comes from my ultrasonic transducer that slowly steps through frequencies. I can see that happening live.
    Next to that I see that the spectrum has a very stable noiselevel with stable "peaks" in it that should be related to the board or other disturbances around.
    The text shows that I am using 192k samplerate and I am listening at 45Khz heterodyne.

    Click image for larger version. 

Name:	IMG_20180622_085316015.jpg 
Views:	5 
Size:	233.8 KB 
ID:	14062

  8. #58
    Member
    Join Date
    Jun 2018
    Location
    Netherlands
    Posts
    37
    Hi,

    I was still "hunting" a best setting to reduce the noise from the board. With F_CPU at 180 and sampling 176k I found using MULT=2 with DIV=8 to be a lot lower/stable in noise.

    Next up is improving my hardware with some controls (rotary encoders)

    CorClick image for larger version. 

Name:	IMG_20180622_100620277.jpg 
Views:	2 
Size:	294.3 KB 
ID:	14063
    Last edited by CorBee; 06-22-2018 at 08:09 AM. Reason: added image

  9. #59
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    253
    hi CorBee, hi all!

    very nice progress!

    I have some comments on some of the posts made in the last days:

    * sample rate: please note that in order to really accurately identify a large part of the bat species (Myotis for example), you really need a frequency response at least up to 125kHz, maybe even a little more. So my suggestion: use at least a sample rate of 250ksps ! Many bats use short calls of a few milliseconds that are frequency-modulated from way over 100kHz to as low as 20kHz. Many of the harder-to-identify species can only be accurately determined to species if you have good knowledge of the start frequency, end frequency, frequency of maximum energy, pulse duration and some more parameters. For that you need the entire call including the start, that may be above 120kHz. Thats why it is important to accurately record at least up to 120/130kHz.

    * microphone response: the SPU0410 seems to work at least up to 100kHz, see my first ultrasound recordings: https://github.com/WMXZ-EU/microSoun...ple-recordings

    * ICS43434: this is a digital MEMS mic, so you do not need a preamp, but the ICS43434 does not work for ultrasound, because the max sample rate is 51.6ksps, see here: https://www.invensense.com/download-...434-datasheet/

    * OPamps & slew rate etc.: I read a little more on OPamps for amplification of audio and I found that the requirements for slew rate and gain bandwidth product are really uncritical, if you use a two-stage preamp (gain is distributed over two stages, for example 11 and 10, so total gain is 110 == 41dB) and your output signal is not too high (its +-0.6Volts peak for the Teensy ADC). However, it should be an ultra low noise type with noise density lower than about 10nV/sqrt(Hz) --> see here: https://store.invensense.com/datashe...-Circuits7.pdf

    * long unshielded wires: not sure about that: but in some of the uploaded photos you see long, unshielded wires for tiny audio signals very near to a microcontroller ;-). My suspicion is, that when using the shortest possible cable length and shielded wires, one can seriously decrease the digital noise that is being picked up by the detector, especially if you have a dynamic display for FFT etc (which produse lots of noise). But that is just my guessing :-).

    Walter, I wonder how I can use a high enough sample rate (> 250ksps) with your microSoundRecorder that has a MULT of 1 (for reason of low noise). Do I have to change manually the function I2S_dividers? Or do the reasons for using MULT of 1 do not apply if I do not use the audio board, but the built-in Teensy ADC ?

    All the best,

    Frank

  10. #60
    Member
    Join Date
    Jun 2018
    Location
    Netherlands
    Posts
    37
    Hi all,

    I have also contacted Frank (DD4WH) and he agreed on moving the part in this discussion related to building/using a teensy bat-detector over to the allready exisiting thread "Teensy Bat Detector" at
    https://forum.pjrc.com/threads/38988-Bat-detector


    regards
    Cor

Posting Permissions

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