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 3 Guests are viewing this topic.

TinselKoala

Quote from: listener191 on March 31, 2018, 04:16:56 PM
My code attached. No refinements or attempts to reduce lines.
Not tested yet.
I have another version for a 36 slot stator, as I have a 10KW motor coming my way.

Regards

L192


// L192 March 2018
// 30 slot stator


const int Enable_1_11_21_5_15_25 = 37;   
const int Enable_2_12_22_6_16_26 = 38;   
const int Enable_3_13_23_7_17_27 = 39;   
const int Enable_4_14_24_8_18_28 = 40;   
const int Enable_5_15_25_9_19_29 =41;   
const int Enable_6_16_26_10_20_30 =42;   
const int Enable_7_17_27_11_21_1 =43;   
const int Enable_8_18_28_12_22_2 =44;   
const int Enable_9_19_29_13_23_3 =45;   
const int Enable_10_20_30_14_24_4 =46;   

   



void setup() {
  // initialize digital pin 1-30 as an output.

pinMode(1, OUTPUT);
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7,OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
pinMode(14,OUTPUT);
pinMode(15, OUTPUT);
pinMode(16, OUTPUT);
pinMode(17, OUTPUT);
pinMode(18, OUTPUT);
pinMode(19, OUTPUT);
pinMode(20, OUTPUT);
pinMode(21, OUTPUT);
pinMode(22, OUTPUT);
pinMode(23,OUTPUT);
pinMode(24, OUTPUT);
pinMode(25, OUTPUT);
pinMode(26, OUTPUT);
pinMode(27, OUTPUT);
pinMode(28, OUTPUT);
pinMode(29, OUTPUT);
pinMode(30,OUTPUT);
   
//initialize pins 37-46 as an output   
pinMode (Enable_1_11_21_5_15_25,OUTPUT);   
pinMode (Enable_2_12_22_6_16_26,OUTPUT);   
pinMode (Enable_3_13_23_7_17_27,OUTPUT);   
pinMode (Enable_4_14_24_8_18_28,OUTPUT);   
pinMode (Enable_5_15_25_9_19_29,OUTPUT);   
pinMode (Enable_6_16_26_10_20_30,OUTPUT);   
pinMode (Enable_7_17_27_11_21_1,OUTPUT);   
pinMode (Enable_8_18_28_12_22_2,OUTPUT);   
pinMode (Enable_9_19_29_13_23_3,OUTPUT);   
pinMode (Enable_10_20_30_14_24_4,OUTPUT);   
   
}

int x = 0;


void loop(){
//int y= analogRead(0); // read pot  use this if you want or set x manually
// x= map(y,0,1000 ,1,100);
x=1000;

// sequencing 30 coils 5 slot pitch previous coil stays on until next coil is on
  digitalWrite(1,HIGH), digitalWrite(11,HIGH), digitalWrite(21,HIGH); //top switches   
  digitalWrite(5,LOW), digitalWrite(15,LOW), digitalWrite(25,LOW);   // bottom switches
  digitalWrite (Enable_1_11_21_5_15_25,HIGH); //enable all switches in group setting output
  delay(x);              // wait for a second
 
  digitalWrite(2,HIGH), digitalWrite(12,HIGH), digitalWrite(22,HIGH); // top switches ON before 1 OFF
  digitalWrite(6,LOW), digitalWrite(16,LOW), digitalWrite(26,LOW); // bottom switches ON before 1 OFF
  digitalWrite(Enable_2_12_22_6_16_26,HIGH); //enable all switches in group setting output
  delay(x);              // wait for a second
  digitalWrite(Enable_1_11_21_5_15_25,LOW); //disable all switches in group 1 OFF
  delay(x);              // wait for a second
 
  digitalWrite(3,HIGH), digitalWrite(13,HIGH), digitalWrite(22,HIGH);   // top swtches ON before 2 OFF
  digitalWrite(7,LOW), digitalWrite(17,LOW), digitalWrite(27,LOW);   // bottom switches ON before 2 OFF
  digitalWrite(Enable_3_13_23_7_17_27,HIGH); //enable all switches in group setting output
  delay(x);              // wait for a second
  digitalWrite(Enable_2_12_22_6_16_26,LOW); //disable all switches in group 2 OFF
  delay(x);              // wait for a second
 
  digitalWrite(4,HIGH), digitalWrite(14,HIGH), digitalWrite(24,HIGH); // top switches
  digitalWrite(8,LOW), digitalWrite(18,LOW), digitalWrite(28,LOW);   // bottom switches
  digitalWrite(Enable_4_14_24_8_18_28,HIGH); //enable all switches in group
  delay(x);              // wait for a second
  digitalWrite(Enable_3_13_23_7_17_27,LOW); //disable all switches in group
  delay(x);              // wait for a second
 
  digitalWrite(5,HIGH), digitalWrite(15,HIGH), digitalWrite(25,HIGH);   // top switches
  digitalWrite(9,LOW), digitalWrite(19,LOW), digitalWrite(29,LOW);   // bottom switches
  digitalWrite(Enable_5_15_25_9_19_29,HIGH); //enable all switches in group
  delay(x);              // wait for a second
  digitalWrite(Enable_4_14_24_8_18_28,LOW); //disable all switches in group
  delay(x);              // wait for a second
 
  digitalWrite(6,HIGH), digitalWrite(16,HIGH), digitalWrite(26,HIGH); // top switches
  digitalWrite(10,LOW), digitalWrite(20,LOW), digitalWrite(30,LOW);   // bottom switches
  digitalWrite(Enable_6_16_26_10_20_30,HIGH); //enable all switches in group
  delay(x);              // wait for a second
  digitalWrite(Enable_5_15_25_9_19_29,LOW); //disable all switches in group
  delay(x);              // wait for a second

  digitalWrite(7,HIGH), digitalWrite(17,HIGH), digitalWrite(27,HIGH);   // top switches
  digitalWrite(11,LOW), digitalWrite(21,LOW), digitalWrite(1,LOW);   // bottom switches
  digitalWrite(Enable_7_17_27_11_21_1,HIGH); //enable all switches in group
  delay(x);              // wait for a second
  digitalWrite(Enable_6_16_26_10_20_30,LOW); //disable all switches in group
  delay(x);              // wait for a second

  digitalWrite(8,HIGH), digitalWrite(18,HIGH), digitalWrite(28,HIGH); // top switches
  digitalWrite(12,LOW), digitalWrite(22,LOW), digitalWrite(2,LOW);   // bottom switches
  digitalWrite(Enable_8_18_28_12_22_2,HIGH); //enable all switches in group
  delay(x);              // wait for a second
  digitalWrite(Enable_7_17_27_11_21_1,LOW); //disable all switches in group
  delay(x);              // wait for a second
 
  digitalWrite(9,HIGH), digitalWrite(19,HIGH), digitalWrite(29,HIGH);   // top switches
  digitalWrite(13,LOW), digitalWrite(23,LOW), digitalWrite(3,LOW);   // bottom switches
  digitalWrite(Enable_9_19_29_13_23_3,HIGH); //enable all switches in group
  delay(x);              // wait for a second
  digitalWrite(Enable_8_18_28_12_22_2,LOW); //disable all switches in group
  delay(x);              // wait for a second
 
  digitalWrite(10,HIGH), digitalWrite(20,HIGH), digitalWrite(30,HIGH); // top switches
  digitalWrite(14,LOW), digitalWrite(24,LOW), digitalWrite(4,LOW);   // bottom switches
  digitalWrite(Enable_10_20_30_14_24_4,HIGH); //enable all switches in group
  delay(x);              // wait for a second
  digitalWrite(Enable_9_19_29_13_23_3,LOW); //disable all switches in group
  delay(x);              // wait for a second
  digitalWrite(Enable_10_20_30_14_24_4,LOW); //enable all switches in group
  delay(x);

Ah... OK.... But...

1. Your code doesn't compile, because of a minor error: you left off the closing curly bracket in loop(). Once this is fixed the code compiles and runs... But...

2. There is a timing irregularity. This was also there in the original sketch Pierre proposed and I don't recall ever getting a straight answer about whether this was intentional on his part (the "Secret") or a mistake (the "bug"). At any rate it interferes with the smooth flow of the fields around the stator. To be specific, there are two "delay" intervals between "Enable_1x, HIGH" and "Enable_1x, LOW" and also between "Enable_10x, HIGH" and "Enable_10x, LOW", whereas there are three "delay" intervals between all the other "Enable_" HIGH and LOW statements. If this is intentional, fine, but it would be nice to know why.

3. It is far better IMHO (for debugging and actual running, since the desired loop speed is so low) to include setting the "delay" interval value each time it is used, via the potentiometer, rather than setting it once per loop. So I'd recommend replacing each "delay(x)" statement with "delay(map(analogRead(A0), 0, 1023, 0, 100))" so that the speed can be set without having to wait for the loop to finish. This adds some tiny microseconds to the execution time but compared to the "60 Hz" output speed this is insignificant.

4. In my testing it looks like this code has several more "overlaps" than previous versions. That is, instead of just two LEDs lit at any time, this has groups of 5 or 6 chasing around. My test board doesn't have all 30 LED positions populated though; I am only looking at the first "thirdrant" of the complete circle (Pins 1 - 12) , so I'm not seeing the full picture in my hardware test.

pmgr

To shed some more light on the coil winding pattern from Pierre, I went back to my old post:

For Pierre's case, I think we need to get clarification from him how exactly he has wound the stator. What I assumed in my latest simulations is that a coil runs over 7 slots and the next coil is in the neighboring slot (see my number sequence above).

01-07 08-14 15-21 22-28 29-35 36-06
07-13 14-20 21-27 28-34 35-05 06-12
13-19 20-26 27-33 34-04 05-11 12-18
19-25 26-32 33-03 04-10 11-17 18-24
25-31 32-02 03-09 10-16 17-23 24-30
31-01 02-08 09-05 16-22 23-29 30-36

36 coils total, so he could be using this winding configuration. The magnetic field pattern is attached (7SlotCoilSpan).

Yet he could also have done it like this: spanning 7 slots and have the neighboring coils in the same slot, then he would get the following sequence:

01-07 07-13 13-19 19-25 25-31 31-01
02-08 08-14 14-20 20-26 26-32 32-02
03-09 09-15 15-21 21-27 27-33 33-03
04-10 10-16 16-22 22-28 28-34 34-04
05-11 11-17 17-23 23-29 29-35 35-05
06-12 12-18 18-24 24-30 30-36 36-06

This actually yields the same coil configuration as the previous configuration (yet in different order, but that doesn't matter).
So again, 36 total coils, so he could be using this configuration.

So let's look now at a coil span of 6 slots instead of 7:

01-06 07-12 13-18 19-24 25-30 31-36
02-07 08-13 14-19 20-25 26-31 32-01
03-08 09-14 15-20 21-26 27-32 33-02
04-09 10-15 16-21 22-27 28-33 34-03
05-10 11-16 17-22 23-28 29-34 35-04
06-11 12-17 18-23 24-29 30-35 36-05

Again 2 coils per slot and 36 coils total, so he could be using this as well. I note that his one has his magic number sequence 01-06 ; 02-07; 03-08, etc. see post #170. For the magnetic field, see the attached image (6SlotCoilSpan).

Let's see if he could have done it like this: spanning 6 slots and have the neighboring coils in the same slot, then he would get the following sequence:

01-06 06-11 11-16 16-21 21-26 26-31 31-36
36-04 04-09 09-14 14-19 19-24 24-29 29-34
34-03 03-08 08-13 13-18 18-23 23-28 28-33
33-02 02-07 07-12 12-17 17-22 22-27 27-32
32-01

However this only gives 29 coils, so he can't have used this.

Someone should ask him what he is using.

PmgR

====
* Truthfulness * Compassion * Forbearance * www.falundafa.org

TinselKoala

I've "massaged" listener191's code a little bit to get rid of the timing glitch (assuming it is unintentional), fix an error in comments, add the realtime speed control, etc.

I haven't been able to figure out how to compress the 10 coil-actuation statement sets into a single loop yet, but I'm sure it can be done.

Please, Stefan or moderators... can you enable the "code" BBTag?

-----------------------------------------------------------------------------------------------------------------------------------


/**********************************

   L192 March 2018
   30 slot stator
   
   massaged by TK:
   -- timing irregularity fixed
   -- for loop added
   -- Enable[] group array added
   -- Speed adjust real-time added



**********************************/
const int Enable[] = { 37,38,39,40,41,42,43,44,45,46 };  // Enable pins for coil groups 1-10

/*
Enable[1] group controls coils _1_11_21_5_15_25 
Enable[2] group controls coils _2_12_22_6_16_26   
Enable[3] group controls coils _3_13_23_7_17_27 
Enable[4] group controls coils _4_14_24_8_18_28 
Enable[5] group controls coils _5_15_25_9_19_29
Enable[6] group controls coils _6_16_26_10_20_30
Enable[7] group controls coils _7_17_27_11_21_1
Enable[8] group controls coils _8_18_28_12_22_2
Enable[9] group controls coils _9_19_29_13_23_3
Enable[10] group controls coils _10_20_30_14_24_4
*/

int pincounter = 1;
int index = 1;
int maxDelay = 100;  // set maximum delay interval in milliseconds here

void setup() {
  // initialize digital pin 1-30 as an output.
for (pincounter = 1; pincounter < 31; pincounter ++) {
pinMode(pincounter, OUTPUT);
}
pinMode(A0, INPUT);
}

void loop() {

  // sequencing 30 coils 5 slot pitch previous coil stays on until next coil is on
  digitalWrite(1,HIGH), digitalWrite(11,HIGH), digitalWrite(21,HIGH); //top switches   
  digitalWrite(5,LOW), digitalWrite(15,LOW), digitalWrite(25,LOW);    // bottom switches
  digitalWrite (Enable[1], HIGH); // enable all switches in group 1
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait
  digitalWrite(Enable[10],LOW);  // disable all switches in group 10
  delay(map(analogRead(A0),0,1023,0,maxDelay));

  digitalWrite(2,HIGH), digitalWrite(12,HIGH), digitalWrite(22,HIGH); // top switches ON before 1 OFF
  digitalWrite(6,LOW), digitalWrite(16,LOW), digitalWrite(26,LOW);    // bottom switches ON before 1 OFF
  digitalWrite (Enable[2], HIGH);  // enable all switches in group 2
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait
  digitalWrite(Enable[1], LOW);  // disable all switches in group 1
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait

  digitalWrite(3,HIGH), digitalWrite(13,HIGH), digitalWrite(22,HIGH); // top switches ON before 2 OFF
  digitalWrite(7,LOW), digitalWrite(17,LOW), digitalWrite(27,LOW);    // bottom switches ON before 2 OFF
  digitalWrite (Enable[3], HIGH);  // enable all switches in group 3
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait
  digitalWrite(Enable[2],LOW);   // disable all switches in group 2
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait

  digitalWrite(4,HIGH), digitalWrite(14,HIGH), digitalWrite(24,HIGH);  // top switches
  digitalWrite(8,LOW), digitalWrite(18,LOW), digitalWrite(28,LOW);     // bottom switches
  digitalWrite (Enable[4], HIGH);  // enable all switches in group 4
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait
  digitalWrite(Enable[3],LOW);   // disable all switches in group 3
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait

  digitalWrite(5,HIGH), digitalWrite(15,HIGH), digitalWrite(25,HIGH);  // top switches
  digitalWrite(9,LOW), digitalWrite(19,LOW), digitalWrite(29,LOW);     // bottom switches
  digitalWrite (Enable[5], HIGH);  // enable all switches in group 5
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait
  digitalWrite(Enable[4],LOW);   // disable all switches in group 4
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait

  digitalWrite(6,HIGH), digitalWrite(16,HIGH), digitalWrite(26,HIGH);  // top switches
  digitalWrite(10,LOW), digitalWrite(20,LOW), digitalWrite(30,LOW);    // bottom switches
  digitalWrite (Enable[6],HIGH); // enable all switches in group 6
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait
  digitalWrite(Enable[5],LOW);   // disable all switches in group 5
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait

  digitalWrite(7,HIGH), digitalWrite(17,HIGH), digitalWrite(27,HIGH);   // top switches
  digitalWrite(11,LOW), digitalWrite(21,LOW), digitalWrite(1,LOW);      // bottom switches
  digitalWrite (Enable[7],HIGH);  // enable all switches in group 7
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait
  digitalWrite(Enable[6],LOW);  // disable all switches in group 6
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait

  digitalWrite(8,HIGH), digitalWrite(18,HIGH), digitalWrite(28,HIGH);   // top switches
  digitalWrite(12,LOW), digitalWrite(22,LOW), digitalWrite(2,LOW);      // bottom switches
  digitalWrite (Enable[8],HIGH);  // enable all switches in group 8
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait
  digitalWrite(Enable[7],LOW);   // disable all switches in group 7
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait

  digitalWrite(9,HIGH), digitalWrite(19,HIGH), digitalWrite(29,HIGH);   // top switches
  digitalWrite(13,LOW), digitalWrite(23,LOW), digitalWrite(3,LOW);      // bottom switches
  digitalWrite (Enable[9],HIGH);  // enable all switches in group 9
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait
  digitalWrite(Enable[8],LOW);   // disable all switches in group 8
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait

  digitalWrite(10,HIGH), digitalWrite(20,HIGH), digitalWrite(30,HIGH); // top switches
  digitalWrite(14,LOW), digitalWrite(24,LOW), digitalWrite(4,LOW);     // bottom switches
  digitalWrite (Enable[10],HIGH); // enable all switches in group 10
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait
  digitalWrite(Enable[9],LOW);   // disable all switches in group 9
  delay(map(analogRead(A0),0,1023,0,maxDelay));   // read speedpot and wait
}

listener191

Quote from: pmgr on March 31, 2018, 11:41:18 PM
To shed some more light on the coil winding pattern from Pierre, I went back to my old post:

For Pierre's case, I think we need to get clarification from him how exactly he has wound the stator. What I assumed in my latest simulations is that a coil runs over 7 slots and the next coil is in the neighboring slot (see my number sequence above).

01-07 08-14 15-21 22-28 29-35 36-06
07-13 14-20 21-27 28-34 35-05 06-12
13-19 20-26 27-33 34-04 05-11 12-18
19-25 26-32 33-03 04-10 11-17 18-24
25-31 32-02 03-09 10-16 17-23 24-30
31-01 02-08 09-05 16-22 23-29 30-36

36 coils total, so he could be using this winding configuration. The magnetic field pattern is attached (7SlotCoilSpan).

Yet he could also have done it like this: spanning 7 slots and have the neighboring coils in the same slot, then he would get the following sequence:

01-07 07-13 13-19 19-25 25-31 31-01
02-08 08-14 14-20 20-26 26-32 32-02
03-09 09-15 15-21 21-27 27-33 33-03
04-10 10-16 16-22 22-28 28-34 34-04
05-11 11-17 17-23 23-29 29-35 35-05
06-12 12-18 18-24 24-30 30-36 36-06

This actually yields the same coil configuration as the previous configuration (yet in different order, but that doesn't matter).
So again, 36 total coils, so he could be using this configuration.

So let's look now at a coil span of 6 slots instead of 7:

01-06 07-12 13-18 19-24 25-30 31-36
02-07 08-13 14-19 20-25 26-31 32-01
03-08 09-14 15-20 21-26 27-32 33-02
04-09 10-15 16-21 22-27 28-33 34-03
05-10 11-16 17-22 23-28 29-34 35-04
06-11 12-17 18-23 24-29 30-35 36-05

Again 2 coils per slot and 36 coils total, so he could be using this as well. I note that his one has his magic number sequence 01-06 ; 02-07; 03-08, etc. see post #170. For the magnetic field, see the attached image (6SlotCoilSpan).

Let's see if he could have done it like this: spanning 6 slots and have the neighboring coils in the same slot, then he would get the following sequence:

01-06 06-11 11-16 16-21 21-26 26-31 31-36
36-04 04-09 09-14 14-19 19-24 24-29 29-34
34-03 03-08 08-13 13-18 18-23 23-28 28-33
33-02 02-07 07-12 12-17 17-22 22-27 27-32
32-01

However this only gives 29 coils, so he can't have used this.

Someone should ask him what he is using.

PmgR

====
* Truthfulness * Compassion * Forbearance * www.falundafa.org

Hi PmgR,

This was posted a few posts back.

Shows Pierre's coil pitch was 6 slots, so I favour..

01-06 07-12 13-18 19-24 25-30 31-36
02-07 08-13 14-19 20-25 26-31 32-01
03-08 09-14 15-20 21-26 27-32 33-02
04-09 10-15 16-21 22-27 28-33 34-03
05-10 11-16 17-22 23-28 29-34 35-04
06-11 12-17 18-23 24-29 30-35 36-05


Regards

L192


r2fpl