Search results

  1. rjsdotorg

    Multi-channel Teensy 4.* ADC capture project with high-rate USB streaming, SD logging, and Python-based capture/plot tools.

    For the couple dozen who have cloned it, you might want the update today. I tested more with one and two channels.
  2. rjsdotorg

    Fast Data Logger

    https://github.com/rjsdotorg/ADC This version is up to 14 channels (uses DMA and faster if only 2) and streams and/or logs data to uSD. 2 channels streams up to 1.3MHz to a laptop or uSD. Tested with Teensy 4.0, still developing BTW this has the uSD holder soldered to the board whereas the 4.1...
  3. rjsdotorg

    Multi-channel Teensy 4.* ADC capture project with high-rate USB streaming, SD logging, and Python-based capture/plot tools.

    https://github.com/rjsdotorg/ADC This version is up to 14 channels, and streams and/or logs data to uSD. 2 channels streams up to 1.3MHz to a laptop or SD. Tested with Teensy 4.0, still developing
  4. rjsdotorg

    "Could not open comm port 'COMM3' " fix (or any WIndows port...)

    The Python in the capture was simply first in the list of the PS command output, with "Arduino IDE" down the list. The gist was simply the use of Get-CimInstance to debug when in Windows. BTW VS Code running PlatformIO does use Python in its toolchain. I just tried to replicate the whole...
  5. rjsdotorg

    "Could not open comm port 'COMM3' " fix (or any WIndows port...)

    VS Code / PlatformIO said "COMM" Python process was just an Get-CimInstance output example - I had been running Arduino IDE for a while then switched to VS Code which failed due to zombie processes holding the port. Sorry, it was unclear. I had learned to use Get-CimInstance to track down the...
  6. rjsdotorg

    3.3V input pin voltage with USB power?

    I think I have another to try. I don't have a scope but do have a nice AS-1250 ADC to check the pin V separately. The STD is small. A 3V battery would be a good test too. Part of the idea here is to turn any Teensy into a 1.3 MHz triggered O-scope, and I'll put a Zener and resistor on A0 to test...
  7. rjsdotorg

    3.3V input pin voltage with USB power?

    Now with both channels at 1.3MHz! https://github.com/rjsdotorg/ADC
  8. rjsdotorg

    3.3V input pin voltage with USB power?

    As one might expect, the STD rises with rate (12 bit counts):
  9. rjsdotorg

    3.3V input pin voltage with USB power?

    BTW, the .cpp is attached, and serial cap code is below (can't attach...). Output is 1339.4 ksamp/sec streaming uint32 over USB 2 """ serial_capture.py – Capture Teensy ADC DMA USB streamer data into a numpy array. The Teensy firmware streams raw binary uint16_t samples in 512-byte...
  10. rjsdotorg

    3.3V input pin voltage with USB power?

    I looped the 3.3 V pin to A0, the board is powered by USB/laptop. I have a new streaming .cpp code which streams one channel of data at 150k back to the laptop running Python serial capture. It appears to vary from ~3.22 to 3.26V - does that seem typical?
  11. rjsdotorg

    "Could not open comm port 'COMM3' " fix (or any WIndows port...)

    I was using Arduino IDE and then switched to VS Code. I "closed" Arduino/Teensduino but several Arduino processes were still left running. I did a PS script: Get-CimInstance Win32_Process | Where-Object { $_.ProcessId -in 7708,4544,9920,13008 } | Select-Object ProcessId,Name,CommandLine |...
  12. rjsdotorg

    Fast Data Logger

    I ran the test 7 times and saw quite a variation in max busy: rbMaxUsed 1280 12032 1280 768 6656 768 min write us 4.68 4.68 4.68 4.68 4.68 4.68 max write us 5.54 5.53 5.54 5.54 5.54 5.69 min busy us 18 17 18 18 18 18 max busy us 1390 11674 1380 822 6412 823
  13. rjsdotorg

    Fast Data Logger

    slash2 with your test and Type is exFAT Card size: 63.86 GB (GB = 1E9 bytes) Manufacturer ID: 0X3 OEM ID: SD Product: SP64G Version: 8.0 Serial number: 0X28D120F8 Manufacturing date: 1/2012 I get about 2x your max busy us :
  14. rjsdotorg

    Fast Data Logger

    joepasquariello I don't quite see why 256 here? #define BUFLEN (256) // bytes per write
  15. rjsdotorg

    Fast Data Logger

    My own bench.ino tests with Sandisk XC is ~23MB/sec over SDIO, 2x faster than HC: FreeStack: 449400 Type is exFAT Card size: 63.86 GB (GB = 1E9 bytes) Manufacturer ID: 0X3 OEM ID: SD Product: SP64G Version: 8.0 Serial number: 0X28D120F8 Manufacturing date: 1/2012 FILE_SIZE_MB = 5 BUF_SIZE = 512...
  16. rjsdotorg

    ADC tests for TCD1304DG

    I was being approximate 10.7 ENOB is from https://www.pjrc.com/teensy/IMXRT1060CEC_rev4.pdf OS typically adds 0.5 bits of resolution for every doubling of the sampling rate, I usually rely on oversampling and exponential averaging / filter - I'm not sure what the IMXRT1060 does exactly with its...
  17. rjsdotorg

    ADC tests for TCD1304DG

    Are you still using analogRead()? You should really consider the DMA ADC examples in the Teensy set. Mine attached does 1.17Mhz (one channel) with no averaging so ~10 real bits and with 8x averaging you should get almost 12 real bits and still ~130ksmp/s
  18. rjsdotorg

    Teensy 4.0 PWM glitching every 4-5s, at 500Hz for high duty cycles

    As an update, I'm thinking that the behavior is mostly in the controller of the BLDC (can't update first post now). "specs" say "PWM signal speed regulation around 10-20kHz" but actually runs from hundreds up to 100kHz. "signal feedback requires pull-up resistor." which sounds like open-drain...
  19. rjsdotorg

    Let's talk of possible new accessory boards

    A Teensy-based time lapse camera would be, well, based...
  20. rjsdotorg

    Teensy 4.0 PWM glitching every 4-5s, at 500Hz for high duty cycles

    I have a small BLDC motor (5 wire with internal control board) and doing PWM control. As per the Teensy docs: Anytime you are doing PWM at high duty cycle it glitches every 4.3-5s, with exactly 500Hz. This is with or without a 4.7k pull-up. Ie, analogWrite(2, 255); enables it - actually >=240...
  21. rjsdotorg

    Overclocking The Teensy 4.1 and Teensy 4.0

    FWIW I have a 4.0 overclocked to 916Mhz with a 1cm^2 heatsink and only see 50C running a modified SD bench. 916 might not be needed, I'll see when I finish ADC processing code.
  22. rjsdotorg

    Fast Data Logger

    I searched for @beermat and SDIO etc but found no posts. Google either...
  23. rjsdotorg

    Why is my microSD card misbehaving? (Micromod Teensy)

    Ah yes. But why are the benchmarks nowhere near 120MB/s?
  24. rjsdotorg

    Why is my microSD card misbehaving? (Micromod Teensy)

    I just bought/tested a "new" uSD Sandisk 32GB Ultra UHS-1 to compare with older models. Using SDIO and inserted in solder-on connector to Teensy 4.0. In left-right order, SdFat/bench.ino example results: Use a freshly formatted SD for best performance. Type any character to start...
  25. rjsdotorg

    Teensy Quick Reference: Code Examples, Tips and Tricks

    Yes, a lot of the first post is now 404
  26. rjsdotorg

    Run-time non-volatile read and write to flash or SD card

    Look at the Bill Greiman example TeensyDmaAdcLogger.ino I also have some test code that writes ADC samples to uSD at 1.1MHz Using the Teensyduino library with Visual Studio Code does allow the helpful use of GitHub Copilot
  27. rjsdotorg

    Let's talk of possible new accessory boards

    If accel is planned, please use ISM330DHCX. I think it has the best specs for small SMD at the moment. I use it with Pi Zero 2W Is CSI (Camera Serial Interface) ribbon connector in the realm of possibility?
  28. rjsdotorg

    Periodic click when saving ADC input to SD card

    Ah I think I see And Bill Greiman did not use file.is_busy() in his example TeensyDmaAdcLogger.ino if (n >= 512) { // could be if ((n > 512) && !file.isBusy()) { if (rb.writeOut(512) != 512) { Serial.println("writeOut() failed"); file.close(); return; } }...
  29. rjsdotorg

    Periodic click when saving ADC input to SD card

    With the main.cpp code RMS noise is ~15 counts at 12 bits and no averaging, 1.17Msamp/s. Here is one second of photodiode data no data jumps/missing even at high slew rates:
  30. rjsdotorg

    Periodic click when saving ADC input to SD card

    Good non-ISR examples using `writeOut()`, but currently working on the ISR version from RingBuf.h and TeensyDmaAdcLogger.ino * This ring buffer may be used in ISRs. Use beginISR(), endISR(), write() * and print() in the ISR and use writeOut() in non-interrupt code * to write data to a file. I...
  31. rjsdotorg

    I need help with an SdFat ADC DMA ISR example

    In addendum to another post, here is my modified version of RingBuf ISR example (based on TeensyDmaAdcLogger.ino) It always does 512 byte writes, but I can't follow in the lib to see if it does: - always test for SD.is_busy() - write only if SD is NOT BUSY
  32. rjsdotorg

    Periodic click when saving ADC input to SD card

    This uses Bill Greiman's RingBuf.h, and I can't follow it very well, yet, and don't see an *.is_busy(). However VS Code Copilot seems to have found and fixed the main issue "adjusted buffer allocation and pointer math so BUF_BLOCK_SIZE is treated as bytes (fixes cache invalidation/offset...
  33. rjsdotorg

    Periodic click when saving ADC input to SD card

    I am testing a modified TeensyDmaAdcLogger.ino example (attached) with a ping-pong buffer of 2 by 512 // Preallocate .5GiB file, multiplying 8 by 2^26, resulting in a value of 536,870,912 bytes, or 512 megabytes (MB) const uint64_t PRE_ALLOCATE_SIZE = 8ULL << 26; // Ping-pong DMA buffer. DMAMEM...
  34. rjsdotorg

    1.0mm breakout connector for the Teensy 4.0 uSD pads ?

    In my case, I'm happy to say that switching from the Adafruit SDIO SD board to the soldered-on simple holder on the Teensy 4.0 made all the difference.
  35. rjsdotorg

    Periodic click when saving ADC input to SD card

    In my case, I'm happy to say that switching from the Adafruit SDIO SD board to the soldered-on simple holder on the Teensy 4.0 made all the difference. Same 10 year old Sandisk 16GB HC card, no blips at 256 byte intervals. Photodiode card on pin14/ADC0, 586ksmp/s: However, I do see what appear...
  36. rjsdotorg

    Periodic click when saving ADC input to SD card

    Google AI mode just told me this which I'm testing: To use the ADC library (by Pedvide) with manual DMA control, you utilize the library to configure the ADC hardware while using DMAChannel.h to manually set the TCD registers. Manual ADC-to-Memory Configuration This setup captures 128 samples...
  37. rjsdotorg

    Periodic click when saving ADC input to SD card

    pseudo-code still might help others I am (currently) just writing to uSD at 553ksmp/s, and, also getting the every-512 byte glitch. You can see it is also railing the ADC occasionally:
  38. rjsdotorg

    Periodic click when saving ADC input to SD card

    What is your current code, if I may ask?
  39. rjsdotorg

    Periodic click when saving ADC input to SD card

    I also just read that pinMode(<pin>, INPUT_DISABLE); should be added for analog inputs. I have not tested yet, but will. I am assuming it is the case for ADC0... ? Also here
  40. rjsdotorg

    1.0mm breakout connector for the Teensy 4.0 uSD pads ?

    I wish they were for sale (?) I would have done that instead. We have also ground down board edges to create castellations, but if pre-populated we used stripped 30ga as jumpers - Bill was worried about static during grinding: (That was MSP430 based deep sea camera)
  41. rjsdotorg

    1.0mm breakout connector for the Teensy 4.0 uSD pads ?

    I had to think on that too What Pio does with his (very nice) board is swap using 2 layers:
  42. rjsdotorg

    1.0mm breakout connector for the Teensy 4.0 uSD pads ?

    As someone pointed out, the part is 1.1mm pitch, while the pads are 1.0mm
  43. rjsdotorg

    1.0mm breakout connector for the Teensy 4.0 uSD pads ?

    The Molex 1051620001 arrived and I soldered one on. FYI this really calls for solder paste and a microscope. I bent 1,2 & 7,8 inwards a tad, soldered and had to use wick to remove excess on a couple. The mechanical issue is that the card rubs on the 2 SMDs and needs tape under it so as not to...
  44. rjsdotorg

    Periodic click when saving ADC input to SD card

    As someone suggested, I tried a 47uF cap at the power input to the SD hat, which made a barely discernible difference. I have not added anything to the Teensy 4.0
  45. rjsdotorg

    1.0mm breakout connector for the Teensy 4.0 uSD pads ?

    Shouldn't be too bad (I hope). I did not see the exact which is part on the 4.1... (?) I also bought more SDIO breakouts
  46. rjsdotorg

    1.0mm breakout connector for the Teensy 4.0 uSD pads ?

    I ordered the Molex 1051620001, so I'll test next week.
  47. rjsdotorg

    Periodic click when saving ADC input to SD card

    BTW this is my Python viewer code I keep on the uSD card: import struct import matplotlib.pyplot as plt format_string = 'H' dl = struct.calcsize(format_string) l = [] with open('IsrLoggerTest.bin', 'rb') as file: while True: raw_data = file.read(dl) if raw_data!=b''...
  48. rjsdotorg

    Periodic click when saving ADC input to SD card

    I saw that Greiman's post does not seem to suffer ticks with the 4.1 I am using my 4.0 boards and Adafruit SDIO board with ADC0. With them I see a VREF-related (?) glitch every 256 samples, which is the 512 byte write points. It is erratic for 28 samples at 815ksamp/s, droops then rises ~42mV...
Back
Top