6
\$\begingroup\$

I need to connect my MSP430 microcontroller (3.3V) to interact with a 5V TTL UART camera (http://www.cn-lcf.net/sdp/561974/4/pd-2909996/7575433-2127043/LCF-23M_OV528_Protocol_RS232_Camera_Module.html).

In order to do that I came up with the idea of dropping the camera's TX port from 5V to 3.3V level by a voltage divider.

The MCU TX to camera RX does not need a voltage divider and since it's a TTL camera the 3.3V from the MCU shall be enough to drive the camera's input high (https://dlnmh9ip6v2uc.cloudfront.net/assets/6/d/7/7/4/515385fdce395f0905000000.png).

Will that work?

\$\endgroup\$
2
  • \$\begingroup\$ Generally it should be OK, but for a start maybe use smallish 1K type values for the dividers so you don't affect the rise times too much especially at the higher speeds. \$\endgroup\$
    – PeterJ
    Dec 19, 2014 at 8:39
  • \$\begingroup\$ I think I better go with this solution: sparkfun.com/products/12009 It's almost the same in terms of circuit complexity but assures the proper level shifting. \$\endgroup\$
    – eltomek
    Dec 19, 2014 at 8:43

1 Answer 1

8
\$\begingroup\$

This is quite commonly done but keep resistances low so that there is little chance the rise times and fall times of the data signal are not unduly lengthened. As PeterJ says in his comment, something around 1k will be OK.

There are devices that you can buy that do this (8 bit wide and bi-directional) but if you only have one signal to modify then resistors are the best choice.

\$\endgroup\$
7
  • \$\begingroup\$ How about sparkfun.com/products/12009, isn't it better while still retaining simple circuit? \$\endgroup\$
    – eltomek
    Dec 19, 2014 at 9:00
  • 2
    \$\begingroup\$ @tml - simpler than two resistors? \$\endgroup\$
    – Andy aka
    Dec 19, 2014 at 9:14
  • 1
    \$\begingroup\$ @tml you can do that, follow their schematic and component choice though so you know it's going to work. The selection of MOSFETs and their use in this situation means it's not actually that simple \$\endgroup\$
    – KyranF
    Dec 19, 2014 at 9:14
  • 1
    \$\begingroup\$ I agree with Andy that resistors are all you need for this \$\endgroup\$
    – KyranF
    Dec 19, 2014 at 9:14
  • \$\begingroup\$ @Andyaka sure, it's an additional MOSFET, however if only one line has a voltage divider and by mistake I put the 5V on that line it may damage the 3.3V device. As a complete solution the MOSFET level shifter on 2 lines does the protection. \$\endgroup\$
    – eltomek
    Dec 19, 2014 at 9:24

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.