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

Search:

Type: Posts; User: mborgerson

Page 1 of 7 1

1. Thread: T4.X Frequency Counter using analog comparator

by mborgerson
Replies
0
Views
114

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...

by mborgerson
Replies
22
Views
1,259

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...

by mborgerson
Replies
13
Views
377

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...
4. Thread: voltage splitter to avoid 5V input to teensy 4.1

by mborgerson
Replies
2
Views
104

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...

by mborgerson
Replies
13
Views
377

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...

by mborgerson
Replies
13
Views
377

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...

by mborgerson
Replies
13
Views
377

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...
8. Thread: POU Hot Water Source (beer brewing)

by mborgerson
Replies
9
Views
815

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...
9. Thread: POU Hot Water Source (beer brewing)

by mborgerson
Replies
9
Views
815

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...
10. Thread: POU Hot Water Source (beer brewing)

by mborgerson
Replies
9
Views
815

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...
11. Thread: Mixing/Shifting ultrasonic frequency to audible spectrum

by mborgerson
Replies
8
Views
286

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...
12. Thread: Mixing/Shifting ultrasonic frequency to audible spectrum

by mborgerson
Replies
8
Views
286

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...
13. Thread: Mixing/Shifting ultrasonic frequency to audible spectrum

by mborgerson
Replies
8
Views
286

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. ...
14. Thread: Mixing/Shifting ultrasonic frequency to audible spectrum

by mborgerson
Replies
8
Views
286

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...
15. Thread: Where can I buy a 24Pin female pin header for use with the teensy 4.1.

by mborgerson
Replies
12
Views
497

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...
16. Thread: Genericize FFT? Also window functions representation

by mborgerson
Replies
5
Views
635

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...

by mborgerson
Replies
909
Views
71,904

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:
...

by mborgerson
Replies
8
Views
248

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...

by mborgerson
Replies
8
Views
248

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...

by mborgerson
Replies
8
Views
248

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:

...
21. Thread: Writing to flash or sd card on power loss

by mborgerson
Replies
13
Views
431

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.
22. Thread: bitbang i2c without pullup resistors?

by mborgerson
Replies
5
Views
264

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...

by mborgerson
Replies
5
Views
223

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...
24. Thread: bitbang i2c without pullup resistors?

by mborgerson
Replies
5
Views
264

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...

by mborgerson
Replies
5
Views
223

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...
26. Thread: Access sd card via usb?

by mborgerson
Replies
9
Views
333

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...
27. Thread: Access sd card via usb?

by mborgerson
Replies
9
Views
333

In a post on this thread: ...

I gave examples of python scripts and a Teensy 4.1 sketch that...

by mborgerson
Replies
909
Views
71,904

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...
29. Thread: Fastest way to transfer data to/from Teensy 4.0/4.1 and Windows 10?

by mborgerson
Replies
8
Views
419

Luni: Feel free to put the python scripts on the...

Luni: Feel free to put the python scripts on the wiki page.
30. Thread: Best way to connect 6 IMUs to Teensy 4

by mborgerson
Replies
10
Views
323

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:

31. Thread: Fastest way to transfer data to/from Teensy 4.0/4.1 and Windows 10?

by mborgerson
Replies
8
Views
419

Rather than post hundreds of lines of C++ Builder...

Rather than post hundreds of lines of C++ Builder code that you could build to illustrate data transfers that take only a few dozen lines, I bit the bullet and came up with a couple of Python...
32. Thread: Fastest way to transfer data to/from Teensy 4.0/4.1 and Windows 10?

by mborgerson
Replies
8
Views
419

I've had good results transferring data at rates...

I've had good results transferring data at rates over 10MB/second using the USB Serial port. I've recently found that it makes things simpler to use the USB Dual Serial setup. I use SerialUSB1...
33. Thread: Finding the right sensor for a photography project

by mborgerson
Replies
8
Views
311

I think a neat approach would be to build your...

I think a neat approach would be to build your own switch with some brass sheet stock from the local hobby shop:

T___________NUT_
^____________G

The 'T' is a terminal for a...
34. Thread: Teensyduino 1.54 Beta #6

by mborgerson
Replies
91
Views
4,334

Tested B6 with Radiohead library and two NRF24LO1 modules with LNA and power amplifiers. Good comms between T4.0 and T4.1 at default power and SPI settings over about 30 feet inside the house. ...
35. Thread: Slide Show now sends to PC

by mborgerson
Replies
0
Views
121

Slide Show now sends to PC

This is an improved Slide Show display. The QVGA slide images and transitions were recorded with the Win10 screen recorder. The slide images and transitions were sent to the PC host application...
36. Thread: Teensyduino 1.54 Beta #6

by mborgerson
Replies
91
Views
4,334

Installed on Win10x64 Home. All the following...

Installed on Win10x64 Home.

All the following compiled and ran on T4.1 without problems (except the ever present warning about using Timelib.h vs Time.h):

OV7670 Camera test with JPG...
37. Thread: Minimalistic SdFat Datalogger for Teensy4.1 - Example?

by mborgerson
Replies
15
Views
571

I stripped down a logger I wrote some time ago to...

I stripped down a logger I wrote some time ago to the bare bones:
* Open SD file
* write binary records consisting of timing data and 5 ADC values to a buffer
* when buffer is full, swap...
38. Thread: Best method to stream data from USB HS?

by mborgerson
Replies
2
Views
199

Using the default Teensy Serial USB, I can send...

Using the default Teensy Serial USB, I can send about 22MB/second to my PC data logger host app. Your host application has to be optimized for data transfer---the only screen output I use is a byte...
39. Thread: Teensy 4.1 - clock output capability for high speed ADC

by mborgerson
Replies
1
Views
220

You could get 75MHz by setting analogoutfrequency...

You could get 75MHz by setting analogoutfrequency on a PWM-capable pin. I think that's as high as you can go as it is 1/2 the bus frequency of 150MHz. Perhaps you could get 80MHz by overclocking...

by mborgerson
Replies
7
Views
663

I've created a GitHub repository with the...

I've created a GitHub repository with the Slideshow library. The repository has the Slideshow class, an example program, and 5 files that are used by the example program. The repository is here: ...

by mborgerson
Replies
7
Views
567

The open once, write and flush many times,...

The open once, write and flush many times, close once process is more efficient with larger writes to SD. When you do small writes, like your 64 bytes, it is not so efficient, as the system has to...

by mborgerson
Replies
7
Views
663

I figured out how to get a better video of the...

I figured out how to get a better video of the slide show transition. This video was taken from the display of the slide show app I plan to post on GitHub tomorrow.

https://youtu.be/48MEkTOLv2I...

by mborgerson
Replies
7
Views
663

I think I'll have it on GitHub sometime tomorrow....

I think I'll have it on GitHub sometime tomorrow. The code seems pretty stable now, but I need to clean up excess debug statements and add some documentation.

I suppose I could add a few more...

by mborgerson
Replies
7
Views
567

Rather than opening and closing the files, you...

Rather than opening and closing the files, you could simply call the flush() function. That function writes currently buffered data to the SD and updates the length in the directory. IIRC, it is...

by mborgerson
Replies
7
Views
567

An important thing to remember is that the SD...

An important thing to remember is that the SD write routines in the latest version of SD (which is actually like SDFAT 2.0B under the hood) takes only a handful of microseconds to write to the SD...

by mborgerson
Replies
7
Views
663

Okay, here is a video from a slide show run on...

Okay, here is a video from a slide show run on the T4.1 and using the pixel pipeline for transitions and pan and zoom effects during slide display.

https://youtu.be/yRxyfhdJfHc

The video...

by mborgerson
Replies
7
Views
608

Could you just divide the input signal by two...

Could you just divide the input signal by two with an appropriate flip-flop or counter IC? You would lose some resolution, but you would not have to worry about messing with the software innards of...
48. Thread: 1 MSPS on a T4? Is this possible...

by mborgerson
Replies
57
Views
4,718

I assume that you are driving the sensor with 5V...

I assume that you are driving the sensor with 5V and ground for your power. The outputs should be at about 2.5V each. The T4.1 ADC has an input limit of about 3.3Volts, so you probably need a...
49. Thread: 1 MSPS on a T4? Is this possible...

by mborgerson
Replies
57
Views
4,718

The output data from the 1MSample logger is a...

The output data from the 1MSample logger is a binary file with a sequence of 16-bit unsigned integers. Each integer can have a value between 0 and 4095, which represents the range of values output...