Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 8 of 8

Thread: Teensy 4.0 and step stipcks hookup.

  1. #1
    Junior Member
    Join Date
    Feb 2020
    Posts
    17

    Teensy 4.0 and step stipcks hookup.

    Another Teensy project, another pile of dead teensies

    I hooked up a stepstick (TMC2208) by the book to a Teensy 4.0.

    EN, STEP and DIR are directly connected to Teensy pins, VCC_IO (as TMC calls it) to 3.3V from the Teensy 3.3V supply, and VMOT to a 12V supply. All GNDs are common.
    And a 100uF cap over the 12V and GND as the datasheet says.

    The TMC2208 is supposed to be able to run at 3.3V and not send unexpected 5V out. In this case it's not supposed to send anything to the Teensy!
    The same prototype board works fine hooked up with an old Uno.

    Click image for larger version. 

Name:	deadteensy.jpg 
Views:	16 
Size:	194.1 KB 
ID:	19205

    What is good practice when it comes to hooking up stuff to the 3.3V Teensy? It seems quite fragile.

    I could add level shifters, or add some inline resistors on the signals.

  2. #2
    Junior Member
    Join Date
    Feb 2020
    Posts
    17
    Explaining your problems makes you think

    After some measurements it looks like the damned chip has internal pullups to some internally generated 5V. When motor power is supplied to the chip it will pull-up some IO pins to 5V, even if the digital power supply is 3.3V.

    Bastards!

    I could add some pull-down resistors, or external stronger pull-ups to 3.3V, or make sure the Teensy are driving those pins before powering on the stepper driver (assuming they pull harder) .

  3. #3
    Junior Member
    Join Date
    Feb 2020
    Posts
    17
    Did some further research while waiting for new Teensies to ship.


    From https://learn.watterott.com/silentstepstick/faq/:
    SilentStepSticks with variable 3-5V logic voltage
    At power-up the motor supply voltage VM should come up first and then the logic supply voltage VIO. On power-down the logic supply voltage VIO should turned off at first and then the motor supply voltage VM, because the internal logic of the TMCxxxx driver is powered from VM. To ensure the correct powering a schottky diode from VIO (anode) to VM (cathode) can be added. The v2 Protectors for SilentStepSticks include this schottky diode.
    And indeed the TMC is messing with VIO, the supplied 3.3V logic voltage, when powered up. Not enough to kill an Arduino UNO, but enough to kill a Teensy 4.0.
    Click image for larger version. 

Name:	VIO.jpg 
Views:	15 
Size:	158.1 KB 
ID:	19212

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    11,491
    Ouch! Hopefully the pile of dead T4's is small in number. Another thread had robot Servo's feeding back power on data lines - bad wires were mentioned - ruining T4's too.

  5. #5
    For what it's worth, you can use 74HCT (or 74AHCT) logic to interface between 3.3V logic and 5V for outputs. the 74HCT541 has 8 non-inverting buffers. Recommend current output limit is 8mA though HCT seems more robust than that. I'm using them in one design.

  6. #6
    Junior Member
    Join Date
    Feb 2020
    Posts
    17
    Quote Originally Posted by defragster View Post
    Ouch! Hopefully the pile of dead T4's is small in number. Another thread had robot Servo's feeding back power on data lines - bad wires were mentioned - ruining T4's too.
    That was me too. My pile of dead boards is quite respectable. Makes a grown man cry.

    It seems like the powering sequence is the issue here. The motor power supply has to be turned on and stable before you turn on the logic power. The TMC chips are quite fragile too, powered on in the wrong order and they break.

    Looks like the safest would be to add a voltage regulator from motor voltage to 5V and power the teensy with that.
    The be safe I should add that schottky diode watterott suggest.
    And possibly a separate 3.3V linear regulator that powers the TMCs 3.3V line to isolate it from the Teensy. That spike they send when motor power is turned on looks pretty nasty.

    And a bunch of 300ohm resistors in series with all signals, that fixed the problem on the robot.

  7. #7
    So a little bit more on my design with the T4 - it's driving a number of steppers controllers. While, in theory, I could drive the stepper controllers directly off the 3.3V logic (they have opto interfaces), I chose to use 5V. Mainly because there seems to be a lot of vagueness in stepper driver specs. Some say 5V or higher and most are silent about voltage and current. But also because I wanted to isolate the T4 from external voltages that could run very high (48-80 V, typically). So I used 74HCT541 non-inverting buffers for outputs. This creates a 3.3V only central zone. Nothing external touches the 3.3V zone. Either from optos for input or the 74HCT541s for output. HCT logic has a Vih of 2V so it works fine with 3.3V logic. So far, the only thing that has damaged a t4 in my shop is an errant soldering iron.

  8. #8
    Junior Member
    Join Date
    Feb 2020
    Posts
    17
    Quite embarrassing.

    I am the idiot again sending 12V into the poor Teensys 3.3V, and the drivers IO power pin. A crappy cable carrying 12V on my prototype board had the plastic insulation melted and it sometimes contacted the 3.3V line!

    I really need to improve my prototype building skills.

    To avoid my poor prototyping skills I quickly designed and ordered some PCBs, it's dirt cheap to get them made. Just takes some time for shipping.

    Click image for larger version. 

Name:	TinyStep.jpg 
Views:	14 
Size:	249.4 KB 
ID:	19262

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •