Teensy max (brief) input voltage.

I’ve come across a problem using my teensy: I’m planning to use a 3.3V gyro, yet I would like to have 5V output to the servos. Ideally I’d like to run the board at 5V to guarantee the max clock (16MHz), which would require bi-directional 3.5 <-> 5.0 level shifting.

For now though, I’m going to change it to run at 3.3V while I get the gyro working (it only just arrived so I haven’t even connected it yet). I’ve setup my board so that the servos can get the 5V power from the USB while everything else (including the servo PWM output) is at 3.3V.

An alternative to level shifting the I2C and Vcc to the gyro would be to leave the whole board at 3.3V. This should be fine for the servo output PWM, but the input PWM would still be at 5V.

I’d like to know, would it be OK to use a servo PWM input at 5V? The datasheet says the max input high voltage is Vcc+0.5 = 3.8V, but that is for DC characteristics. I’m wondering, for a servo PWM which is only high for a maximum of 2ms out of a 20ms duty cycles, could a 5V high still damage the board? It would make my life easier, but would mainly keep my board tidy, if I didn’t need to shift them to 3.3V.

Thanks for any help you can give,

Ian

You will not damage your servo it you power it from 5 volts and drive it from a 3.3v pin.

But was that your question?

No I was wondering if 5V input PWM would damage the Teensy.

On a standard servo the input does not deliver a voltage so it will not damage the teensy.

I’d like to know, would it be OK to use a servo PWM input at 5V? The datasheet says the max input high voltage is Vcc+0.5 = 3.8V, but that is for DC characteristics. I’m wondering, for a servo PWM which is only high for a maximum of 2ms out of a 20ms duty cycles, could a 5V high still damage the board?

I would say yes it would damage it. Just because it says DC characteristics does not mean a constant level, it applies to any peak or transient voltage. AC characteristics tend to refer to timing diagrams and signal rise and fall times.
What I would do is to have a diode anode on input cathode on 3V supply. Then connect the 5V PWM through something like a 220R resistor to the servo input. That way you will clamp any excessive voltage at the safe level.

Grumpy_Mike:

I'd like to know, would it be OK to use a servo PWM input at 5V? The datasheet says the max input high voltage is Vcc+0.5 = 3.8V, but that is for DC characteristics. I'm wondering, for a servo PWM which is only high for a maximum of 2ms out of a 20ms duty cycles, could a 5V high still damage the board?

I would say yes it would damage it. Just because it says DC characteristics does not mean a constant level, it applies to any peak or transient voltage. AC characteristics tend to refer to timing diagrams and signal rise and fall times. What I would do is to have a diode anode on input cathode on 3V supply. Then connect the 5V PWM through something like a 220R resistor to the servo input. That way you will clamp any excessive voltage at the safe level.

Mike, I think he is talking about connecting a servo input to the Teensy. Although the servo is powered from 5 volts there is no voltage on its input other than that provided by the teensy pin.

Cheers Mike, that is what I was after. Yes I’m not connecting a servo to an input, that would do nothing. A servo PWM is coming into the teensy, and then using this I generate a new output PWM to actually send to a servo. Should’ve been more clear.

I’ll get the gyro working, and then have a think about what level to run the board at and where to shift the levels.

Ian, I think you have confused both Mike and me.

I was talking about connect a servo input to a teensy output. In other words, the output from the teensy to the input of the servo.

As I said above, if that is the case you do not need to do any level shifting.