obracím se na všechny ohledně rady na diodový alternátor z automobilu. Docela u nás fouká a rád bych si ve volném čase zpříjemnil chvíle nějakou činností (prosím nedoporučovat mi, co mám dělat ve svém volném čase


Fórum | MyPower.CZ | Obnovitelné zdroje energie - energetická soběstačnost | Poslední návštěva: stř kvě 18, 2022 6:41 am
/**************************************************************
* Blynk is a platform with iOS and Android apps to control
* Arduino, Raspberry Pi and the likes over the Internet.
* You can easily build graphic interfaces for all your
* projects by simply dragging and dropping widgets.
*
* Downloads, docs, tutorials: http://www.blynk.cc
* Blynk community: http://community.blynk.cc
* Social networks: http://www.fb.com/blynkapp
* http://twitter.com/blynk_app
*
* Blynk library is licensed under MIT license
* This example code is in public domain.
*
**************************************************************
* This example runs directly on ESP8266 chip.
*
* Note: This requires ESP8266 support package:
* https://github.com/esp8266/Arduino
*
* Please be sure to select the right ESP8266 module
* in the Tools -> Board menu!
*
* Change WiFi ssid, pass, and Blynk auth token to run :)
*
**************************************************************/
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>
/* definice pinu
#define D0 16
#define D1 5
#define D2 4
#define D3 0
#define D4 2
#define D5 14
#define D6 12
#define D7 13
#define A0 A0 */
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxxxxxxxxxxxxxxxxx";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "home";
char pass[] = "xxxxxxxxxx";
int hallPin = 3;
int volt = A0; //voltmetr
int mosfet = 14;
volatile byte half_revolutions;
unsigned int newRpm, oldRpm;
unsigned int pwm = 0;
unsigned int targetRpm, pwmStep;
float analogVoltage = 0;
float targetVoltage;
SimpleTimer timer;
BLYNK_CONNECTED() {
//get data stored in virtual pin V13 from server
Blynk.syncVirtual(V10);
Blynk.syncVirtual(V11);
Blynk.syncVirtual(V12);
}
// restoring from server
BLYNK_WRITE(V10){
//restoring int value
targetVoltage = param[0].asFloat();
}
BLYNK_WRITE(V11){
//restoring int value
targetRpm = param[0].asInt();
}
BLYNK_WRITE(V12){
//restoring int value
pwmStep = param[0].asInt();
}
void setup()
{
pinMode(hallPin,INPUT);
pinMode(volt,INPUT);
pinMode(mosfet, OUTPUT);
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
attachInterrupt(digitalRead(hallPin), rpm_fun, RISING);
half_revolutions = 0;
newRpm = 0;
timer.setInterval(200L, mereniRPM);
timer.setInterval(25L, rizeniPWM);
timer.setInterval(500L, vypis);
}
void vypis(){
Blynk.virtualWrite(V0, newRpm);
Blynk.virtualWrite(V1, analogVoltage);
Blynk.virtualWrite(V2, pwm);
}
void mereniRPM(){
newRpm = (half_revolutions*300)/3;
if ((analogVoltage < targetVoltage)&&(oldRpm > targetRpm)&&(oldRpm < targetRpm + 150)&&(pwm < 1020)) {
pwm = 600;
analogWrite(mosfet, pwm);
}
if ((analogVoltage < targetVoltage)&&(newRpm >= oldRpm)&&(oldRpm > targetRpm)&&(pwm < 1020)) {
pwm += pwmStep;
analogWrite(mosfet, pwm);
}
oldRpm = newRpm;
half_revolutions = 0;
}
void rizeniPWM (){
analogVoltage = analogRead(volt) * (35.1 / 1023.0);
if ((analogVoltage < targetVoltage)&&(newRpm > oldRpm)&&(oldRpm > targetRpm)&&(pwm < 1020)) {
pwm += pwmStep;
analogWrite(mosfet, pwm);
}
if ((analogVoltage > targetVoltage)&&(pwm > 0)) {
pwm -= pwmStep;
analogWrite(mosfet, pwm);
}
if ((newRpm < oldRpm)&&(pwm > 0)) {
pwm -= pwmStep;
analogWrite(mosfet, pwm);
}
if ((oldRpm < targetRpm)&&(pwm > 0)) {
pwm -= pwmStep;
analogWrite(mosfet, pwm);
}
}
void loop(){
Blynk.run();
timer.run(); // Initiates SimpleTimer
}
void rpm_fun()
{
half_revolutions++;
}
marko250 píše:Já to považuji za slepou uličku zisku energie v porovnání s riziky , investicemi a komplikacema.Zlatá FVE.
miroc píše:Vid v podpise linky na tristary. Do zajtrajsich prvych lucov slnka tam budu dnesne data. Mozete sami porovnat.
kybos píše:Ještě by to chtělo informaci, kdy na těch Tristarech začíná den. Pár minut po půlnoci se tam zobrazovala výroba, kterou VE za těch pár minut určitě nestihla vyrobit. Pokud jsou ty začátky dne různé, pak není možno porovnávat.
marko250 píše:Nahoď tu výsledky výroby za mesiace 10/11/12/1/2(2016/17celkovo) FVE/VE.
#include <ESP8266WiFi.h>
#include <SimpleTimer.h>
#include <ArduinoOTA.h>
/* definice pinu
#define D0 16
#define D1 5
#define D2 4
#define D3 0
#define D4 2
#define D5 14
#define D6 12
#define D7 13
#define A0 A0 */
const char* nazevWifi = "home";
const char* hesloWifi = "****************";
WiFiClient client;
int hallPin = 3;
int mosfet = 14;
int volt = A0; //voltmetr
volatile byte half_revolutions;
unsigned int newRpm, oldRpm;
unsigned int targetRpm = 1200;
float analogVoltage = 0.0, targetVoltage = 30.0;
SimpleTimer timer;
void otaError(ota_error_t error)
{
Serial.println(F("Error."));
}
void otaProgress(unsigned int actual, unsigned int maxsize)
{
}
void otaStart()
{
Serial.println(F("Start."));
}
void otaEnd()
{
Serial.println(F("End."));
}
void setup()
{
pinMode(hallPin,INPUT);
pinMode(mosfet, OUTPUT);
pinMode(volt,INPUT);
Serial.begin(9600);
WiFi.begin(nazevWifi, hesloWifi);
attachInterrupt(digitalRead(hallPin), rpm_fun, RISING);
half_revolutions = 0;
newRpm = 0;
timer.setInterval(200L, mereniRPM);
ArduinoOTA.setHostname("TURBINE");
ArduinoOTA.onStart(otaStart);
ArduinoOTA.onEnd(otaEnd);
ArduinoOTA.onProgress(otaProgress);
ArduinoOTA.onError(otaError);
ArduinoOTA.begin();
}
void mereniRPM(){
newRpm = half_revolutions * 100;
analogVoltage = analogRead(volt) * (35.1 / 1023.0);
if (newRpm < oldRpm) digitalWrite(mosfet, LOW);
if (newRpm < targetRpm) digitalWrite(mosfet, LOW);
if ((analogVoltage < targetVoltage)&&(newRpm >= oldRpm)&&(newRpm >= targetRpm)) digitalWrite(mosfet, HIGH);
oldRpm = newRpm;
half_revolutions = 0;
}
void loop(){
timer.run(); // Initiates SimpleTimer
ArduinoOTA.handle();
}
void rpm_fun()
{
half_revolutions++;
}
Uživatelé procházející toto fórum: Žádní registrovaní uživatelé a 0 návštevníků