//O3 generator STM upgrade // thisone https://www.marderchen.lima-city.de/rest/O3generator_working_efficient.jpg //https://www.marderchen.lima-city.de/rest/O3_generator_inside.jpg *gehäusedeckel ist mit schaumstoff luftdicht angebrachtdamit der laute server fsn nicht so guthörbar* // https://www.marderchen.lima-city.de/rest/O3_generator_STMupgrade_fine.jpg // https://www.marderchen.lima-city.de/rest/O3_generatot_new-prime-coil-Wire.jpg // https://www.marderchen.lima-city.de/rest/O3_generator_upgrade.jpg // https://www.marderchen.lima-city.de/rest/O3_generator_NE555_to_STM32_upgrade.jpg // circuit: GPIO > 220R > D882 (3A NPN) switching GND to (220R+470R+470R alll parralel) +19V charged gate from 4x (IRF4905 parralel) (caused 1 gone broken, 2 gone broken, 3get epic hot so use 4 for pulsing +19V (~4Ampere)+(25V3300yF elekttrolyte)power o 5 turns teslacoil... wath pictures using onle one rom possible 3 wires coil in center from tesla // 10k temp sensor connecttion 3V3 > temp sensor > GPIO > 10kOhm > GND //used for fadingthe 12V 1.66Ampere serverfan circuit 220R > 2x(D882 3A NPN prralel)> (FAN with 16V 470yF elektrolype parralel)>+12V 2other 12Vfans not loud so permanent 12V connected //buttons: 1+2 duty load (length of powerpulse on), 3+4 duty off break, 5+6 repeatt of the dutysequenze in timed interfall(changing not realy he power but thenoise of the pulsed coils), 7+8 set basic power for the serverfan (if easure higher than 1200 everything higher addet to fanpower //last set is 1 for dutyon 32 for dutyoff 48 for repeat for get good corona result without hearable feeping :3 //have fun use if usefull.. by marderchen #include #include #define NO_MODULES 1 // datathinks PB12 - clockthinks PB13- Strobethinks PB14 TM1638 module(PB12, PB13, PB14);// 3wires to STM + gnd and 5V TM1638* modules[NO_MODULES] = {&module,}; byte modes[NO_MODULES]; #define rot1 PC14 #define grun1 PC13 #define blau1 PC15 #define rot2 PA8 #define grun2 PA9 #define blau2 PA10 #define MOSV12_1 PB11//220R -> J3Y (S8050SMD)->IRF4905 (4x 470R inline to +12V #define MOSV12_2 PB10 //blaurott #define temp1 PA0 //GND->tempsensor->GPIO<-10k<-3V3//mos #define temp2 PA1 // trafo #define temp3 PA2 // mos #define FAN1 PB1 //220R-> D882->fan(1000yFparralel)->+12V +470O+1.6A #define FAN2 PB0 #define weisnicht PA5 #define S1 PA12 uint8_t Zpower=1; uint8_t Zrepeat=44 ;//? uint16_t Zbreak=20;//57 uint16_t fanP=100,fanD=0; boolean anaus=false; uint16_t maxx=1000,Mtime=0,tempy1,tempy2,tempy3,meldy[10],correction,blink,zeige=1; String wort=""; void setup() { delay(200); pinMode(rot1,OUTPUT); pinMode(blau1,OUTPUT); pinMode(grun1,OUTPUT);pinMode(rot2,OUTPUT); pinMode(blau2,OUTPUT); pinMode(grun2,OUTPUT); pinMode(MOSV12_1, OUTPUT); pinMode(MOSV12_2, OUTPUT); pinMode(FAN1, OUTPUT); pinMode(FAN2, OUTPUT);pinMode(weisnicht, OUTPUT);pinMode(S1,INPUT); for (int i = 0; i < NO_MODULES; i++) {module.setupDisplay(true, 8); modes[i] = 0;} digitalWrite(weisnicht,HIGH);zahlda(Zpower,Zbreak); delay(500); } void loop() { zeitreise(); } String cach=""; void update(TM1638* module, byte* mode) { byte buttons = module->getButtons();//only button pulse if (buttons ==1) {Zpower++;} if (buttons ==2&&Zpower>0) {Zpower--;} if (buttons ==4) {Zbreak++;} if (buttons ==8&&Zbreak>0) {Zbreak--;} if (buttons ==16) {Zrepeat++;} if (buttons ==32&&Zrepeat>0) {Zrepeat--;} if (buttons ==64){fanP+=10;} if (buttons ==128&&fanP>=10) {fanP-=10;} if (buttons ==1||buttons==2||buttons==4||buttons==8) {zeige=1;zahlda(Zpower,Zbreak);} if (buttons ==64||buttons==128) {zeige=3;} if (buttons ==16||buttons==32) {zeige=1;zahlda(0000,Zrepeat);} if(zeige==3){zahlda(tempy1,fanD );} if(digitalRead(S1)==HIGH){anaus=true;} if(digitalRead(S1)==LOW){anaus=false;} for(uint8_t nul=0;nul<=7;nul++){module->setLED(0,nul);} //module->setLED(1,modus); if(anaus==true){module->setLED(1,7);} module->setDisplayToString(cach); } void zahlda(uint16_t zahla,uint16_t zahlb){ cach=""; if(zahla<=9){cach+="0";}if(zahla<=99){cach+="0";}if(zahla<=999){cach+="0";} cach+=zahla; if(zahlb<=9){cach+="0";}if(zahlb<=99){cach+="0";}if(zahlb<=999){cach+="0";} cach+=zahlb;} void istwarm(void){//no wires to connect temp2, and 3 if (((analogRead(temp1)-2000)) 0){tempy1--;}else{tempy1++;} if (((analogRead(temp2))) 0){tempy2--;}else{tempy2++;} if (((correction-analogRead(temp3))) 0){tempy3--;}else{tempy3++;} if(tempy1>1200){fanD=fanP+(tempy1-1200);}else{fanD=fanP;} } void led(void){ blink++;if(blink>1000){blink=0;} if(anaus==true){ if(blink%40==0){meldy[0]=maxx-1;} if(blink%80==0){meldy[2]=maxx-1;} }} uint8_t leds=5; void fade(void){ for(uint8_t zu=0;zu 0){meldy[zu]--;} if(meldy[zu]>=50){meldy[zu]-=50;} }} long maintime=millis(),maintime3=millis();long timez= millis();long mosipulsi=micros(); void zeitreise(void){ while ((millis()- maintime) >= 6){fade();led();maintime = millis();} while ((millis()- maintime3) >= 100) {for (int i = 0; i < NO_MODULES; i++) {update(modules[i], &modes[i]);} maintime3 = millis();} //refresh display while ((millis()- timez) >= 5) {istwarm();timez = millis();} //read temperatursensors while ((micros()-mosipulsi) >= 3) {pulspowder();mosipulsi = micros();}} void pulspowder(void) { for (uint16_t fcount=0; fcount <=maxx; fcount++) { for(uint16_t kl=0;kl =(Zpower+1+Zbreak)){Mtime=0;} if(Mtime==0 && anaus==true){moson();} if(Mtime==(Zpower+1)){mosaus();} Mtime++; } // if(fcount==0){allof();} if (fcount <= (maxx-1) && fcount >=1) { if (fcount==(maxx-meldy[0])) {digitalWrite(rot1,HIGH);} if (fcount==(maxx-meldy[1])) {digitalWrite(grun1,HIGH);} if (fcount==(maxx-meldy[2])) {digitalWrite(blau1,HIGH);} if (fcount==(maxx-meldy[3])) {digitalWrite(rot2,HIGH);} if (fcount==(maxx-meldy[4])) {digitalWrite(grun2,HIGH);} if (fcount==(maxx-meldy[5])) {digitalWrite(blau2,HIGH);} if (fcount==(maxx-fanD)) {digitalWrite(FAN1,HIGH);digitalWrite(FAN2,HIGH);} } if (fcount>=maxx){allof();}} } void faster(void){ for(uint16_t kl=0;kl =(Zpower+1+Zbreak)){Mtime=0;} if(Mtime==0 && anaus==true){moson();} if(Mtime==(Zpower+1)){mosaus();} Mtime++; }}//} void allof(void){ digitalWrite(rot1,LOW);digitalWrite(rot2,LOW);digitalWrite(grun1,LOW);digitalWrite(grun2,LOW);digitalWrite(blau1,LOW);digitalWrite(blau2,LOW);digitalWrite(FAN2,LOW);digitalWrite(FAN1,LOW);} void moson(void){ digitalWrite(MOSV12_1,HIGH);digitalWrite(MOSV12_2,HIGH);} void mosaus(void){ digitalWrite(MOSV12_1,LOW);digitalWrite(MOSV12_2,LOW);}