Universal WiFi Interface

User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: Universal WiFi Interface

Post by dima »

Wanted to visually document ESP8266 to MCP2515 development.

TJA1050 requires 5V but the inverter ESP8266 powered by 3.3V. We can still power MCP2515 chip with 3.3V but need to isolate CANBus chip by cutting off back PCB VCC trace. Then give TJA1050 separate 5V.
P1010007.jpeg
P1010009.jpeg
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: Universal WiFi Interface

Post by dima »

Arduino module/library not working correctly.

Setting one parameter udc to be transmitted from inverter with id: 58 (0x3A)

Code: Select all

can tx udc 58 0 8 1
Reading this with MCP2515 module:

Code: Select all

Extended ID:0x0F1AE569  DLC:6  Data:0xFE 0xE3 0xC1 0xF7 0x3D 0x51 
Questions:
1) Extended messages normal? not Standard?
2) How to break down 0x0F1AE569: 0F = priority 15 OK, 1A and E5 = group OK, 69 id?? not really what I set > 0x3A ...inverter internal ID?

Code: Select all

CAN Id: 0xPPPXXXXSS
P = priority;  low value = higher priority;
      0x00=0
      0x0F=15
      0x10=16
      0x1C=20
      0x20=32
      0x90=144
      0xFF=255;
XXXX = PNG, parameter group number, 4 chars / 8 bytes long
SS = source address
3) How to break down the Data?

EDIT: Answering my own question -> Use proper library by Coryjfowler

Now we get a proper output:

Code: Select all

Standard ID:0x03A  DLC:8  Data:0xCE 0x00 0x00 0x00 0x00 0x00 0x00 0x00 
Yahha777
Posts: 25
Joined: Wed Feb 27, 2019 7:03 am
Location: Belorussia. Borisov
Contact:

Re: Universal WiFi Interface

Post by Yahha777 »

Hello! Tell me - what am I doing wrong? I'm flashing the ESP 8266 module using the "ESP 8266 flasher" program from here: https://github.com/dimecho/Open-Inverte ... r.Dash.zip I specify the address 0x000000 for flash- WeMos-D1.bin and 0x100000 for flash-spiffs.bin. Visually in the program and by the often blinking LED - the firmware is taking place. But after restarting the Wi-Fi module - there is no access point. :(
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: Universal WiFi Interface

Post by dima »

There is an eeprom bug (I have a fix will push to GitHub soon) load this eeprom.ino with Arduino to erase EEPROM, then load the binary (or main arduino sketch)

Code: Select all

#include <EEPROM.h>

void setup()
{
  //Erase EEPROM to Default
  
  EEPROM.begin(1024);
  for (uint16_t i = 0 ; i < EEPROM.length() ; i++) {
    EEPROM.write(i, 255);
  }
  EEPROM.commit();
}

void loop()
{
}
esyjam
Posts: 2
Joined: Thu Jun 04, 2020 9:53 pm
Location: Tanzania

Re: Universal WiFi Interface

Post by esyjam »

Has any one used ESP32 instead of ESP8266?
Using the same code for ESP8266?
Post Reply