Author Topic: Diode voltage clamping  (Read 2058 times)

0 Members and 1 Guest are viewing this topic.

Offline NEoXTopic starter

  • Contributor
  • Posts: 29
  • Country: hr
Diode voltage clamping
« on: October 27, 2018, 12:17:04 pm »
Hi!
I want to step down voltage from sensor signal (9v) to 3.3v for MCU and generaring smallest amount of heat as possible
because next to circuit is temperarure sensor that need to be acurate . I was searching for best solution to doo that but got more confused than before.
-basic voltage divider? -waste of energy and heating up
-zener voltage shifting? -im looking for more protection way (zener shifting is just Vin-Vbreakdown..if there is more than 9v on sensor input thing wil blow up)
-op amp as comparator? -overkill?/dumb?
-simple transisotr (base 9v, collector to emiter 3.3v and to mcu?)-better way and cheaper than this?

..and at the end circuit below.. but the problem? I DON'T UNDERSTAND how it works? where that extra voltage goes..how to calculate resistors? Is this the best option? :-// :-DMM

edit: sensor is digital logic(0v or 9v)
« Last Edit: October 27, 2018, 12:22:56 pm by NEoX »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7770
  • Country: de
  • A qualified hobbyist ;)
Re: Diode voltage clamping
« Reply #1 on: October 27, 2018, 01:26:19 pm »
Is the sensor's signal an analogue signal which will fed into an ADC or is it a digital signal?
 

Offline NEoXTopic starter

  • Contributor
  • Posts: 29
  • Country: hr
Re: Diode voltage clamping
« Reply #2 on: October 27, 2018, 01:43:10 pm »
Sensor is digital..But I'm just searching for best oprion to convert signal from 9v to 3.3v
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7770
  • Country: de
  • A qualified hobbyist ;)
Re: Diode voltage clamping
« Reply #3 on: October 27, 2018, 02:18:41 pm »
The magic term is "level shifter". There are a lot of different types of level shifters, and it's hard to tell which might be a good solution without knowing more about your circuit.
 

Offline spec

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: england
  • MALE
Re: Diode voltage clamping
« Reply #4 on: October 27, 2018, 03:09:42 pm »
+ NEoX

The attached simple schematic will convert 0V and 9V logic levels to input logic levels suitable for a MOS MCU running with a 3.3V supply.

I have assumed that the MCU is an ATmega 328 with the input pull-ups disabled, and that the 9V logic level input is not fast.

With a 9V input logic level the current through R1 and R2 is 10uA and with a 0V logic level input the current through R1 and R2 is 0uA, so the interface will generate very little heat.

This simple logic level converter will also give good protection from input voltage more negative than 0V and more positive than 9V. You could quite safely apply -9V and 18V without damaging the MCU input (the MCU has built in catching diodes at the Gnd pin and VCC pin).

« Last Edit: October 27, 2018, 03:46:48 pm by spec »
 

Offline spec

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: england
  • MALE
Re: Diode voltage clamping
« Reply #5 on: October 27, 2018, 03:30:01 pm »

...I DON'T UNDERSTAND how it works? where that extra voltage goes..


Once the input voltage to the MCU reaches 3.8V (3.3V +0.5V), D1 becomes forward biased and conducts all 'excess' current flowing through R1 to the 3.3v supply line, thus clamping the input voltage to 3.8V.

D1 does not conduct unless it has 0.5V forward voltage across it.

Incidentally, R2 and D2, are there to protect the MCU input from negative voltages from the 0V to 9V logic input, and have no function under normal operation.
« Last Edit: October 27, 2018, 03:38:46 pm by spec »
 

Offline NEoXTopic starter

  • Contributor
  • Posts: 29
  • Country: hr
Re: Diode voltage clamping
« Reply #6 on: October 28, 2018, 01:19:39 pm »
So how to connect small load on this like LED without voltage drop on mcu input pin? When sensor turn I want led to turn on and MCU to get 3.3v signal ..i tryed it and got voltage drop. :-//
« Last Edit: October 28, 2018, 01:21:26 pm by NEoX »
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Diode voltage clamping
« Reply #7 on: October 28, 2018, 03:58:43 pm »
Your original circuit drops the excess voltage across the resistor and about 0.7V across the  conducting diode.

Let's say your input is 9V  Diode D1 will conduct and the anode will be about 3.3V + 0.7V or 4V.  Therefore, R1 drops the difference, 5V.  One end of R1 is at 9V and the other end is at 4V so the drop is 5V.  How much power it dissipates is determined by the resistance value P = E2/R

If you use a 1k resistor, you dissipate 25/1000 or 25 mW.  If you use a 10k resistor, you dissipate 2.5 mW.

I would use a Schottky diode because, internal to the uC, they are using Schottky diodes for the very same purpose - input pins are clamped (usually).  If you use a Silicon diode, the internal diode will turn on first (0.2V?) and it will have to do all the clamping and your external circuit is mostly useless.

1N5817 has a very low forward voltage drop at low current:
https://www.diodes.com/assets/Datasheets/ds23001.pdf

In this case, the voltage at the pin might be just 3.3V + 0.15V or 3.45V.  Much better.  But you need to keep the current low so you need to so some math to figure out how much resistance you can handle.  You get that from the input characteristics of the uC pin.  How much current do you have to source at what voltage?  Those numbers come from the uC datasheet.  You need to consider how much voltage drop over R1 is added because of the input current.  It won't be much but it is not zero.  You also need to ensure you get over the input threshold voltage.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf