Ensuring 5v stepped down to 3v3 for sync in on drum machine

Everyone was so helpful with my previous post, I was hoping someone could take a look at this and make sure it looks ok. Everyone's expertise is so appreciated.

Working on a teensy drum machine. Want to be able to take sync pulses from Korg (or any other manufacturer's) drum machines. Many of them are 5v and, of course, the teensy is only 3v3 tolerant.

I am using a SN74LVC1G17 single Schmitt-Trigger buffer, which is new to me. How am I looking?

1760003756899.png
 
I was under the impression that it is best practice to include a 0.1uF cap between gnd and vcc (placing the cap close to the IC on the pcb layout). Is this overkill or is this just not correct?

Quick and dirty schematic...

1760006479003.png
 
It is correct.
Don't forget Teensy is 3.3V only, and will not support 5V signal on any of its I/O pins.
 
Thank you. The intention of this circuit is to step 5v down to 3v3. This should accomplish that goal no? 5v into the jack, 3v3 out to the net called 'sync'


1760006805688.png
 
Simpler still: a 1N4148 diode, anode connected to the Teensy pin and cathode connected to the plug. Configure the pin as INPUT_PULLUP.
 
Simpler still: a 1N4148 diode, anode connected to the Teensy pin and cathode connected to the plug. Configure the pin as INPUT_PULLUP.
That's technically only 1 diode drop, or 0.7V. That's not enough of a drop from 5V. Could damage the Teensy pin. 5-0.7 = 4.3V. Two diodes would be a drop of 1.4V. 5-1.4 = 3.6V, which is at the absolute maximum of the part. (3.3VDD + 0.3V) Not safe (for the Teensy) either.

However, I may be misunderstanding you.

If the OP has the buffer chip, in my opinion, it would be better to use it.
 
The buffer will work OK as long as the Vcc pin is connected to 3.3V. That is unclear from the schematic. It will then accept 5V or 3.3V input and convert to 3.3V to the Teensy.

The 0.1uF cap placed between and close to the power and ground pins on ICs is always a good idea. It is one of those things that may not be required in all cases, but can't hurt. This chip won't be switching much current, so probably optional in this case.
 
That's technically only 1 diode drop, or 0.7V. That's not enough of a drop from 5V. Could damage the Teensy pin. 5-0.7 = 4.3V. Two diodes would be a drop of 1.4V. 5-1.4 = 3.6V, which is at the absolute maximum of the part. (3.3VDD + 0.3V) Not safe (for the Teensy) either.

However, I may be misunderstanding you.
You are thinking about the diode being in the opposite orientation than what I described.
 
Simpler still: a 1N4148 diode, anode connected to the Teensy pin and cathode connected to the plug. Configure the pin as INPUT_PULLUP.
That is very clever but with 1N4148 it is very close to 0.8V threshold “low” level of 3.3V CMOS logic. Resistor + 3.3V zener offers more noise immunity. if you want to go with single diode solution a Schottky diode would offer less drop and more margin.
 
Last edited:
If it's the other way, doesn't the Teensy see the 5V and die? I don't understand the circuit then.
Diodes only have a forward voltage drop because they only conduct in the forward direction (mostly). If the diode has the anode connected to the Teensy it can only conduct away from the CPU - meaning when the input is high (5V) the diode will not conduct and the pin will stay pulled up to 3.3V. When the input is low the diode will conduct and pull the pin down to the forward voltage (which is low enough to be registered as digital low).
 
Diodes only have a forward voltage drop because they only conduct in the forward direction (mostly). If the diode has the anode connected to the Teensy it can only conduct away from the CPU - meaning when the input is high (5V) the diode will not conduct and the pin will stay pulled up to 3.3V. When the input is low the diode will conduct and pull the pin down to the forward voltage (which is low enough to be registered as digital low).
Personally, I wouldn't do that. Diodes conduct in both directions, but they are obviously asymmetric. One learns this when creating diode stacks for high voltage applications. So the Teensy pin will be subjected to 5V. The question is how much leakage current at 5V can it take? I'm not risking a $25 part just so I can use a ten cent diode. I'd use a zener or an appropriate buffer. Obviously you can use what you'd like. Sometimes you get lucky.

I watched a small company go down the tubes doing "tricks" like that. In their case, they were relying on an undocumented spec of a transistor instead of using a snubbing circuit. When the field failures started rolling in, they denied an issue. Their customer cancelled their contract, because the transistors shorted out and print heads were smoking. As a young engineer it was a seminal experience, to watch a company implode in real time. YMMV.
 
Personally, I wouldn't do that. Diodes conduct in both directions, but they are obviously asymmetric. One learns this when creating diode stacks for high voltage applications. So the Teensy pin will be subjected to 5V. The question is how much leakage current at 5V can it take? I'm not risking a $25 part just so I can use a ten cent diode. I'd use a zener or an appropriate buffer. Obviously you can use what you'd like. Sometimes you get lucky.
If you don't trust a dead simple signal diode to block a reverse voltage of 1.7V you may as well just give up completely, because no component is going to be up to your standards.
 
If you don't trust a dead simple signal diode to block a reverse voltage of 1.7V you may as well just give up completely, because no component is going to be up to your standards.
Not a very kind response. Just relaying my hard won experience. BSEE 1978, MSEE 1987. Your mileage may vary.
 
Diodes conduct in both directions, but they are obviously asymmetric. One learns this when creating diode stacks for high voltage applications. So the Teensy pin will be subjected to 5V.
Typical signal diodes have reverse leakages measured in nanoamps, its perfectly OK to use them. High voltage is a very different environment where leakage power can be significant, but 1nA at 2V is not going to damage anything.
 
Typical signal diodes have reverse leakages measured in nanoamps, its perfectly OK to use them. High voltage is a very different environment where leakage power can be significant, but 1nA at 2V is not going to damage anything.
A 1N4148 diode is about 3nA @5V reverse bias. Less at lower bias. The leakage does double every 10C. So operating at 70C, the leakage is 32x greater than at 20C. However, the impedance of the input pin matters. If it is 1Meg or less, then the voltage on the pin is under 0.1V, even at elevated temperatures. For a digital pin, I believe I read that the input impedance is around 100-150K. For analog it is around 1Meg.

I'm used to working with higher voltages and temperatures. My bad. An in spec blocking diode in this instance ought to be ok.
 
Back
Top