0
\$\begingroup\$

I'm designing a CAN node using an ESP32, which works on 3.3V. The only transceiver I can find where I live at a reasonable cost is the TJA1040. The datasheet says it works both on 5V and 3.3V. I am confused whether I should use 3.3V as supply for both the uC and the transceiver, or use 5V for the transceiver, 3.3V for the uC and just connect the TXD and RXD pins directly.

Here is a link to the datasheet. https://www.mouser.mx/datasheet/2/302/TJA1040-3139578.pdf.

Any help would be really appreciated. Thanks

\$\endgroup\$
1
  • \$\begingroup\$ Checking Mouser in Argentina then TJA1040 100pcs @ ARS$ 1.497,60. Or MCP2562FD 120pcs @ ARS$ 950,40. The former is very old, the latter is modern and supports 3.3V logic levels. \$\endgroup\$
    – Lundin
    Commented Jul 3 at 14:05

1 Answer 1

2
\$\begingroup\$

The datasheet says:

Input levels compatible with 3.3 V and 5 V devices

The input levels are not the same as the supply voltage level. On page 5, the operating range is specified as from 4.75 V to 5.25 V, i.e., you must use a nominal 5 V supply.

The TJA1040's minimum VIH is 2 V, so you can use 3.3 V outputs to drive the transceiver's inputs.

However, the TJA1040's VOH is near 5 V, so you must not connect the transceiver's output directly to an ESP32's input. The RXD signal requires some kind of level shifting. Depending on the signal speed and what is available, you could use a voltage divider, a transistor-based level shifter (see this question), a buffer with overvoltage-tolerant input (e.g., (SN)74LVC1G125), or an integrated level shifter chip (e.g., TXU0101, (SN)74LVC1T45).

\$\endgroup\$
1
  • \$\begingroup\$ Awesome. Thanks \$\endgroup\$ Commented Jul 3 at 12:57

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.