Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Datasheet/Parts Requests


Datasheet/Parts Requests Request a datasheet or enquire about part equivalents and/or difficult-to-find parts here.

Reply
 
LinkBack Thread Tools Display Modes
Old 16th June 2005, 07:44 PM   (permalink)
Default Choosing proper interface chip

Hi,
Was wondering if someone here may be knowing of an interface chip, which can sit between a microcontroller and a sensor and do the level shifting per the following scenario:

Inputs pulses coming from a sensor (12v), need to be shifted down to 5v level by this chip, before feeding to microcontroller pins.
On the reverse, output from micro must be shifted up to 12v by the interace chip. This digital 12v level must appear on 8 pins on the interface chip, on the return path to the sensor.
(pulses will be 20 microsecond wide.)

Thank you.
vr is offline  
Old 16th June 2005, 08:07 PM   (permalink)
Default Re: Choosing proper interface chip

Quote:
Originally Posted by vr
Hi,
Was wondering if someone here may be knowing of an interface chip, which can sit between a microcontroller and a sensor and do the level shifting per the following scenario:

Inputs pulses coming from a sensor (12v), need to be shifted down to 5v level by this chip, before feeding to microcontroller pins.
On the reverse, output from micro must be shifted up to 12v by the interace chip. This digital 12v level must appear on 8 pins on the interface chip, on the return path to the sensor.
(pulses will be 20 microsecond wide.)

Thank you.
I suppose one restor divider and one transistor+resisitor is enaugh, but you don't mention type of bus you use (serial/paralel).
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline  
Old 17th June 2005, 09:15 AM   (permalink)
Default Re: Choosing proper interface chip

Quote:
Originally Posted by Jay.slovak
I suppose one restor divider and one transistor+resisitor is enaugh, but you don't mention type of bus you use (serial/paralel).
Doesn't have to be a divider, a single resistor feeding a PIC pin is all you need (assuming you're using a PIC?), the internal protection diodes will clip the input to 5V, and the resistor limits the current they pass.

As suggested, for the output, a resistor from the PIC pin to the base of an NPN transistor, then a pull-up resistor from collector to 12V is all that's required - note that this will invert the polarity of the output, but this is easily compensated for in the software.

There are examples in the 'hardware extras' section of my tutorials.

It's not very clear exactly what you mean?, but if it's 8 bit parallel you will need eight of these!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 17th June 2005, 11:17 AM   (permalink)
Default

if try with PNP, how to make it work?
__________________
May God be with you.
My Blog
Agent 009 is offline  
Old 17th June 2005, 11:21 AM   (permalink)
Default

Quote:
Originally Posted by Agent 009
if try with PNP, how to make it work?
I was thinking about it.. it won't work beacuse of differnet voltage levels.
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline  
Old 17th June 2005, 11:35 AM   (permalink)
Default

Yes, we need negative voltage for the base... But can't we do it?
__________________
May God be with you.
My Blog
Agent 009 is offline  
Old 17th June 2005, 11:37 AM   (permalink)
Default

Quote:
Originally Posted by Agent 009
Yes, we need negative voltage for the base... But can't we do it?
You can have the base negative against Emitor, but you can't make it positive or equal leveled!
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline  
Old 17th June 2005, 11:38 AM   (permalink)
Default

If you use NPN to switch on the PNP (or use open colector pin on PIC), that would work.
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline  
Old 17th June 2005, 11:40 AM   (permalink)
Default

I think that's the best way, unless power and space r not problems, so just add inverters over all outputs, no???
__________________
May God be with you.
My Blog
Agent 009 is offline  
Old 17th June 2005, 12:57 PM   (permalink)
Default

Quote:
Originally Posted by Jay.slovak
If you use NPN to switch on the PNP (or use open colector pin on PIC), that would work.
Again, this is covered in the 'hardware extras' section of my PIC tutorials, but it's rather wasteful to add twice the number of transistors when a very simple software change saves half of them.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 17th June 2005, 10:47 PM   (permalink)
Default

Yeah, but maybe it's really strainful to change all the output of a very long program :? ...
__________________
May God be with you.
My Blog
Agent 009 is offline  
Old 17th June 2005, 10:51 PM   (permalink)
Default

Quote:
Originally Posted by Agent 009
Yeah, but maybe it's really strainful to change all the output of a very long program :? ...
As far as I know, every text editor has a Replace Function. If you search for BSF PortB,7 and replace it with BCF PortB,7 (and Vice versa) that would do the job...

(But it won't work with paralel or USART connection...) 8)
__________________
"I share, thus I am"
Jay.slovak
Read this!
ICD2 Clone
Best PIC/DsPIC Bootloader

Read my Inchworm ICD2 review!
Jay.slovak is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 10:19 AM.


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

eXTReMe Tracker