M
Reaction score
11

Latest activity Postings About

    • M
      If you want to sample the same signal with two different ADC channels, or even connect one signal to both an ADC input and a comparator input, you may need a couple of amplifiers to divide the signal into two (or more) parts, each having a low...
    • M
      My USBTMC (USB Test and Measurement Class) code has progressed to the point where I'm optimizing the data transfer functions that move data packets from the connected devices to the host. The USBTMC specification mandates request/response model...
    • M
      Sorry about that. I'm in the middle of a cold caught on return from a family vacation trip. This link may be more useful Fast ADC sampling I'll look at your other questions the first morning after I get more than four hours of sleep!
    • M
      At the top of the Boards.txt file is a reference to a workaround to make Arduino recognize changes to boards.txt. Boards.txt workaround the suggestion there is to delete the file "User Data" That file no longer exists in IDE 2.3.1. The...
    • M
      Not entirely true. If you use the ADC timer functions in the ADC library, ADC Collection is started by the hardware. The response to the interrupt and the processing and storage of the results may be delayed a bit by other interrupts, but...
    • M
      This project is definitely going to be published---it's free of the NDAs that hinder the distribution of the FLIR Boson source code. It's a Work-In-Progress that will probably occupy a good part of my non-travel time over the next several...
    • M
      In a now-closed thread, @PaulStoffregen said: In the process of developing my USBTMC (USB Test and Measurement Class) driver, I have found it necessary to also modify usb_desc.c to insert the descriptor data from usb_desc.h into the executed...
    • M
      There are some issues you need to consider: 1. How noisy is your input signal? This will determine how much hysteresis you will need in determining the zero crossing. 2. How often do you need to collect this data? 3. Will the results be...
    • M
      Update: It seems you can make cosmetic changes to the USB type menu, and long as you don't change the number of items or their order. In boards.txt: teensy41.menu.usb.serial=Serial teensy41.menu.usb.serial.build.usbtype=USB_SERIAL...
    • M
      At the top of boards.txt for TD 1.59 there is this: # Solution for Arduino IDE 2.0 recognizing changes to this file: # https://github.com/arduino/arduino-ide/issues/1030#issuecomment-1152005617 The solution at GitHub from @per1234 is: I'll...
    • M
      mborgerson replied to the thread FFT not working properly.
      I shouldn't do these things late at night! There's a bug in the code to extract the fft samples from the buffer. It should be: vReal[ j ] = adc_volt[start+j ]; vImage[ j ] = 0; // still not sure if this needs to be done more than once!
    • M
      mborgerson replied to the thread FFT not working properly.
      It looks like you are calling your fft() function 30,000 times, but you only use the values from 0 to SAMPLES each time! You don't seem to ever do the FFT over the rest of the sample. 1. Subtract the mean as you are doing in your loop. DO...
    • M
      mborgerson replied to the thread Teensy AD sampling.
      I did the correlation experiments about 3-4 years ago. I've attached a zip file with several sample sketches. Most were done with a T3.6, so that I could use the onboard DAC for signal output. I think you could probably get by with a 3-bit...
    • M
      mborgerson replied to the thread Magic numbers in usb_desc.c.
      Thanks for the link to USB in a Nutshell. I'll look it over. I didn't add anything to the descriptor list and the USBTMC device seems to enumerate properly. The USBTMC device, as I have it now, has the standard USB Serial interface and...
    • M
      I am modifying the usb descriptors defined in usb_desc.c to add the USB Test and Measurement class device. I think I have most of it correct, as my device seems to enumerate properly. At the end of the file there is code to build a descriptor...
    • M
      mborgerson replied to the thread Teensy AD sampling.
      I'm not sure that the Audio library will work well with a 70KHz signal. I think the Audio signal chain is designed around 44.1KHz sampling of signals up to about 20KHz. For a 70KHz signal you will need input amplifiers with greater bandwidth and...
    • M
      I've made enough progress in my USB Test and Measurement Class (USBTMC) host and device drivers to start the initial hardware testing with one T4.1 host connected to one T4.1 device. My initial tests will skip the implementation of the USBTMC...
    • M
      You could also add a LED blink during the expected playback time. #include <Audio.h> //#include <Wire.h> //#include <SPI.h> #include <SerialFlash.h> // GUItool: begin automatically generated code AudioPlaySdWav playSdWav1...
    • M
      I checked the IMX-RT1062 reference manual. It tells me that the MQS outputs are PWM outputs suitable for directly driving a speaker or headphones. The next steps in troubleshooting would be: 1. If you don't have the T4.1 audio shield, get...
    • M
      The boson camera project is not about making a device that looks like a UVC device to a host. It is the development of a Teensy Host driver to read data from an actual FLIR Boson camera connected to the T4.1 host USB port. The driver is...
    • M
      I'm at the point of writing a Claim() function for my USBTMC device driver. A starting point for most Claim() functions is a check of the USB VID and PID. The VID will be the Teensy VID, 0x16C0, as is the case for all existing Teensy USB...
    • M
      Oops, Forgot to scroll up to the scope pics. Sorry.
    • M
      Perhaps the asm("wfi"); overrides anything done earlier in loop(); Are you looking at pin 13 with an oscilloscope? Perhaps setting pin 13 high (or low) in setup() would be instructive..
    • M
    • M
      I've gotten the pseudo TMC device to enumerate: SERENUM + USBTMC configuration during enumeration Configuration Descriptor: 09 02 40 00 02 01 00 C0 32 NumInterfaces = 2 ConfigurationValue = 1 Interface = 1 Number of endpoints...
    • M
      A few notes: 1. When you post code, use the "</>" button to open a window into which you past your code: #include <Audio.h> #include <Wire.h> #include <SPI.h> #include <SerialFlash.h> // GUItool: begin automatically generated code...
    • M
      I stand corrected. Perhaps I was confusing the T4.1 with an older Cortex-M4 system from 10 years ago, which may have had a different implementation of systick. On the principle of "trust, but verify", I wrote a more instrumented version of the...
    • M
      mborgerson replied to the thread FFT not working properly.
      Your algorithm for correcting the DC Offset is the problem here. You should NOT calculate the sum and correct the offset inside READ_ADC()! sum should be a local variable in loop.. Set it to zero just before Use READ_ADC() to collect raw...
    • M
      I'm actually asking about both. I want to set up one T4.x to be TMC device. It will collect data from various sensors and forward that data to a host. The Host T4.1 will have a USBTMC driver that will enumerate and connect to one or more...
    • M
      Hmmm, Is the capacitance in the Teensy and power supply sufficient that you don't see negative-going spikes when the Systic timer fires off? Intermittent current spikes can result in hard-to-diagnose problems if the supply lacks the capability...
    • M
      I'll try overriding Print long enough to test enumeration and see how far I get with the driver. Another question: Since there are no other devices derived from the USBTMC class, where do I define the DeviceClass and DeviceSubClass values...
    • M
      mborgerson replied to the thread FFT not working properly.
      The linked paper is not only thorough, but very well written. You don't need a math degree to understand the discussion and they provide pointers to real-world software and great figures showing the results of various approaches to spectral...
    • M
      I'm working on the development of a USB Serial Bus Test and Measurement Class (USBTMC) device as a way for a T41 Host to have one or more other Teensies as data collection devices which send their data to the host for analysis, display, and...
    • M
      mborgerson replied to the thread Project Advice - USB Tester.
      Data comes to your Teensy via USB only when the Host requests it. The host breaks USB transfers up into micro Frames which request data from the connected devices at 125uSec intervals. I'm not sure of the difference between your two devices...
    • M
      mborgerson replied to the thread FFT not working properly.
      Your correction for offset is using an IIR filter to calculate the dc_offset. That will take several hundred samples to stabilize near the actual DC offset. (This actually shows up in your plot). If you include those samples in the FFT...
    • M
      This sounds like the kind of problem I'm thinking about in my NYWWIP (Not-Yet-Working_Work-In-Progress). If I get it working, one T4.1 would handle two SPI converters and send the data to T4.1 #2 over a fast, block-oriented USB link with minimal...
    • M
      A bit of searching in the Teensy forums should yield some sample sketches. I know I've posted several over the last few years. Note that , until very recently,"External RAM" meant the QSPI external Pseudo-Static RAM, which maxes out at about...
    • M
      The T4.1 USB is limited to the 480MBits/second rate of USB 2.0. Even though your PC supports the higher rates of USB 3.0, it falls back to USB 2.0 rates when connected to a Teensy. The T4.1 hardware just cannot toggle bits on the data lines...
    • M
      USB Serial on the T4.1 uses the built-in IMX-RT1062 USB controller to send and receive data. When you write bytes to the Serial device on the T4.1, the driver accepts the bytes, puts them into a circular queue of buffers and transmits the...
    • M
      in the 'gotchas' column of the timing function table it says: "Variables must be outside functions. Avoid compare equals." Yet the timeout waiting for input example has the 'waiting' variable inside loop();
    • M
      in the 'gotchas' column of the timing functions table it says: "Variables must be outside functions. Avoid compare equals." However, the timeout waiting for input example has the 'waiting' elapsedMillis variable defined inside loop().
    • M
      Do you, perchance, have while(!Serial){} at the beginning of your setup()????
    • M
      Early in my development of a driver for Bulk-mode USB collection of video data, I ran some experiments connecting two T4.1s using USB Host Serial on one board and USB Serial on the other. (This required modification of the Host Serial driver...
    • M
      Do you have #include <SD.h> before #include <USBHost_t36.h> USBHost_t36.h Basic.ino includes <FS.h>. Perhaps that doesn't play well with the newer versions of SD.H In my own heavily modified library, I delete the include of FS.h and...
    • M
      If, as I suspect, the data is arriving at one of the hardware Serial ports, the interrupts and buffering require only a few lines of code. for 4 x uint16_t + 1 x uint32_t (Data + time stamp) at 10KHz, you need (12 bytes ) * 10000 or 120,000...
    • M
      Your overall rate of 173MB/hour is well within the capabilities of the T4.1 SD card, which can write ~ 20MBytes/second. There are lots of data logger examples you can use to put together a logger to handle that much data. You don't specify...
    • M
      I think the comment about not knowing which pin of the barrel jack connects first is something to pursue. If the 28V from the external supply is connected before the ground for the LM2596 and Teensy you might get a spike at the regulator...
    • M
      If you are using a pin with the ADC. you should not use "pinMode(A0, INPUT);" That makes internal connections appropriate for digital inputs. You should use "pinMode(A0,INPUT_DISABLE);" which removes resistors that can affect signals near the...
    • M
      I used a UBlox ZED09F9R in a logger developed last year. It's expensive, but it includes acceleration sensors and wheel-tick inputs. Since it will work with all major GNSS constellations, it gives pretty good accuracy. Like all GPS systems...
    • M
      mborgerson replied to the thread USBHost error recovery.
      Yeah, the camera retails for about $3500. I suppose you could drive the 5+ miles to Teledyne/FLIR and ask them for a loaner ;-) I'm now avoiding the issue by using only control transfers that work. It turns out that it is not necessary to...
  • Loading…
  • Loading…
Back
Top