Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Comparato output voltage drops when connected to Microcontroller .

Status
Not open for further replies.

SAILLESH.SABARISH

Member level 1
Joined
Dec 15, 2009
Messages
32
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Location
india
Activity points
1,512
In my application I am connecting a LM311 comparator output to AVR32 microcontroller.
I am using a pull up resistor of 1k connected to 5v supply at pin 7 . I am getting an output of 5v when the input at pin3 goes below the reference voltage at pin 2.

the comparator out is fine and working well with the given inputs.

but when i connect the comparator output to the micro controller input the output from the comparator when it goes high is falling from 5v to 3.2v .
this is very strange to see. I also grounded the controller along with the comparator circuit.

I would like to know is that working right or have some problem on it..

thanks in advance.
 

hi keith
I have the micro placed on an evaluation board. The board is powered by a 5v. But the micro has different power input considerations.

like the i/o pins are running at 3.3v
the micro core is running at 1.8v

sash
 

If your mcu I/O is not specified to work with 5v (5v tolerant inputs) then it probably has clamping diodes to protect the inputs from voltages higher than 3.3v, this diodes can create the voltage drop.
What is the model of your mcu?

Alex
 
AVR32uc3A0512 this is my micro model ...i am using the EVK1100 board. but i dont see any diodes mentioned in their datasheet...
 

yes i agree your answer ...
but on page 40 in the pdf...in the absolute maximum ratings they have said that input could be 5.5v max except for few pins.s.5v to input .
so can i give 5v to input since i dont want to use voltage divider.
 

Yes you are correct, the above limit was for specific pins , I thought it was for different ports.
It says that for the rest of the ports you can use up to 5.5v, it is also written in Input High-level Voltage in page 41.
Which pins did you try and you had problems, and are you sure that they were configured as inputs?

Alex
 
I am using the pins PB23 and PB25 .since I am using the Timer capture units i had configured them as inputs.



sash
 

Apart ftom the question, if the respective input will be 5V tolerant (and don't use clamping diodes to Vdd) or not, there is no particular use of overdriving the input to 5V. Why don't you simply connect the LM311 pullup to 3.3V, possibly using a slightly lower resistance value?
 

I searched for the schematic of EVK1100 and I have found http://www.atmel.com/dyn/resources/prod_documents/EVK1100_SCHEMATICS_REVC.pdf
I don't know if it is the correct one but it shows that PB23 is connected to U1_DCD and PB25 to U1_DTR , U1 is MAX3241.
Take a look at page 6 in the left side.
Does the board have a selector to select if you want the pins connected to U1 or not?

Alex
 

@alex

yes the controller has options to do . I can select the i/o pins for specific functions. since almost each i/o pins are multiplexed with two or three functions.

---------- Post added at 01:06 ---------- Previous post was at 01:02 ----------

@FvM
since in my application i use a single source 5v to supply the ICs i want to know whether it is possible to give a 5v input to the controller.
other wise i would also try giving a separate 3.3v to pull up .if i was left with no choice.
 

If you want to provide 5v to the input then at least use a 1-2k resistor between the mcu pin and the comparator to limit the current in case something goes wrong.
In normal input operation the current is a very small and the resistor wouldn't change the operation and the internal pullup is 10-15k so a 2k can drive the input fine.

In your original question you said that the voltage dropped from 5 to 3.4, were these the same pins as above (PB23 and 25)?
Did you use a resistor between the mcu and comparator when you tried that connection?

Alex
 

yes the pins are same as PB23 and PB25 as i said before . i didnt use any resistance to connect between the comparator output and the mcu input .
but since its maximum rating is 5.5v it should not drop any voltage as i think.
 

Yes it shouldn't so obviously something is wrong, and I think you should use a resistance because something is sinking current and it should at least be limited until we find what it can be.
There shouldn't be a clamping diode in that pin and the pullup of 10k can't pull down the voltage like that.
My mind still goes in a wrong pin direction setting, I have never used you mcu so I can't help much but if nothing else is connected in that pin I can 't find any other reason.

Now that I think of it you already have a resistor because the 5v are provided from the lm311 pullup and you have about 1.5mA current through that resistor to have that much voltage drop (5-3.4=1.6v).

Alex
 
Last edited:

Is the resistor for the pull up is the main reason for the voltage drop??
but when i didnt connect the comparator output to the mcu i can measure the voltage as 5v.
 

If the mcu pullup is connected to 5v (since you measure 5v when nothing is connected) then it can't be what is causing the voltage drop but something is sinking 1.5mA.
Another thought is to remove the LM311 pullup and connect the LM311 to the mcu and use only the mcu internal pullup to see if you get 5v.

Alex
 

I havent used the MCU pull up.. the comparator out put pin is pulled up. I was able to read the comparator output to be 5v when it is not connected to the mcu input.
but i will try to use the pull up the MCU input pin and check for the 5v.
 

I thought you had the internal pull up enabled.
You can also try to feed the input directly from the 5v power supply using a 1K resistor, check if you get 5v in the input or you get a voltage drop?
What is the voltage you measure in the mcu pin when there is nothing connected?

Alex
 

since in my application i use a single source 5v to supply the ICs i want to know whether it is possible to give a 5v input to the controller.
other wise i would also try giving a separate 3.3v to pull up .if i was left with no choice.
I expected, that you have the 3V3 processor supply available. But it may be internal to the eval board only. Because AVR32 is specified with 5V tolerance for PB, there's no problem to connect 5V to the port inputs. But because the ports have no internal clamping diodes, you have to take care not to exceed the allowed voltage range.

I don't know if it is the correct one but it shows that PB23 is connected to U1_DCD and PB25 to U1_DTR , U1 is MAX3241.
Take a look at page 6 in the left side.
Does the board have a selector to select if you want the pins connected to U1 or not?
That sounds plausible. In this case, not the processor but the MAX3241 may clamp the input voltage. DCD and DTR are however outputs of the MAX3241, they would even short the external voltage, unless the zero ohm SMD jumpers are removed.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top