1
\$\begingroup\$

I'm interacting with a computer and the return high (1) is at 12V but I need it to ~5V. What is the best way to lower the voltage without affecting the signal (serial) ? I already thought of a voltage divider but I was wondering if there is a better way ...

\$\endgroup\$
3
  • \$\begingroup\$ Simplicity is best and, like vladimir says, if it's a one way comms thing then go for the resistor divider. \$\endgroup\$
    – Andy aka
    Jul 3 '14 at 21:18
  • \$\begingroup\$ Better in what way? \$\endgroup\$
    – kjgregory
    Jul 3 '14 at 21:23
  • \$\begingroup\$ @KGregory in a simple way. Maybe you are addressing your question to the OP? \$\endgroup\$
    – Andy aka
    Jul 3 '14 at 22:01
1
\$\begingroup\$

If your connection is one way only and you are fine not insulating your device from your computer then a voltage divider is cheap and perfectly fine. Please note that the divider total resistance may affect speed and power consumption, I'd go for a total resistance not higher than \$10k\Omega\$.

If you need two ways communication you might want to look the mighty web for the MAX232 or its many flavours, this chip is designed precisley to achieve your goal. The MAX will not guarantee any insulation at all but it allows two ways communications.

\$\endgroup\$
2
  • \$\begingroup\$ When you're talking about two ways comms, you mean that the same line "read and write" ? My "computer" is the OBDII connector of a car, I use the same line to read and write data. So if I understand, I could not use a divider for what I want to do ? I'm still a beginner so there's is some point I don't understand \$\endgroup\$
    – GmodCake
    Jul 4 '14 at 4:00
  • \$\begingroup\$ No, you probably can't, you'll need a specific chip for that. \$\endgroup\$ Jul 4 '14 at 6:11
1
\$\begingroup\$

If this is "ordinary" serial communications, I suspect that the 12 volt side will be RS-232 levels, and the 5 volt side will be UART logic levels. If so, you will need a MAX-232 or similar RS-232 driver/receiver, as the 5 volt logic levels will be inverted relative to the 12 volt RS-232 levels.

The MAX-232 and similar RS-232 line driver/receivers invert the signals, as well as providing the required voltage swing changes.

If you only want to convert from the 12 volt signal to the 5 volt, you can probably get away with a transitor (for the inversion) and a couple of resistors (base and pull-up).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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