A’ cleachdadh an t-sealaidheachd GSM seo, faodaidh tu luchd sam bith le ìre 220 V agus cumhachd nach eil nas motha na 2 kW a thionndadh air, ann an oisean sam bith den Talamh far a bheil lìonra ceallach.
Tha an inneal seo fo smachd arduino nano tro mhodal gsm SIM800L. Tha diagram gnìomh le liosta de cho-phàirtean air a thoirt seachad gu h-ìosal. Faodaidh e obrachadh an dàrna cuid bho bataraidhean togte no bho lìonra 220 V. Nuair a bhios e ag obair bhon lìonra, faodaidh an luchd suas ri 2 kW de dhealan ithe. Bho bataraidhean, cumhachd toraidh as àirde 300 W.
Beagan mun sgeama.
Tha 4 blocaichean san inneal seo:
- aonad inverter
- rianadair agus aonad bataraidh
- aonad solar cumhachd gun bhriseadh
- Bloc smachd.
Tha an aonad inverter na inneal-tionndaidh càr àbhaisteach 500t. Obraichidh e cuideachd le nas lugha de chumhachd, ach lùghdaichidh an cumhachd toraidh as àirde cuideachd ann an co-rèir ri cumhachd an inverter.
Tha an rianadair agus an aonad bataraidh na dhràibhear BMS S3 saor cunbhalach air a dhealbhadh gus 3 bataraidhean lithium-ion a cheangal. Tha sruth àrd aig na bataraidhean. Faodaidh iad sruth de 35 amperes a lìbhrigeadh. Ma tha nas lugha de chumhachd agad, faodaidh tu bataraidhean nas saoire a cheannach le sruth as àirde nas ìsle.
Tha an aonad solar cumhachd gun bhriseadh air a dhèanamh air transistor VT3, VD4, R4, R5, R3. Tha catod an zener diode VD4 ceangailte gu dìreach ris an t-solar cumhachd agus nuair a thèid cumhachd a chuir an sàs, bidh an transistor VT3 a ’fosgladh. Às deidh dha fosgladh, bidh comas àicheil a’ ruighinn a h-uile cuir a-steach sealaidheachd agus bidh na h-ath-chraolaidhean ag atharrachadh gu modh solar cumhachd cuairteachaidh bhon t-solar cumhachd. Feart cudromach de cho-chruinneachaidhean sealaidheachd deiseil: bidh cuid dhiubh ag obair nuair a thig comas dearbhach don chuir-a-steach, agus cuid nuair a thig fear àicheil. Ma tha a’ chiad roghainn agad, feumaidh tu an R3 a ghluasad a-steach don bheàrn emitter de transistor VT3 agus an cuir a-steach sealaidheachd a cheangal ri emitter an aon transistor.
Tha an aonad smachd air a chruinneachadh air modal SIM800 agus arduino nano.
Seo mar a tha an cuairteachadh cruinn coltach
Seo cò ris a bhios e coltach nuair a bhios e pacaichte
Gus an tòisich an inneal air SMS fhaighinn bhon fhòn agad, feumaidh tu an àireamh fòn agad a sgrìobhadh a-steach don chaochladair your_phone. Tha e comasach cuideachd taisbeanadh LCD a cheangal ris an Arduino, mar eisimpleir wh1601 no wh0802, ach feumaidh tu na loidhnichean gu lèir a mhìneachadh leis an sgrìobhadh lcd.
còd a '
char your_phone = "+79148389933";
#include <SoftwareSerial.h> // Подключаем библиотеку SoftwareSerial для общения с модулем по программной шине UART
SoftwareSerial softSerial(8,9); // Создаём объект softSerial указывая выводы RX, TX (можно указывать любые выводы Arduino UNO)
// include the library code:
//#include <LiquidCrystal.h>
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
//const int rs = 12, en = 11, d4 = 5, d5 = 6, d6 = 7, d7 = 10;
//LiquidCrystal lcd(rs, en, d4, d5, d6, d7); // В данном случае вывод TX модуля подключается к выводу 2 Arduino, а вывод RX модуля к выводу 3 Arduino.
// Инициируем работу шин UART с указанием скоростей обеих шин: //
String buf2,buf3;
int g=0;
String cmd1;
void setup(){ //
init_port();
// lcd.begin(16, 2);
// Print a message to the LCD.
//lcd.clear();
// lcd.setCursor(0, 0);
/// lcd.print("VKL");
// lcd.setCursor(0, 1);
/// lcd.print("ZHDITE");
/// init_port();// Инициируем передачу данных по аппаратной шине UART на скорости 9600 (между Arduino и компьютером)
softSerial.begin(9600); // Инициируем передачу данных по программной шине UART на скорости 38400 (между модулем и Arduino)
Serial.begin(9600);
delay(30000);
// cmd1 ="AT+CMGF=1rn";
softSerial.print("AT+CMGF=1rn");
/// print_lcd(cmd1);
delay(1000);
dellAllSMS();
// cmd1 ="AT+CMGDA="DEL ALL"rn";
// print_lcd(cmd1);
//cmd1="AT+CPAS";
/// print_lcd(cmd1);
} //
char c;
int m=0;
int i=0;//
int n=0;
// Выполняем ретрансляцию: // Всё что пришло с модуля - отправляем компьютеру, а всё что пришло с компьютера - отправляем модулю
void dellAllSMS(){
/* This deletes all sms in memory
*/
softSerial.print("AT+CMGDA="DEL ALL"rn"); // set sms to text mode
delay(3000);
}
void pin_on_setb()
{
digitalWrite(2,1);
digitalWrite(13,1);
}
void pin_off_setb()
{
digitalWrite(2,0);
digitalWrite(13,0);
}
void pin_on_inv()
{
digitalWrite(3,1);
// digitalWrite(13,1);
}
void pin_off_inv()
{
digitalWrite(3,0);
// digitalWrite(13,0);
}
void init_port()
{
pinMode(2,1);
pinMode(3,1);
pinMode(13,1);
}
String readData(){
// this function just reads the raw data
uint16_t timeout=0;
while (!softSerial.available() && timeout<10000)
{
delay(10);
timeout++;
}
if(softSerial.available())
{
String output = softSerial.readString();
//if(DEBUG)
/// Serial.println(output);
return output;
}
}
String buf, bufferIndex;
int tempIndex=0;
int messageIndex;
int prev=0;
int power=0;
void loop(){ //
/* if(softSerial.available()){ Serial.write(softSerial.read());} // Передаём данные из программной шины UART в аппаратную (от модуля через Arduino к компьютеру)
if( Serial.available()){softSerial.write( Serial.read());} // Передаём данные из аппаратной шины UART в программную (от компьютера через Arduino к модулю )*/
// lcd.clear();
// lcd.setCursor(0, 0);
// lcd.print("Nagruzka");
// lcd.setCursor(0, 1);
// if (power==1)
// {
// lcd.print("VKL");
// }
// else {lcd.print("VIKL");}
softSerial.print(F("AT+CMGL="ALL",0"));
softSerial.print("r");
buf = readData();
// Serial.println(buf);
tempIndex = buf.lastIndexOf("+CMGL: ");
tempIndex = tempIndex + 6;
bufferIndex = buf.substring(tempIndex);
bufferIndex = bufferIndex.substring(1,(bufferIndex.indexOf(",")));
messageIndex = bufferIndex.toInt();
///Serial.println(messageIndex);
if(prev!=messageIndex)
{
tempIndex = buf.lastIndexOf(your_phone);
// lcd.clear();
// lcd.setCursor(0, 0);
// lcd.print("SMS READ");
if((digitalRead(4))&&(tempIndex!=-1))
{
pin_on_inv();
delay(2000);
pin_off_inv();
// i=1;
// power=1;
}
else
{
pin_on_setb();
delay(2000);
pin_off_setb();
// i=1;
// power=1;
}
// send_sms(number3);
prev++;
}
if(messageIndex>=2)
{
dellAllSMS();
// lcd.clear();
// lcd.setCursor(0, 0);
// lcd.print("SMS READ");
// lcd.setCursor(0, 1);
// lcd.print("SMS DEL");
// cmd1 ="AT+CMGDA="DEL ALL"rn";
// print_lcd(cmd1);
prev=0;
}
delay(10000);
}
Gheibhear am faidhle STL airson am bogsa a chlò-bhualadh
Bhidio obrach:
Source: www.habr.com