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: 19
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
 


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.1250 seconds.
Privacy Policy     Process times : 0, 0, 0, 0.12