Start a new topic

OpenEVSE over Ethernet

Hi,


I am using a home automation system to permanently monitor and adjust the charge current of my OpenEVSE.


I wasn't fully satisfied with the wifi option because

  1. I was having random disconnections
  2. I try to avoid using radiowaves when possible


As I didn't find any ad-hoc solution to wire the OpenEVSE to my Ethernet network, I gathered info and parts to make mine. Here I decided to share my experience.



Hardware choice

TCP232-T2


I bought a cheap TCP232-T2 module, lost half a day trying to use it setup software which never worked, ended-up using the setup options of the virtual comport appliance instead to set the device to my need:


image


The "TCP Server" protocol is crucial.

The BaudRate and COM Parameters should match the OpenEVSE ones, generally as pictured.

The network settings are up to your choices.


Wiring

image

The OpenEVSE outputs 5V on its serial pins but the TCP232 is designed for 3.3V only so I tinkered a little bit with connectors, wires and resistors I had around.

I reused the Ubec from the Wifi kit. Ground is already connected between the Ubec 0V and the OpenEVSE GND, so no need to wire it.



Box Setup


image


I 3D-printed an enclosure to insulate and secure the TCP232 in the box.

I routed the ethernet cable through a PG in the box and crimped a RJ45 connector.



Software


The manufacturer of the TCP232 is providing software solutions for windows, but my home automation runs on a raspberry pi under raspbian gnu/linux.


I found the following netcat commands to fulfil my needs:



 Get max current "Pilot" setpoint ($GE rapi command):

echo '$GE' | netcat -C -w 1 192.168.1.51 10000

 

Set max current "Pilot" setpoint ($SC xx rapi command), example for 10A:

echo '$SC 10' | netcat -C -w 1 192.168.1.51 10000

 

Get actual charge current value ($GG rapi command):

echo '$GG' | netcat -C -w 1 192.168.1.51 10000

 

I "pipe" the rapi command to netcat.

Of course you may extend the principle to any rapi command.

The -C option adds CrLf to each command, needed by the TCP232.

The -w 1 sets a timeout of 1s before ending the tcp session.

There are different netcat versions that may not support these options, or have different switches, please check yours.

The IP and port just match the earlier made settings of my TCP232.



The end


I think the most valuable info from my project is there.

I hope my english is OK.

Any mistake in this post? There are better ways to achieve the same goal; Any idea in mind, please comment!


3 people like this idea

Hi Graham,


Cool that you solved your issue.

I suspect the TCP232 input impedance to be a bit low, that's why I chose low resistor values.


You're on the right track!


1 person likes this

Hi,


Since the place where I will put my OpenEVSE will be at level -3 and my apartment is at level 4 (7 floors away) wifi is not an option because I want to control from home. With wifi I'm limited as hotspot near the car.


So, wired is the only option.


Since I have no resistors at home and I need to buy them, instead I was think to buy a module to convert 3.3V <--> 5V.

ex.: 3.3V 5V TTL Logic Level Converter Bi-directional


What do you think?


BR,

Pedro

Hi Pedro,


The signal level converter is probably a better solution than the resistors, however, my only concern would be to check if you need to supply +3.3v to it as I think we don't have any on our setup.

The ebay page isn't clear about it.


This said, I guess you could still add a 3.3v dc/dc converter from the 12v or the 5v.


Guillaume

Hi All,


Am finally preparing to convert my OpenEVSE from the wireless to the Ethernet module. From digging around it appears the the Huzzah ESP8266 WiFi Module includes MQTT support. Am guessing the USR-TCP232-T2 Serial -> Ethernet will not have any such support... does sound like includes a webpage for config though. Can anyone clarify/expand on this... I would love to use MQTT but over a wired connection. Thanks!

Hi Guillaume,


I too suffered connectivity reliability issues with the WiFi module on my OpenEVSE, so I followed your lead and USR-TCP232-T2 module.


Like your example, the TCP232 module is powered by the Ubec but in my case I've used a 15k & 10k resistor to achieve 3v to the module's RX pin. I don't have a scope so can't measure the signal voltage, but the maths work out.


I've configured the module with the same options as you defined, and I can happily communicate with the module over the network. However, after connecting it to my OpenEVSE v5 board I'm not getting any response from the OpenEVSE.


I've checked continuity across the system and everything looks good. Any ideas?


Also, what's the significance of the RemoteIP value?


Thanks in advance :)

Actually, I just fixed it - realised I was probably dropping the voltage a bit too much @ 3v. Just swapped them out for 3.6K & 7.5K resistors which should give me 3.378v....and it worked!

Hi Anthony,

I confirm that by removing the wifi module we lose the features it includes like MQTT.

I also confirm that my USR TCP232 module has an onboard webserver but only for its own config (network, serial settings...).

You might explore something like an ethernet capable arduino board on which you would port some code from the openEVSE wifi module github.

Am thinking of using a raspberry pi as an intermediary for the MQTT connection.. it could be the go between for MQTT and RAPI to Open EVSE.. thanks for the confirmation. Am always pushing for wired connections.

I am also controlling my OpenEVSE using this ethernet method, but some proper support and implementation from the OpenEVSE guys on this front would be awesome!

 Hi,


Update: my TCP-232 device suddenly failed. I ordered a new one, on Amazon this time, and got it a few days ago.

I was surprised to read the "USR" brand on it as my previous one didn't feature it.

I was even more surprised to see that the new one had an onboard web server for its setup, and that it was instantly compatible with every software from the usriot website.

In the end I'm pretty sure the first device I got was a fake:


image


This might also explain why it failed after less than a year of operation.


The Genuine one was very easy to setup as a TCP server, the only special setting I had to activate is called "impersistent connection" in the config webpage.

Very cool project... nice professional touch with 3D enclosure and PG. Have two questions;
1) latest online at USR IOT shows support for 5V and 3.3V.. this should preclude the need for resistors?
2) do you sell your cool enclosure (and do you have link for PG?)... I know... that's 3 questions ;-)

Nice to see others trying to seek RF alternatives!

 

... on closer reading looks like the TX signals are the issue at 5V,,, see the Ubec powering the converter at 5V on VDD... my bad. Other questions on enclosure and PG still stand... could offer kit w/ adapter, gland and enclosure ;-)

 

Thanks for sharing, very cool project...

Hi! Great project! Did you make any changes to the OpenEVSE firmware? Is any Ethernet module with UART support suitable for these purposes? I want to buy this: http://ali.onl/10KT

Login or Signup to post a comment