NEWS
AC laden mit einem Mean Well NPB 750-48
-
Projekt : Über AC, laden mit einem Mean Well NPB 750-48 über Can Bus Steuerung
Der Versuch meine Pylontech USxxxx steuerbar per Mean Well zu laden,
das ganze per Tasmota Can SMLBauteile:
Mean Well NPB 750-48
ESP32 NodeMcu / Developer Board
Waveshare SN65HVD230 CAN Board
JST Buchsengehäuse-Kabel PHD Polzahl Gesamt 14 Rastermaß: 2mm PHDR-14VS
JST Konfektionierte Litze PHD Polzahl Gesamt 1 810793weiteres folgt --------------------------------------->
Links:

-
Projekt : Über AC, laden mit einem Mean Well NPB 750-48 über Can Bus Steuerung
Der Versuch meine Pylontech USxxxx steuerbar per Mean Well zu laden,
das ganze per Tasmota Can SMLBauteile:
Mean Well NPB 750-48
ESP32 NodeMcu / Developer Board
Waveshare SN65HVD230 CAN Board
JST Buchsengehäuse-Kabel PHD Polzahl Gesamt 14 Rastermaß: 2mm PHDR-14VS
JST Konfektionierte Litze PHD Polzahl Gesamt 1 810793weiteres folgt --------------------------------------->
Links:

-
Platzhalter 2
Pinbelegung

Der Esp32 wird mit einer -bin geflasht mit folgenden define:
#define USE_MCP2515
#define USE_SML_CANBUS
#define USE_SML_SCRIPT_CMD
#define USE_SML_M
#define USE_WEBSEND_RESPONSE
#define USE_SCRIPT_STATUS
#define USE_SCRIPT_FULL_JSON_PARSER
#define USE_SCRIPT_JSON_EXPORT
#define SUPPORT_MQTT_EVENT
#define USE_SCRIPT_WEB_DISPLAY
Der Waveshare wird verbunden :
ESP32 Rx nach RX Can
ESP32 Tx nach TX Can
Can L an NPB Can L
Can H an NPB Can H
Keine terminierung am Waveshare SN65Tasmota :
Telemetrieperiode ist 10
Mqtt verbunden mit Mqtt Adapter
Tasmota keine Enstellung der GPIO nötig da im Script ausgeführtBit 7 Command B4 00

-
Platzhalter 2
Pinbelegung

Der Esp32 wird mit einer -bin geflasht mit folgenden define:
#define USE_MCP2515
#define USE_SML_CANBUS
#define USE_SML_SCRIPT_CMD
#define USE_SML_M
#define USE_WEBSEND_RESPONSE
#define USE_SCRIPT_STATUS
#define USE_SCRIPT_FULL_JSON_PARSER
#define USE_SCRIPT_JSON_EXPORT
#define SUPPORT_MQTT_EVENT
#define USE_SCRIPT_WEB_DISPLAY
Der Waveshare wird verbunden :
ESP32 Rx nach RX Can
ESP32 Tx nach TX Can
Can L an NPB Can L
Can H an NPB Can H
Keine terminierung am Waveshare SN65Tasmota :
Telemetrieperiode ist 10
Mqtt verbunden mit Mqtt Adapter
Tasmota keine Enstellung der GPIO nötig da im Script ausgeführtBit 7 Command B4 00

-
Status,
Daten abholen geht,
senden auf dem Can Bus geht

zu beachten ist das der Browser bei Wert Änderung nicht die Web Gui aktualisiert !
Platzhalter 4
das Script von heute 07.07.2024
>D 40 sw=0 cstr="" cstrV="" cstroo="" cstrT="" Wert=0 Wert2=0 Byte1=0 Byte1H="" Byte2=0 Byte2H="" Volt=51.50 >B =>sensor53 r >S ; Anfrage Typ if upsecs%10==0 then cstrT="800C0103028200" sml(1 3 cstrT) endif ; Switch on / off if chg[sw]>0 ;if upsecs%30==0 and sw>0 then ;on cstroo="800C010403000001" sml(1 3 cstroo) print ----- 1 ----- endif if chg[sw]<1 ;if upsecs%30==0 and sw<1 ;off then cstroo="800C010403000000" sml(1 3 cstroo) print ----- 0 ----- endif ; Volt senden 51,50 Volt if upsecs%15==0 then cstrV="800C01040420001E14" sml(1 3 cstrV) endif ; Berechnung Sende Byte ( 2 Byte ) ; gesendet wird Ampere if chg[Wert]>0 then Wert2=Wert*2 Byte1=Wert2/256 endif ;Byte 1 ist kleiner 0 if Byte1<1 then Byte1=0 Byte1H=hn(Byte1) Byte2=Wert2 Byte2H=hn(Byte2) endif ;Byte 1 ist 1 if Byte1>1 and Byte1<2 then Byte1=1 Byte1H=hn(Byte1) Byte2=Wert2-256 Byte2H=hn(Byte2) endif ;Byte 1 ist 2 if Byte1>2 and Byte1<3 then Byte1=2 Byte1H=hn(Byte1) Byte2=Wert2-512 Byte2H=hn(Byte2) endif ;Byte 1 ist 3 if Byte1>3 and Byte1<4 then Byte1=3 Byte1H=hn(Byte1) Byte2=Wert2-768 Byte2H=hn(Byte2) endif ;Byte 1 ist 4 if Byte1>4 and Byte1<5 then Byte1=4 Byte1H=hn(Byte1) Byte2=Wert2-1024 Byte2H=hn(Byte2) endif if upsecs%30==0 then cstr="800C0104043000"+Byte2H+Byte1H sml(1 3 cstr) print cstr ist %cstr% print Wert ist %Wert% endif >M 1 ; Mean Well 750-48 ; params -> 04 = baudrate 250kb + number of receive buffers * 100 +1,3,C,0,3204,CAN,1,5 ;Eingangsfilter 1,000C0003088200@,Model Typ,,Typ,0 >W bu(sw "LR ist ein send Off" "LR ist Aus send On") nm(0 700 20 Wert "Zähler Wert (W): " 80 1) cstT Typ{m} %cstT% cstr Ampere{m} %cstr% cst Volt{m} %cstrV% cstroo Ein_Aus{m} %cstroo% Wert ist {m} %Wert% W Wert2 ist {m} %Wert2% W Byte1 ist {m} %Byte1% Byte1 Hex ist {m} %Byte1H% Byte2 ist {m} %Byte2% Byte2 Hex ist {m} %Byte2H% # -
Platzhalter 4
das Script von heute 07.07.2024
>D 40 sw=0 cstr="" cstrV="" cstroo="" cstrT="" Wert=0 Wert2=0 Byte1=0 Byte1H="" Byte2=0 Byte2H="" Volt=51.50 >B =>sensor53 r >S ; Anfrage Typ if upsecs%10==0 then cstrT="800C0103028200" sml(1 3 cstrT) endif ; Switch on / off if chg[sw]>0 ;if upsecs%30==0 and sw>0 then ;on cstroo="800C010403000001" sml(1 3 cstroo) print ----- 1 ----- endif if chg[sw]<1 ;if upsecs%30==0 and sw<1 ;off then cstroo="800C010403000000" sml(1 3 cstroo) print ----- 0 ----- endif ; Volt senden 51,50 Volt if upsecs%15==0 then cstrV="800C01040420001E14" sml(1 3 cstrV) endif ; Berechnung Sende Byte ( 2 Byte ) ; gesendet wird Ampere if chg[Wert]>0 then Wert2=Wert*2 Byte1=Wert2/256 endif ;Byte 1 ist kleiner 0 if Byte1<1 then Byte1=0 Byte1H=hn(Byte1) Byte2=Wert2 Byte2H=hn(Byte2) endif ;Byte 1 ist 1 if Byte1>1 and Byte1<2 then Byte1=1 Byte1H=hn(Byte1) Byte2=Wert2-256 Byte2H=hn(Byte2) endif ;Byte 1 ist 2 if Byte1>2 and Byte1<3 then Byte1=2 Byte1H=hn(Byte1) Byte2=Wert2-512 Byte2H=hn(Byte2) endif ;Byte 1 ist 3 if Byte1>3 and Byte1<4 then Byte1=3 Byte1H=hn(Byte1) Byte2=Wert2-768 Byte2H=hn(Byte2) endif ;Byte 1 ist 4 if Byte1>4 and Byte1<5 then Byte1=4 Byte1H=hn(Byte1) Byte2=Wert2-1024 Byte2H=hn(Byte2) endif if upsecs%30==0 then cstr="800C0104043000"+Byte2H+Byte1H sml(1 3 cstr) print cstr ist %cstr% print Wert ist %Wert% endif >M 1 ; Mean Well 750-48 ; params -> 04 = baudrate 250kb + number of receive buffers * 100 +1,3,C,0,3204,CAN,1,5 ;Eingangsfilter 1,000C0003088200@,Model Typ,,Typ,0 >W bu(sw "LR ist ein send Off" "LR ist Aus send On") nm(0 700 20 Wert "Zähler Wert (W): " 80 1) cstT Typ{m} %cstT% cstr Ampere{m} %cstr% cst Volt{m} %cstrV% cstroo Ein_Aus{m} %cstroo% Wert ist {m} %Wert% W Wert2 ist {m} %Wert2% W Byte1 ist {m} %Byte1% Byte1 Hex ist {m} %Byte1H% Byte2 ist {m} %Byte2% Byte2 Hex ist {m} %Byte2H% #nun Vorbereitung zum Livetest -------------------------------------------->
Test Script vom 30.06.2024 Daten abholen :
>D ovolt=0 maxc=0 cstr="" Timer=0 Wert=0 >B =>sensor53 r ; ->sensor53 d1 ; Dump mode for console debug >BS +>subscribe EA, cmnd/MeanWell/CSTR +>subscribe EA, cmnd/MeanWell/VOUT +>subscribe EA, cmnd/MeanWell/COUT >S Timer+=1 if Timer>10 then cstr="800C0103026100" sml(1 3 cstr) endif if Timer>11 then cstr="800C0103026000" sml(1 3 cstr) endif if Timer>12 then cstr="800C010302B100" sml(1 3 cstr) endif if Timer>13 then cstr="800C010302B200" sml(1 3 cstr) endif if Timer>14 then cstr="800C010302B300" sml(1 3 cstr) endif if Timer>15 then cstr="800C010302B000" endif if Timer>17 then =>websend [192.168.2.28] /cm?cmnd=status 10 endif if Timer>18 then +>publish MeanWell/CSTR %cstr% endif if Timer>19 then +>publish MeanWell/VOUT %Wert% endif if Timer>20 then +>publish MeanWell/COUT %Wert% endif if Timer>21 then print Bezugswert ist : %Wert% print Eingabe Volt ist : %ovolt% print Eingabe Current ist : %maxc% endif if Timer>22 then Timer=0 endif if chg[ovolt]>0 { ; change voltage 41.5 - 58.5 cstr="97654321081111"+hx(ovolt*1024) ;cstr="800C0103042000"+hn(test) sml(1 3 cstr) } if chg[maxc]>0 { ; change max current 0-60A cstr="908180FE0801030000"+hx(maxc*20) ;cstr="800C010302B200" sml(1 3 cstr) } >M 1 ; Mean Well 750-48 ; params -> 04 = baudrate 250kb + number of receive buffers * 100 +1,3,C,0,3204,CAN,1,5 1,000C000304B000uuUU@100,B0 CC Constant Current,A,B0,0 1,000C000304B100uuUU@100,B1 CV Constant Voltage,V,B1,0 1,000C000304B200uuUU@100,B2 FV Floating Voltage,V,B2,0 1,000C000304B300uuUU@100,B3 TC Taper Current,A,B3,0 1,000C0003046100uuUU@10,61 Read Current Out,A,COut,0 1,000C0003046000uuUU@10,60 Read Voltage Out,V,VOut,0 ;1,000C0003088600@,Serial Number,,serial,0 ;1,000C000308xxxx@,Alle ID,,Alle,0 ;@ indicates termination of the decoding procedure. ;string result meter serial number, use # character for this parameter >E ; Executed when a Tasmota MQTT RESULT Wert=WebQuery#StatusSNS#MT175#Bezug_Aktuell >W nm(49.8 51.5 0.1 ovolt "Output Voltage (V): " 80 1) nm(0 20 0.1 maxc "Max Current (A): " 80 1) ;cstr{m}%cstr% Zähler Bezug Watt{m} %Wert% W #
-
nun Vorbereitung zum Livetest -------------------------------------------->
Test Script vom 30.06.2024 Daten abholen :
>D ovolt=0 maxc=0 cstr="" Timer=0 Wert=0 >B =>sensor53 r ; ->sensor53 d1 ; Dump mode for console debug >BS +>subscribe EA, cmnd/MeanWell/CSTR +>subscribe EA, cmnd/MeanWell/VOUT +>subscribe EA, cmnd/MeanWell/COUT >S Timer+=1 if Timer>10 then cstr="800C0103026100" sml(1 3 cstr) endif if Timer>11 then cstr="800C0103026000" sml(1 3 cstr) endif if Timer>12 then cstr="800C010302B100" sml(1 3 cstr) endif if Timer>13 then cstr="800C010302B200" sml(1 3 cstr) endif if Timer>14 then cstr="800C010302B300" sml(1 3 cstr) endif if Timer>15 then cstr="800C010302B000" endif if Timer>17 then =>websend [192.168.2.28] /cm?cmnd=status 10 endif if Timer>18 then +>publish MeanWell/CSTR %cstr% endif if Timer>19 then +>publish MeanWell/VOUT %Wert% endif if Timer>20 then +>publish MeanWell/COUT %Wert% endif if Timer>21 then print Bezugswert ist : %Wert% print Eingabe Volt ist : %ovolt% print Eingabe Current ist : %maxc% endif if Timer>22 then Timer=0 endif if chg[ovolt]>0 { ; change voltage 41.5 - 58.5 cstr="97654321081111"+hx(ovolt*1024) ;cstr="800C0103042000"+hn(test) sml(1 3 cstr) } if chg[maxc]>0 { ; change max current 0-60A cstr="908180FE0801030000"+hx(maxc*20) ;cstr="800C010302B200" sml(1 3 cstr) } >M 1 ; Mean Well 750-48 ; params -> 04 = baudrate 250kb + number of receive buffers * 100 +1,3,C,0,3204,CAN,1,5 1,000C000304B000uuUU@100,B0 CC Constant Current,A,B0,0 1,000C000304B100uuUU@100,B1 CV Constant Voltage,V,B1,0 1,000C000304B200uuUU@100,B2 FV Floating Voltage,V,B2,0 1,000C000304B300uuUU@100,B3 TC Taper Current,A,B3,0 1,000C0003046100uuUU@10,61 Read Current Out,A,COut,0 1,000C0003046000uuUU@10,60 Read Voltage Out,V,VOut,0 ;1,000C0003088600@,Serial Number,,serial,0 ;1,000C000308xxxx@,Alle ID,,Alle,0 ;@ indicates termination of the decoding procedure. ;string result meter serial number, use # character for this parameter >E ; Executed when a Tasmota MQTT RESULT Wert=WebQuery#StatusSNS#MT175#Bezug_Aktuell >W nm(49.8 51.5 0.1 ovolt "Output Voltage (V): " 80 1) nm(0 20 0.1 maxc "Max Current (A): " 80 1) ;cstr{m}%cstr% Zähler Bezug Watt{m} %Wert% W #
Info Data

//Auflistung Canbus HEX für Ladestrom setzen //30006400 //1A 51,5 Watt //3000C800 //2A 103,0 Watt 0100 h ist 256 //30002C01 //3A 154,5 Watt //30009001 //4A 206,0 Watt //3000F401 //5A 257,5 Watt //30005802 //6A 309,0 Watt 0200 h ist 512 //3000bc02 //7A 360,5 Watt //30002003 //8A 412,0 Watt 0300 h ist 768 //30008403 //9A 463,5 Watt //3000E803 //10A 515,0 Watt //30004C04 //11A 566,5 Watt 0400 h ist 1024 //30006A04 //11,30 A 581,9 Watt -
Info Data

//Auflistung Canbus HEX für Ladestrom setzen //30006400 //1A 51,5 Watt //3000C800 //2A 103,0 Watt 0100 h ist 256 //30002C01 //3A 154,5 Watt //30009001 //4A 206,0 Watt //3000F401 //5A 257,5 Watt //30005802 //6A 309,0 Watt 0200 h ist 512 //3000bc02 //7A 360,5 Watt //30002003 //8A 412,0 Watt 0300 h ist 768 //30008403 //9A 463,5 Watt //3000E803 //10A 515,0 Watt //30004C04 //11A 566,5 Watt 0400 h ist 1024 //30006A04 //11,30 A 581,9 WattBastelpause

>D 40 sw=0 cstr="" cstrV="" cstroo="" cstrA="" Wert=0 Wert2=0 Byte1=0 Byte1H="" Byte2=0 Byte2H="" Volt=51.50 Timer=0 >B =>sensor53 r >S ; Anfrage Typ Timer+=1 if Timer>50 then cstrA="800C0103028200" sml(1 3 cstrA) endif if Timer>51 cstrA="800C0103028600" sml(1 3 cstrA) endif if Timer>52 then cstrA="800C010302B100" sml(1 3 cstrA) endif if Timer>53 then cstrA="800C010302B200" sml(1 3 cstrA) endif if Timer>54 then cstrA="800C010302B300" sml(1 3 cstrA) endif if Timer>55 then cstrA="800C010302B000" sml(1 3 cstrA) endif if Timer>56 then cstrA="800C0103026100" sml(1 3 cstrA) endif if Timer>57 then cstrA="800C0103026000" sml(1 3 cstrA) endif if Timer>58 then cstrA="800C0103026100" sml(1 3 cstrA) endif if Timer>59 then cstrA="" endif if Timer>60 then Timer==0 endif if Timer>61 then Timer=0 endif ; Switch on / off ;if chg[sw]>0 if upsecs%30==0 and sw>0 then ;on cstroo="800C010403000001" sml(1 3 cstroo) print ----- 1 ----- endif ;if chg[sw]<1 if upsecs%30==0 and sw<1 ;off then cstroo="800C010403000000" sml(1 3 cstroo) print ----- 0 ----- endif ; Volt senden 51,50 Volt if upsecs%28==0 then cstrV="800C01040420001E14" sml(1 3 cstrV) endif ; Berechnung Sende Byte ( 2 Byte ) ; gesendet wird Ampere if chg[Wert]>0 then Wert2=Wert*2 Byte1=Wert2/256 endif ;Byte 1 ist kleiner 0 if Byte1<1 then Byte1=0 Byte1H=hn(Byte1) Byte2=Wert2 Byte2H=hn(Byte2) endif ;Byte 1 ist 1 if Byte1>1 and Byte1<2 then Byte1=1 Byte1H=hn(Byte1) Byte2=Wert2-256 Byte2H=hn(Byte2) endif ;Byte 1 ist 2 if Byte1>2 and Byte1<3 then Byte1=2 Byte1H=hn(Byte1) Byte2=Wert2-512 Byte2H=hn(Byte2) endif ;Byte 1 ist 3 if Byte1>3 and Byte1<4 then Byte1=3 Byte1H=hn(Byte1) Byte2=Wert2-768 Byte2H=hn(Byte2) endif ;Byte 1 ist 4 if Byte1>4 and Byte1<5 then Byte1=4 Byte1H=hn(Byte1) Byte2=Wert2-1024 Byte2H=hn(Byte2) endif if upsecs%30==0 then cstr="800C0104043000"+Byte2H+Byte1H sml(1 3 cstr) print cstr ist %cstr% print Wert ist %Wert% endif >M 1 ; Mean Well 750-48 ; params -> 04 = baudrate 250kb + number of receive buffers * 100 +1,3,C,0,3204,CAN,1,5 ;Eingangsfilter 1,000C000304B000uuUU@100,B0 CC Constant Current,A,B0,0 1,000C000304B100uuUU@100,B1 CV Constant Voltage,V,B1,0 1,000C000304B200uuUU@100,B2 FV Floating Voltage,V,B2,0 1,000C000304B300uuUU@100,B3 TC Taper Current,A,B3,0 1,000C0003046100uuUU@10,61 Read Current Out,A,COut,0 1,000C0003046000uuUU@10,60 Read Voltage Out,V,VOut,0 ;1,000C0003088200xxxxxxUUuu@,Model Typ,,bez,0 ;1,000C0003088600UUuuUUuu@,Serial Number,,serial,0 ;1,000C000308xxxx@,Alle ID,,Alle,0 >W bu(sw "LR ist ein send Off" "LR ist Aus send On") nm(0 700 20 Wert "Zähler Wert (W): " 80 1) cstrA Anfrage{m} %cstrA% cstr Ampere{m} %cstr% cst Volt{m} %cstrV% cstroo Ein_Aus{m} %cstroo% Wert ist {m} %Wert% W Wert2 ist {m} %Wert2% W Byte1 ist {m} %Byte1% Byte1 Hex ist {m} %Byte1H% Byte2 ist {m} %Byte2% Byte2 Hex ist {m} %Byte2H% Timer ist {m} %Timer% #bin Weg für heut --------------------------------------------------------------------------->
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden


