Search results

  1. Nominal Animal

    How does grounding work if I cut the 5V pads or connect schottsky diodes while keeping the USB plugged in?

    I fully agree with Paul above, both in intent and definitions. By "floating", I specifically meant that the supply does not tie its outputs to any specific potential; it only keeps the positive output a specific voltage above the negative output, up to a maximum current draw; and only up to a...
  2. Nominal Animal

    How does grounding work if I cut the 5V pads or connect schottsky diodes while keeping the USB plugged in?

    Reread my first message. I wrote, "If you need your Teensy to have a different ground potential than the computer (USB GND pin potential), you do need to use an USB isolator." It is critical that you understand that "1 V" describes a difference of one volt. In Teensies and other...
  3. Nominal Animal

    How does grounding work if I cut the 5V pads or connect schottsky diodes while keeping the USB plugged in?

    You have to, actually. They must be directly connected for the USB isolator to work correctly. It's the 5V output from the isolated DC-DC supply that needs a bit of care. In this case, the Teensy is powered from a separate supply (and its GND must be directly connected to Teensy GND and thus...
  4. Nominal Animal

    How does grounding work if I cut the 5V pads or connect schottsky diodes while keeping the USB plugged in?

    If you connect the external power supply to Teensy+isolator when nothing is powered yet, there should not be enough energy in the circuits to cause an ESD event (other than in the same scale that happens ordinarily/all the time), so no bleed resistor is needed. In fact, a resistor between the...
  5. Nominal Animal

    How does grounding work if I cut the 5V pads or connect schottsky diodes while keeping the USB plugged in?

    That uses K-Cut B0505S-1WR3 isolated DC-DC supply, which has a minimum load of 20mA. So, you need a cable between the isolator and Teensy where the 5V line broken, not connected to anything on the Teensy side, and on the isolator side 5V and GND connected using a 250Ω quarter-watt (or...
  6. Nominal Animal

    How does grounding work if I cut the 5V pads or connect schottsky diodes while keeping the USB plugged in?

    If you need your Teensy to have a different ground potential than the computer (USB GND pin potential), you do need to use an USB isolator. Analog Devices' ADuM3160 and ADuM4160 full-speed isolators work fine with Teensies. Teensy 4.x/MicroMod automatically limit themselves to full speed, or...
  7. Nominal Animal

    Split Keyboard w/ Teensy 4.1 - Can it be done?

    I would use a pair of Teensy 4.0's, with either WS2812 or similar digitally-controlled RGB LEDs to limit the number of I/Os needed, or a dedicated LED matrix controller IC; with a nice shielded 6-wire (RX+GND twisted, TX+GND twisted, 5V, GND) cable between the two Teensies using high baud rate...
  8. Nominal Animal

    Custom PCB for ER-TFT028A2-4 IPS TFT Display (ILI9341)

    I have the same displays, and have played a bit with different ways of driving the LEDs. I have not built it this suggestion yet myself, but (KiCAD/ngspice) simulations show it should work fine at up to 10 kHz PWM. The idea is to use a low-drop adjustable linear regulator like TLV75801P as a...
  9. Nominal Animal

    Teensy 4.1 Pins

    For the 14 SPST toggle switches (OFF-ON), 3 SPDT (ON-OFF-ON) toggle switches, rocker switch (OFF-ON), and push button (OFF-(ON), i.e. momentary), I'd use a 4×6 matrix with diodes, using 10 pins, and 12 BAT54C Schottky diodes in SOT23-3 (a common cathode pair of diodes in each package). For the...
  10. Nominal Animal

    #define placement

    Adafruit #2050, 3.5" 320×480 TFT, actually uses the HX8357D controller and the Adafruit_TFTLCD library. It should not be too difficult to copy the ILI9341_t3 library as HX8357D_t4 –– that way there is no library resolution issues! –– and change the initialization commands and the rotation...
  11. Nominal Animal

    #define placement

    Oh, I just meant that it is nontrivial to do in any case, especially when you only have 320×240 display modules at hand; and not specific to Teensy at all. Making a library too general is feature creep, and since features you cannot test are likely to be buggy, it is not a good thing. It is...
  12. Nominal Animal

    Suggestions for recording data

    Mostly, it depends on how you call Serial.write(). If you use it to write individual bytes or words, Teensy 4.x tops out at about 4 Mbytes/sec. If you collect data into buffers (in binary) and write in chunks of 32 bytes or more (up to 512 makes sense), you can get 25-30 Mbytes/sec on typical...
  13. Nominal Animal

    #define placement

    In general terms in C and C++, the pattern is to define the macros before the include statements, so that in the included (library!) code you do #ifndef FOO #define FOO 456 // Default #endif /* FOO */ This means that if FOO is not defined before the include statement, it will default to...
  14. Nominal Animal

    Flashing 4.1 code on a board with a 4.0 bootloader chip

    Yep, I'm fully aware it might change in the future. As I explained above, I do have a way to work around it, by using a two-bit bus switch with inverted enable, so that a GPIO pin that is floating or low at startup (like B0_12, pin 32, which defaults to a 100k pull-down) enables the bootloader...
  15. Nominal Animal

    Flashing 4.1 code on a board with a 4.0 bootloader chip

    @PaulStoffregen: Ping? Does the current bootloader version work with GPIO_B0_13 (BGA pin D10) – MKL02 PTB4 (pin 12) not connected?
  16. Nominal Animal

    Flashing 4.1 code on a board with a 4.0 bootloader chip

    @PaulStoffregen: Is this still true for the current bootloader version (as of 2024-01-31)? Or would it be better to use a digital bus switch, for example Toshiba TC7WB67CFK, to ensure it is connected (and other functions for the B0_13 pin disconnected) by default during bootup, and only...
  17. Nominal Animal

    Combining two 32-bit values into one 64-bit value: unexpected result

    You can obviously fix that by usingLRsample = (((uint64_t)((uint32_t)leftSample)) << 32) | ((uint32_t)rightSample); It is important to first cast the value to the same size but unsigned, to prevent sign extension. You can safely assign an unsigned expression to a signed variable of the same...
  18. Nominal Animal

    Teensy 4.0 5v Serial Tolerance?

    That makes even more sense to me too. The current-limiting series resistor is often used with logic IC chips with signal levels exceeding VCC, and their datasheets often mention it (and it works because of small rail-clamping diodes within the IC itself).
  19. Nominal Animal

    Teensy 4.0 5v Serial Tolerance?

    In series with the RX and TX signals, of course, so they'd limit the current in the signal to what the tiny little ESD diodes or whachamacallits' in the Teensy can handle; sure. I just prefer those level translators and isolators, because they're cheap, simple, and robust. I don't even know...
  20. Nominal Animal

    Teensy 4.0 5v Serial Tolerance?

    Is there a reason you're not using a TXU0202 (Mouser, DigiKey) or even two 74LVC1T45's in SOT-26 (LCSC, Mouser) dead-bugged (soldered directly to wires and covered with heatshrink)? I keep telling microcontroller users to stock up on unidirectional level shifters (TXU0202 for UART, TXU0204 for...
  21. Nominal Animal

    Odd sized screen - just can't find an option

    BuyDisplay ER-TFT034-1 is 42.6mm × 92.8mm (display itself 38.24mm × 86.02mm, so touch panel could sit on top), with IPS panel and 412×960 resolution, and a capacitive touch panel; but is difficult to drive as it expects continuously refreshed RGB data in parallel (ST7701S controller). It would...
  22. Nominal Animal

    Trying to pass SPI signals through transistors, but it doesn't seem to work

    The series resistor is placed between the IC pin that drives the signal voltage, and the rest of the signal trace. (If we put the series resistor on the other side, near the input pin, we get reflections and other nasty stuff, because electrical signals propagate at a finite speed.) You see...
  23. Nominal Animal

    Trying to pass SPI signals through transistors, but it doesn't seem to work

    Use one SPI as a master, connected to CLK+MOSI+MISO1. Then, use another SPI as a slave, connected to CLK+MISO2, with MOSI unconnected. Teensy 4.x are all well suited for this. If you want more parallel buses with the same clock, you could use two SN74HCS157 per socket, for CLK + MOSI1 + .. +...
  24. Nominal Animal

    Trying to pass SPI signals through transistors, but it doesn't seem to work

    I do suspect the issues alexandros is seeing are due to timing mismatch between clock and data signals, as well as noise. Schmitt triggers on input can help with the noise, but to fix the timing issues, both clock and data signals must be routed the same way (with roughly the same length...
  25. Nominal Animal

    Trying to pass SPI signals through transistors, but it doesn't seem to work

    For pure shift registers: Let's assume we use three signals: SCLK, MOSI, and MISO. Each socket receives SCLK_PREV, MOSI_PREV, and MISO_PREV from the previous socket, forwarding them to the next socket as SCLK_NEXT, MOSI_NEXT, MISO_NEXT. (That is, SCLK_NEXT in socket 2 is the same as SCLK_PREV...
  26. Nominal Animal

    Trying to pass SPI signals through transistors, but it doesn't seem to work

    Yep; there are many digital isolator chips available with different configurations (both unidirectional and bidirectional, different number of channels, different channel direction configurations for unidirectional one) that can also do voltage level shifting. I personally prefer ISO6721 (or...
  27. Nominal Animal

    Trying to pass SPI signals through transistors, but it doesn't seem to work

    Instead of a tree-like structure, where the signals pass through several transistors, you should consider a bus like structure. I prefer to use unidirectional voltage level translators like TI TXU0304 for SPI, TXU0204 for UART with hardware RTS/CTS, and TXU0202 for UART RX/TX; with the OE...
  28. Nominal Animal

    comms over USB serial

    Thanks! This backs up my claim and understanding, because the only difference between the two (25+ MB/s vs. under 5 MB/s) is how Serial.write() is called in the Teensy sketch. Based on this, we can recommend Teensy developers use a buffer (buf) of suitable size (len, for example 32), and if...
  29. Nominal Animal

    Forum switching to new SSL cert

    And for completeness, works absolutely fine on Linux as well.
  30. Nominal Animal

    comms over USB serial

    If you want, you could change the Teensy sketch (replacing #if 0 with #if 1), with no changes to the Linux program. You should see the transfer rate drop down to 4-5 MB/s. (To repeat, the only difference is that the #if 1 version uses Serial.write() for each byte separately on Teensy; the...
  31. Nominal Animal

    comms over USB serial

    Here is the sketch I use for Teensy USB Serial benchmarking: // SPDX-License-Identifier: CC0-1.0 // Size of outgoing buffer constexpr size_t packet_size = 32; constexpr size_t packet_words = packet_size / 4; uint32_t packet[packet_words]; // Xorshift64* pseudo-random number...
  32. Nominal Animal

    comms over USB serial

    It's not that. The 4 to 5 MB/s limit occurs when you use Serial.write() for each byte to be sent, instead of filling a buffer (of up to Serial.availableForWrite() bytes) and send the filled buffer using Serial.write(buffer, bytes). If you use a 32 byte or larger buffer, you can expect to reach...
  33. Nominal Animal

    Level shifting a 5V input down to 3.3V for Teensy 4.0

    I like using TI TXU0n0m unidirectional voltage level shifters. In this case, a TXU0101 would work well. It works at up to 200 Mbit/s rates, with the 5.0V-to-3.3V (or vice versa) propagation delay being 11ns maximum. TI recommends using a 0.1nF supply bypass capacitor on each supply pin...
  34. Nominal Animal

    test thread

    The DNS update reached me too, and everything seems to work fine. I did have to set my avatar image, but I'm not sure I had one set before. Other than that, everything seems to have transferred over correctly. (y)
  35. Nominal Animal

    Screen Brightens when Faders are Moved - Teensy 4.1

    Apologies for spamming the thread, for the content firehose, and posting such annoyingly long posts, but here's the LM4048-2.048V (or any other 2.048V shunt voltage regulator that works in the 0.2mA - 10mA range)-based circuit, with component-by component explanation. I am posting this only...
  36. Nominal Animal

    Screen Brightens when Faders are Moved - Teensy 4.1

    I realized I forgot to post links to good articles on the web describing the constant current sink using BJT and MOSFET the above schematic is based on; with the LM4040 just very precisely limiting the backlight control voltage to 2.5V and thus the current over the LEDs. Apologies! The main...
  37. Nominal Animal

    Need help with USBSerial device not getting recognized by teensy 4.1

    If the underlying reason is USB host support lacking something necessary for high-speed (480 Mbit/s) serial support to work, you could just use one of the cheap ($10/10€) ADuM3160-based USB isolators you can get off eBay and elsewhere, between Teensy and the USB serial device. If you get one...
  38. Nominal Animal

    Triple USB faster than one on Teensy 4.1 with Linux host??

    You're using USB Serial and the Linux ACM driver (because /dev/ttyACMn), which in Linux goes through the tty subsystem. This is basically geared towards human data rates with stuff like timeouts in 0.1 second units built right in, and its internal latencies become a bottleneck at high data...
  39. Nominal Animal

    Screen Brightens when Faders are Moved - Teensy 4.1

    You should probably tell them you do have 5V also available; there is no need to power the backlights from the 3.3V supply. Here is what I would suggest, as a hobbyist myself (click to embiggen): I consider the above schematic to be obvious and well known, in the public domain. There are two...
  40. Nominal Animal

    Screen Brightens when Faders are Moved - Teensy 4.1

    Excellent! Those provide all the information we need! (I have designed one similar board like the one you have, for someone who wanted to use BuyDisplay ER-TFT028A2 on a Seek Reveal Pro (replacing the TM024HDH71 display), using the ILI9341 controller (yours uses ST7789; both common). The...
  41. Nominal Animal

    MPR121 multiple board issue

    No idea, unless you have a long wire from the ADDR pin that picks up electrical noise, or a short between the ADDR pin and one of the electrode pins. Fortunately, easy workarounds do exist, specifically in the form of an additional PCA9546A or PCA9548A chip, letting 4 or 8 MPR121's with the...
  42. Nominal Animal

    ILI9341 variable writing over iteself

    The line tft.println(i); will only draw the characters on top of the existing image. Don't think of drawing the characters as "foreground on background", but like transparency sheets. To make the number legible, you need to clear the area to a background color first, before you slap that...
  43. Nominal Animal

    Screen Brightens when Faders are Moved - Teensy 4.1

    Your schematic shows Teensy pin 8 connected to the LCD module BL pin. There are several ways that BL might be connected: 1. Direct connection to backlight LED anodes, cathodes to ground, optionally with a current-limiting resistor in between. 2. Direct connection to backlight LED cathodes...
  44. Nominal Animal

    Screen Brightens when Faders are Moved - Teensy 4.1

    Me hobbyist only. I can't even tell if you're being kind, or sniping at me. ;) I don't think so, because powering the LCD backlight from a GPIO pin is the key problem, I believe. If you use a multimeter in milliAmps mode, using its probes to replace the wire from Teensy pin 8 to display BL...
  45. Nominal Animal

    Screen Brightens when Faders are Moved - Teensy 4.1

    To drive LEDs, you do need to limit the current somehow. I fear that if you connect BL directly to 5V, it will burn out the backlight LEDs, unless the module contains a limiting resistor in itself. Bipolar junction transistors or MOSFETs can be used for this purpose. Since you want to use PWM...
  46. Nominal Animal

    Screen Brightens when Faders are Moved - Teensy 4.1

    No, just a single three-pin SOT-23 part, and two or three resistors. You can dead-bug this, i.e. solder directly to wires, and put heatshrink on top to keep it well contained. (SOT-23 (SOT23-3) is just 2.9mm by 1.3mm body, with one leg in the middle of one side, and two legs on the opposite...
  47. Nominal Animal

    Screen Brightens when Faders are Moved - Teensy 4.1

    You're driving the LCD backlight (LEDs) from a GPIO pin directly. Backlight LEDs tend to need more current than a GPIO pin can provide, so anything happening in the same circuit will affect the current to the backlight. If the backlight is white, the 3.3 volt level you supply to the backlight...
  48. Nominal Animal

    Teensy MicroMod PCB thickness increased

    I welcome the stiffer MicroMod. The one I have bends alarmingly when in use; MLCCs and BGA pads really do require a stiff board or problems ensue (as we've already discovered with the MicroMod pad issues). I've looked at making my own board based on Teensy 4 and the PJRC-programmed bootloader...
  49. Nominal Animal

    Possible to use Teensy AS the keyboard to replace 8x8 matrix?

    The project can be split into two parts: Teensy as a host for a standard USB keyboard. This is well supported by Teensyduino: you can use Teensy 4.1 or 3.6 (easiest, with USB host port exposed on pins, so you only need to plug in a suitable cable), or Teensy 4.0 (soldering an USB female...
  50. Nominal Animal

    Taylor series equation - angle value setup

    I agree: taylor(1073741824) returns = -2147483522. When lines 84-88 of https://github.com/PaulStoffregen/Audio/synth_sine.cpp are changed to if (ph >= 0xC0000000 || ph < 0x40000000) { // ph: 0.32 angle = (int32_t)ph; // valid from -90 to +90 degrees } else {...
Back
Top