MarkT's latest activity

  • M
    MarkT replied to the thread Directional change in joystick.
    Rotation is done with a rotation matrix, [ cos (a), sin (a) ] [ -sin (a), cos (a) ] - use matrix multiplication of the rotation matrix with the coords as a column vector to get the rotated colum vector. And a is the angle in radians. atan2...
  • M
    MarkT replied to the thread Teensy 4 multi-pin TDM.
    AudioMemory takes a count of Audio blocks, not bytes, 2000 would indeed use all the available RAM and more! Something in the range 10 to 20 is worth using to start with - you can monitor memory usage BTW - see here...
  • M
    Motor torque scales with rotor volume I'm afraid, unless you can find a long-stack NEMA11 you are limited by the laws of physics. For more torque a gear-motor is the usual approach, but that will decrease the rpm. A servomotor (not hobby-servo...
  • M
    effect fade is what you want I think...
  • M
    Like a vibration switch?
  • M
    Ah, so the noise is high frequency (from the signal's viewpoint) - that clarifies things. For minimum phase distortion a Bessel filter might be best (for IIR). A FIR filter will be linear phase of course, but with a lot more latency.
  • M
    If your sample rate is only 30Hz there's no need to worry about efficiency, the T4 is vastly more powerful than required for the task. There are sites out there that can generate a digital filter to a specification and generate C code (*). Just...
  • M
    MarkT replied to the thread DAC for Sqare Wave Signal.
    Probably because I2S stands for Inter-IC-Sound? They pretty much are all sigma-delta and pipelined, so fixed crystal-locked sample rate and filtering and decimation is integral to how they function.
  • M
    MarkT replied to the thread Audio Adapter I2S trace length.
    Make sure you've got a continuous ground-plane for the signals return currents, otherwise looks feasible to me. I'd make the signal buses top-side, ground plane on underside. That's compatible with SMT components.
  • M
    MarkT replied to the thread Project: MIDI to 9000+ RGB LEDs.
    3kW of LED lighting is probably enough for daytime use outdoors in a large environment! 100W of LED is enough for a streetlight... I think you'll find you'll be running them well below max and can probably reduce PSU requirements. Also that...
  • M
    MarkT replied to the thread Frequency to midi usb.
    Usually calling delay() is a mistake - just record the time. Next time around you can guard the code using that time+70, to avoid subsequent re-triggering that fast. Then the first time no delay happens.
  • M
    No, because that is not a clone of the repo. You can restrict to a branch or tag I think and so forth, but you get all the files for that, since the intention is to be able to submit pull-requests.
  • M
    MarkT replied to the thread Teensy 4.1 stalls?.
    If the reset pin, crystal pins or the power supply(s) is affected by noise, or any pin is triggered to cause CMOS latchup, those all might well cause a freeze
  • M
    MarkT replied to the thread TeensyTimerTool.
    The #include files for the chip?
  • M
    A button has two states, they can't both be ON? The T4 has a program button, that's all - are you talking about some other button in your circuit?
  • M
    MarkT replied to the thread PWM help.
    That's not rated for 3.3V, again the graphs show the plateau is nominally above 3.3V, I wouldn't trust it at 3.3V but its quite likely to work, but you may be unlucky. Have you tried a parametric search?
  • M
    MarkT replied to the thread PWM help.
    Also just reading the top of the datasheet or the "Drain source on-state resistance" line in the specs shows its designed for 10V gate drive (meaning 12V). I'd simply advise to ignore the threshold voltage spec for using a MOSFET as a switch...
    • Screenshot 2024-07-21 at 08.20.02.png
  • M
    Let me repeat, don't use delay() at all. Don't use while(). In loop() call stepper.run() or stepper.runSpeed() - AccelStepper does all its work in those methods and they must be called frequently for steps to be generated correctly...
  • M
    MarkT replied to the thread AnalogRead issues.
    The 'scope has a far lower input impedance (1 or 10 Mohms) than an analog pin (well up in Gohms range at low frequencies), this explains how the 'scope can see lower noise voltages from the piezo. Pieze elements are charge sources so the...
  • M
    AccelStepper requires you to call stepper.run() frequently, and then you can call things like stepper.moveTo() to start things happening. No delay()'s please, that's going to lock up the processor so nothing can happen.
  • M
    You shouldn't try to call Serial.print in a ISR, Serial access itself uses interrupts so you get a deadly embrace where Serial waits for its interrupts but already in an ISR so interrupts are blocked. If you access a variable like run_count...
  • M
    MarkT replied to the thread two outputs for sd extension..
    I'd be inclined to believe that ribbon is too long for 50MHz, try 8MHz or shorten to a few inches?
  • M
    Probably a case of the fingers typing a similar word all by themselves, I've done that especially with words I frequently type...
  • M
    empirical, from greek empeirikos for "experience", not the latin imperium "command, power, authority"..
  • M
    There are many many T4 based synths documented in these forums, additive, subtractive and FM.
  • M
    Driving the input with 3.3V directly and no series resistor would have damaged the IR emitter in the device - 400mA is four times the absolute maximum rating. Thus the device is quite possibly not performing according to the datasheet any...
  • M
    MarkT replied to the thread ADC Sampling in Teensy 4.0.
    Mistyped there, you mean "is ARM, not AVR" - even ARM processors differ in register assigments as they can have a variety of different hardware peripherals assigned.
  • M
    These days in C++ we simply use: #pragma once To prevent multiple includes of the same header. I assume this works in Arduino/Teensy for any header included from C++ files, I haven't checked.
  • M
    MarkT replied to the thread Teensy 4.1 Inputs and Outputs.
    Do you mean the audio adapter? That has one microphone input, but two two line inputs. There are other options for interfacing to microphones, and yes that would be a separate board - any I2S compatible audio chip pretty much can work. Or you...
  • M
    You need to get knobs on those pots! Watch out for loose wires if you remain with it breadboarded - a more permanent construction will pay off the first time it gets dropped perhaps! I suspect your volume issue is the pots are linear and you...
  • M
    Mmmm, some nice sounds - perservere! Kickstarter?
  • M
    MarkT replied to the thread FlexCAN_T4 - FlexCAN for Teensy 4.
    That's a good excuse in my book.
  • M
    MarkT replied to the thread Teensy 4.1 stalls?.
    You'll need to protect the teensy and its wiring from the EMI produced by the blower motor. Is the teensy in a grounded metal box? That's the bare minimum you need to do.
  • M
    On a modern logic chip 2pF is a lot of area. The usual unit for measuring component capacitances on a VLSI chip is the femtofarad!
  • M
    Many more much smaller decoupling caps (10nF 0402?), one for each via that needs it? - that's how its usually done. 4- or 6-layer boards are typically needed for BGA devices. Large decoupling caps typically are further out as they can afford a...
  • M
    Can you expand those traces so we can see the edges in more detail please?
  • M
    The TL431 is a reference, not a logic level converter, its probably a 100 times too slow on the edge transitions to produce reliable clocking - go with suitable 5V tolerant logic families like 74LCX, 74LVC with strong hysteresis, the 74LVC14 hex...
  • M
    MarkT replied to the thread Humidity issues.
    Seriously consider a hermetic enclosure for the teensy in a marine environment, no connectors handle salty air well, unless you pot them and put them beyond use! For everyday rain exposure the push button needs to be IP68 or similar I think...
  • M
    MarkT replied to the thread FlexCAN_T4 - FlexCAN for Teensy 4.
    mHz is millihertz, MHz is megahertz, megax...
  • M
    And the simpler solution for a slow-changing analog input is to put 100nF or so to ground on the input pin - this will present a low impedance on the timescale of an ADC conversion, and is one extra component. Typical sampling caps in modern...
  • M
    MarkT replied to the thread 5-DRV8825 Questions.
    Microstepping reduces the tendancy to miss-step, so it usually increases the _usable_ torque. 60 rpm is within most stepper's power band (torque can drop off very rapidly with speed at a few hundred rpm). Dynamic torque is a lot less than...
  • M
    I'm pretty sure there's only one ground on the audio adapter. The SGTL grounds are normally star grounded together to a single ground plane - at least that's the datasheet recommendation. (Well to be precise there is a separate headphone analog...
  • M
    I thought CMSIS had all the relevant vector operations like complex magnitude? I do know T4 only out of the box supports a certain version of CMSIS, perhaps that's the issue?
  • M
    FIR filters don't have to be linear-phase though - its not clear if there is a requirement for linear-phase, but the phrase real-time suggests its not such a priority? Partitioned convolution can give upto 0 sample latency if done the right way...
  • M
    Which rather rules out the naive FFT/zeroing/IFFT approach as its not real-time, suggesting you require either a FIR filter (limited by performance as number of taps increases), or a filter done with fast convolution (partitioned convolution for...
  • M
    For large numbers of FIR taps its best to use FFT based convolution - there are various threads here about this, I doubt there's a particularly simple one - try searching "partitioned convolution" perhaps?
  • M
    MarkT replied to the thread Realistic max SPI clock rate?.
    Much higher so long as you have signals over a groundplane at a reasonable impedance, and you can add good (low inductance) decoupling to chips with SMT caps and low-value series resistors on datalines to reduce ringing.
  • M
    MarkT replied to the thread I think my Teensy 4.1 is broken.
    Please give measurements in numbers, rather than "none in 3V3" - is this 0.00V, 0.0V, 0.1V ,0.5V? This level of detail is usually very revealing. If its 0.1V or less I'd suspect a hard short somewhere, you have to find it and fix it - the...
  • M
    MarkT replied to the thread Realistic max SPI clock rate?.
    And working on a breadboard its wise to stick to below 30MHz anyway - I never got anything digitls to work reliably above 40MHz in that environment (due to lots of parasitic impedances).
  • M
    Magnetic field strength falls as the inverse-cube of the distance from a magnet, once far enough away for it to look like a dipole. To the best of our knowledge magnetic monopoles don't exist - if they did they would have an inverse-square law...
Back
Top