Forum Rule: Always post complete source code & details to reproduce any issue!

Search:

Type: Posts; User: mborgerson

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    325

    I did manage to get VGA-resolution BMP images...

    I did manage to get VGA-resolution BMP images sending to the PC. The transitions look OK, but the frame rate is noticeably slower. This is due to the 4 times larger number of pixels. The .bmp...
  2. Replies
    22
    Views
    1,676

    Your timing code will probably return 0 for all...

    Your timing code will probably return 0 for all values in vImag;


    You could try something like this:



    void adc0_isr() {
    uint16_t adc_val;
    // call readSingle() to clear the interrupt.
  3. Replies
    22
    Views
    1,676

    I ran my histogram analyzer that does 1,000,000...

    I ran my histogram analyzer that does 1,000,000 samples at 50uSec intervals for two cases: The first collects the ADC values for histogram analysis without SD card writes, the second collects the...
  4. Replies
    22
    Views
    1,676

    If you simply called my GetADC function without...

    If you simply called my GetADC function without change and captured the time before and after the call, the interval is going to be higher by 101 milliseconds due to the delay() calls in the...
  5. Replies
    22
    Views
    1,676

    With the OP's specification of 50uSec sampling, ...

    With the OP's specification of 50uSec sampling, I think there is a low probability that the SysTick interrupt will affect the ADC timing. Both the ADC timer and the Systick timer are generated from...
  6. Replies
    22
    Views
    1,676

    Here is a simple demo program to collect 16384...

    Here is a simple demo program to collect 16384 samples using the ADC timer.


    // Sample program to Collect ADC data with ADC timer
    // Using the ADC timer to collect minimizes sampling jitter
    //...
  7. Replies
    22
    Views
    1,676

    I've got lots of example code that might be...

    I've got lots of example code that might be applicable, but your question is a bit too vague. To pull out the right example I need to know:

    1. Which Teensy are you using?
    2. How many samples...
  8. Replies
    22
    Views
    1,676

    Another possibility is to use the ADC library and...

    Another possibility is to use the ADC library and the hardware ADC timer. It is also more complex in that you have to know how to set up and use an interrupt to collect the data-- but it gets you...
  9. Perhaps the lower input voltage results in a...

    Perhaps the lower input voltage results in a slower V_3.3 rise time and the 1.5K pull-up resistor used to pull up the USB DP signal isn't pulling up quickly enough and the PC is lacking the signal...
  10. Replies
    5
    Views
    489

    As noted, 100K is too large for the divider...

    As noted, 100K is too large for the divider resistors. I don't know if it's true for the T3.2, but on the T4.X
    I always add

    pinMode(inPin, INPUT_DISABLE);

    to make sure only the...
  11. I ran a test of the following collection loop ...

    I ran a test of the following collection loop with an input signal of about 2.36MHz:

    // Collect time stamps for rising edges
    void CollectSample(uint32_t numsamples) {
    uint16_t scount = 0;
    ...
  12. Access time to the registers is slower than...

    Access time to the registers is slower than normal DTCM memory access because the peripheral bus runs at only 150MHz, whereas the internal bus to DTCM memory runs at the 600MHz CPU clock rate.

    I...
  13. I wrote a test program to use the input capture...

    I wrote a test program to use the input capture capability on GPT2 and to save the data to SD. The program saves separate files for channels 1 and 2. It seems to work well with one channel at...
  14. Replies
    7
    Views
    464

    Your code with multiple "port.print(...)" ...

    Your code with multiple "port.print(...)" statement is very inefficient for the serial port. Each call will probably wait until it is finished to start the next statement. It should be much more...
  15. Here is a sample sketch showing intermittent...

    Here is a sample sketch showing intermittent capture of input pulse timing.



    // Fast_Stamp_4
    // Sketch to test fast intermittent time-stamp collection
    // M. Borgerson May 25, 2010
    ...
  16. Do you need continuous sampling? If not, could...

    Do you need continuous sampling? If not, could you use an intermittent sampling scheme where you collect data for 10 milliseconds, stop and write to SD card, collect another 10milliseconds, stop...
  17. I would make sure that you use Serial1 and...

    I would make sure that you use Serial1 and Serial2 as they have the 8-byte transmit and receive FIFOs and that will reduce the receive interrupt overhead.

    There's no real need to go through the...
  18. I'll need to see the code to give you any kind of...

    I'll need to see the code to give you any kind of definitive answer to that. My first GUESS is that doubling or tripling the sample rate caused some buffer overflows and you may need larger...
  19. The most straightforward way to do this is: ...

    The most straightforward way to do this is:


    uint32_t totalSamples = secondsToSample * SAMPLERATE; // pre-calculate number of samples needed based on duration of sampling

    volatile void...
  20. It should be straightforward to log for a fixed...

    It should be straightforward to log for a fixed amount of time by using an elapsedMillis timer which is reset when starting logging. In the loop you would add code to check the elapsedMillis timer...
  21. T4.X Frequency Counter using analog comparator

    After working for a while with downconverting 40KHz ultrasonic signals and thinking about the timing of conversions for Pk-Pk voltage measurement, I decided that I needed a T4 frequency counter that...
  22. A few experiments might prove interesting-----if...

    A few experiments might prove interesting-----if somewhat costly in Teensies and time:

    1. Does the timing of the damage change if you change the sampling speed and conversion speed?
    2. Does the...
  23. The voltage source was a signal generator with a...

    The voltage source was a signal generator with a 50-ohm output impedance.

    I think we need to make sure we are thinking of the same things. An accuracy of 0.01V means that the measured voltage is...
  24. If the EEClick can output a signal of up to 5V,...

    If the EEClick can output a signal of up to 5V, then your combination of 10-Ohm and 10KOhm resistors won't protect the Teensy. It only reduces the input voltage by one part in one thousand.

    To...
  25. On the basis that 100 lines of code is often...

    On the basis that 100 lines of code is often worth a thousand lines of discussion, I put together a simple program to test over and under-sampling an ~300KHz sine wave and calculating the...
  26. The ADC on the T4.0 can be set up with an...

    The ADC on the T4.0 can be set up with an aperture time of 100nSec or less. @Samsurp specified an accuracy of 0.01Volts in a 4.5 Volt signal, so a 10-bit resolution should be sufficient. I think...
  27. Unless you subsample at a frequency that is an...

    Unless you subsample at a frequency that is an exact sub multiple of the input sine wave, you will eventually take a sample at a maximum and minimum point. The key to getting this to work is to know...
  28. Replies
    9
    Views
    1,260

    The nice thing about designing systems with a few...

    The nice thing about designing systems with a few really expensive sensors is that the funding agencies don't quibble about the cost of upgrading to an MPU with more memory or better peripheral...
  29. Replies
    9
    Views
    1,260

    The one used on the oceanographic sensors was the...

    The one used on the oceanographic sensors was the FP07DA103N when I last worked there in 2018. That is a 10K Ohm at 20 deg C unit. It's not in stock at DigiKey, but the 8K Ohm version is...
  30. Replies
    9
    Views
    1,260

    Let's look at the energy balance. Assume you...

    Let's look at the energy balance. Assume you want 8 gallons of water at 160F. Your cold water tap yields water at 60F. Boiling water is 212F.

    The boiling water is 52 degrees away from the...
  31. It just occurred to me that this down-conversion...

    It just occurred to me that this down-conversion scheme might be a nice way to put together an ultrasonic doppler velocity sensor. I've got a handful of 40KHz ultrasonic sensors in the toolbox and...
  32. I played around with LTSpice a bit this morning...

    I played around with LTSpice a bit this morning and designed a 4-pole Butterworth bandpass filter with about 6dB gain from 38 to 42KHz and -40dB rejection at 19KHz and LOTS more at 60Hz. It takes a...
  33. My vague recollections that sub-sampling might do...

    My vague recollections that sub-sampling might do the downshifting seems to be valid. I wrote a simple program to collect ADC data at 38KHz and fed it a 40KHz sine wave from my signal generator. ...
  34. I'll have to review my understanding of signal...

    I'll have to review my understanding of signal processing, but it seems you might solve this problem by under-sampling your input at 38KHz. The output may look like a 2KHz sine wave. You may need a...
  35. I'm not sure those are the parts I found by...

    I'm not sure those are the parts I found by stepping through the DigiKey search process, but I'm strongly biased toward them. It was DigiKey that made it possible for me to start a small board...
  36. The last time I played around with the ARM CMSIS...

    The last time I played around with the ARM CMSIS FFT on the Teensy it was with the T3.6. I found that a Real FFT took about 1.02mSec for FFT1024 with a Hanning window. A friend is working over the...
  37. Replies
    966
    Views
    123,361

    I just transferred a solar energy evaluation...

    I just transferred a solar energy evaluation program from the T3.6 that I used last summer to the T3.5. I ran into some compilation issues in MTP.h and MTP.cpp in the tests for processor type:
    ...
  38. I dug out my LT1867L board and recorded a data...

    I dug out my LT1867L board and recorded a data file with all 8 channels connected to a 1.5V alkaline battery and sampled at 4000 samples/second. Data from each of the first four channels passed...
  39. The LT1867 is a capacitive Successive...

    The LT1867 is a capacitive Successive Approximation ADC. The input acquisition time is a nominal 1.1 microseconds, independent of the sample rate.

    As noted, it is imperative to have good...
  40. I've used an LT1867 board from another project to...

    I've used an LT1867 board from another project to successfully collect data on the T3.6. Here is the part of the code that interacts with the LT1867:


    ...
  41. Or you could consider using an SD File that is...

    Or you could consider using an SD File that is pre-allocated. This avoids the necessity for the file system to scan the FAT to find the next file cluster.
  42. Replies
    5
    Views
    507

    Excellent point. I've gone so far as to add a...

    Excellent point. I've gone so far as to add a label to the silkscreen for things like SCK, MOSI, MISO, etc. etc. The vias generally take less than half the PCB area of a normal test point. Some of...
  43. That was my thought too. A closer examination of...

    That was my thought too. A closer examination of the timing of the low-current part shows that those periods last about the same interval as the timing info shows for an average update of the...
  44. Replies
    5
    Views
    507

    Been there, done that. I got past the problem at...

    Been there, done that. I got past the problem at the prototype stage by finding a convenient place to cut the traces and do an "X" set of jumpers to switch the signals. I've also added pull-ups by...
  45. Funny you should ask! A few days ago, I had a...

    Funny you should ask! A few days ago, I had a setup to measure power consumption of the T4.1 while writing to the SD Card. The setup uses a high-side current sensor on the T4.1 power input and...
  46. Replies
    9
    Views
    908

    I took a quick look at the GitHub repository and...

    I took a quick look at the GitHub repository and I will probably try implementing it later today. A few things still bother me:

    1. The endpoint definitions are different between the T3 and T4...
  47. Replies
    9
    Views
    908

    In a post on this thread: ...

    In a post on this thread: https://forum.pjrc.com/threads/66265-Fastest-way-to-transfer-data-to-from-Teensy-4-0-4-1-and-Windows-10

    I gave examples of python scripts and a Teensy 4.1 sketch that...
  48. Replies
    966
    Views
    123,361

    FWIW, I've attached a PDF schematic from a data...

    FWIW, I've attached a PDF schematic from a data logger from about 12 years ago---back when 32GB SD cards were the largest available and cost $50 to $75 dollars each. We needed 128GB of storage, so...
  49. Luni: Feel free to put the python scripts on the...

    Luni: Feel free to put the python scripts on the wiki page.
  50. Replies
    10
    Views
    798

    Using all three I2C ports may give you 3x the...

    Using all three I2C ports may give you 3x the sampling rate that you would get with a multiplexer. Answering the following questions might get more complete responses:

    1. What are your desired...
Results 1 to 50 of 350
Page 1 of 7 1 2 3 4