loading
5CommentsJoined May 24th, 2015

Tell us about yourself!

Complete Your Profile
  • Use Arduino to Communicate with Tracer MT5 Charge Controller

    Use this code for Arduino MEGA :/* An interface to the Tracer solar regulator. Communicating in a way similar to the MT-5 display for ARDUINO MEGA*/// DO NOT include <SoftwareSerial.h> !!// connect RX from MT5 to pin 14 of Arduino MEGA// connect TX from MT5 to pin 15 of Arduino MEGA// Arduino MEGA has 3 Serials. Serial3 is standard 14/15 !!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(9600); Serial3.begin(9600); // >>>>>>>>>>>>>>>>> Notice the 3 !}float to_float(uint8_t* buffer, int offset) { unsigned short full = buffer[offset + 1] << 8 | buff[offset]; retur...see more »Use this code for Arduino MEGA :/* An interface to the Tracer solar regulator. Communicating in a way similar to the MT-5 display for ARDUINO MEGA*/// DO NOT include <SoftwareSerial.h> !!// connect RX from MT5 to pin 14 of Arduino MEGA// connect TX from MT5 to pin 15 of Arduino MEGA// Arduino MEGA has 3 Serials. Serial3 is standard 14/15 !!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(9600); Serial3.begin(9600); // >>>>>>>>>>>>>>>>> Notice the 3 !}float to_float(uint8_t* buffer, int offset) { unsigned short full = buffer[offset + 1] << 8 | buff[offset]; return full / 500.0;}void loop(){ Serial.println("-------------------------------------"); Serial.println("Reading from Tracer"); Serial3.write(start, sizeof(start)); Serial3.write(id); Serial3.write(cmd, sizeof(cmd)); int read = 0; for (int i = 0; i < 255; i++) { if (Serial3.available()) { buff[read] = Serial3.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); Serial.println(); delay(2000);}

    Use this code for Arduino MEGA :/* An interface to the Tracer solar regulator. Communicating in a way similar to the MT-5 display for ARDUINO MEGA*/// DO NOT include <SoftwareSerial.h> !!// connect RX from MT5 to pin 14 of Arduino MEGA// connect TX from MT5 to pin 15 of Arduino MEGA// Arduino MEGA has 3 Serials. Serial3 is standard 14/15 !!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(9600); Serial3.begin(9600); // >>>>>>>>>>>>>>>>> Notice the 3 !}float to_float(uint8_t* buffer, int offset) { unsigned short full = buffer[offset + 1] << 8 | buff[offset]; retur...see more »Use this code for Arduino MEGA :/* An interface to the Tracer solar regulator. Communicating in a way similar to the MT-5 display for ARDUINO MEGA*/// DO NOT include <SoftwareSerial.h> !!// connect RX from MT5 to pin 14 of Arduino MEGA// connect TX from MT5 to pin 15 of Arduino MEGA// Arduino MEGA has 3 Serials. Serial3 is standard 14/15 !!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(9600); Serial3.begin(9600); // >>>>>>>>>>>>>>>>> Notice the 3 !}float to_float(uint8_t* buffer, int offset) { unsigned short full = buffer[offset + 1] << 8 | buff[offset]; return full / 500.0;}void loop(){ Serial.println("-------------------------------------"); Serial.println("Reading from Tracer"); Serial3.write(start, sizeof(start)); Serial3.write(id); Serial3.write(cmd, sizeof(cmd)); int read = 0; for (int i = 0; i < 255; i++) { if (Serial3.available()) { buff[read] = Serial3.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); Serial.println(); delay(2000);}

    View Instructable »
  • Use Arduino to Communicate with Tracer MT5 Charge Controller

    "exact same sketch" but of course changed SoftwareSerial myserial to (17,16) ! :)

    I made it, but it doesn't work. :(I use controller Tracer 2210 -> works fineI use Arduino Mega, serial 2 (17=RX, 16=TX)I use the exact same sketch from here above.After I sent the initialisation strings, I do get a response from the controller that I can see on my osciloscope. I've put a "schmitt trigger" in front of the RX pin so that I get nice 5V pulses on pin 17.On my serial, I see nothing but ZERO's (except the temperature which is -30)Baud rates are both set to 9600I tried 15 and 14 as RX and TX, but the same result.When I try another baud rate , I don't get nothing back from the charger.I tried without the schmitt trigger : same result (pulses are only 3V)What did I do wrong ?

    View Instructable »
  • PaulVdB commented on braulio777's instructable Arduino Logic Probe9 months ago
    Arduino Logic Probe

    The test probe is connected to GND ???

    View Instructable »