Bidirectional logic level shifting from positive to negative supply

So I have this laser frequency locking gizmo that I'm debugging. (It needs a board turn, unfortunately, but it's a pretty cool gizmo--it uses both temperature and current to lock a DWDM laser to an accuracy of 100 Hz or so, and has a high accuracy temperature controller, Peltier driver, and lock acquisition aid.)

Because the (very very expensive) laser's anode is connected to the case, the board runs off a single negative supply. That of course makes it harder to keep logic levels straight in my mind, hence the board turn. :(

The new version is going to have a small AVR on it, which leads to the problem of how to connect the JTAG interface. I could just insist that the board's power supply float, but that's an accident waiting to happen. Sooo, I need to translate 5V CMOS levels from (+5,0) to (0,

-5). This is easy when it's unidirectional--you just use a grounded base transistor of the appropriate polarity, drive the emitter through a resistor, and take the output across a resistor from the collector to the appropriate supply rail. That takes care of the SDI, SDO, and SCLK lines with just 3 parts each, which is OK.

However, the RESET line is bidirectional open drain.

After a few tries with cross-coupled gates, I came up with this:

formatting link

It needs 13 parts, which isn't horrible but which can probably be improved some--hence this post.

When the JTAG is disconnected, it needs to turn into an ordinary pull-up on the processor reset line, and it needs to be reasonably fast, because I'm hoping to be able to use the DebugWire interface, which relies on toggling RESET like mad. That's why the resistor values are low.

The BCV62s are exhibiting a fair amount of heating--at 25 mW, the output transistors of the mirrors are on the edge of thermal runaway if I don't use the emitter resistors. (If I give up on DebugWire, I can just drop the currents by a factor of 10 and ditch the emitter degeneration.) The mirror ratios are fairly sloppy, due partly to the heating, so I need to use a 1500 ohm load resistor. That will make the transistors saturate, so I had to add Schottky clamps.

They are also a bit on the slow side--about 100 MHz f_T.

The original just had the two dual transistors, three resistors, and a Zener diode. So you see that an initially fairly clean design grew a lot of fuzz due to the poor quality current mirrors.

Any bright ideas?

Thanks

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs
Loading thread data ...

s

:(

e

something like this?

formatting link
p_note/AN2342.pdf

-Lasse

Reply to
langwadt

5V battery! :)

Seriously, one of Larkins DC:DC converters might work! There must be a nicer way to do it (a nominally "floating" voltage source). But I can't seem to figure out a good one, too late in the day perhaps.

--

John Devereux
Reply to
John Devereux
[snip]

Phil, I'm confused about what "bidirectional" means in this case...

+reset can drive -resetbar and -resetbar can drive +reset ??

And are both ends activated by open-drain pulldowns, +reset pulling down to ground, -resetbar pulling down to -5V or pulling up to ground ?? ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

                   Spice is like a sports car... 
     Performance only as good as the person behind the wheel.
Reply to
Jim Thompson

I was thinking along those lines too. Perhaps an isolated DC-DC with a 5V zener across the output so it could sink as well as source? The barrier capacitance would be a limiting factor on the speed of the reset signal(s). Art

Reply to
Artemus

Transistor current mirrors are intellectually appealing, and great inside ICs, but often are a nuisance in real life. I haven't done one in decades.

The logical function I think you need is "5 volt battery". I measured a fresh AA alkaline at 1.61, so three might do it.

Or maybe you could buy a 5-volt regulated-output dc/dc converter, add a few mA of dummy load, and use that.

John

Reply to
John Larkin

Oops, you beat me to it!

John

Reply to
John Larkin

Can't you just use two optocouplers? One pulls up the reset line when needed, the other pulls the input line if the reset is wiggled on the uC side.

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

Phil indicated "reasonably fast"... which depends on your definition of "fast" :-) ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |

                   Spice is like a sports car... 
     Performance only as good as the person behind the wheel.
Reply to
Jim Thompson

Well, I have done 10MHz with optocouplers. CNW-137 series IIRC, could look it up. I can't imagine JTAG being that fast.

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

Just bought some Avago ones that have 22ns maximum propagation delay. That's only about one HC gate delay!

Reply to
Spehro Pefhany

The problem is that the Atmel DebugWire interface seems to be very delicate--they warn you about too-small pullups and stray capacitance. (I've never used an AVR before, but the client likes them.) IME optocouplers need a fair amount of current to be even slightly fast, because phototransistors are such junk.

I thought about the 5V battery too, but something more along the lines of two Li coin cells and a micropower op amp connected as a rail splitter, with a big output bypass cap.

I'll probably just drop the current, delete the degeneration and Schottky clamps, adjust the resistor to avoid saturation, and run the processor at lower speed for debugging purposes. That gets me back down to 6 parts.

I wouldn't think that a DC-DC converter would work too well, on account of the input-output capacitance. Or maybe I'm being too paranoid? (Board spins encourage that.)

BTW John, I like current mirrors for some things, biasing being one of them, because of their good headroom. My usual beef is that they contribute full shot noise, but I don't care in this case.

Cheers

Phil

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

(It

uses

100

makes

he

that

0,

ed

gh a

o

SCLK

...

l-up

ause

n

tput

on't

drop

=A0The

d to

rate,

a

w a

uC

snip

how about an I2C isolator? analog has a 2 channel icoupler one

if it is for something expensive doing the whole jtag interface isolated might not be a bad idea, I've seen several boards let out the magic smoke because of debugger and PC floating at 1/2 mains

-Lasse

Reply to
langwadt

Ok, the client is always king. Is this one still not fast enough?

formatting link

They do get expensive though, $2-3 depending on quantity. If you can back off the speed a bit you can save $$$.

Then one day the batteries fade away ...

Why is a little capacitance so bad? It won't be much, and your transistors have some as well.

[...]
--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

--
Must've been tough back then, in the first place,  just _finding_
matched CK722's and then finding a nice isothermal environment to put
them in.

Did you use one of those nice Vectron ovens?
Reply to
John Fields

That's an interesting idea. They go up to 1Mb/s, which is probably faster than my 6-part solution, and cost about $3. I'll see if they can work down to the 0.5 mA level.

Thanks

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

formatting link

Depends on how much--I'm not sure. 10 pF would be fine, but 100 pF not so good.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

ADuM2250? Those are only 1MHz. Looks like Phil needs to get the data across at the speed of light :-)

He only needs to swing from 0V to -5V. But I've seen it, too. Guy fires up generator, gooses the old thing a bit by pushing the governor ... phutah ... phutah ... *POOF* ... VROOOM ... VROOOOOOOM ... *PHUT*

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

formatting link

Nice parts, thanks for the steer. Their threshold current is fairly high for this application--2 mA typical, 5 max. A few bucks isn't a big issue on this board--the laser is $1000 plus. (They only had the one in house, and that one was needed for the big demo, so I had to debug the board using the one-and-only solid gold laser, which was a bit sporty. It works fine now though.

But by then the board has been debugged, so I don't care too much--it won't hurt anything except the debug interface. Production units may well use the same board with the debug interface left unpopulated, because this is a small-but-vital part of a big many $$ system.

This discussion has prompted me to read the Atmel docs a little more carefully, and my original horse-designed-by-a-committee design wouldn't have worked anyway--the bias current is too high. If I really wanted to do this fast, I could use one of those nice Intersil 5.5 GHz dielectric-isolated monolithic PNP arrays, the HFA3128. (Of course I'd probably get 10 edges per bit, but never mind.)

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058
hobbs at electrooptical dot net
http://electrooptical.net
Reply to
Phil Hobbs

[...]

Well, barrier capacitance 3-4pF, depending on model, Digikey has them:

formatting link

You could always roll your own to get lower than that. I usually had to but that was because of medical grade requirements and noise (had to be synchronized and so on).

--
Regards, Joerg

http://www.analogconsultants.com/

"gmail" domain blocked because of excessive spam.
Use another domain or send PM.
Reply to
Joerg

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.