Register to reply

Level translation problem

by triden
Tags: translation
Share this thread:
triden
#1
Jun8-11, 04:53 PM
P: 173
Hello,

I am in need of some form of "clamp" or level translation for an input to a uC. How can I prevent a signal from going beyond the VIH of the uC port? (approx 5.5vdc). The signal will be an ADC signal, so ideally the clamping circuit will not alter the adc input in any way. The reason I need a clamp is because sometimes a 12vdc switch is hooked up to the input which I need to limit to 5v. I was thinking of using an emitter follower to do this because the gain is ~1. Any other ideas?

Regards,

Chris
Phys.Org News Partner Engineering news on Phys.org
An innovative system anticipates driver fatigue in the vehicle to prevent accidents
Squink personal factory aims to make circuit prototyping easy
Catching grease to cut grill pollution
berkeman
#2
Jun8-11, 05:06 PM
Mentor
berkeman's Avatar
P: 40,639
Quote Quote by triden View Post
Hello,

I am in need of some form of "clamp" or level translation for an input to a uC. How can I prevent a signal from going beyond the VIH of the uC port? (approx 5.5vdc). The signal will be an ADC signal, so ideally the clamping circuit will not alter the adc input in any way. The reason I need a clamp is because sometimes a 12vdc switch is hooked up to the input which I need to limit to 5v. I was thinking of using an emitter follower to do this because the gain is ~1. Any other ideas?

Regards,

Chris
Can you just diode clamp it to 5V? The cathode of the diode goes to the 5V rail, and the anode is connected to the input that you want to protect.

If the source of the voltage is low impedance, you may need a current limiting resistor in series with the source.


EDIT -- use a Schottky diode to keep the Vf voltage drop of the diode under the 0.5V.
skeptic2
#3
Jun8-11, 06:05 PM
P: 1,803
I concur with Berkeman. This is a better solution than the other one frequently mentioned, that of a 5.1V Zener. The reasons it is better are these:

The Zener voltage typically has only a 10% tolerance. That means your actual voltage could be anywhere from 4.6 to 5.6 volts.

Zener diode voltage varies more than ordinary diodes over temperature. What may work at room temperature may not work at cold temperatures.

Diodes with 0.7 volts across them can handle more current than a Zener of the same power rating with 5.1 volts across it.

Diodes, particularly Schottky diodes, are a lot faster than Zeners and clip short voltage spikes better.

(I have used ordinary silicon diodes, not Schottky, and never had any problems.)

MATLABdude
#4
Jun8-11, 08:16 PM
Sci Advisor
P: 1,724
Level translation problem

If you're just measuring the presence or absence of a higher-powered 12V (or thereabouts) can I suggest the use of a voltage divider? Using a 1k and a 3k will divide your input signal by 4 while only drawing 4 mA (48 mW). You can also use a DMM to find the exact ratio or resistors that give you a closer match (neglecting heating effects or resistor 'aging'). That or just use a 10k pot and tune it until you get your desired ratio.
triden
#5
Jun9-11, 01:29 PM
P: 173
Ah Berkeman, I think the schottkey diode trick the the answer. Using regular silicon diodes will take me over my maximum input ratings.

As an alternative, is it common to use a unity gain op-amp with the rail voltage at 5vdc? This way I can still have my varying analog input, but the output will never swing past the 5v rail. Just a thought.
berkeman
#6
Jun9-11, 01:37 PM
Mentor
berkeman's Avatar
P: 40,639
Quote Quote by triden View Post
Ah Berkeman, I think the schottkey diode trick the the answer. Using regular silicon diodes will take me over my maximum input ratings.

As an alternative, is it common to use a unity gain op-amp with the rail voltage at 5vdc? This way I can still have my varying analog input, but the output will never swing past the 5v rail. Just a thought.
If you use a CMOS rail-to-rail opamp, you still need to clamp its input against the 12V fault.
triden
#7
Jun9-11, 01:58 PM
P: 173
Quote Quote by berkeman View Post
If you use a CMOS rail-to-rail opamp, you still need to clamp its input against the 12V fault.
If I were to use something like this (http://cds.linear.com/docs/Datasheet/14901afbs.pdf) where the input differential voltage rating is 44v, should it not work? Is there still a need to clamp the input?
berkeman
#8
Jun9-11, 02:05 PM
Mentor
berkeman's Avatar
P: 40,639
Quote Quote by triden View Post
If I were to use something like this (http://cds.linear.com/docs/Datasheet/14901afbs.pdf) where the input differential voltage rating is 44v, should it not work? Is there still a need to clamp the input?
Hah! That's an interesting part. I hadn't seen an opamp with that feature before. It does seem like it will work for you as a follower, limited to the 5V/GND supply rails that you give it.

Nice find!
mdjensen22
#9
Jun9-11, 02:22 PM
P: 161
I'd go with the diode clamp - actually I'd recommend a full set since you can get some pretty nasty spikes with mechanical switches. The internal protection diodes of a mcu are notoriously slow - this is cheap insurance.
Example clamp diodes

Edit - in this case, your micro replaces the op-amp.
triden
#10
Jun9-11, 02:35 PM
P: 173
Cool! Thanks everyone - very insightful.
skeptic2
#11
Jun9-11, 02:58 PM
P: 1,803
Notice at the very bottom of the datasheet there is a phone number. You might want to call the number and ask for an applications engineer for opamps.


Register to reply

Related Discussions
Rotation vs. Translation General Physics 4
Translation E > F General Discussion 2
Translation/rotation Introductory Physics Homework 17
Translation of this conversation General Discussion 41
Translation correct? General Discussion 2