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

Search:

Type: Posts; User: mborgerson

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    5
    Views
    140

    This afternoon's project was to see if the...

    This afternoon's project was to see if the 1MSample example could be modified to log the 1MSample ADC values to an SD Card. Some time ago, I coerced a micro SD socket into clinging to the bottom of...
  2. Replies
    5
    Views
    140

    Thanks for providing this morning's "stay at...

    Thanks for providing this morning's "stay at home and stay busy" project.

    This code worked fine for recording at 10KHz sine wave. It's a bit too simplified to be up to my professional...
  3. Replies
    13
    Views
    213

    JarkkoL's example is a strong argument for the...

    JarkkoL's example is a strong argument for the "Always post complete source code" warning at the top of the forum. With access to the source JarkkoL and others could certainly spot potential...
  4. Unless you are using a micro-sd card >= 32GB,...

    Unless you are using a micro-sd card >= 32GB, Windows and the standard SDFAT formatter will not format the card as EXFat. You can use the EXFat formatter that is part of the SDFat beta to format any...
  5. Here is my test sketch and the results. The...

    Here is my test sketch and the results.
    The input was a signal generator set to produce a square wave alternating between -1.5 and +1.5V at about 9.8Hz
    ...
  6. In answer to your question: I don't think...

    In answer to your question:


    I don't think it empties the internal cap, but it does siphon off some of its charge to the internal capacitors.

    I think you can use a simple circuit like this:...
  7. Sorry about the error in the power dissipation...

    Sorry about the error in the power dissipation calculation. I should have caught that, especially since I've been using a high-side current sensor based on the Max 471 to do measurements of Teensy...
  8. Replies
    3
    Views
    116

    The Teensy 4.0 doesn't have any capability to use...

    The Teensy 4.0 doesn't have any capability to use anything except V3.3 as the analog reference. If you need better results, you'll need an external ADC.

    Various earlier posts say that the T4.0...
  9. Wow! 150mA across a 10-0hm resistor is going to...

    Wow! 150mA across a 10-0hm resistor is going to dissipate 1.5Watts at full scale. I hope that resistor is big and temperature-stable.

    If you have access to that part of the circuit, you might...
  10. Replies
    6
    Views
    108

    Have you looked over this explanation of digital...

    Have you looked over this explanation of digital envelope detectors: https://www.dsprelated.com/showarticle/938.php

    It seems that you just need access to the signal to do a full-wave...
  11. Replies
    18
    Views
    164

    Is this the same problem that we hashed out in...

    Is this the same problem that we hashed out in https://forum.pjrc.com/threads/59906-SPI-MOSI-pulled-low-too-late-on-Teensy-4-0?highlight=spi+timing

    I found the the issue with the late activation...
  12. I followed up on my parsing optimization with...

    I followed up on my parsing optimization with some tests that changed the file buffer size. It wasn't until the buffer went below 512 bytes that the read parsing time for one million values went up...
  13. Having lots of time for projects as a result of...

    Having lots of time for projects as a result of the Governor of Oregon's Stay-at-home order, I worked out an optimized version of the ASCII to Long Integer parsing algorithm. I also added a...
  14. AHA! In US English, what you show is generally...

    AHA! In US English, what you show is generally referred to as a "thumb drive" or "USB drive". USB alone generally refers to the serial bus itself.

    Now that I know what you want, I'm afraid...
  15. Replies
    8
    Views
    812

    I ran across the need for speed vs power issue on...

    I ran across the need for speed vs power issue on a logger in about 2005. I needed an ARM chip to do a bunch of cubic spline fits about once per minute. That would take a second or so. The rest...
  16. I'm not sure what you mean by The other end...

    I'm not sure what you mean by

    The other end of the USB connection on the Teensy can be connected to any USB host. It would then be the responsibility of that host to save the data in a file.
    ...
  17. You are correct on #1. I slipped in an extra...

    You are correct on #1. I slipped in an extra '9'--and even that wasn't really correct. In reality, it should have been: If the median value in the data is less than 100, the storage will take less...
  18. Three observations: 1: If the median value in...

    Three observations:

    1: If the median value in your data is < 999 and all the values are positive, your character storage format may actually take less space than storing 4-byte long integers. ...
  19. Your sample code doesn't show anything using the...

    Your sample code doesn't show anything using the dir and pos values. I think it is that missing code that is your problem. The default priority for attachInterrupt is 128, in the middle of the...
  20. I'm sure that there are complexities that I don't...

    I'm sure that there are complexities that I don't appreciate--- and I have a question about the OP's description:



    The part about no current flowing when both signals are the same leads me to...
  21. Just last week I got a package of 4 BME280 sensor...

    Just last week I got a package of 4 BME280 sensor boards off Amazon for about $16. The BME280 is a nifty little sensor that measures temperature, pressure, and humidity. There is a library for it...
  22. The impending ventilator shortage

    Another thought: What's the difference between a CPAP machine and a ventilator? If the difference is just sensors and the ability to supplement the oxygen ratio, perhaps the mechanics of a...
  23. I've seen a number of news reports that suggest...

    I've seen a number of news reports that suggest that hospitals may soon need more ventilators than are available or can be rapidly manufactured. Perhaps it's time for a paradigm shift. Instead of...
  24. My go-to choice for buffers for a decade or two...

    My go-to choice for buffers for a decade or two has been one of the single-channel versions of the 74C125. I have used the NC7SZ125M5X in a number of designs.
    However, I most often used it as a...
  25. I tested my hypothesis about the pad drive of a...

    I tested my hypothesis about the pad drive of a highly capacitive load by connecting two 150pF capacitors from SCK to ground.

    I then ran the OP's original simplified test program. Here are the...
  26. The app note at:...

    The app note at:
    https://www.nxp.com/docs/en/application-note/AN5078.pdf

    was helpful in setting up my LTSpice model.
  27. I just ran a quick LTSpice model of a 1MHz clock...

    I just ran a quick LTSpice model of a 1MHz clock driving 300pF through a 20-ohm resistor (20 ohms is the nominal output impedance of the SCK pad at maximum drive strength). The model showed a...
  28. Perhaps your PCB is causing very fast reflections...

    Perhaps your PCB is causing very fast reflections on the SCK line that are causing glitches inside the T4 SPI controller. I think SPI.begin sets up the port pins for SCK and MISO and MOSI for the...
  29. I modified your code to use ExFAT and the SDFAT...

    I modified your code to use ExFAT and the SDFAT library and it seems to work OK. I couldn't get the logging to stop except by pulling the USB cable.

    In your code you have:
    ...
  30. I took a look at the expansion board schematic,...

    I took a look at the expansion board schematic, and it seems that it uses all the SDIO lines to the microSD connector. That means that BUILTIN_SDCARD should work if you have the proper libraries. ...
  31. I have found that adding some PCS to SCK delay...

    I have found that adding some PCS to SCK delay will move the start of SCK to a point after the MOSI signal is stable:

    19335

    To accomplish this, you have to edit the source code for SPI.h. To...
  32. At the start of your post you state that you have...

    At the start of your post you state that you have the SD Card connected to pins 34-37. Since you are not using pins 38 and 39 (DAT2 and DAT3), I presume that the card is wired to work in SPI mode. ...
  33. It's definitely an issue with the Teensy 4.0...

    It's definitely an issue with the Teensy 4.0 Hardware or SPI Library. I ran the same code on a Teensy 3.6 at 180MHz with Teensyduino 1.51 and Arduino 1.8.12 and the MOSI signal definitely goes low...
  34. Replies
    9
    Views
    425

    The alternative we use with oceanographic loggers...

    The alternative we use with oceanographic loggers is to have an external power plug that routes power from the batteries to the logger (or controls an electronic switch to do so). Removing and...
  35. Replies
    3
    Views
    204

    After some more testing, I added code to disable...

    After some more testing, I added code to disable the USB port when the Teensy switches to 8MHz. Without this code, plugging in a USB cable while at the slow speed with the USB pullup at the...
  36. Thread: MCU trends

    by mborgerson
    Replies
    9
    Views
    529

    I agree that it is nearly impossible to get good...

    I agree that it is nearly impossible to get good results from onboard ADCs in the newer processors. For me, good results means 1-2 bits LSB noise at 16-bit resolution. I've gotten near those...
  37. Replies
    3
    Views
    204

    I decided to define a new object: ...

    I decided to define a new object: IntervalTimer_VC, which allows the user to specify the new bus clock after changing the clock speed. I did find that I couldn't simply add a setClock() function...
  38. Replies
    3
    Views
    204

    Dynamic clock change issues on T3.6

    I have been working on a data logging program that operates a Teensy 3.6 at two different clock rates:

    48MHz when connected to USB: The USB Serial port is used for the PC host interface and...
  39. Replies
    31
    Views
    2,590

    A friend asked me to look over the Analog Devices...

    A friend asked me to look over the Analog Devices LTC6240 for a piezo-base oceanographic shear sensor. That op amp looks very good for piezo sensors because of the very low input bias currents--in...
  40. Replies
    7
    Views
    249

    Minimizing noise pickup from SD card writes is an...

    Minimizing noise pickup from SD card writes is an ongoing project for me. I have found two main sources of noise:

    1. The effect of the current peaks on the power supply. As you suggest, lots of...
  41. Replies
    7
    Views
    249

    I've dug out a bit more information on the effect...

    I've dug out a bit more information on the effect of sync() on SD Card power.

    I added a member function to the SDioCard object to return the number of times that transferStop() has been called...
  42. Replies
    7
    Views
    249

    In order to more clearly illustrate the effect of...

    In order to more clearly illustrate the effect of the sync() call, I modified the data collection sketch to call sync() on odd-numbered writes of the 32KB ping-pong buffers. The result is shown in...
  43. Replies
    7
    Views
    249

    The current measured in the test data was not...

    The current measured in the test data was not measured with a meter. It was measured with a current sensor collecting data at 10KHz. The only integration in the Max471 sensor comes from a 0.1uF...
  44. Power reduction with sync() when logging to SD

    While working on a project to build a low-power data logger using a Teensy3.6, I discovered something a bit counter-intuitive. I found that calling the sync() function after writing a block of data...
  45. Teensy clock speed not saved on per-sketch basis

    I'm working on a low-power logger that runs at 8MHz and draws about 5mA at 2600 bytes/second of data input. Since that is too low for USB to work, I upload data files and set up tests by setting...
  46. Replies
    7
    Views
    249

    I didn't realize that the forum display didn't...

    I didn't realize that the forum display didn't like my tab settings. Here is an easier-to-read version of the results table:


    Algorithm mA with no sync mA with sync() ...
  47. Replies
    7
    Views
    249

    Low-Power logging and sync() in EXFat

    While working on a project to build a low-power data logger using a Teensy3.6, I discovered something a bit counter-intuitive. I found that calling the sync() function after writing a block of data...
  48. Replies
    13
    Views
    423

    The concern for writes of less than 512 bytes...

    The concern for writes of less than 512 bytes goes back to the original implementation of the LFS on an MSP430F148, which has only 2KB of RAM. There are only two allocated sector buffers in the...
  49. Replies
    13
    Views
    423

    I've done some more tests with transferStop and I...

    I've done some more tests with transferStop and I find that it does indeed reduce power drain significantly:
    on a T3.6 at 24MHz using a 32GC SanDisk Ultra SD micro card.
    After SDC.begin but...
  50. Replies
    13
    Views
    423

    SDIO Power drain

    I'm working on a Teensy version of a Logger File System (LFS). It is a sequential file system with a simple directory structure and minimal file system overhead. It was originally written for data...
Results 1 to 50 of 60
Page 1 of 2 1 2