Home  |  Contents 

Microcontroller and PC projects
  Forum Index : Microcontroller and PC projects         Section
Subject Topic: VS6048 Solar CC Wifi Monitoring System Post ReplyPost New Topic
<< Prev Page of 3
Author
Message << Prev Topic | Next Topic >>
azhaque
Newbie
Newbie


Joined: 21 February 2017
Location: Pakistan
Online Status: Offline
Posts: 25
Posted: 16 October 2018 at 4:21pm | IP Logged Quote azhaque

Hello everyone,

Progress to report, of the last 2-3 days.

Got the ESP8266 to run a webserver displaying dummy data, on my home network. This Network runs on an old Linksys router (pic below).





The Arduino/ESP8266 code is given below



#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>

// Replace with your network credentials
const char* ssid = "TeenZaitoon";
const char* password = "OliveGrove2018";

ESP8266WebServer server(80);   //instantiate server at port 80 (http port)

String page = "";
double Adata; 
double data48A; 
double data48B; 

void setup(void){

  pinMode(A0, INPUT);
  
  delay(100);
  Serial.begin(115200);
  WiFi.begin(ssid, password); //begin WiFi connection
  Serial.println("");
  
  // Wait for connection
  while (WiFi.status() != WL_CONNECTED) {
    delay(50);
    Serial.print(".");
  }
  Serial.println("");
  Serial.print("Connected to ");
  Serial.println(ssid);
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());
  server.on("/", [](){
    page = "<h1>Olive-Grove Solar Power Stats</h1><h3>Analogue: "+String(Adata)+"</h3><h4>ChargeCont-A: "+String(data48A)+"</h4><h5>ChargeCont-B: "+String(data48B)+"</h5>";
    server.send(200, "text/html", page);
  });
  
  server.begin();
}
 
void loop(void){
  Adata = analogRead(A0)-5;
  data48A += 3;
  data48B += 7;
  delay(150);
  server.handleClient();
}
ar Power Stats</h1><h3>Analogue: "+String(Adata)+"</h3><h4>ChargeCont-A: "+String(data48A)+"</h4><h5>ChargeCont-B: "+String(data48B)+"</h5>";
    server.send(200, "text/html", page);
  });
  
  server.begin();
}
 
void loop(void){
  Adata = analogRead(A0);
  data48A += 3;
  data48B += 7;
  delay(150);
  server.handleClient();
}


Picture of the data on my Chrome browser






Perusal of the Code would show that the output is essentially dummy data. This would be substituted by the actual data from the MODBUS outputs of the Charge Controllers. The photo below shows the simulated output voltage (0- 5 VDC) from the ACS758 that will indicate battery current, both charging and discharging.





Next step is to test out the MODBUS system and write its software.

Regards all round.

azhaque





Edited by azhaque on 16 October 2018 at 4:36pm



Back to Top View azhaque's Profile Search for other posts by azhaque
 
azhaque
Newbie
Newbie


Joined: 21 February 2017
Location: Pakistan
Online Status: Offline
Posts: 25
Posted: 19 October 2018 at 10:29pm | IP Logged Quote azhaque

Hi there,

Further progress to report.

Got the SoftwareSerial library system for ESP8266 up and running.

This Library allows one to emulate an extra UART on the 8266. I need the extra UART to connect to the channel for the second CC. O/P video on Youtube.

https://www.youtube.com/watch?v=xfXNs84Q56I


azhaque



Edited by azhaque on 19 October 2018 at 10:30pm
Back to Top View azhaque's Profile Search for other posts by azhaque
 
azhaque
Newbie
Newbie


Joined: 21 February 2017
Location: Pakistan
Online Status: Offline
Posts: 25
Posted: 24 October 2018 at 9:00pm | IP Logged Quote azhaque

Progress slow due to time constraints.
Had to mount Arduino mega board with the 8266 veroboard. This is because I can't risk connecting the prototype to the CC for the fear that the CC maybe damaged during testing plunging the home into darkness.
Now Arduino would run the modbus slave sketch for testing.
Last week spent on making a new mounting. Pic below
azhaque
Back to Top View azhaque's Profile Search for other posts by azhaque
 
azhaque
Newbie
Newbie


Joined: 21 February 2017
Location: Pakistan
Online Status: Offline
Posts: 25
Posted: 06 November 2018 at 6:19pm | IP Logged Quote azhaque

Sorry all for the delay in posting an update.

I now have the circuit working which collects VS6048 Charge Controller data via MODBUS. The microcontroller is an ESP8266-12E used in a NodeMCU development board.

Youtube video attached here

Next step is to put the data on the home network using the built in wifi in the ESP.

Regards

azhaque
Back to Top View azhaque's Profile Search for other posts by azhaque
 
lizby
Senior Member
Senior Member


Joined: 17 May 2016
Location: United States
Online Status: Offline
Posts: 255
Posted: 06 November 2018 at 10:42pm | IP Logged Quote lizby

Nice. Is that an RS-485 module on the right of your perfboard, connecting to the charge controller using the green ethernet cable (stripped at the perfboard end?

Or perhaps as you suggest, a MODBUS module (or are they the same?).


Edited by lizby on 06 November 2018 at 10:43pm
Back to Top View lizby's Profile Search for other posts by lizby
 
azhaque
Newbie
Newbie


Joined: 21 February 2017
Location: Pakistan
Online Status: Offline
Posts: 25
Posted: 07 November 2018 at 12:19pm | IP Logged Quote azhaque

lizby wrote:
Nice. Is that an RS-485 module on the right of your perfboard, connecting to the charge controller using the green ethernet cable (stripped at the perfboard end?

Or perhaps as you suggest, a MODBUS module (or are they the same?).



Hi Lizby,

You guessed it right. That is indeed the MODBUS module using a MAX485 IC. Very cheap of low quality but works for me. This is a link to similar units on Amazon.

I also attach the datasheet/writeup about the innards of the VS6048 CC, very graciously shared by EPEVER/EPSOLAR. Should be useful for those who would like to continue on this line of work.

Regards

azhaque

2018-11-07_121825_BSeriesControllerProtocolv2.4.zip
Back to Top View azhaque's Profile Search for other posts by azhaque
 
azhaque
Newbie
Newbie


Joined: 21 February 2017
Location: Pakistan
Online Status: Offline
Posts: 25
Posted: 08 November 2018 at 1:42pm | IP Logged Quote azhaque

Greetings all,

Update pls.

Got the software up and running.

Data from the Epsolar VS6048BN charge controller using MODBUS protocol is fed to the ESP8266. The ESP payloads it on a wifi system feeding into the home network.

The pic below shows the ESP circuit sitting on the stairs on a make shift arrangement, just outside the garage door. Initially tried it inside the garage but the system doesn't work because garage door is steel and grounds the wifi radio signal. The green cable is from the charge controller carrying the MODBUS data. It is over 3 meters long and there seems to be no issue in data transmission.






The image below is the Router sitting inside the lounge. The signal is easily received in all the rooms, including the basement.






A short Video about the live data on screen on the laptop.

Now to clean up/improve the ESP code and make proper weatherproof housing for the ESP for placement outside the garage, in the open.

Regards
Back to Top View azhaque's Profile Search for other posts by azhaque
 
akashh
Senior Member
Senior Member


Joined: 19 January 2014
Location: India
Online Status: Offline
Posts: 115
Posted: 08 November 2018 at 3:44pm | IP Logged Quote akashh

Hi,
Looks good. It reminds me of how I started Wattmon almost six years ago. I had worked with the same current sensor but opted for a Hall effect sensor that didn't require a physical wired connection after having some trouble with solder joints and just the general inconvenience of having to disconnect the cables every time it required a fix.
As for SoC I use the coulomb counting method which is not terribly accurate but usually gives a decent indication of charge, and can be further improved by setting the Peukert constant.
Please do not view this as an advertisement for the Wattmon but rather as an alternative to developing the system from scratch if it gets too much. If you wish to know more you can PM me or check out the website at www.wattmon.com

All the best
Akash
Back to Top View akashh's Profile Search for other posts by akashh
 
azhaque
Newbie
Newbie


Joined: 21 February 2017
Location: Pakistan
Online Status: Offline
Posts: 25
Posted: 10 November 2018 at 11:55am | IP Logged Quote azhaque

Akashh,

Namastay from Islamabad.

The wattmon is a real wow. However my system is a piddly copy of the wattmon.

Keep up the good work.

Aurangzeb Haque
Back to Top View azhaque's Profile Search for other posts by azhaque
 


If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Search the forums using Google.
<< Prev Page of 3
In the news...
 
Post ReplyPost New Topic
Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum

Powered by Web Wiz Forums version 7.8
Copyright ©2001-2004 Web Wiz Guide

This page was generated in 0.1035 seconds.
Privacy Policy     Process times : 0, 0.01, 0, 0.09