Announcement

Collapse
No announcement yet.

Epever Tracer 2210A & Arduino UNO - Log data - Which PINs?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Epever Tracer 2210A & Arduino UNO - Log data - Which PINs?

    Now that I figured out that the Tracer 2210A mppt charge controller does not log data, I want to use an Arduino Uno to do that.

    I found and Arduino Sketch which will capture the data to the Arduino IDE Terminal. I can later on send the data to an SD card or use an IoT wifi module.

    I have a standard network cable which I have cut one of the ends off so I can access the wires. My problem is Which Wires on the cut end, that connect to the Arduino Uno (pins 10 & 11) do I actually use? I can try all of them but that would take a while plus I might mess up the 2210A charge controller or the Arduino itself if I use the incorrect ones.

    (I tried using one RS-485-B and one RS-485-A pin but no results came up in the IDE Terminal)

    Any help will be really appreciated.

    Thanks in advance.

    Chris

    According to the 2210A documentation, the pins are laid out the following way:

    PIN Function
    1 Power supply output +5
    2 Power supply output +5
    3 RS-485-B
    4 RS-485-B
    5 RS-485-A
    6 RS-485-A
    7 Ground
    8 Ground

    The Arduino Sketch I am using follows:
    /*
    * An interface to the Tracer solar regulator.
    * Communicating in a way similar to the MT-5 display
    */
    #include <SoftwareSerial.h>
    SoftwareSerial myserial(10, 11); // RX, TX
    uint8_t start[] = { 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55,
    0xEB, 0x90, 0xEB, 0x90, 0xEB, 0x90 };
    uint8_t id = 0x16;
    uint8_t cmd[] = { 0xA0, 0x00, 0xB1, 0xA7, 0x7F };
    uint8_t buff[128];
    void setup() {
    Serial.begin(57600);
    myserial.begin(9600);
    }
    float to_float(uint8_t* buffer, int offset){
    unsigned short full = buffer[offset+1] << 8 | buff[offset];
    return full / 100.0;
    }
    void loop() {
    Serial.println("Reading from Tracer");
    myserial.write(start, sizeof(start));
    myserial.write(id);
    myserial.write(cmd, sizeof(cmd));
    int read = 0;
    for (int i = 0; i < 255; i++){
    if (myserial.available()) {
    buff[read] = myserial.read();
    read++;
    }
    }
    Serial.print("Read ");
    Serial.print(read);
    Serial.println(" bytes");
    for (int i = 0; i < read; i++){
    Serial.print(buff[i], HEX);
    Serial.print(" ");
    }
    Serial.println();
    float battery = to_float(buff, 9);
    float pv = to_float(buff, 11);
    //13-14 reserved
    float load_current = to_float(buff, 15);
    float over_discharge = to_float(buff, 17);
    float battery_max = to_float(buff, 19);
    // 21 load on/off
    // 22 overload yes/no
    // 23 load short yes/no
    // 24 reserved
    // 25 battery overload
    // 26 over discharge yes/no
    uint8_t full = buff[27];
    uint8_t charging = buff[28];
    int8_t battery_temp = buff[29] - 30;
    float charge_current = to_float(buff, 30);
    Serial.print("Load is ");
    Serial.println(buff[21] ? "on" : "off");
    Serial.print("Load current: ");
    Serial.println(load_current);
    Serial.print("Battery level: ");
    Serial.print(battery);
    Serial.print("/");
    Serial.println(battery_max);
    Serial.print("Battery full: ");
    Serial.println(full ? "yes " : "no" );
    Serial.print("Battery temperature: ");
    Serial.println(battery_temp);
    Serial.print("PV voltage: ");
    Serial.println(pv);
    Serial.print("Charging: ");
    Serial.println(charging ? "yes" : "no" );
    Serial.print("Charge current: ");
    Serial.println(charge_current);
    delay(1000);
    }

  • #2

    Are you familiar with how to implement RS-485 in an Arduino? I'm not sure why you are suggesting pins 10 and 11.


    Have you seen this page:

    https://community.blynk.cc/t/epsolar...-monitor/10596

    One of the commenters in that thread is a forum member here, and may be willing to help if you are open to email contact.
    CS6P-260P/SE3000 - http://tiny.cc/ed5ozx

    Comment


    • #3
      Originally posted by cmhippy View Post
      Now that I figured out that the Tracer 2210A mppt charge controller does not log data, I want to use an Arduino Uno to do that.

      I found and Arduino Sketch which will capture the data to the Arduino IDE Terminal. I can later on send the data to an SD card or use an IoT wifi module.

      I have a standard network cable which I have cut one of the ends off so I can access the wires. My problem is Which Wires on the cut end, that connect to the Arduino Uno (pins 10 & 11) do I actually use? I can try all of them but that would take a while plus I might mess up the 2210A charge controller or the Arduino itself if I use the incorrect ones.

      (I tried using one RS-485-B and one RS-485-A pin but no results came up in the IDE Terminal)

      Any help will be really appreciated.

      Thanks in advance.

      Chris

      According to the 2210A documentation, the pins are laid out the following way:

      PIN Function
      1 Power supply output +5
      2 Power supply output +5
      3 RS-485-B
      4 RS-485-B
      5 RS-485-A
      6 RS-485-A
      7 Ground
      8 Ground
      You project seems to mirror this project:
      http://www.instructables.com/id/Use-...r-MT5-Charge-/

      It appears that your sketch is for RS-232 communications
      But the comm port in your Charge Controller is an RS-485 Comm Port.

      Are you assuming that a RS-232 Port ( Arduino ) will plug & play with a RS-485 Port ( Charge Controller ) ?

      Do you have an RS-485 Shield?

      Comment


      • #4
        sensij & NEOH,

        Thanks for the response pointing out a couple things. I will try and contact the member and yes, I think I'm mixing things up with the 232 and 485. I'll use the links presented to review all the information again.

        I'll look in to getting an RS-485 shield for the Arduino.

        Chris

        Comment

        Working...
        X