0
\$\begingroup\$

I'm connected to a 5v heat-pump to control it via serial. I'm using a level shifter to shift between the two as the heatpump is 5v and the D1 is 3.3v shown in the scope images below. My issue is I can't read data off the RX line as its voltage is wrong but only when connected to the D1. If I remove the D1 RX pin the voltages are shifted correctly.

Wires coming in from the heat-pump, top, left to right are: RX, GND, 5V, TX. 5V goes to power the D1 mini which uses a regulator to convert it down to 3.3. enter image description here

Here is the circuit with the D1 sending data to the HP. Goes out blue at 3.3v and is shifted correctly to 5v. Perfect. enter image description here

Here is the RX line though coming back into the D1. Yellow is the 5v coming in which is wrong, it doesn't have a low. It's then shifted to an unreadable level for the D1. enter image description here

The strange part is if I remove the green wire coming from the shifter to the D1 and scope again I get what I would expect. Levels coming in at 5v shifted down to 3.3v. enter image description here

So the weird voltage issue only happens when it's connected to the D1. I've three different D1 chips (given they all came in the same batch) with the same results. I don't think it's the shifter because of what I see in the last scope. Any idea what's going on here?

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

Obviously there is a USB to UART chip (CH340C) on the D1 which is probably driving your RX signal as well. Did you take that into account?

\$\endgroup\$
  • \$\begingroup\$ There is nothing connected to the usb so I figured it wouldn't affect anything. Is this assumption wrong? \$\endgroup\$ – Ryan Detzel Oct 25 '18 at 14:05
  • \$\begingroup\$ The chip is supplied all the time so it's probably driving that line \$\endgroup\$ – Tom L. Oct 25 '18 at 14:28
  • \$\begingroup\$ Interesting, I wonder if that's why this works fine with a different clone chip? Maybe the clone (can't verify right now) is using a different USB to UART chip that doesn't drive it the same way? Assuming that's it is there anything I can do to get around this? \$\endgroup\$ – Ryan Detzel Oct 25 '18 at 14:30
  • \$\begingroup\$ Actually that's the usual behavior if you supply the chip like this. It's only different if the chip is supplied through the usb 5V. You'll have to remove that IC or lift one pin. \$\endgroup\$ – Tom L. Oct 25 '18 at 14:33

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.