question

wouter avatar image
wouter asked

How to make an arduino comunicate over ve.direct

hello, i want to program an arduino in a way that it appears as a solar charge controller in the VRM. I want to measure the voltage and current on my own build charger and monitor it on the VRM. How can i sent data over the Ve.direct port. i read the Victron documentation but i am lost.

VE.Directcommunication protocolarduino
1 comment
2 |3000

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

kevgermany avatar image kevgermany ♦♦ commented ·
@wouter

@Mike Dorsett

@Peter H


Moved to modifications.

0 Likes 0 ·
4 Answers
Mike Dorsett avatar image
Mike Dorsett answered ·

Have you read BlueSolar-HEX-protocol-MPPT.pdf? Your arduino needs a serial port, programmed to the right data rate. you then need to write your code to respond to the register numbers that correspond to the incommng request strings, and that will (optionally) broadacst the data in text protocol once per second. This is a simplified overview, the complete task will be quite complex as CRC detection and generation need to be implemented too.

2 |3000

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

Peter H avatar image
Peter H answered ·

Hi, I have a similar question and perhaps more could benefit from the answer?

In this thread, @gone-sailing had developed this amazing protocol to emulate almost any sensor and send it to Cerbo GX over VE.Direct. It would be awesome if someone could help with describing the MVP for each.

Let's try to split it in three parts:

1. Arduino code. MVP: Arduino sketch which send over VE.Direct a tank level sensor labelled "Tank1" with a static value of "42%"

2. Connector pinning. MVP: The VE.Direct link schematics for which pin on the Arduino should go to which pin on the Cerbo VE.Direct connector

3. Cerbo GX modifications. MVP: Display the external sensor among with the others in its GUI

2 |3000

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

gone-sailing avatar image
gone-sailing answered ·

Peter, thanks for the plug but the driver I created allows you to send data to a GX device over MQTT not VE.Direct. in my opinion, using MQTT is probably easier.

2 comments
2 |3000

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

Peter H avatar image Peter H commented ·
Ah, my bad. MQTT over wifi I suppose since Arduino (eg R4) lack Ethernet port?
0 Likes 0 ·
gone-sailing avatar image gone-sailing Peter H commented ·
It depends on which one you get. I have a few Arduinos with Wifi and mqtt works well on them.
0 Likes 0 ·
wkirby avatar image
wkirby answered ·

This VE.Direct simulator might help to get you started.
This particular sketch sends fixed values and simulated a BMV, but you could adapt it I suppose.
https://github.com/izak/vedirect-simulator

2 |3000

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

Related Resources

VE.Direct protocol FAQ

Additional resources still need to be added for this topic