Overunity.com Archives is Temporarily on Read Mode Only!



Free Energy will change the World - Free Energy will stop Climate Change - Free Energy will give us hope
and we will not surrender until free energy will be enabled all over the world, to power planes, cars, ships and trains.
Free energy will help the poor to become independent of needing expensive fuels.
So all in all Free energy will bring far more peace to the world than any other invention has already brought to the world.
Those beautiful words were written by Stefan Hartmann/Owner/Admin at overunity.com
Unfortunately now, Stefan Hartmann is very ill and He needs our help
Stefan wanted that I have all these massive data to get it back online
even being as ill as Stefan is, he transferred all databases and folders
that without his help, this Forum Archives would have never been published here
so, please, as the Webmaster and Creator of these Archives, I am asking that you help him
by making a donation on the Paypal Button above.
You can visit us or register at my main site at:
Overunity Machines Forum



Pierre's 170W in 1600W out Looped Very impressive Build continued & moderated

Started by gotoluc, March 23, 2018, 10:12:45 AM

Previous topic - Next topic

0 Members and 5 Guests are viewing this topic.


Slider2732

Am glad Pierre has posted the code...that's the right way forward and a good honest gesture  :D

Btw, my own version of the code is in the other thread, a few pages back. It was likely missed because, being a new member, the post was held back for moderator approval and the thread was moving quickly.
But now that the real code is available, excellent !

Oh, have just seen Stargate's post above.
It seems that Pierre has based it on the Blink sketch, a simple method to flash an LED on and off and the usual first program that people will upload to their Arduino. Scott Fitzgerald being the author of that famous sketch and Pierre has left a nod in an appreciative direction to that author for the start point of his own program.
Really, it's a big extraction of that sketch (Arduino language for program code), with the output pins all being listed and then the individual switchings on and off of the LEDs themselves. He also has a section that runs every loop, that sees where a variable pot is positioned, to change the speed of running if needed. 

français
Je suis content que Pierre ait posté le code ... c'est la bonne voie à suivre et un bon geste honnête  :D
Ma propre version du code est dans l'autre sujet, quelques pages en arrière. Il a probablement été manqué parce que, étant un nouveau membre, le poste a été retenu pour l'approbation du modérateur et le sujet se déplaçait rapidement. Mais maintenant que le vrai code est disponible, excellent!
Oh, viens de voir le post de Stargate ci-dessus. Il semble que Pierre l'ait basé sur le croquis de Blink, une méthode simple pour allumer et éteindre une LED et le premier programme habituel que les gens vont télécharger sur leur Arduino. Scott Fitzgerald étant l'auteur de ce célèbre sketch et Pierre a laissé un signe de tête dans une direction appréciative à cet auteur pour le point de départ de son propre programme. Vraiment, c'est une grande extraction de cette esquisse (langage Arduino pour le code de programme), avec les broches de sortie qui sont toutes listées, puis les commutations individuelles des LED elles-mêmes. Il a également une section qui exécute chaque boucle, qui voit où un pot variable est positionné, pour changer la vitesse de course si nécessaire.

TinselKoala

That's right, there is nothing remarkable in that sketch, it does essentially exactly the same thing that Slider's sketches do.

BUT... there seems to be something special about the timing. Is this an error or is it deliberate?

The sketch basically switches 12 groups of 3 LEDs on and off in overlapping sequence. There is a timing interval between each group On or Off command.

Group 1 is turned ON, TWO timing intervals pass, Group 1 is turned OFF.
Group 2 is turned ON... THREE timing intervals pass, group 2 is turned OFF.
Group 3 is turned ON... THREE intervals pass, Group 3 is turned OFF.
Group 4 is turned ON... THREE intervals pass, Group 4 is turned OFF.
Group 5 is turned ON... THREE intervals pass, Group 5 is turned OFF.
Group 6 is turned ON... THREE intervals pass, Group 6 is turned OFF.
and so on until...
Group 12 is turned ON... TWO intervals pass, Group 12 is turned OFF.

So Groups 1 and 12 are only on for TWO timing intervals, the other 10 groups are on for THREE timing intervals.

Is this deliberate? Did I miscount?

français
C'est vrai, il n'y a rien de remarquable dans ce croquis, il fait essentiellement exactement la même chose que les croquis de Slider.
MAIS ... il semble y avoir quelque chose de spécial à propos du timing. Est-ce une erreur ou est-ce délibéré?
Le  croquis bascule 12 groupes de 3 LED allumés et éteints dans une séquence de chevauchement. Il y a un intervalle de temps entre chaque commande On ou Off du groupe.
Le groupe 1 est activé, DEUX intervalles de synchronisation passent, le groupe 1 est désactivé.
Le groupe 2 est activé ... TROIS intervalles de synchronisation passent, le groupe 2 est désactivé.
Le groupe 3 est activé ... TROIS intervalles passent, le groupe 3 est désactivé.
Le groupe 4 est allumé ... Trois intervalles passent, le groupe 4 est désactivé.
Le groupe 5 est activé ... TROIS intervalles passent, le groupe 5 est désactivé.
Le groupe 6 est allumé ... Trois intervalles passent, le groupe 6 est désactivé.
et ainsi de suite jusqu'à ...
Le groupe 12 est activé ... DEUX intervalles passent, le groupe 12 est désactivé.
Ainsi, les groupes 1 et 12 ne sont activés que pour DEUX intervalles de temps, les 10 autres groupes sont activés pour TROIS intervalles de temps.
Est-ce délibéré? Ai-je mal compté?

TinselKoala

Here's Pierre's sketch altered for Luc's 30-slot stator. I followed the original pattern but with 10 instead of 12 pins between each group member.
Please check my work! 

Now we have 10 groups of 3 output pins, in overlapping sequence.

I've preserved the odd timing of the original (groups 1 and 10 only on for 2 timing intervals instead of 3.)

I also compressed the pin declarations into a for loop and changed some variable names and comments to make it clearer.

français
Voici le croquis de Pierre modifiée pour le stator à 30 emplacements de Luc. J'ai suivi le modèle original mais avec 10 broches au lieu de 12 entre chaque membre du groupe.
S'il vous plaît vérifier mon travail!
Maintenant, nous avons 10 groupes de 3 broches de sortie, en séquence de chevauchement.
J'ai conservé le timing étrange de l'original (groupes 1 et 10 seulement sur 2 intervalles de temps au lieu de 3.)
J'ai également compressé les déclarations de broche dans une boucle for et changé quelques noms de variables et commentaires pour le rendre plus clair.

/*
  Pierre's Original Sketch

Modded by TK 24 Mar 2018

altered for 30-slot stator (gotoluc)

Speed control pot: connect wiper to Analog 0, legs of pot to +5v and GND



*/

int stepspeed = 0, rawspeed = 0;

void setup() {
 
  // initialize all needed digital pins as OUTPUT
  int pin = 1;
  for (pin = 1; pin <= 31; pin ++)
    pinMode(pin, OUTPUT);
  pinMode(A0, INPUT);
 
}

void loop() {
 
  rawspeed = analogRead(0); // read speedpot on Analog Pin 0
  stepspeed = map(rawspeed,0,1023,1,100);  //transforme rawspeed en une valeur de 0 à 100 (millisecondes)

  digitalWrite(1,HIGH), digitalWrite(11,HIGH), digitalWrite(21,HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(2,HIGH), digitalWrite(12,HIGH), digitalWrite(22,HIGH); // turn the LED on (HIGH is the voltage level)
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(1,LOW),  digitalWrite(11,LOW),  digitalWrite(21,LOW);     // turn the LED off by making the voltage LOW
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(3,HIGH), digitalWrite(13,HIGH), digitalWrite(23,HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(2,LOW),  digitalWrite(12,LOW),  digitalWrite(22,LOW);     // turn the LED off by making the voltage LOW
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(4,HIGH), digitalWrite(14,HIGH), digitalWrite(24,HIGH); // turn the LED on (HIGH is the voltage level)
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(3,LOW),  digitalWrite(13,LOW),  digitalWrite(23,LOW);     // turn the LED off by making the voltage LOW
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(5,HIGH), digitalWrite(15,HIGH), digitalWrite(25,HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(4,LOW),  digitalWrite(14,LOW),  digitalWrite(24,LOW);     // turn the LED off by making the voltage LOW
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(6,HIGH), digitalWrite(16,HIGH), digitalWrite(26,HIGH); // turn the LED on (HIGH is the voltage level)
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(5,LOW),  digitalWrite(15,LOW),  digitalWrite(25,LOW);     // turn the LED off by making the voltage LOW
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(7,HIGH), digitalWrite(17,HIGH), digitalWrite(27,HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(6,LOW),  digitalWrite(16,LOW),  digitalWrite(26,LOW);     // turn the LED off by making the voltage LOW
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(8,HIGH), digitalWrite(18,HIGH), digitalWrite(28,HIGH); // turn the LED on (HIGH is the voltage level)
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(7,LOW),  digitalWrite(17,LOW),  digitalWrite(27,LOW);     // turn the LED off by making the voltage LOW
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(9,HIGH), digitalWrite(19,HIGH), digitalWrite(29,HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(8,LOW),  digitalWrite(18,LOW),  digitalWrite(28,LOW);     // turn the LED off by making the voltage LOW
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(10,HIGH), digitalWrite(20,HIGH), digitalWrite(30,HIGH); // turn the LED on (HIGH is the voltage level)
  delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(9,LOW),  digitalWrite(19,LOW),  digitalWrite(29,LOW);     // turn the LED off by making the voltage LOW
  delay(stepspeed);              // wait for stepspeed value in milliseconds
// digitalWrite(11,HIGH), digitalWrite(21,HIGH), digitalWrite(31,HIGH);   // turn the LED on (HIGH is the voltage level)
// delay(stepspeed);              // wait for stepspeed value in milliseconds
  digitalWrite(10,LOW),  digitalWrite(20,LOW),  digitalWrite(30,LOW);     // turn the LED off by making the voltage LOW
  delay(stepspeed);              // wait for stepspeed value in milliseconds
 
}


TinselKoala

It would be nice if Stefan could enable the "code" BBCode tag.....

fr. Ce serait bien si Stefan pouvait activer le "code" BBCode tag.....