Author Topic: +5V digital signal from 3.3V MCU - with ESD protection  (Read 2621 times)

0 Members and 1 Guest are viewing this topic.

Offline SaimounTopic starter

  • Frequent Contributor
  • **
  • Posts: 547
  • Country: dk
+5V digital signal from 3.3V MCU - with ESD protection
« on: July 25, 2021, 10:31:39 am »
Hi :)

I have a 3.3V MCU. I want to use 1 GPIO to create a +5V digital signal.
The signal is sent to an external connector so there should be ESD protection for the transistor.


My questions:
1) do BJT transistors need ESD protection? I guess not nearly as much as an exposed MCU pin for example?


I do not want the output to "jump" to 5V when the device is powered up - it should stay at 0V. I tried to do this using an open drain output with an external pullup on the base of the transistor (see attached schema - and the zoomed result). C1 is there to reduce the rise time, but clearly it takes a bit of time to charge up so there is a bump at power up.

2) How to solve that problem? Could I do this using a PNP for example?
 

Offline Ground_Loop

  • Frequent Contributor
  • **
  • Posts: 642
  • Country: us
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #1 on: July 25, 2021, 10:52:20 am »
How about driving a couple 5 volt 7404 inverters in series. Not the most elegant solution, but it works.
There's no point getting old if you don't have stories.
 

Offline SaimounTopic starter

  • Frequent Contributor
  • **
  • Posts: 547
  • Country: dk
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #2 on: July 25, 2021, 11:05:30 am »
How would you do that?

I have to mention the price is an important factor to me  ;D
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8112
  • Country: fi
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #3 on: July 25, 2021, 11:29:06 am »
Any 74HCT series gate, most obviously a non-inverting buffer, will do the level conversion. They are not expensive and are available in small single-gate packages as well.

For added ESD protection, ESD protection diode/TVS. A lot of integrated parts available, these have their own sections on distributors, sort for price.
 

Offline SaimounTopic starter

  • Frequent Contributor
  • **
  • Posts: 547
  • Country: dk
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #4 on: July 25, 2021, 01:00:26 pm »
They do not cost "much" but still 40 cents, while a BJT will cost about 1 cent.

Are you guys saying it is not possible to do this with a simple transistor?

And about the ESD protection I actually read online that a BJT would not need any protection as in case the voltage raises it will simply sink the current to ground, actually like a TVS diode would. Or did I miss something?
 

Offline Ground_Loop

  • Frequent Contributor
  • **
  • Posts: 642
  • Country: us
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #5 on: July 25, 2021, 02:36:39 pm »
Have you tried running with the 3.2V?  A lot of 5V devices operate just fine with 3.2. I have a project on the bench with a 5V shift register operating with 3.2 inputs perfectly.
There's no point getting old if you don't have stories.
 

Offline SaimounTopic starter

  • Frequent Contributor
  • **
  • Posts: 547
  • Country: dk
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #6 on: July 25, 2021, 02:46:24 pm »
That's a good point, but in this case I have no idea what devices will be connected to the signal - some of them will definitely accept 3.3V, but not all :)
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16549
  • Country: us
  • DavidH
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #7 on: July 25, 2021, 08:23:42 pm »
And about the ESD protection I actually read online that a BJT would not need any protection as in case the voltage raises it will simply sink the current to ground, actually like a TVS diode would. Or did I miss something?

That pretty much covers it.  The gate oxide of a MOSFET is particularly fragile and must be protected from any excessive voltage or face catastrophic failure.  A MOSFET transistor could also be used in your application since the gate is not exposed.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5840
  • Country: de
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #8 on: July 25, 2021, 08:45:30 pm »
That's a good point, but in this case I have no idea what devices will be connected to the signal - some of them will definitely accept 3.3V, but not all :)

Which is one major reason to use an optocoupler... as is standard in all industrial applications. Yes, costs a bit more than 1 cent, but will let you sleep well at night.

But for a cheap solution you'll need two transistors (plus and few resistors), an NPN (CE) followed by a PNP (CE). This will ensure that your output is inactive and at 0 V until the MCU IO pin goes high.

« Last Edit: July 25, 2021, 09:06:52 pm by Benta »
 

Offline harerod

  • Frequent Contributor
  • **
  • Posts: 449
  • Country: de
  • ee - digital & analog
    • My services:
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #9 on: July 25, 2021, 09:29:17 pm »
Quote from: simonlasnier on Today at 14:00:26

    And about the ESD protection I actually read online that a BJT would not need any protection as in case the voltage raises it will simply sink the current to ground, actually like a TVS diode would. Or did I miss something?


That pretty much covers it.  The gate oxide of a MOSFET is particularly fragile and must be protected from any excessive voltage or face catastrophic failure.  A MOSFET transistor could also be used in your application since the gate is not exposed.


David, that sounds like an excellent way to save money. Based on your experience, what model BJT, in which circuit would you suggest to the TO? For ESD severity let's assume standard human body model at 2kV. As a bonus, what would you suggest for a MOSFET-solution?
Thanks, marcus
 

Offline TK

  • Super Contributor
  • ***
  • Posts: 1722
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #10 on: July 25, 2021, 09:40:43 pm »
What about this solution using MOSFET?



Source: electronics.stackexchange.com
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5840
  • Country: de
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #11 on: July 25, 2021, 09:49:50 pm »
What about this solution using MOSFET?



Source: electronics.stackexchange.com

Output is +5 V when power is off. Not desirable.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5840
  • Country: de
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #12 on: July 25, 2021, 10:12:09 pm »
This should work:

 
The following users thanked this post: Saimoun

Offline TK

  • Super Contributor
  • ***
  • Posts: 1722
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #13 on: July 25, 2021, 11:42:15 pm »
If the device where the output is being connected to is unknown, you should provide an open collector output so the receiver can decide what to do with the GPIO signal, like the output on many sensors or an optocoupler like another member suggested.
 

Offline perieanuo

  • Frequent Contributor
  • **
  • Posts: 838
  • Country: fr
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #14 on: July 26, 2021, 06:48:37 am »
mosfet level converter is the answer, cost-effective too
output transistors (bjt, fet...) usually don't need electrostatic discharge protection, only in very particular use case
we've done medical projects, none with this type of output protection
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
 

Offline harerod

  • Frequent Contributor
  • **
  • Posts: 449
  • Country: de
  • ee - digital & analog
    • My services:
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #16 on: July 26, 2021, 09:30:17 am »
mosfet level converter is the answer, cost-effective too
output transistors (bjt, fet...) usually don't need electrostatic discharge protection, only in very particular use case
we've done medical projects (emphasis by harerod), none with this type of output protection

Human Body Model: capacity 100pF, 1500 Ohm impedance
IEC61000-4-2/IEC60601-1-2:+-8kV HBM contact, +-15kV air ?

Are you permitted to share your interface schematics, including components?
 

Offline SaimounTopic starter

  • Frequent Contributor
  • **
  • Posts: 547
  • Country: dk
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #17 on: July 26, 2021, 11:26:48 am »
Thanks everybody for the replies! It seems you have misunderstood when I said "I do not know what devices will be plugged in". I do not know they will all be devices with a certain load, some of them light, some of them lower. And then some of them will have a very low threshold like 1V, others will have a much higher one like maybe 4V. Either way a 5V signal should work with 99% of them.

This was kind of what I was looking for:
This should work:

I made the attached circuit which seem to work fine :)

I will solder and do some experiments with real components :)
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #18 on: July 26, 2021, 11:30:53 am »
How fast does it need to be? C2 makes it very slow.
 

Offline SaimounTopic starter

  • Frequent Contributor
  • **
  • Posts: 547
  • Country: dk
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #19 on: July 26, 2021, 12:04:33 pm »
Not fast at all. The diagram shows the max speed, about 6ms period.
C2 is to reduce EMC :)
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #20 on: July 26, 2021, 12:26:51 pm »
How about two NPN BJTs? That way there's only one type of transistor in your circuit.

How many chanels do you need? If it's more than one, you're almost certainly better off using an IC, given the space required for the other components.
 
The following users thanked this post: Saimoun

Offline SaimounTopic starter

  • Frequent Contributor
  • **
  • Posts: 547
  • Country: dk
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #21 on: July 26, 2021, 12:51:25 pm »
@Zero: that looks great, thanks! I'll try that out.
And yes a very good point about using an IC, and I found some of these 74HC for 4 cents. But I only need 1 channel, so I think it is easier this way :)
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5840
  • Country: de
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #22 on: July 26, 2021, 05:55:15 pm »
How about two NPN BJTs? That way there's only one type of transistor in your circuit.

Will also work.
My reason for choosing the NPN/PNP combo was that the output will stay at 0 V when the MCU/driver is powered off and when powering up.

 

Offline SaimounTopic starter

  • Frequent Contributor
  • **
  • Posts: 547
  • Country: dk
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #23 on: July 26, 2021, 08:05:35 pm »
Oh ok I thought this was going to work the same way  ;D

What is the difference then, between using two NPN's instead of one? More current? (I do not need much current as you can guess with the 1k output :) )
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5840
  • Country: de
Re: +5V digital signal from 3.3V MCU - with ESD protection
« Reply #24 on: July 26, 2021, 08:22:16 pm »
It's just a question of whether the output resistor is pulling up (NPN version) or pulling down (PNP version). This makes a difference when powering up or down. The PNP output will be at 0 V during this time. The NPN version: I don't know.
Using two NPNs is redundant and unnecessary complexity to my mind (you can control the IO polarity in software).

You decide which behaviour is desired.

« Last Edit: July 26, 2021, 08:26:31 pm by Benta »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf