TACxxxx series Modbus Energy meter

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
iz8mbw
Normal user
Posts: 35
Joined: 14 Apr 2023, 08:43
Location: Napoli, Italy

TACxxxx series Modbus Energy meter

#1 Post by iz8mbw » 08 Aug 2023, 17:18

Hello.
There are several Modbus smart Energy meter (similar to the Eastron ones) of the TACxxxx series that looks like to be software compatible with SDM120 (Models TAC1100 and TAC2100 seems to be compatible).
Here some links:

https://aliexpress.com/item/1005005653834309.html
https://aliexpress.com/item/1005005663380677.html
https://aliexpress.com/item/1005005852868362.html
https://aliexpress.com/item/1005004447216469.html

Model TAC1100 or TAC2100 seems to be a valid alternative to the SDM120.

Model comparison:
https://ae01.alicdn.com/kf/S584021f5d83 ... 7da84s.jpg


Does anyone tested them with ESPEasy or have more info?

Thanks.
Last edited by iz8mbw on 09 Aug 2023, 08:27, edited 3 times in total.

User avatar
Ath
Normal user
Posts: 3950
Joined: 10 Jun 2018, 12:06
Location: NL

Re: TACxxxx series Modbus Energy meter

#2 Post by Ath » 08 Aug 2023, 22:17

That comparison only shows a functional comparison, not a software comparison, as even most Eastron models have different configurations (mostly because of technical differences, of course).
Did you find any documentation on the Modbus RTU registers supported by these meters?
/Ton (PayPal.me)

TD-er
Core team member
Posts: 9266
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: TACxxxx series Modbus Energy meter

#3 Post by TD-er » 08 Aug 2023, 22:50

To be honest, the electrical connection of the live and neutral wires on this one look kinda scary:
https://nl.aliexpress.com/item/10050056 ... pt=glo2nld
A huge screw terminal for live in next to a very flimsy small screw terminal for neutral.

On the Eastron SDM120 the L-in and L-out are next to each other and the Neutral is on the other side of the module.
That does look a lot less dangerous whenever a wire may ever come loose.
And with solid copper wires in a space constraint environment like a DIN rail box, this is not unthinkable.
Also you won't notice any loose neutral wire as it is only used for powering the meter, not for carrying the actual current... I hope. Given that very small blue screw terminal you won't be able to fit > 1.5 mm^2 and even that might be challenging.
That blue screw terminal should not be used for more than just powering the DIN rail meter.

The user interface does seem to be copied from Eastron, so I wouldn't be surprised if they also cloned some of the register numberings.

But it really looks like a fire hazard in denial.

iz8mbw
Normal user
Posts: 35
Joined: 14 Apr 2023, 08:43
Location: Napoli, Italy

Re: TACxxxx series Modbus Energy meter

#4 Post by iz8mbw » 09 Aug 2023, 08:20

Hello.
@Ath yes, please give a look to a customer review of one of the Aliexpress link, an user specify it's software compatible with SDM120.

@TD-er As you can see TAC1100 has one huge screw terminal (bigger respect to the SDM120 one that supports maximum 6 mm^2) for LINE and a small one for NEUTRAL this berceuse it "reads" the energy (Ampere and so Watt) on the LINE (it should have a shunt inside) and Neutral is only used to read the Voltage values. This is why the screw terminal of Neutral is small. Also the Peacefair PZEM-004T V3 (that supports 100 A) has small screw terminal to read Voltage.
If you give look, also the DDM18SD meter has the same wiring connections of the TAC1100.
Personally I prefer the TAC1100 huge screw terminal for LINE respect to the smallest one of the SDM120, 6 mm^2 for 45A can not be enough.


Anyway please download the Manual and Modbus specifications of TAC1100 and TAC2100 from here: https://we.tl/t-XCbqdM1Vof

Thanks.

User avatar
Ath
Normal user
Posts: 3950
Joined: 10 Jun 2018, 12:06
Location: NL

Re: TACxxxx series Modbus Energy meter

#5 Post by Ath » 09 Aug 2023, 09:38

Best advice then would be to get such meter and just try if it works as expected. Please be extra careful with the wiring and your personal safety!
/Ton (PayPal.me)

TD-er
Core team member
Posts: 9266
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: TACxxxx series Modbus Energy meter

#6 Post by TD-er » 09 Aug 2023, 09:52

I know it should not carry any (significant) current over the neutral line.
But the problem is, they should have added only a single screw terminal hole for neutral.
Now people may wire it up like it is an extension cord, thus the neutral will carry the same current as the line terminal.
I don't have any issues with the (over)sized screw terminal for the line wire.
But those blue screw terminals are notoriously bad at keeping a solid copper wire clamped as they aren't that deep and are directly soldered to a PCB.
Thus any mechanical stress on that header may loosen up the soldering on the PCB.
For just powering the module, this should not really be an issue, but as soon as this terminal will be used to wire up 2 neutral lines to provide significant current, you're in for a lot of trouble.

TD-er
Core team member
Posts: 9266
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: TACxxxx series Modbus Energy meter

#7 Post by TD-er » 09 Aug 2023, 10:00

I just browsed through your WeTransfer files and the protocol document mentions exactly the same input register addresses as the Eastron units use.
Well, I only looked at the first few as I know those from memory right now....

However the holding registers are NOT the same.
So you cannot set any parameters like baud rate or ID using the ESPEasy plugin.
I did plan on speeding up the Eastron readings by using some of the available mirrored registers so you can read the most frequently used registers in 1 sequential call.
But that also won't work on these units, so I may not add this feature to remain compatible with these obviously clones of Eastron units.
Even their documentation is a clear rip-off of the Eastron documentation, but I have to say they did pay more attention to layout consistency as the Eastron documentation sometimes uses a different font for some later added lines.

TD-er
Core team member
Posts: 9266
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: TACxxxx series Modbus Energy meter

#8 Post by TD-er » 26 Aug 2023, 01:01

I just connected a TAC1100 and it is working just fine with the Eastron plugin.
Well at least the voltage is showing plausible :)
N.B. it can't show the net frequency.

I had to set the ID via the single button on the unit, which was a bit tricky, but I managed :)

I really don't like that the huge L-out screw is really close to the RS485 screw terminal.
If you like to place the cap on it, you're pressing the wires close to this screw and thus you are relying on the isolation capabilities of the wires you use for the RS485.
It should have a plastic cap, like Eastron does for the SDM630.
For a picture of my test setup here, see: https://github.com/letscontrolit/ESPEas ... 1694016031

Sprokkie
Normal user
Posts: 17
Joined: 14 Jan 2018, 21:39

Re: TACxxxx series Modbus Energy meter

#9 Post by Sprokkie » 06 Oct 2023, 17:48

iz8mbw wrote: 09 Aug 2023, 08:20


Anyway please download the Manual and Modbus specifications of TAC1100 and TAC2100 from here: https://we.tl/t-XCbqdM1Vof

Thanks.
The wetransfer is no longer valid can you send the manual to we transfer again or post it here?
Many thanks in advanced

TD-er
Core team member
Posts: 9266
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: TACxxxx series Modbus Energy meter

#10 Post by TD-er » 06 Oct 2023, 17:54

In the latest build you can just use those TAC modules with the Eastron plugin.
Not all values are supported, like the TAC1100 I have here does not provide the net frequency.

ysinh
New user
Posts: 7
Joined: 17 Oct 2023, 05:08

Re: TACxxxx series Modbus Energy meter

#11 Post by ysinh » 17 Oct 2023, 05:15

Download the modbus protocol here :https://www.kdocs.cn/l/cnQKPZECE6eY

Wenzhou Taiye Electric Co., LTD TAC2100 series Modbus Protocol v1.0
Measuring class parameter [Floating point format data]
Input Register Parameter
[ Function code : 04H ]
Register Address
[Hex]
Description Length
(bytes)
Data
Format Units High
Byte
Low
Byte
Voltage. 4 Float V 00 00
Current. 4 Float A 00 06
Active power. 4 Float W 00 0C
Reactive power. 4 Float var 00 12
Apparent power. 4 Float VA 00 18
Power factor (1). 4 Float None 00 1E
Phase angle. 4 Float Degrees 00 24
Frequency of supply voltages. 4 Float Hz 00 30
Nature of load (Resistive=1, inductive=2, capacitive
=3, Non Load=4) 4 Float None 00 4E
Active power demand (2). 4 Float W 00 8C
Reactive power demand (2). 4 Float var 00 8E
Apparent power demand. 4 Float VA 00 90
Current demand. 4 Float A 00 92
Import active power demand 4 Float W 00 9A
Export active power demand 4 Float W 00 9C
Maximum active power demand (2). 4 Float W 00 A2
Maximum reactive power demand (2). 4 Float var 00 A4
Maximum apparent power demand. 4 Float VA 00 A6
Maximum current demand. 4 Float A 00 A8
Maximum import active power demand 4 Float W 00 B0
Maximum export active power demand 4 Float W 00 B2
Total import active energy. 4 Float kWh 05 00
Total export active energy. 4 Float kWh 05 02
Total active Energy. 4 Float kWh 05 04
Total import reactive energy. 4 Float kvarh 05 08
Total export reactive energy. 4 Float kvarh 05 0A
Total reactive Energy. 4 Float kvarh 05 0C
Notes:
1. The power factor has its sign adjusted to indicate the direction of the current. Positive refers to
forward current, negative refers to reverse current.
2. The power sum demand calculation is for import – export.
Wenzhou Taiye Electric Co., LTD TAC2100 series Modbus Protocol v1.0
Measuring class parameter [Integer format data]
Holding Register Parameter
[ Read : Function code : 03H ]
Register Address
[Hex]
Description Length
(bytes)
Data
Format Units High
Byte
Low
Byte
Voltage. 4 ULONG 0.01V 00 00
Current. 4 ULONG 0.001A 00 06
Active power. 4 LONG 0.001kW 00 0C
Reactive power. 4 LONG 0.001kvar 00 12
Apparent power. 4 ULONG 0.001kVA 00 18
Power factor (1). 2 INT 0.001 00 1E
Phase angle. 2 INT 0.01° 00 21
Frequency of supply voltages. 2 UINT 0.01Hz 00 2A
Nature of load (Resistive=1, inductive=2, capacitive
=3, Non Load=4) 2 UINT None 00 46
Active power demand (2). 4 LONG 0.001kW 00 66
Reactive power demand (2). 4 LONG 0.001kvar 00 68
Apparent power demand. 4 ULONG 0.001kVA 00 6A
Current demand. 4 ULONG 0.001A 00 6C
Import active power demand 4 ULONG 0.001kW 00 74
Export active power demand 4 ULONG 0.001kW 00 76
Maximum active power demand (2). 4 LONG 0.001kW 00 7C
Maximum reactive power demand (2). 4 LONG 0.001kvar 00 7E
Maximum apparent power demand. 4 ULONG 0.001kVA 00 80
Maximum current demand. 4 ULONG 0.001A 00 82
Maximum import active power demand 4 ULONG 0.001kW 00 8A
Maximum export active power demand 4 ULONG 0.001kW 00 8C
Total import active energy. 4 ULONG 0.01kWh 04 00
Total export active energy. 4 ULONG 0.01kWh 04 02
Total active Energy. 4 ULONG 0.01kWh 04 04
Total import reactive energy. 4 ULONG 0.01kvarh 04 08
Total export reactive energy. 4 ULONG 0.01kvarh 04 0A
Total reactive Energy. 4 ULONG 0.01kvarh 04 0C
Notes:
1. The power factor has its sign adjusted to indicate the direction of the current. Positive refers to
forward current, negative refers to reverse current.
2. The power sum demand calculation is for import – export.
Wenzhou Taiye Electric Co., LTD TAC2100 series Modbus Protocol v1.0
Set class parameters
Holding Register Parameter
[ Read : Function code : 03H ; Write : Function code : 10H ]
Register
Address
[Hex]
Parameter Description Length
(bytes)
Data
Format
High
Byte
Low
Byte Mode
Key Parameter
Programming
Authorization
(KPPA)
Read: to get the status of the KPPA
0 = not authorized;1 = authorized
Write the correct password to get KPPA,
enable to program key parameters.
2 UINT 50 00 R/W
Demand Period
Write demand period: 0~60 minutes,
Default 60.
Range: 0~60, 0 means function update
every second.
2 UINT 50 02 R/W
Slide time Default 1, min.
Range:1 ~ (Demand Period -1). 2 UINT 50 03 R/W
Modbus address
Write the modbus address
Range: 1 to 247 for MODBUS Protocol,
default 1.
2 UINT 50 05 R
Network Baud
Rate
Write the network port baud rate for
MODBUS Protocol, where:
0 = 1200 baud.
1 = 2400 baud.
2 = 4800 baud.
3 = 9600 baud, default.
4 = 19200 baud.
5 = 38400 baud.
2 UINT 50 06 R
Parity and stop bit
Write the network port parity/stop bits for
MODBUS Protocol, where:
0 = One stop bit and no parity, default.
1 = One stop bit and even parity.
2 = One stop bit and odd parity.
3 = Two stop bits and no parity.
2 UINT 50 07 R
Password
Read: to get the password of the meter
Write: to program the new password of
the meter
Default : 0000
(KPPA is asked)
2 UINT 50 08 R/W
Pulse 1 Energy
Type
Write MODBUS Protocol
input parameter for pulse
output 1:
1: import active energy
2: total active energy
4: export active energy, default
5: import reactive energy
6: total reactive energy
2 UINT 50 09 R/W
Wenzhou Taiye Electric Co., LTD TAC2100 series Modbus Protocol v1.0
8: export reactive energy
Pulse 1 constant
Write pulse constant index: n
= 0 to 3
0 : 1000 imp/kWh(kvarh), default
1 : 100 imp/kWh(kvarh)
2 : 10 imp/kWh(kvarh)
3 : 1 imp/kWh(kvarh)
4 : 10kwh/imp
5 : 100kwh/imp
6 : 1000kwh/imp
Note: When the pulse constant is equal
to 1000 imp/kWh(kvarh), the pulse width
time cannot be set to 200ms.
2 UINT 50 0A R/W
Pulse 1 Width
Write pulse on period in milliseconds:
60, 100 or 200, default 100.
Note: The pulse width time cannot be set
to 200ms when the pulse constant is
equal to 1000 imp/kWh(kvarh).
2 UINT 50 0B R/W
Automatic Scroll
Display Time
Automatic scroll display time, unit :
second
Range 0~60,default : 0
Note: 0 mean stop automatic scroll
display
2 UINT 50 18 R/W
Backlit time
Backlit time, unit : minute.
Default 60.
Range 0~120 or 255 , 0 means backlit
always on,255 means backlit always off.
2 UINT 50 19 R/W
Running time
( Data in units of
minutes)
Running time. Unit : minute.
Write 0 to reset the running time with
load. No response if write other value.
Note: The meter starts timing when
it's powered on
4 ULONG 50 3C R/W
Running time with
load
( Data in units of
minutes)
Running time with load. Unit : minute.
Write 0 to reset the running time with
load. No response if write other value.
Note: The meter starts timing when
power greater than 0 detected
4 ULONG 50 3E R/W
Reset historical
data
0 = reset max. demand
(KPPA is asked) 2 UINT 56 00 W
Meter code The code of the meter 2 HEX 56 01 R
Serial number The serial number of the meter 4 ULONG 56 02 R
Software version
number
Software version number : XX.YY
Data definition : The first byte represents
XX, and the second byte represents YY
2 HEX 56 04 R
Hardware version
number
Hardware version number : XX.YY
Data definition : The first byte represents 2 HEX 56 05 R
Wenzhou Taiye Electric Co., LTD TAC2100 series Modbus Protocol v1.0
XX, and the second byte represents YY
version number of
displayed
version number of displayed : XX.YY
Data definition : The first byte represents
XX, and the second byte represents YY
2 HEX 56 06 R
Wenzhou Taiye Electric Co., LTD TAC2100 series Modbus Protocol v1.0
Example:
1, Read Input Registers
Example: Read “Phase 1 line to neutral volts”
Request: 01 04 00 00 00 02 71 CB
Where, 01 = Meter address
04 = Function code
00 = High byte of registers starting address
00 = Low byte of registers starting address
00 = High byte of registers number
02 = Low byte of registers number
71 = CRC Low
CB = CRC High
Response: 01 04 04 43 66 33 34 1B 38
Where, 01 = Meter address
04 = Function code
04= Byte count
43 = Data, (High Word, High Byte)
66 = Data, (High Word, Low Byte)
33 = Data, (Low Word, High Byte)
34 = Data, (Low Word, Low Byte)
1B = CRC Low
38 = CRC High
Note: 43 66 33 34(Hex) = 230.2 (Floating point)
Example: Read “Phase 1 line to neutral volts” (ULONG Format)
Request: 01 03 00 00 00 02 C4 B0
Where, 01 = Meter address
03 = Function code
00 = High byte of registers starting address
00 = Low byte of registers starting address
00 = High byte of registers number
02 = Low byte of registers number
C4 = CRC Low
B0 = CRC High
Response: 01 03 04 00 00 61 AA 53 DC
Where, 01 = Meter address
04 = Function code
04= Byte count
00 = Data, (High Word, High Byte)
00 = Data, (High Word, Low Byte)
61 = Data, (Low Word, High Byte)
AA = Data, (Low Word, Low Byte)
53 = CRC Low
DC = CRC High
Note: 00 00 61 AA(Hex) = 25002(ULONG) * 0.01V = 250.02V
2, Read Holding Registers
Wenzhou Taiye Electric Co., LTD TAC2100 series Modbus Protocol v1.0
Example: Read “Slide time”
Request: 01 03 50 03 00 01 65 0A
Where, 01 = Meter address
03 = Function code
50 = High byte of registers starting address
03 = Low byte of registers starting address
00 = High byte of registers number
01 = Low byte of registers number
65 = CRC Low
0A = CRC High
Response: 01 03 02 00 05 78 47
Where, 01 = Meter address
03 = Function code
04= Byte Count
00 = Data, (High Byte)
05 = Data, (Low Byte)
78 = CRC Low
47 = CRC High
Note: 00 05 (Hex) = 5 (UINT)
3, Write Holding Registers
Example: Write “Demand Period” = 30
Request: 01 10 50 02 00 01 02 00 1E 77 BF
Where, 01 = Meter address
10 = Function code
50 = High byte of registers starting address
02 = Low byte of registers starting address
00 = High byte of registers number
01 = Low byte of registers number
02 = Byte Count
00 = Data, (High Byte)
1E = Data, (Low Byte)
77 = CRC Low
BF = CRC High
Note: 00 1E (Hex) = 30(UINT)
Response: 01 10 50 02 00 01 B1 09
Where, 01 = Meter address
10 = Function code
50 = High byte of registers starting address
02 = Low byte of registers starting address
00 = High byte of registers number
01 = Low byte of registers number
B1 = CRC Low
09 = CRC High
Wenzhou Taiye Electric Co., LTD TAC2100 series Modbus Protocol v1.0

TD-er
Core team member
Posts: 9266
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: TACxxxx series Modbus Energy meter

#12 Post by TD-er » 17 Oct 2023, 08:48

I had to Ctrl-P it to save it as PDF as I had no clue where any save option was located on the site.
For any future downloads, please also include a direct link to the PDF download if possible. :)

ysinh
New user
Posts: 7
Joined: 17 Oct 2023, 05:08

Re: TACxxxx series Modbus Energy meter

#13 Post by ysinh » 17 Oct 2023, 15:08

i've put the download link in the first line of my comment, but in case the link will be removed in the future, see few post earlier,I dumped the whole pdf in the comment so the info is always available for everyone in the future.
Soon i will put a small working arduino sketch, as I'm busy with testing now

BE CAREFULL as the full 230v is just 2mm away from the rs485 and the top of the screw is above the plastic !
this can never pass the CE certification, but maybe in this case CE means China Export :lol:

ysinh
New user
Posts: 7
Joined: 17 Oct 2023, 05:08

Re: TACxxxx series Modbus Energy meter

#14 Post by ysinh » 19 Oct 2023, 15:32

Here a simple working example, enjoy

/*
datasheet modbus protocol:
https://www.kdocs.cn/l/cnQKPZECE6eY
datasheet tac series
http://www.taiye-electric.com/productde ... meter.html
Bill of Materials:
tac1100 wenzhou taiye electronic modbus
arduino nano
rs485 v3 board
lcd 2004 prefere with onboard i2c
pcf8574 in case no lcd with i2c
d0,d1 reserved for usb
d2 rx rs485 board
d3 tx rs485 board
a4,a5 i2c bus
*/

Code: Select all

#include <Wire.h>
#include <LiquidCrystal_PCF8574.h>
#include <SoftwareSerial.h>
#include <ModbusRtu.h>

SoftwareSerial mySerial(2,3);  //2=rx, 3=tx  
LiquidCrystal_PCF8574 lcd(0x27);  // set the LCD address to 0x27 or 0x3F

//const unsigned int addresses[] = {0x0000,0x0006,0x000c,0x0012,0x0018,0x001e,0x0024,0x0030,0x004e,0x008c,0x008e,0x0090,0x0092,0x009a,0x009c,0x00a2,0x00a4,0x00a6,0x00a8,0x00b0,0x00b2,0x0500,0x0502,0x0504,0x0508,0x050a,0x050c};
const unsigned int addresses[] = {0x0000,0x0006,0x000c,0x0012,0x0018,0x001e,0x0021,0x002a,0x0046,0x0066,0x0068,0x006a,0x006c,0x0074,0x0076,0x007c,0x007e,0x0080,0x0082,0x008a,0x008c,0x0400,0x0402,0x0404,0x0408,0x040a,0x040c};
const byte  dp[] ={2,3,3,3,3,3,2,2,0,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2};
const char *engineeringunits[]= {"V","A","kW","kvar","kVA","pf","deg","Hz"," ","kW","kvar","kVA","A","kW","kW","kW","kvar","kVA","A","kW","kW","kWh","kWh","kWh","kvarh","kvarh","kvarh","kvarh"} ;
Modbus master(0);
//unsigned long tac1100data[28];
float tac1100data[28];
//float tac1100totals[0x0c];
int process = 0;
int x = 0;
modbus_t telegram;
unsigned long u32wait;
int16_t au16data[16];
uint8_t u8state;
int startaddress;

void setup() {
  Wire.begin();
  lcd.begin(20, 4);
  lcd.setBacklight(1);
  lcd.home();
  Serial.begin(115200);//use the hardware serial if you want to connect to your computer via usb cable, etc.
  master.begin( &mySerial, 9600 ); // begin the ModBus object. The first parameter is the address of your SoftwareSerial address. Do not forget the "&". 9600 means baud-rate at 9600
  master.setTimeOut(2000 ); // if there is no answer in 2000 ms, roll over
  u32wait = millis() + 500;
  u8state = 0; 
  startaddress = 0;
  lcd.print("tac1100_modbus  v1.2");
  lcd.print("tac1100nano 19/10/23");
  delay(10000);
  lcd.clear();
}

void loop() {
  switch( u8state ) {
    case 0: 
      if (millis() > u32wait) u8state++; // wait state
      break;
    case 1: 
      telegram.u8id = 1; // slave address
      telegram.u8fct = 3; // function code (this one is registers read)
      telegram.u16RegAdd = addresses[startaddress]; // start address in slave
      telegram.u16CoilsNo = 2; // number of elements (coils or registers) to read
      telegram.au16reg = au16data; // pointer to a memory array in the Arduino
      master.query( telegram ); // send query (only once)
      u8state++;
      break;
    case 2:
      master.poll(); // check incoming messages
      if (master.getState() == COM_IDLE) {
        u32wait = millis() + 5; //35ms minimum@9600bd and multiple on the bus
        unsigned long data;
        data = au16data[0];
        if((startaddress < 9) and (startaddress>5)){
          data = au16data[0];
        }
        else {
          data = (data <<16) +au16data[1];
        }
        //Serial.print(float(data)*pow(10,-dp[startaddress]));
        //Serial.println(engineeringunits[startaddress]);
        //Serial.println(startaddress);
        tac1100data[startaddress] =float((data)*pow(10,-dp[startaddress]));
        data = 0;
        startaddress++;
        if (startaddress>26) {
          startaddress=0;
          u8state++;
        }
        else u8state = 0;
      }
      break;
    case 3: //display data
      lcd.clear();
      lcd.print(tac1100data[0]);
      lcd.print(engineeringunits[0]);
      lcd.setCursor(8,0);
      lcd.print(tac1100data[1]);
      lcd.print(engineeringunits[1]);
      lcd.setCursor(14,0);
      lcd.print(tac1100data[5]);
      lcd.print(engineeringunits[5]);
      lcd.setCursor(0,1);
      lcd.print(tac1100data[2]);
      lcd.print(engineeringunits[2]);
      lcd.setCursor(10,1);
      lcd.print(tac1100data[3]);
      lcd.print(engineeringunits[3]);
      lcd.setCursor(0,2);
      lcd.print(tac1100data[21]);
      lcd.print(engineeringunits[21]);
      lcd.setCursor(10,2);
      lcd.print(tac1100data[22]);
      lcd.print(engineeringunits[22]);
      lcd.setCursor(0,3);
      if(tac1100data[8]== 1) lcd.print("Resistive   load");
      if(tac1100data[8]== 2) lcd.print("Inductive   load");
      if(tac1100data[8]== 3) lcd.print("Capacitive  load");
      if(tac1100data[8]== 4) lcd.print("Cb tripped check");
      u8state++;
      break;  
    case 4: //send data by serial
      Serial.print("<");
      for(int x = 0; x< 27;x++){
        Serial.print(tac1100data[x]);
        Serial.print(";");
      }
      Serial.println(">");
      u8state = 0;
      break;  
    default :
      u8state = 0;
    break;    
  }

}
Last edited by TD-er on 19 Oct 2023, 21:24, edited 1 time in total.
Reason: Wrapped in code tags

User avatar
Ath
Normal user
Posts: 3950
Joined: 10 Jun 2018, 12:06
Location: NL

Re: TACxxxx series Modbus Energy meter

#15 Post by Ath » 19 Oct 2023, 15:35

Can you wrap that in "code" tags (the </> button in the forum editor), to make it more readable?
/Ton (PayPal.me)

TD-er
Core team member
Posts: 9266
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: TACxxxx series Modbus Energy meter

#16 Post by TD-er » 19 Oct 2023, 21:22

Have you tried using the Eastron plugin to see if it was already working?
The TAC1100 is working without any changes needed.

I guess setting the Eastron plugin to "SDM630" will probably allow for all registers supported by those TAC modules as the SDM630 supports nearly all known registers.
The device selector in the Eastron plugin only filters out not supported registers in the selection dialog.

ysinh
New user
Posts: 7
Joined: 17 Oct 2023, 05:08

Re: TACxxxx series Modbus Energy meter

#17 Post by ysinh » 20 Oct 2023, 07:12

The above code I'm using to actively adjust the power factor settings for my solar inverters. as they accept settings between 0.80 and 1.20.
When there is no sun, or not enough, the power factor is adjusted by switching capacitors every 10 min.
:) this all with just a nano...
When my ESP 32 version is ready, i will post it here, still have some wifi reconnection issues with it
Best regards from Dalat, Vietnam

TD-er
Core team member
Posts: 9266
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: TACxxxx series Modbus Energy meter

#18 Post by TD-er » 20 Oct 2023, 08:11

What kind of WiFi issues do you have when running ESPEasy?
Like I said, the TAC1100 at least is working fine with the ESPEasy Eastron plugin.

User avatar
Ath
Normal user
Posts: 3950
Joined: 10 Jun 2018, 12:06
Location: NL

Re: TACxxxx series Modbus Energy meter

#19 Post by Ath » 20 Oct 2023, 21:25

ysinh wrote: 20 Oct 2023, 07:12 :) this all with just a nano...
This part of the forum is about ESPEasy, not about projects on Arduino. ESPEasy is running on ESP8266 and ESP32, ESP32s2, ESp32c3 and ESP32s3 boards (at this moment, will be extended to newer ESP MCUs in the future), and a plugin based system, that can connect devices to the world via controllers and other plugins, supporting a Rules systems that allows scripting for manipulating the data flow etc.

I'm not sure how your project would fit into this scheme, as the TACxxxx devices already are supported via the Eastron plugin, that has support for (nearly) all Modbus registers of these devices... :?
/Ton (PayPal.me)

ysinh
New user
Posts: 7
Joined: 17 Oct 2023, 05:08

Re: TACxxxx series Modbus Energy meter

#20 Post by ysinh » 21 Oct 2023, 08:12

My issue with the wifi part, is i have to manually reset it every few days as it suddenly not respond anymore.
no power supply issues with the esp nor router. also not after a certain time it stops, i have no clue yet

@mr alt, the extracted data i send as a string to the esp, as the 5v environment is much more robust then the 3v3, but yeah that is just my 5 cents, cq stuiver:)

TD-er
Core team member
Posts: 9266
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: TACxxxx series Modbus Energy meter

#21 Post by TD-er » 21 Oct 2023, 10:55

Which ESPEasy build are you then using?
And what exact board?
It is for sure a bug we need to look into if you're loosing the WiFi connection so often.

ysinh
New user
Posts: 7
Joined: 17 Oct 2023, 05:08

Re: TACxxxx series Modbus Energy meter

#22 Post by ysinh » 21 Oct 2023, 14:39

I just compared the modbus protocol of the easton sm120 with the tac1100 , the first 6 register addresses are the same the other 20 parameter addresses are completely different, those 20 other parameters are important for solar installations.
Send me the source code of the easton plugin, and i will adjust it for the tac1100, just a few hours work.

the tac1100 is around 15usd and works ok, but the "life" bolt near the rs485 is crazy

User avatar
Ath
Normal user
Posts: 3950
Joined: 10 Jun 2018, 12:06
Location: NL

Re: TACxxxx series Modbus Energy meter

#23 Post by Ath » 21 Oct 2023, 15:34

ysinh wrote: 21 Oct 2023, 14:39 I just compared the modbus protocol of the easton sm120 with the tac1100 , the first 6 register addresses are the same the other 20 parameter addresses are completely different, those 20 other parameters are important for solar installations.
Send me the source code of the easton plugin, and i will adjust it for the tac1100, just a few hours work.

the tac1100 is around 15usd and works ok, but the "life" bolt near the rs485 is crazy
Please read back carefully in this thread, the messages written by TD-er, where he wrote that the SDM630, as supported by the ESPEasy 'Eastron' plugin, covers all useful Modbus registers, as the SDM630 implements all of them.
No need to adjust any source, as it is already working as intended.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 9266
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: TACxxxx series Modbus Energy meter

#24 Post by TD-er » 21 Oct 2023, 19:23

I looked at your datasheet and indeed the TACxxxx does have some registers not as float, but as int.
So I can extend it, but I assure you it is for sure more work than "just a few hours", as I have made reading modbus completely asynchronous.
So there is a queue of registers to be read and those will be processed at roughly 10x per sec.
Send read request, look at the receive buffer till it has filled up, process to request a next register, etc.

But if you want to take a look, you can have a look at the code for this Eastron plugin: https://github.com/letscontrolit/ESPEas ... astron.ino

ysinh
New user
Posts: 7
Joined: 17 Oct 2023, 05:08

Re: TACxxxx series Modbus Energy meter

#25 Post by ysinh » 22 Oct 2023, 08:15

Thank you for the link, I am working on it right now, I will test it through fully before putting the code here
Testing takes some time, as with a tac1100 on my desk i can only read volts and Hz, but i will put it in my solar system, import export all will be tested

thank you for your cooperation

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests