0
\$\begingroup\$

I am converting 5V to 3.3V (for a rudimentary Raspberry Pi project). The level converter scenario below behaves as I would expect:

Level converter scenario 1 Because HV1 is connected to 5V, the voltmeter connected to LV1 and ground reads 3.3V. This looks right to me (please correct me if I am wrong).

This next scenario is the one that doesn't make sense. Same wiring, except that HV1 is no longer connected to 5V: Level converter scenario 2

This no longer makes sense to me. Should I not get 0V on LV1?

For reference - although I am not sure where to find the datasheet for it - this is the (Amazon) link to the converter component.

\$\endgroup\$
  • 1
    \$\begingroup\$ Could you give schematics? These wiring diagrams are hard to follow and I don't know what half the components are. \$\endgroup\$ – Hearth Feb 13 at 3:48
  • \$\begingroup\$ Can you provide a datasheet for your level translator? I suspect the translator has a pull-up on all the IO pins and simply passes the zero. If you measure the HV1 pin with a multi-meter it would likely be at 5V. \$\endgroup\$ – sstobbe Feb 13 at 4:21
  • \$\begingroup\$ "Should I not get 0V on LV1?" - Why? You didn't connect HV1 to 0V, after all. So why do you feel LV1 should be 0V? What do you measure at HV1? \$\endgroup\$ – marcelm Feb 13 at 13:52
  • \$\begingroup\$ ...a couple of comments seem to indicate that HV1 should be connected to 0V or "low impedance". I am not an electrical engineer, but I am guessing it means ground. Is my understanding correct? \$\endgroup\$ – Eric D Feb 13 at 14:18
1
\$\begingroup\$

I'm guessing this sparkfun level converter is what you are using as it looks like what you have in the pictures. Edit: It's not the sparkfun product, but looks like exactly the same topology. No datasheet or schematic is provided for the Anmbest product so I can't verify part numbers.

Take a look at the schematic and you will find it illuminating. The level converter is just a MOSFET and some pullups. The "direction" of the bi-directional level converter assumes one side at a time being connected to a high impedance, and the other being connected to a low impedance driven connection.

Schematic

When you leave HV1 unconnected, HV1 is pulled high (5.0V) by the resistor connected to HV, and there is nothing to pull LV1 low, so LV1 is pulled high (3.3V) by its resistor connected to LV, and you read the high output.

If LV1 is the output, the only way to get a low signal is to drive HV1 low, which will pull LV1 down through the MOSFET body diode, which will then turn on the MOSFET since its source is connected to LV1 and its gate to LV (3.3V).

\$\endgroup\$
  • \$\begingroup\$ By "low impedance" and "drive low" I am guessing you mean connecting to the ground? In other words you are suggesting I connect HV1 to ground in order to get 0V on LV1 (or conversely LV1 to ground to get 0V on HV1). Am I understanding you correctly? \$\endgroup\$ – Eric D Feb 13 at 14:19
  • \$\begingroup\$ "drive low" means effectively to connect to ground. "low impedance" and "high impedance" are ways of referring to the amount of change in current that a change in voltage causes. Logic inputs on ICs are relatively "high impedance" because it takes little current to drive them to a logic high or low voltage. Logic outputs are usually the opposite or "low impedance" in that the voltage will remain the same with much larger current flow out of the pin. You can't force a logic output to the opposite voltage without likely causing so much current to flow that you will fry the IC. \$\endgroup\$ – Brandon Hill Feb 13 at 18:04
0
\$\begingroup\$

Thanks to the guidance provided on this thread I was able to verify the correct way to wire the 4-channel level converter. It looks obvious now: HV1 must always have a wire to control LV1. If HV1 is connected to 5V, LV1 outputs 3.3V. If HV1 is connected to ground (as shown below), then LV1 outputs 0V:

Correct wiring for level converter

Thanks for all the helpful suggestions.

\$\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.