Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Output from voltage comparator drops to 0.6 V when connected to micro controller?

Status
Not open for further replies.

Drohm

New Member
Hi all,

I have made a voltage comparator out of a 5 V powered LM358N opamp and it is working just fine. But when I connect the output to digital in on a micro controller (PIC 18F4550) the voltage drops to around 0.6 V and the the low voltage is not enough to trigger the input. I have tried to remedy the problem by using the other half of the opamp as a voltage follower but with no luck.

Do you have any idea to what the problem might be?

Regards
Drohm
 
Drohm said:
Hi all,

I have made a voltage comparator out of a 5 V powered LM358N opamp and it is working just fine. But when I connect the output to digital in on a micro controller (PIC 18F4550) the voltage drops to around 0.6 V and the the low voltage is not enough to trigger the input. I have tried to remedy the problem by using the other half of the opamp as a voltage follower but with no luck.

Do you have any idea to what the problem might be?

Regards
Drohm

hi,
Are you sure the PIC pin is not configured as an output.?

Do you have a drawing.?

BTW, you have posted this question 3 times..:)
 
Hi,

Yes Im sure the PIC pin is not configured as output. It works just fine if I put 5 V directly on the pin.

Yeah I know it is posted 3 times Im trying to delete two of the posts :)

I dont have a drawing at the moment, but I will make one very soon. :)
 
Drohm said:
Yes Im sure the PIC pin is not configured as output. It works just fine if I put 5 V directly on the pin.

If you've connected 5V directly to the pin, and it's configured as an output, then you may well have damaged the pin - you should connect any input via a current limiting resistor.

I agree with ericgibbs, you've most likely got the pin configured as an output, and set low.
 
Drohm said:
Yeah, you might be right. But how does that explain that it works with 5 Volts then?

If you're connecting 5V directly to the pin it's destroying the output stage feeding the pin - it's not something you should be doing!.
 
Drohm said:
Ok, thanks for the help! :)

I shall return as soon I have checked the code...

hi,
If you want to double check, post your code.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top