Issues reading VE.Direct serial output from MPPT 75/15 with ESP8266 (WeMos D1 R1 board)

This is my second attempt to utilized official VE.Direct cable + MAX3232, this time using Atmega 328 with extra convenience shield.

It reads fine. VE.Direct RS232 side has to have 5V power via DTR pin.

So to recap so far:

a). We can use official (expensive, long shipping, etc) cable, powering it via DTR (PIN4), with single MAX3232-based converter.
b). We use “raw” VE.Direct wire using TWO MAX3232-based converters (or max + logic inverter?), as in the first post.

Anyway, it needs too much custom hardware :confused: .

EDIT: Why did I use 3.3V in Arduino side? Atmega is 5V… Welp, it works.

Works with WeMos too:

Having some “arduino” shield with male pin RS232 port, and DTR with 5V, setup would be simpler.

I’ve “modded” generic RS232->TTL converter like this and it works using official VE.Direct cable (not “raw” wires directly from Victron):

  1. Use “gender changer” adapter to connect directly without wire hacks.
  2. Due gender changer TX/RX is swapped. We must take PIN2 from Ve.Direct into same track that was PIN3 connected to before.
  3. Provide 3.3V (it’s enough!) power via PIN4 (DTR) so that VE.Direct “dongle” works.

Theoretically, I could use “raw” TX from Victron connected to 4N35 generic optocoupler to convert ~5V to 3.3V AND to invert the signal at the same time, as optocoupler inverts signal just by default, assuming you use pull-up resistor?

Yes, you could do that.
And you can also invert the signal by the means of how you connect the opto input led to the Victron TX pin.
You can use the TX pin as a source pin or a pull down pin.

Smart, haven’t thought of that.

But that means I would have to use in addition +5V cable of the Victron VE.Direct port, and that’s extra wire?

I thought I could just use TX and GND from Victron.

Finally got back to this task.

This is Picoscope capture of Victron output (red), and output after VE.Direct official cable/adapter and RS232->TTL converter:

(converter must be modded to supply power via DTR, and swap TX/RX because as I connect two female DB-9’s).

This “blue” signal, connected to ESP8266’s TX, works fine.

Strangely, Picoscope shows that end of blue signal sequence ends immaturely for some reason:

Anyway, looking at picoscope all I need is to change ~4.7V → 3.3V?

I believe I was trying this TXS0108E-based 5v->3.3V level converter board before:

But it didn’t worked for me for some reason, gonna try again. I was rather “blind” without scope.

This is measurement setup:

TXB0104-based converter (like SparkFun Voltage-Level Translator Breakout - TXB0104) works, but it’s rather “unstable” with long / extra wires. I’ve seen post somewhere stating that TXB0104 pretty good conditions to work.

For example, welding extra wire to VE.Direct TX output and connecting it to Picoscope works, but once you disconnect from Picoscope the TXB0104 goes haywire, producing gibberish :smile: .

BSS138-based SparkFun Logic Level Converter - Bi-Directional works too, and it seems it’s much simpler and more stable.

My guess that SoftwareSerial’s “invert” does something with pullup/down resistors of ESP and it makes it work in that way for some reason, while these proper decoupling/level converter solutions just work without any fiddling.

So the solution is to use proper 5v->3.3V logic level converter like BSS138-based from SparkFun.

This is usage example with some random ESP8266-based “LC Relay Module” (http://www.chinalctech.com/cpzx/Programmer/Relay_Module/650.html) if anyone needs:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.