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.

Choosing proper interface chip

Status
Not open for further replies.

vr

New Member
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 said:
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).
 
Jay.slovak said:
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!.
 
Jay.slovak said:
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.
 
Agent 009 said:
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)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top