Author Topic: Is there a fast / cheap / small way to (opto) isolate JTAG/SWD pins on device?  (Read 2498 times)

0 Members and 1 Guest are viewing this topic.

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
Have:
- Device in sealed box
- Connector and pins that all must be to 20V DC tolerant

Want:
- To get some of these pins purposed as SWD programming to the micro. So I can plug in low voltage programmer on this primary connector and get a new flash without opening the device up. (Consider if I need to replace/update the bootloader, imagine unprogrammed chips in a finished product)
- Device to have only one connector.
- To be able to pass in 3.3V and have it sail through to micro, but pass in 5.1V+ and protect micro.

Require
- Very small realestate, not more than 150mm sq. Cost and complexity also important
- Pins for DO / DI programming pins will not be used for anything else

Ideas
- To buffer the SWD pins DO/DI and deal with power separately.
- Not sure about getting SWD speeds with something like a reverse zener and resistor. Same for propagation delays and capacitance.


Is there a quick goto for buffering JTAG/SWD pins to allow programming of a micro but have 0V-20V tolerance?
« Last Edit: July 02, 2020, 09:05:35 pm by jnz »
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6349
  • Country: ca
  • Non-expert
Opto is going to be difficult to fit in a size that small, you could probably use a standard one and scale the speed way back. But that means longer programming times.
Try scaling back your programming speed and see what an acceptable time is, then design around being able to handle that speed.

If all you need to do is handle 20V transient, then it does not to be isolated. Simple series resistor and some TVS's might work for IO.
Then a series diode and linear reg for the 3.3V rail (assuming device is not using much power at 3.3V). But, feeding in 3.3V might be too low, 5V would be fine. Many options.
« Last Edit: July 02, 2020, 10:07:19 pm by thm_w »
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
Not transients, needs to be 20V DC tolerant.

It also doesn't need to be opto, just a thought that came to mind.

I could slow the programming down, but not any slower than 1-2Mhz. It's only a 512MB flash, but I don't want to introduce assembly and programming issues for the life of the product because I didn't figure out a better solution at this point.

I could get away with 5V programming on this chip, but I'd rather plan for 3.3V SWD if possible. I agree, it's probably on the line to have 3.3V system and get a 3.3V signal through 20V protections.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6349
  • Country: ca
  • Non-expert
3.3V SWD is fine, the supply is a bit harder due to regulator dropout (if that method is used), but still doable.
Can use a SRF to go open circuit once 20V is applied for example. If the supply current is not very high, then this makes your life easier.

You'll have to see what parts are able to run at 1MHz, if you can come up with a resistor and TVS/clamp combination suitable. Then consider power dissipation as well.
I guess SRF would work on the data pins as well at a higher cost, but I'd consider some series resistance to limit peak current.

The super cheap method would be to use the devices internal ESD diodes. But uni-TVS is not too expensive.


https://www.digikey.ca/en/articles/protecting-inputs-in-digital-electronics
https://electronics.stackexchange.com/questions/235796/gpio-esd-protection
https://forum.arduino.cc/index.php?topic=521372.0
https://www.eevblog.com/forum/projects/inputoutput-protection-with-polyfuse-and-diode/
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4414
  • Country: dk
3.3V SWD is fine, the supply is a bit harder due to regulator dropout (if that method is used), but still doable.
Can use a SRF to go open circuit once 20V is applied for example. If the supply current is not very high, then this makes your life easier.

You'll have to see what parts are able to run at 1MHz, if you can come up with a resistor and TVS/clamp combination suitable. Then consider power dissipation as well.
I guess SRF would work on the data pins as well at a higher cost, but I'd consider some series resistance to limit peak current.

The super cheap method would be to use the devices internal ESD diodes. But uni-TVS is not too expensive.


https://www.digikey.ca/en/articles/protecting-inputs-in-digital-electronics
https://electronics.stackexchange.com/questions/235796/gpio-esd-protection
https://forum.arduino.cc/index.php?topic=521372.0
https://www.eevblog.com/forum/projects/inputoutput-protection-with-polyfuse-and-diode/

TVSs usually have quite sloppy voltages, so something designed to work with 3.3V might not really clamp until 8-9V 

diodes to ground and a 3.3 clamp (zener + transistor?) could work. if SWD will work at reasonable speeds with ~1K series resistors
the power dissipation at 20V is not too bad

 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6349
  • Country: ca
  • Non-expert
TVSs usually have quite sloppy voltages, so something designed to work with 3.3V might not really clamp until 8-9V 

diodes to ground and a 3.3 clamp (zener + transistor?) could work. if SWD will work at reasonable speeds with ~1K series resistors
the power dissipation at 20V is not too bad

Agree, there are other clamps. TVS tend to not put characteristic curves in the datasheet so you have to think if its suitable or not.
When I say TVS you may include zener type clamps as well: https://www.digikey.ca/en/products/filter/tvs-diodes/144

In less critical applications LEDs can work for clamping too.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21658
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Err, 150mm squared, the whole thing; or 150 mm^2, just the units?

If ~12 x 12 mm, you'll have a hard time putting on more than one of any kind of isolator.  If you can find a digital isolator with auto-detect bidirectional operation, that may be the ticket.

Or, possibly a USB isolator then USB-JTAG interface.  Or just an isolating USB cable, or laptop.  Assuming the usual situation of course, and not an embedded self-programming situation.

I'm a bit suspicious of the latter use case, because that's what [drum roll please] bootloaders are for.  A simple two wire UART only needs a dual opto to do the job.  A bit slow perhaps (>1Mbps can be hard to find support for) but keeps the interface as minimal as possible.

If it's something like an MCU loading an FPGA, you may be able to partial-load the FPGA for bootloader hardware, then finish the job this way.  Or just put the MCU on the high side, in the same area you have available for the isolator, and communicate with it somehow.

The low isolation may also suggest just using diffamps to sense it.  This has issues with CMRR at high frequencies, but amps and comparators fit for the task are readily available.  You would probably use up all your space on resistors (even using 0402s and packs), unless you find an in-amp, say, that happens to do the job.

And if it's not isolation at all that you need -- this serves as example for how different a problem it is, versus merely limiting or clamping inputs.

For limiting, series resistors to limit current, and clamp diodes to limit voltage, are a fine solution.  Or you can get somewhat higher bandwidth using pairs of depletion MOSFETs (which act like small resistors for low voltages, but constant current sources for high voltages).  Indeed, the latter can be used to obtain full mains cross-wiring protection (>160Vpk), if you need it!  But still all common ground -- no isolation or CMRR to speak of, very different problem.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline profdc9

  • Frequent Contributor
  • **
  • Posts: 319
  • Country: us
Could you use a 2N7000/2N7002 as a bidirectional level shifter with low pull up resistors such as 1k to get fast enough risetimes or 1k on the low side and 4k7 on the high side ?  That way one side can be referenced to whatever voltage is actually is at, as long it exceeds 3.3 volts.  Use zeners on the interface signals just as protection diodes.  Of course your input would have to source enough current. 
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3341
  • Country: nl
Have a look at the "ADUM" line of voltage isolator chips.
They are small, use internal capacitors as the isolation barrier and some of them are designed for bidirectional protocols such as USB.
Some have built in isolated SMPS circuits.
Other versions have multiple channels (upto 6?)

They are small, but not really cheap. You can't have it all.

https://www.analog.com/en/products/interface-isolation/isolation/standard-digital-isolators.html
 

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
Have a look at the "ADUM" line of voltage isolator chips.
They are small, use internal capacitors as the isolation barrier and some of them are designed for bidirectional protocols such as USB.
Some have built in isolated SMPS circuits.
Other versions have multiple channels (upto 6?)

They are small, but not really cheap. You can't have it all.

https://www.analog.com/en/products/interface-isolation/isolation/standard-digital-isolators.html

There are 36 pages of ADUM parts. Did you have an approximate part you think works?

I also have other replies here to make.
« Last Edit: July 06, 2020, 11:59:08 pm by jnz »
 

Offline Warhawk

  • Frequent Contributor
  • **
  • Posts: 821
  • Country: 00
    • Personal resume
Have a look at the "ADUM" line of voltage isolator chips.
They are small, use internal capacitors as the isolation barrier and some of them are designed for bidirectional protocols such as USB.
Some have built in isolated SMPS circuits.
Other versions have multiple channels (upto 6?)

They are small, but not really cheap. You can't have it all.

https://www.analog.com/en/products/interface-isolation/isolation/standard-digital-isolators.html
FYI ADUMparts from ADI use a transformer-based isolation. TI and Silabs use a capacitive isolation.
TI's overview is here:
www.ti.com/isolation
To the OP:
Consider the SN6505 or SN6501 for generating isolated power. Transformers from Wurth and Coilcraft are available.
Additionally, you can use a capacitively coupled charge pump using the TLV1805-Q1
https://www.ti.com/tool/PMP21953

(the bottom solution)
« Last Edit: July 07, 2020, 02:10:46 pm by Warhawk »
 

Offline daqq

  • Super Contributor
  • ***
  • Posts: 2302
  • Country: sk
    • My site
See: https://www.analog.com/media/en/technical-documentation/data-sheets/ADuM160N-161N-162N-163N.pdf

They aren't 20V tolerant, but that should be doable with a bit of protection.

Or you could use isolated tools - there are isolated JTAG and SWD dongles.
Believe it or not, pointy haired people do exist!
+++Divide By Cucumber Error. Please Reinstall Universe And Reboot +++
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
For SWD you can use a I2C isolator. Eg: Silicon Laboratories Si8602
If you also need reset then maybe Si8605.
 

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
Quote
To the OP:
Consider the SN6505 or SN6501 for generating isolated power. Transformers from Wurth and Coilcraft are available.
Additionally, you can use a capacitively coupled charge pump using the TLV1805-Q1
https://www.ti.com/tool/PMP21953

I think I've not explained my issue well...

  • I need the 3.3 / 5V signal from SWD programmer to get to my chip. When a programmer is plugged in.
  • I need these exposed pins I'm using for SWD to be 20V tolerant when a programmer isn't hooked up.
  • If a higher voltage signal is present, I don't really care if the chip sees that as a logic level 1 or 0, doesn't matter.

I might not be following some of the examples suggested, but it seems some are straight level translators that can't handle the 20V at all even remotely, and others seem to be expecting a higher level voltage for the SWD but that isn't the case.

I'm wondering if I didn't just make it way too complicated and I can just Zener at 5.1V and call it a day?
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4414
  • Country: dk
Quote
To the OP:
Consider the SN6505 or SN6501 for generating isolated power. Transformers from Wurth and Coilcraft are available.
Additionally, you can use a capacitively coupled charge pump using the TLV1805-Q1
https://www.ti.com/tool/PMP21953

I think I've not explained my issue well...

  • I need the 3.3 / 5V signal from SWD programmer to get to my chip. When a programmer is plugged in.
  • I need these exposed pins I'm using for SWD to be 20V tolerant when a programmer isn't hooked up.
  • If a higher voltage signal is present, I don't really care if the chip sees that as a logic level 1 or 0, doesn't matter.

I might not be following some of the examples suggested, but it seems some are straight level translators that can't handle the 20V at all even remotely, and others seem to be expecting a higher level voltage for the SWD but that isn't the case.

I'm wondering if I didn't just make it way too complicated and I can just Zener at 5.1V and call it a day?

if SWD will run at reasonable speeds with say 500R-1K series resistors so the power dissipation doesn't get out
of hand it should work, might want to add a series diode to the zener to keep capacitance down

 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6349
  • Country: ca
  • Non-expert
I think I've not explained my issue well...

You explained it well enough, people just read the title of your thread and didn't read further.

Breadboard or solder up some clipping circuits and try it out, to get an idea of what values would work.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
if SWD will run at reasonable speeds with say 500R-1K series resistors so the power dissipation doesn't get out
of hand it should work, might want to add a series diode to the zener to keep capacitance down

Big IF on that. I have no idea but I doubt it. I was thinking something like a 200ohm would be a lot for a series resistor. I think comparing this to I2C like a user did above makes a lot of sense, similar make up to SWD.

It's the same problem with schottky diodes that would dump the overvoltage into the main rail then use a zener to keep that where it should be. That it revolves around stronger series resistors.
 

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
I think I've not explained my issue well...

You explained it well enough, people just read the title of your thread and didn't read further.

Breadboard or solder up some clipping circuits and try it out, to get an idea of what values would work.

Did I mention my time crunch?

I might have to farm this out on upwork or something. Unless someone here wants first crack.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6349
  • Country: ca
  • Non-expert
Its already been 5 days, the parts could come in one day from digikey. Through hole parts to make it easier to breadboard, maybe.
edit: no country code though so no idea where you are.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline jnzTopic starter

  • Frequent Contributor
  • **
  • Posts: 593
Its already been 5 days, the parts could come in one day from digikey. Through hole parts to make it easier to breadboard, maybe.
edit: no country code though so no idea where you are.

USA, but man, I'm already stretched super thin. I need to make a call on this so I can make a decision on the injection molding so that we'll know we can program these without a bootloader (initial programming, fast reprogramming before shipping, including bootloader updates) and where in the assembly process to program before sealing the unit up.

This is in addition to all the C work I'm struggling to get done. Suuuupper duuper overworked.

Oh, and legacy updates to existing products, forgot that has to get done this week.

Want to make some money? ;)
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4078
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Do you really have to present the SWD pins on the connector? Would say, UART work as well via the bootloader?
The problem with SWD is that's its bi-directional and not fitted with big line drivers.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf