doozer
doozer
Branch Unspecified
29 Oct 2007

Need help finding a 12v <-> 5v level converter

Hi,

I'm trying to interface a 4021 (8 stage static shift register) chip which is receiving a 12v clock and data input from a remote device to a PIC chip. The PIC needs to talk at 5v TTL levels. The PIC is interfacing to the 8 bit parallel side of the 4021, the remote device connecting serially.

As the 4021 is bi-directional I need to do line level converting in both directions.

Anyone know of a simple solution that can handle the job?

Thanks,
Matt.
xheavenlyx

xheavenlyx

Electronics and Communication
11 years ago
1. If your PIC's datasheet states it can accept serial 12v input then interface the device directly to the PIC skipping your 4021.

2. Check your 4021 datasheet, if it is a CMOS chip it will work on the 12V input but, I THINK, will give a 5v parallel output. See the datasheet, it has a lot of information of allowed inputs and the available output level.

3. If the powersupply for your CMOS 4021 is 5V the output data will be 5V. thats how it works, again, this is an assumption. Datasheet is your best friend.

4. Do tell us what the datasheet says about all this.
doozer

doozer

Branch Unspecified
11 years ago
xheavenlyx
1. If your PIC's datasheet states it can accept serial 12v input then interface the device directly to the PIC skipping your 4021.

2. Check your 4021 datasheet, if it is a CMOS chip it will work on the 12V input but, I THINK, will give a 5v parallel output. See the datasheet, it has a lot of information of allowed inputs and the available output level.

3. If the powersupply for your CMOS 4021 is 5V the output data will be 5V. thats how it works, again, this is an assumption. Datasheet is your best friend.

4. Do tell us what the datasheet says about all this.
1. Absolute maximum input direct to the PIC is 7.5V. So not an option.

2. The parallel output of the 4021 is determined by the input. It'll happily work from 5v to 15v. ie. a 12v input produced ~12V output. The chip is reversible, that is, can work as serial -> parallel and parallel -> serial hence the input voltage becomes the output.

3. Power supply to the 4021 is 12V. The other end is a 3rd party device which I have no control over. Its clock and data lines are at 12V levels.

4. See above answers 😀

With the help of my CRO i have determined that the clock is always driven by the remote device. Thus my thinking is to use a few opto-couplers. One for the incoming clock signal and 2 for the data line. One for when reading, another for when writing.

Would love to hear your thoughts...

Thanks,
Matt.
xheavenlyx

xheavenlyx

Electronics and Communication
11 years ago
Ohmy, I can honestly say one thing that my practice skills is a little lacking.

I think isolation is the best option here. One more point is that, there are a few other methods that you very well know about except HVIC's (I THINK) which stands for High Voltage Integrated Circuits, so here are few excerpts from ElectronicDesign.com

There are alternative ways to level-shift signals from one reference to another, like pulse transformers and other magnetically isolated level shifters, optocouplers, and capacitive-coupled level-translating drivers. Generally, though, HVICs are more attractive than these alternatives.
For example, HVICs have lower losses than optocouplers. This is primarily because they don’t require secondary-side power supplies. (Secondary power can be derived from the primary side using bootstrapping techniques requiring simply a diode and capacitor.) Another advantage is that they can accommodate any practical output drive size. Then, there are HVICs designed for output currents in excess of 4 A (peak) for driving large switches.

Other advantages over optocouplers include high-frequency operation and short input-to-output delays. HVICs can function up to 1 MHz, and delays are less than 50 to 60 ns. Compared to pulse transformers, HVICs offer larger duty cycle ranges. More broadly, as monolithic circuits, HVICs can provide functionality beyond level shifting at little or no extra cost and with minimal external circuitry. For instance, undervoltage lockout inhibits the outputs in case there’s a power-supply brownout.
[/QUOTE]

Well, then the passage goes on to say these circuits (the pre manufactured ones) come in ranges from 100 to 2000 V ! Thats way out of your requirement.

I guess optocouploing is the best solution because I remember OHHHHH, I just remembered, our analog subject had this topic for signal isolation! I will confirm any other information provided there and let you know.
Ashraf HZ

Ashraf HZ

Communications
11 years ago
Man, I have no idea whats going on here! Me just rely on the good old 7805 for my TTL level needs 😛 Matt, which PIC are you using anyway?
reachrkata

reachrkata

Branch Unspecified
11 years ago
I am not very sure of the system being described as such. But if the clock and data frequencies involved are low (in the KHz range), I think simple Op amps should be enough for the voltage conversion. I think it is not necessary to go in for costly opto couplers / other interface ICs.

Keeping the cost low while still satisfying the requirements is an important point to consider !!!

My two cents are - Use 12V as the main supply for the sytem. Use a simple Linear regulator for the 5V supply of PIC. the 12V also serves are the voltage for up converson of the PIC data outputs connected to the 3rd party system.

Share this content on your social channels -

Only logged in users can reply.