class142 / ne-rs485

RS485 for NordElettronica RV electronics control units
2 stars 0 forks source link

How to connect the RS485 interface? #1

Open weisskopfjens opened 1 year ago

weisskopfjens commented 1 year ago

A very interesting project. I have a nordelettronica NE324. The NE324 has a four pin connector for a panel. Pin 1 GND, Pin 2 BUS, Pin 3 Sense temp_bat, Pin 4 v_panel. According to the description you can connect a NE333 panel. How did you connect the RS485 interface to your charger? RS485 A and B and GND? The NE333 and the NE334 panel should be compatible to each other. Thank you very much in advance.

smotek commented 1 year ago

I have a combination of NE333 and N355. I have only A and B pin 2,3 Green and yellow connected. My communication speed is 38400baud. I sense the battery voltage states. I control switching on and off the relay.

weisskopfjens commented 1 year ago

Thank you for your answer and for the further informations. I have a position sensor MPU6050, a BME280 temperature, pressure, humidity sensor and a RS485 to serial board connected to an ESP32. I want to use the position sensor to align the caravan and with the RS485 board I want to primarily monitor the voltage of the service battery with a web interface via the NE324. Of course I also want to use the other functions via webinterface as I don't have a panel. I have had to rewrite some of your source code. If everything works as I imagine it, I would publish it here on github. Thanks for your great work and publication. Thanks to your publication I could learn a lot about Modbus ;-)

class142 commented 1 year ago

Hi @weisskopfjens, thank you for reaching out and thanks to @smotek for jumping in and answering. Unfortunatly I was unable to maintain the repository over the summer, but I just added some more wiring documentation also mentioning the actual plugs/sockets used by NE. If you would like to commit your changes, feel free to create a pull request.

PS: It's no Modbus sadly, but some proprietary protocol. Otherwise it would be way simpler to interface the bus.

weisskopfjens commented 1 year ago

Thank you for the additional pinout. I'm not sure if the interface on the NE324 is comparable to your interface on the NE334. According to the manufacturer, there is only one pin that is designated as BUS. I have a molex connector on the NE324. For a RS485 connection I would need 2 pins. Right now I'm traveling with the family with the caravan and would rather not make any experiments ;-) As soon as I am at home and have time, I will start some experiments. Currently I use an esp32. I actually measure the water level in the tank and the voltage of the battery via extra hardware. I have created a small web interface, through which I can display the values to me. If a know more i would commit my changes here. Thank you

smotek commented 1 year ago

What panel do you have there? Need a photo from the back. I see that NE333 also has several versions and connections. I have 4pin, but according to this you can have 3pin. https://pitstopcamper.com/gb/nordelettronica/15059-ne324tvdl-battery-charger-pack-ne333-panel-nordelettronica-cable.html

smotek commented 1 year ago

If this is your scheme, then you do not have RS485, but another type of bus. https://forum.karawaning.pl/uploads/monthly_2021_05/2021-05-28_16h45_53.png.a709a5df8e26590af43aea33fc8a774a.png

olivluca commented 5 months ago

I have a combination of NE333 and N355. I have only A and B pin 2,3 Green and yellow connected. My communication speed is 38400baud. I sense the battery voltage states. I control switching on and off the relay.

Do you need to disconnect the original control panel (NE333) or can they both work at once?

smotek commented 5 months ago

If you just want to listen to data, a panel can also be connected. If you want to control, you have to disconnect the panel.

class142 commented 5 months ago

That's interesting, because my NE334 can stay connected and even indicates the new state. Additionally you don't have to bother with keep-alive messages because it handles them for you if it is turned on. The NE cable by CaraControl for 196/237/356 also just splits the connection: https://www.caracontrol.eu/nordelettronica-wiring-ne-196-237-356/p25

I suppose there should be a list of panels/electroblocks an their functionalities.

olivluca commented 5 months ago

Well, I guess I'll have to get an rs485 adapter from aliexpress and do some experiment. Any suggested one?

smotek commented 5 months ago

There is Master/Slave communication, the Control panel is the Master. There should be only one Master. If there are not many questions about the bus, I can imagine that it can work. The problem arises when the Panel and the other Master are transmitting to the bus at the same time. The message will be discarded and, for example, the relay will not turn on.

I use this converter. https://vi.aliexpress.com/item/33017179197.html?spm=a2g0o.productlist.main.1.e1e813d8l70qD7&algo_pvid=ffc6e4fe-3dda-4014-973f-d3239e908277&algo_exp_id=ffc6e4fe-3dda-4014-973f-d3239e908277-0&pdp_npi=4%40dis%21EUR%211.09%211.09%21%21%211.13%211.13%21%402101fb0c17133356973716080e1199%2112000033145810430%21sea%21BE%21142829507%21&curPageLogUid=AXK6LCpCL1FQ&utparam-url=scene%3Asearch%7Cquery_from%3A

olivluca commented 5 months ago

Your converter is labeled "A,B,GND,5V", where do you get the 5v?

smotek commented 5 months ago

image My connection

White - GND Brown +12V But you don't need GND or +5V. It is enough to connect A and B.

olivluca commented 5 months ago

Maybe it's enough to connect A and B because it's getting the 5V from the usb? I'm going to need a ttl adapter (without usb the usb/serial part, to use with an esp32), in that case I think I can use the same 5V supplying the 3.3V regulator of the esp32.

smotek commented 5 months ago

Yes, the converter is powered by USB. The 5V terminal is the output. UART to RS485 conversion I recommend a module with HW flow control. There is no need to switch the data flow in SW.