Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 30th April 2008, 08:50 AM   (permalink)
Experienced Member
mesamune80 is on a distinguished road
Send a message via ICQ to mesamune80 Send a message via MSN to mesamune80 Send a message via Yahoo to mesamune80
Smile Input For PIC uC

Hi all,

i am using a comparator ic and LM393 ,configured it as windows detector circuit with the output go to LED and pic uC pin.
But i could not read any high logic from the ic output pin when the pin is goes high. i am using a 1k pull up resistor for the power (12v) to LED which is parallel to uC pin as well which i want the uC to detect it is logic high.
Any problem with my configuration?
mesamune80 is offline   Reply With Quote
Old 30th April 2008, 08:56 AM   (permalink)
Experienced Member
 
Blog Entries: 1
Gayan Soyza is a glorious beacon of lightGayan Soyza is a glorious beacon of lightGayan Soyza is a glorious beacon of lightGayan Soyza is a glorious beacon of lightGayan Soyza is a glorious beacon of light
Default

Remove the comparator part from the uC & check the comparator whether it is working correctly?

Can you see the LED goes on when input logic = 1 (in between your range)?

What input did you feed the input?Inverting pin or for the non inverting pin?

Note that its output open collector type.
__________________
Gayan
Forum Supporter

Last edited by Gayan Soyza; 30th April 2008 at 09:07 AM.
Gayan Soyza is offline   Reply With Quote
Old 30th April 2008, 09:10 AM   (permalink)
Experienced Member
mesamune80 is on a distinguished road
Send a message via ICQ to mesamune80 Send a message via MSN to mesamune80 Send a message via Yahoo to mesamune80
Default

ya,my LED lit but i could not get any signal to my uC pin.
my circuit is look like this with the VrefA and VrefB to my pic uC pin (input pin)
Is there anything i need to add so that my uC can detect logic 1 and 0 respectively?
Attached Images
File Type: jpeg Windows Detector1.jpeg (21.4 KB, 50 views)
mesamune80 is offline   Reply With Quote
Old 30th April 2008, 09:13 AM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

Remove the LED's, they are stopping the outputs going high!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 30th April 2008, 09:17 AM   (permalink)
Experienced Member
mesamune80 is on a distinguished road
Send a message via ICQ to mesamune80 Send a message via MSN to mesamune80 Send a message via Yahoo to mesamune80
Default

i see ,thanks nigel ,but i need some indication for that? (high and low limit indication)
can i do it in a different way? or any alternative for that?
mesamune80 is offline   Reply With Quote
Old 30th April 2008, 09:25 AM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

Use a transistor to feed the LED.

Or, more crudely, put a resistor in series with the LED - but this will still restrict the output of the comparator from going fully high, and reduce the LED's brightness.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 30th April 2008, 09:27 AM   (permalink)
Experienced Member
 
ericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud of
Default

Quote:
Originally Posted by Nigel Goodwin
Use a transistor to feed the LED.

Or, more crudely, put a resistor in series with the LED - but this will still restrict the output of the comparator from going fully high, and reduce the LED's brightness.
Hi Nigel,
Just noticed he is using a +12V supply to the LM393...
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is offline   Reply With Quote
Old 30th April 2008, 09:28 AM   (permalink)
Experienced Member
mesamune80 is on a distinguished road
Send a message via ICQ to mesamune80 Send a message via MSN to mesamune80 Send a message via Yahoo to mesamune80
Default

It seem like i got not much choices,either a transistor or a dim LED =_="
what transistor is suitable for this i can use 2N222?
mesamune80 is offline   Reply With Quote
Old 30th April 2008, 09:30 AM   (permalink)
Experienced Member
mesamune80 is on a distinguished road
Send a message via ICQ to mesamune80 Send a message via MSN to mesamune80 Send a message via Yahoo to mesamune80
Default

anything wrong with 12V? @_@"
mesamune80 is offline   Reply With Quote
Old 30th April 2008, 09:39 AM   (permalink)
Super Moderator
 
Nigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to beholdNigel Goodwin is a splendid one to behold
Default

Quote:
Originally Posted by mesamune80
anything wrong with 12V? @_@"
Not as long as you have a current limiting resistor feeding the PIC.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline   Reply With Quote
Old 30th April 2008, 09:45 AM   (permalink)
Experienced Member
mesamune80 is on a distinguished road
Send a message via ICQ to mesamune80 Send a message via MSN to mesamune80 Send a message via Yahoo to mesamune80
Default

okay i'll try it out ,thanks guys.
mesamune80 is offline   Reply With Quote
Old 30th April 2008, 12:28 PM   (permalink)
Experienced Member
 
eblc1388 is just really niceeblc1388 is just really niceeblc1388 is just really nice
Default

Or you can use 3.3V 250mW zener diode in series with each LED.
__________________
L.Chung
eblc1388 is online now   Reply With Quote
Old 30th April 2008, 12:48 PM   (permalink)
Experienced Member
 
ericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud ofericgibbs has much to be proud of
Default

Quote:
Originally Posted by mesamune80
okay i'll try it out ,thanks guys.
hi,
You could do it this way.

I have modified the top LED, I'm assuming a Red LED about Vfwd=2V

The LM393 is open collector output, also the PIC analog is a high impedance.
Attached Images
File Type: jpg uC1.jpg (24.9 KB, 25 views)
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/

Last edited by ericgibbs; 7th July 2008 at 11:23 AM.
ericgibbs is offline   Reply With Quote
Old 5th May 2008, 01:25 AM   (permalink)
Experienced Member
mesamune80 is on a distinguished road
Send a message via ICQ to mesamune80 Send a message via MSN to mesamune80 Send a message via Yahoo to mesamune80
Default

Thanks for all the replies,really thanks for all of you.
i think i might choose either zener or voltage divider method to power up both my LED and also signal to my uC. =)
mesamune80 is offline   Reply With Quote
Old 5th May 2008, 02:54 AM   (permalink)
Experienced Member
mesamune80 is on a distinguished road
Send a message via ICQ to mesamune80 Send a message via MSN to mesamune80 Send a message via Yahoo to mesamune80
Default

Can i put it this way? so that i can adjust untill the voltage to my uC is about 5V at the same time i also can light on my LED.
Or any better idea i can use? at the moment i have 10k adj resistor and 1k resisitor.
Attached Images
File Type: jpg sample.JPG (22.4 KB, 15 views)

Last edited by mesamune80; 5th May 2008 at 02:59 AM.
mesamune80 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
LCD Display karenhornby Electronic Projects Design/Ideas/Reviews 27 22nd February 2008 07:42 PM
Using Oscilloscopes mechie Electronic Theory 9 29th November 2007 09:48 PM
Output = Input - Problems adamthole Micro Controllers 20 24th April 2007 04:09 AM
uuffff how doess this stupid ting work lol cyprio7 General Electronics Chat 7 9th October 2005 06:55 PM
convert input resistance to different output, but how?! pcoghlan Electronic Projects Design/Ideas/Reviews 7 9th July 2004 09:59 PM



All times are GMT. The time now is 01:48 AM.


Electronic Circuits  |  Radio Controlled
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.