//old tesla coil driver with selvduild 2digs + 7ledsbar leddisplay //used for wireless LED experiment working fine:3 even blowing onmas wattage inside becoming some led light out but funny effect :3 //durreng experimenting destroyed 2irf1404 so final solution P-channel mosfet IRF4905 (lol working better with irf4905.. maybe the D882->BD140->Gate bridge slow down the frequency?) //12V 5x(parralel (2x10V 3300yF))fighfrequencycapacitors parralel need high pulsdrain 12V ->AMS1117(with large heatsink) ->3v3 (leds +stm32f103c8t6 /*pics * https://marderchen.lima-city.de/NEU+/wirelesledtry_induktorcoil_N=6_U=12.jpg * https://marderchen.lima-city.de/NEU+/wirelessledtry_firsttestresult_nowoptimizing.jpg * https://marderchen.lima-city.de/NEU+/wirelessledtry_mosfetcoolingaddet.jpg * https://marderchen.lima-city.de/NEU+/wirelessledtry_ferritrangeboosting1.jpg * https://marderchen.lima-city.de/NEU+/wirelessledtry_ferritrangeboosting2.jpg * https://marderchen.lima-city.de/NEU+/wirelessledtry_ferr%20.jpg uups^^ * https://marderchen.lima-city.de/NEU+/wirelessledtry_optimalferritcoreposition.jpg * https://marderchen.lima-city.de/NEU+/wirelesledtry_optimizinginduktor.jpg * https://marderchen.lima-city.de/NEU+/wirelessledtry_optimized_inductorcoilholter.jpg * https://marderchen.lima-city.de/NEU+/wirelessledtry_4x_6turns_inductorcoilsfortrymixing.jpg * https://marderchen.lima-city.de/NEU+/wirelessledtry_maybeshouldusehigherpulsingvoltage.jpg * https://marderchen.lima-city.de/NEU+/wirelessledtry_destroyed2nd-lastIRF1404_soresolderetto_p-mos_IRF4905.jpg * https://marderchen.lima-city.de/NEU+/wirelessledtry_highpreformanceserverfanupgrade.jpg * and on end from video.. */ //kote by marterchen =^.^= watch GPIO list for read whats realy needet :3 //have seen the awesome video https://www.youtube.com/watch?v=PsUsByrOveE from stranged parts and just quick tryed to build my own.. like to blay with electronic :3 think the original device using far higher frequency for transmitt more energy but higher frequenzy=lower fieldrange.. //\/digmatrix not needet to bee connected #define dig1 PB5 //dig/sekt vertauschjt #define dig2 PB6 #define dig3 PB7 #define dig4 PB8 #define dig5 PB9 #define dig6 PB15 #define dig7 PA8 #define seg1 PA9 #define seg2 PA10 #define seg3 PC14 ///\end digmatrix #define trans1 PB11 //GPIO->220R->D882->16V470yF relectrolyte parralel to +12V connected serverturbinerotor #define trans2 PB10 //notused #define trans3 PB1 //GPIO-> 220R->D882->over 4x 470R in line to +12V connected gate->coil diameter arround DINA4 drawboard turns/coil N=6 3coils parralel used wire ~0.5mm˛ laque litze #define trans4 PB0 //notused //interface 3V3->taster->470Rgroundet GPIO #define t1 PB12 //can be groundet #define t2 PB13 //can be groundet #define t3 PB14 //can be groundet #define t4 PA12 //needet power on fan+mosfetpulsing #define t5 PA15 //needet power off #define user PC13 //led on minimumsystemboard int16_t digitise[4][10]; //last: brighteness uint16_t bar[9]; int8_t onpress[14]; uint16_t fadefine=200; int ani =199; int aus=0; uint8_t teslapower=24; uint8_t teslarepeat=3; uint16_t teslabreak=50; uint16_t dotys; int8_t zeitregen,blinkt; uint8_t setzen=1; long maintime=millis(); long maintime2=micros(); long maintime3=millis(); String showme=""; void setup() { pinMode(dig1, OUTPUT); pinMode(dig2, OUTPUT); pinMode(dig3, OUTPUT); pinMode(dig4, OUTPUT); pinMode(dig5, OUTPUT); pinMode(dig6, OUTPUT); pinMode(dig7, OUTPUT); pinMode(seg1, OUTPUT); pinMode(seg2, OUTPUT); pinMode(seg3, OUTPUT); pinMode(t1, INPUT); pinMode(t2, INPUT); pinMode(t3, INPUT); pinMode(t4, INPUT); pinMode(t5, INPUT); pinMode(trans1, OUTPUT); pinMode(trans2, OUTPUT); pinMode(trans3, OUTPUT); pinMode(trans4, OUTPUT); pinMode(user, OUTPUT); } boolean onoff=false; void loop() { zeitreise(); drueckmich(); } void drueckmich(void){ if (onpress[12] >=2) { if (digitalRead(t1) == HIGH && onpress[0] ==0 ) { onpress[0] =1; setzen++; if (setzen >3) {setzen=1;} } if (onpress[0] == 1) { onpress[1]++; } if (onpress[1] >= 15) { onpress[1] =0; onpress[0]=0; } if (digitalRead(t2) == HIGH && onpress[2] ==0 ) { onpress[2] =1; setzden(setzen,true); } if (onpress[2] == 1) { onpress[3]++; } if (onpress[3] >= 3) { onpress[3] =0; onpress[2]=0; } if (digitalRead(t3) == HIGH && onpress[4] ==0 ) { onpress[4] =1; setzden(setzen,false);} if (onpress[4] == 1) { onpress[5]++; } if (onpress[5] >= 3) { onpress[5] =0; onpress[4]=0; } if (digitalRead(t4) == HIGH && onpress[6] ==0 ) { onpress[6] =1; onoff=true;} if (onpress[6] == 1) { onpress[7]++; } if (onpress[7] >= 5) { onpress[7] =0; onpress[6]=0; } if (digitalRead(t5) == HIGH && onpress[8] ==0 ) { onpress[8] =1; onoff=false;} if (onpress[8] == 1) { onpress[9]++; } if (onpress[9] >= 5) { onpress[9] =0; onpress[8]=0; } digitalWrite(user,HIGH); if ((digitalRead(t1) ||digitalRead(t2) ||digitalRead(t3) ||digitalRead(t4) ||digitalRead(t5))==HIGH){digitalWrite(user,LOW);} onpress[12]=0; }}//tagrum void setzden(int chosenone,boolean updown) { if(updown==true){ if (chosenone==1 && teslapower = 1) {teslapower-=1;} if (chosenone==2 && teslarepeat >= 1) {teslarepeat-=1;} if (chosenone==3 && teslabreak >= 12) {teslabreak-=1;} } if (chosenone==1){zeigmal(teslapower);} if (chosenone==2){zeigmal(teslarepeat);} if (chosenone==3){zeigmal(teslabreak);} } void zeigmal(int16_t wasden){ showme=""; if (wasden <=9){ showme+="0";} showme +=wasden; refresh(); } //me wil sel8ina zufrau void refresh() { zeigzeugs(0,showme[0]); zeigzeugs(1,showme[1]); } uint32_t fadecach=0; void zeitreise(void){ while ((millis()- maintime) >= 30) { onpress[12]++; if (setzen !=0&&onoff == false) {refresh();} downfade(); maintime = millis(); } while ((millis()- maintime2) >= 20) { maintime2 = millis(); if(setzen==1){bar[0]=fadefine;} if(setzen==2){bar[1]=fadefine;} if(setzen==3){bar[2]=fadefine;} if(onoff==true){bar[6]=fadefine;} if(onoff == false){refresh();machlicht();digitalWrite(trans3, LOW); } } while ((micros()- maintime3) >= 3) { fadecach=fadefine*teslabreak; if(onoff == true){pulspower();} maintime3 = micros(); }} uint8_t steptz=2; void downfade(void) { for (int16_t digs=0; digs <=8; digs++) { if(bar[digs]>=(steptz*4)) { bar[digs]-=steptz*4;} for (int16_t ad=0; ad <=2; ad++) { if(digitise[digs][ad]>steptz) { digitise[digs][ad]-=steptz;} }} } /*thingy showing 0 in dig "PLAN" dots between are 8 in dig 6(if starting with1 and not 0) first dig from left.. * hihi i know there must be a better solution better but better using my one caused its working fine :3 * * ---1-- * | | * 3 2 []8 * | | * ---4--- * | | * 5 6 []8 * | | * ---7--- */ void zeigzeugs(int welchezahl,char wasden) { if (wasden == 'S') {wasden='5';} if (wasden == 'e') {wasden='9';} if (wasden == 'R') {wasden='A';} if (wasden == '0') {digitise[welchezahl][1]=ani; digitise[welchezahl][2]=ani; digitise[welchezahl][3]=ani; digitise[welchezahl][4]=aus; digitise[welchezahl][5]=ani; digitise[welchezahl][6]=ani; digitise[welchezahl][7]=ani;} if (wasden == '1') {digitise[welchezahl][1]=aus; digitise[welchezahl][2]=ani; digitise[welchezahl][3]=aus; digitise[welchezahl][4]=aus; digitise[welchezahl][5]=aus; digitise[welchezahl][6]=ani; digitise[welchezahl][7]=aus;} if (wasden == '2') {digitise[welchezahl][1]=ani; digitise[welchezahl][2]=ani; digitise[welchezahl][3]=aus; digitise[welchezahl][4]=ani; digitise[welchezahl][5]=ani; digitise[welchezahl][6]=aus; digitise[welchezahl][7]=ani;} if (wasden == '3') {digitise[welchezahl][1]=ani; digitise[welchezahl][2]=ani; digitise[welchezahl][3]=aus; digitise[welchezahl][4]=ani; digitise[welchezahl][5]=aus; digitise[welchezahl][6]=ani; digitise[welchezahl][7]=ani;} if (wasden == '4') {digitise[welchezahl][1]=aus; digitise[welchezahl][2]=ani; digitise[welchezahl][3]=ani; digitise[welchezahl][4]=ani; digitise[welchezahl][5]=aus; digitise[welchezahl][6]=ani; digitise[welchezahl][7]=aus;} if (wasden == '5') {digitise[welchezahl][1]=ani; digitise[welchezahl][2]=aus; digitise[welchezahl][3]=ani; digitise[welchezahl][4]=ani; digitise[welchezahl][5]=aus; digitise[welchezahl][6]=ani; digitise[welchezahl][7]=ani;} if (wasden == '6') {digitise[welchezahl][1]=ani; digitise[welchezahl][2]=aus; digitise[welchezahl][3]=ani; digitise[welchezahl][4]=ani; digitise[welchezahl][5]=ani; digitise[welchezahl][6]=ani; digitise[welchezahl][7]=ani;} if (wasden == '7') {digitise[welchezahl][1]=ani; digitise[welchezahl][2]=ani; digitise[welchezahl][3]=aus; digitise[welchezahl][4]=aus; digitise[welchezahl][5]=aus; digitise[welchezahl][6]=ani; digitise[welchezahl][7]=aus;} if (wasden == '8') {digitise[welchezahl][1]=ani; digitise[welchezahl][2]=ani; digitise[welchezahl][3]=ani; digitise[welchezahl][4]=ani; digitise[welchezahl][5]=ani; digitise[welchezahl][6]=ani; digitise[welchezahl][7]=ani;} if (wasden == '9') {digitise[welchezahl][1]=ani; digitise[welchezahl][2]=ani; digitise[welchezahl][3]=ani; digitise[welchezahl][4]=ani; digitise[welchezahl][5]=aus; digitise[welchezahl][6]=ani; digitise[welchezahl][7]=ani;} if (wasden == ' ') {digitise[welchezahl][1]=aus; digitise[welchezahl][2]=aus; digitise[welchezahl][3]=aus; digitise[welchezahl][4]=aus; digitise[welchezahl][5]=aus; digitise[welchezahl][6]=aus; digitise[welchezahl][7]=aus;} if (wasden == 'A') {digitise[welchezahl][1]=ani; digitise[welchezahl][2]=ani; digitise[welchezahl][3]=ani; digitise[welchezahl][4]=ani; digitise[welchezahl][5]=ani; digitise[welchezahl][6]=ani; digitise[welchezahl][7]=aus;} if (wasden == 'L') {digitise[welchezahl][1]=aus; digitise[welchezahl][2]=aus; digitise[welchezahl][3]=ani; digitise[welchezahl][4]=aus; digitise[welchezahl][5]=ani; digitise[welchezahl][6]=aus; digitise[welchezahl][7]=ani;} if (wasden == 't') {digitise[welchezahl][1]=ani; digitise[welchezahl][2]=ani; digitise[welchezahl][3]=ani; digitise[welchezahl][4]=aus; digitise[welchezahl][5]=ani; digitise[welchezahl][6]=aus; digitise[welchezahl][7]=ani;} if (wasden == 'i') {digitise[welchezahl][1]=aus; digitise[welchezahl][2]=aus; digitise[welchezahl][3]=aus; digitise[welchezahl][4]=aus; digitise[welchezahl][5]=aus; digitise[welchezahl][6]=ani; digitise[welchezahl][7]=aus;} if (wasden == 'm') {digitise[welchezahl][1]=aus; digitise[welchezahl][2]=aus; digitise[welchezahl][3]=aus; digitise[welchezahl][4]=ani; digitise[welchezahl][5]=ani; digitise[welchezahl][6]=ani; digitise[welchezahl][7]=aus;} if (wasden == 'H') {digitise[welchezahl][1]=aus; digitise[welchezahl][2]=ani; digitise[welchezahl][3]=ani; digitise[welchezahl][4]=ani; digitise[welchezahl][5]=ani; digitise[welchezahl][6]=ani; digitise[welchezahl][7]=aus;} if (wasden == 'o') {digitise[welchezahl][1]=aus; digitise[welchezahl][2]=aus; digitise[welchezahl][3]=aus; digitise[welchezahl][4]=ani; digitise[welchezahl][5]=ani; digitise[welchezahl][6]=ani; digitise[welchezahl][7]=ani;} if (wasden == 'U') {digitise[welchezahl][1]=aus; digitise[welchezahl][2]=ani; digitise[welchezahl][3]=ani; digitise[welchezahl][4]=aus; digitise[welchezahl][5]=ani; digitise[welchezahl][6]=ani; digitise[welchezahl][7]=ani;} if (wasden == 'E') {digitise[welchezahl][1]=ani; digitise[welchezahl][2]=aus; digitise[welchezahl][3]=ani; digitise[welchezahl][4]=ani; digitise[welchezahl][5]=ani; digitise[welchezahl][6]=aus; digitise[welchezahl][7]=ani;} if (wasden == 'C') {digitise[welchezahl][1]=ani; digitise[welchezahl][2]=aus; digitise[welchezahl][3]=ani; digitise[welchezahl][4]=aus; digitise[welchezahl][5]=ani; digitise[welchezahl][6]=aus; digitise[welchezahl][7]=ani;} //see how simple it is brain :3 } long startriger=micros(); void machlicht(void) { while ((micros()-startriger) >= 20) { for (int16_t sekt=1; sekt <=3; sekt++) { noseg(); if(sekt ==1) {digitalWrite(seg1, LOW );} if(sekt ==2) {digitalWrite(seg2, LOW );} if(sekt ==3) {digitalWrite(seg3, LOW );} for (int16_t fcount1=0; fcount1 <(fadefine+2); fcount1++) { if (fcount1 == 0) {nodig();} if (fcount1 < fadefine && fcount1>=1 && sekt <=2) { if (fcount1 == ((fadefine)-digitise[sekt-1][1])) { digitalWrite(dig1, LOW );} if (fcount1 == ((fadefine)-digitise[sekt-1][2])) { digitalWrite(dig2, LOW );} if (fcount1 == ((fadefine)-digitise[sekt-1][3])) { digitalWrite(dig3, LOW );} if (fcount1 == ((fadefine)-digitise[sekt-1][4])) { digitalWrite(dig4, LOW );} if (fcount1 == ((fadefine)-digitise[sekt-1][5])) { digitalWrite(dig6, LOW );} if (fcount1 == ((fadefine)-digitise[sekt-1][6])) { digitalWrite(dig5, LOW );} if (fcount1 == ((fadefine)-digitise[sekt-1][7])) { digitalWrite(dig7, LOW );} } if (fcount1 < fadefine && fcount1>=1 && sekt ==3) { if (fcount1 == (fadefine-bar[0])) { digitalWrite(dig1, LOW );} if (fcount1 == (fadefine-bar[1])) { digitalWrite(dig2, LOW );} if (fcount1 == (fadefine-bar[2])) { digitalWrite(dig3, LOW );} if (fcount1 == (fadefine-bar[3])) { digitalWrite(dig4, LOW );} if (fcount1 == (fadefine-bar[4])) { digitalWrite(dig5, LOW );} if (fcount1 == (fadefine-bar[5])) { digitalWrite(dig6, LOW );} if (fcount1 == (fadefine-bar[6])) { digitalWrite(dig7, LOW );}} if (fcount1 > (fadefine-1)) {nodig(); noseg();} }} startriger = micros(); } } void pulspower() { for (uint32_t fcount1x=0; fcount1x <(teslarepeat*10); fcount1x++) { for (uint32_t fcount2=0; fcount2 <(teslabreak); fcount2++) { if (fcount2==1) {digitalWrite(trans3, HIGH);digitalWrite(trans1,HIGH);} if (fcount2==(teslapower+2)) {digitalWrite(trans3, LOW); } if (fcount2==(teslabreak/6)){digitalWrite(trans1,LOW);} }}} void nodig(void) { digitalWrite(dig1, HIGH ); digitalWrite(dig2, HIGH ); digitalWrite(dig3, HIGH ); digitalWrite(dig4, HIGH ); digitalWrite(dig5, HIGH ); digitalWrite(dig6,HIGH ); digitalWrite(dig7, HIGH ); } void noseg(void) { digitalWrite(seg1, HIGH ); digitalWrite(seg2, HIGH ); digitalWrite(seg3, HIGH ); } //[MEOW] project by marderchen use it or parts if usefull :3