question

phtr avatar image

Connect Raspberry Pi directly to MPPT over serial pins for Venus OS / Venus package

Hi there,


as I find 30€ quite a lot for the VE.Direct to USB cable and as the Raspberry Pi just has some Serial Pins at the GPIO interface, I wondered if someone has already connected e.g. a MPPT via the Pis GPIOs to the Venus software. Would be great to hear!


Best regards,

Philipp

MPPT - Solar Charge ControllerVenus OSVE.DirectRaspberry Pi
10 |3000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

3 Answers
andyalford avatar image
andyalford answered ·

I had wondered the same thing, but I have decided that the galvanic isolation provided in the USB cable is worth the money.

A shame though, as the extra cabling will create quite a rats' nest.

(My boat was hit by lightning a few years ago, and the only Electronics which survived had isolated inputs.)

For anyone curious, VE.Direct wiring and protocol specification is published here

https://www.victronenergy.com/support-and-downloads/whitepapers

2 comments Share
10 |3000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

One way to reduce the rat's nest is a USB hub. I have everything connect near the chargers , BMV and Multi, then run a single cable to the Pi.

jkario avatar image
jkario answered ·

MPPTs use 5V and the Pi GPIO pins are 3v3 so you cannot connect them directly. You would need a logic level converter in between. You could use one of those cheap eBay USB to Serial TTL cables and make your own cable by cutting the jumper cables and replacing them with a 4pin JST-PH connector. Be sure to only connect GND, TX and RX. You should never ever connect together the USB port 5V with the VE.Direct port 5V. Also, the cable is not isolated. I presume the official Victron cable has a SI8422 chip inside to provide isolation (just a guess). I would use the official cable. Given that it's going to take time to source the components and solder the connector and the end result is not as good as the original (no isolation) it's just not worth the effort. Choose your battles.

1 comment Share
10 |3000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Hi @jkario, thanks for your answer!

I'm aware of the need of a logic level convert (two resistors should do it) and how to connect the MPPT to the Pi. Nevertheless, thanks for your explanations!

My question was more focused on whether the serial GPIO port of the Raspberry Pi can be used on the software side with VenusOS or whether only the official USB cable is supported.

If the original cable only uses a standard component, then the question would be whether VenusOS only listens on `/dev/ttyUSBx` or also on `/dev/ttySx`. Do you have any knowledge about it?


masterov avatar image
masterov answered ·

I was able to connect VE.Direct (MPPT 100/30) to RPi4 as follows:


vedirecttorpi4.jpg (299.4 KiB)
1 comment Share
10 |3000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Hi Masterov

So you have the VE direct on the rapsi 4 running OK and showing a MPPT or any other VE Direct controller showing on the screen.?

As i have developed a interface for the raspi pi to except I/O, relays, can bus etc, Just can't get the VE direct or go, on a rapsi 3+. The USB VE direct all runs OK etc just not the serial port UART on the raspi.

Done all the level conversion as a test unit etc i can scope the the comms siganls going in and out just that Venus software dose not respond.

I know the raspi 4 has different UART port arrangement compared to the 3+ etc.

Victron Raspi Hat.pdf

Victron Raspi Stetson.pdf

Any thoughts, i have done all the config files to activate etc.

The only odd thing is after boot the rapsi hangs with the UART connected after disconnecting the RX port it boots OK, doesn't like being loaded up.

Also i have full script file for auto updates to be done automatically now , so need to manual install files etc.