0
\$\begingroup\$

I have a circuit that outputs a digital signal to an FPGA on an XEM6310 board. To digitize the signal, a comparator is used with a reference/threshold voltage of +12 V, with its positive rail tied to +12 V and negative rail tied to GND.

The output of the comparator will switch between discrete values of 0 and +12 V. However, the XEM6310 can only tolerate voltages of ~4 V maximum. Furthermore, 3.3 V on the FPGA maps to a logic high, and 0 maps to a logic low.

I therefore need to level shift the +12 V output of the comparator down to 3.3 V. From my understanding of how fixed-direction level shifters work, you tie one pin of the IC to the voltage level that is being shifted (+12 V in my case), and the other to the desired shifted voltage (+3.3 V.) For the IC that I am selecting these pins are Vcc and Vdd respectively (DS states that Vcc can exceed Vdd.) Then, the input to the level shifter would be tied to the output of the comparator, where its output would map to the corresponding output pin of the IC (to be sent to XEM6310.)

My question: As I only want to perform a shift when the input to the level shifter is +12 V, what will happen when the input is 0? Will a shift occur or will the output of the level shifter match the input (since the input does not match Vcc)?

I do not want to shift the 0 output of the comparator as it is already at the required logic low for the XEM6310

I have attached a high-level image of the level shifter IC and a link to the DS:

TI Hex Voltage-Level Shifter Pin Assignment

DS: https://www.ti.com/lit/ds/symlink/cd4504b.pdf?HQS=dis-dk-null-digikeymode-dsf-pf-null-wwe&ts=1640103859723&ref_url=https%253A%252F%252Fwww.ti.com%252Fgeneral%252Fdocs%252Fsuppproductinfo.tsp%253FdistId%253D10%2526gotoUrl%253Dhttps%253A%252F%252Fwww.ti.com%252Flit%252Fgpn%252Fcd4504b

\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

You might be able to use a simple resistor voltage divider to bring the 12V signal down to 3.3V. If you are worried about spikes on the 12V signal then add a Schottky diode from the FPGA input to the 3.3V power.

The ratio of resistor values in the divider is determined by the ratio of the voltages, but the actual values of the resistors depend on information that you haven't provided. Using higher resistor values will cause slower rise and fall times for the 3.3V signal, but using smaller resistor values might draw more current from your 12V signal than it can supply.

\$\endgroup\$
0
\$\begingroup\$

Most comparators have an "open collector" output - they can pull the output to Ground, or "let go" of it, and allow and external resistor to pull the output High - you just need to connect that external pull-up resistor to 3.3 volts rather than 12 volts to get a 0 to 3.3 volt output.

The comparator will probably not work with the reference input connected to the positive power supply - it won't see the other input go above that supply (and may be damaged if the inputs do go above the supply voltage).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.