pulse width / period measurment with offset

Hello all!

I would like to start off by saying I am not asking anyone to spend their time writing code for me for free. I will and have done research and just cant wrap my head around this.

Having said that here is what i am trying to do. I experiment with motors, generators and basically electromechanical devices. Up till now i have used many other means and circuits to pulse coils or connect coils at certain intervals but i have to design something new for every machine. One of the key aspects of the generators and such that i work with is a very clean make and break contact (brushes or relays) because transistors and mosfets take sometimes multiple microsends to be fully on / fully off and that does not suit the experiments. instead of making complicated contacts or circuits to have a switch at a certain point i want to make a controller that can sense the location of a magnet on a flywheel and be able to use the data to turn on or off relays at a given point. Another thing that is important is to be able to display the data on an oled because the entire point is to be able to adjust parameters and be able to correlate those parameters to the effects in the machine.

main example of what I am trying to do is this. I have a pulse motor with a rotor with 4 magnets, and one drive coil. I want to be able to know when the magnet is at Top Dead Center (TDC) meaning exactly at the center of the coil. From there I want to be able to offset a value so that i can make a relay close at (for example) 3 degrees after TDC untill a max of half the period (half way between the magnets). I need that to be adjustable "on the fly" so to be able to adjust and see the effects that is has on the motor. The problems I have a trouble wrapping my head around are: 1 I dont really care about the "speed up" part, seeing as when the motor is accelerating to top speed every revolution the pulse width and period will be different until they level out. but even at top speed if i change something that causes acceleration if the acceleration is a lot then I have to measure calculate and adjust the timing "all" between the magnets. given the desire to have a 4 magnet rotor with a top speed of 4000 max that is a period of 3.759 miliseconds. in that amount of time i need to calculate the pulse width to know where the center of the magnet is (width /2 ) use that to set a value for TDC and have an offset for how far from TDC i want to turn on the switch and how long the switch will stay on. SO basically it is a must to be able to do everything measurement wise within that time frame. The motor will "probably" have a max of 2500 rpm but i am going with 4000 to leave room for the unexpected. #2 because i need to display the results on an oled I am wondering if i should use two linked arduinos with one doing the sensor readings and relay that information to a second which will do the calculation and switching. That is because i simly cannot think of a way to figure out how long it takes for the code to execute therefore I have no idea if 3.759 miliseconds would be enough time. That also leads to the fact that if i want the switch to happen only a few degrees past TDC there would only be 41.76 microseconds (at theoretical top speed) to calculate per degree away from TDC so if i wanted to switch on a coil when the magnet is 2 degrees past TDC i would only have roughly 82 microseconds to sense the magnet (rising pulse on an interrupt from a hall sensor) add 1/2 the previous pulse width to find TDC add the offset so it turns on the coil at 2 degrees and use the previous period measurment to adjust the "on time" of the coil so it turns off at a variable amount between TDC and half the period.

So, what I am thinking of is this: If I use one arduino with an interrupt to set a Micros() value (lets say T1) when the hall sensor senses a magnet (rising edge), and senses when the magnet is past (T2 - falling edge) and the next magnet (T3 next rising edge) . I can relay those values to the second arduno to be the "calculator", "display" and the "output" and use T3 - T1 to find the period....T2 - T1 to find the pulse width which would leave the first arduino alone and let it sense everything precisely with basically only the interrupt to set the values and the IIC code to relay the data values to a second arduno. the second arduino would do the calculations and set the output values of TDC + offset to turn on the relay at a variable point and TDC + some variable to turn off the relay at a certain point, and also update the oled wich I only need updated every second or so. So does this sound feasible or am i completely barking up the wrong arduino?

Like i said before. I will do my research, But if anyone sees a problem with this idea or has ANY pointers on how to implement this in an easy fashion I would GREATLY appreciate any input.

At the current time I have a sketch I have built up be copying sections from multiple others to simply be able to read a hall sensor and find the period and calculate rpm. I believe it calculates based on a 2 pulse per revolution rotor, but that's simply because i am more focused on the other aspects and just haven't modified it for a 4 magnet rotor. when I can figure out whether i will need two arduinos or if it can be done with one i will write up a new code and post it so anybody that is feeling helpful can tell me if i am being an idiot. Thank you in advance to anybody that can help me think this through more clearly!

the current simple sketch for rpm measurment is this

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

#define OLED_MOSI   9
#define OLED_CLK   10
#define OLED_DC    11
#define OLED_CS    12
#define OLED_RESET 13
Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);

#define SSD1306_LCDHEIGHT 64
#if (SSD1306_LCDHEIGHT != 64)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif

 int refsig = 200; //for converting the analog signal coming from hall sensor to digital through arduino code
 int val;//the digital value of the incoming analog signals
 int prev_val = 0;
 int t, cur_t; //time variables
 
void setup() {
 Serial.begin(115200);
 pinMode(A0, INPUT);
 display.begin(SSD1306_SWITCHCAPVCC);
 
  display.display();
  delay(2000);

 // Clear the buffer.
  display.clearDisplay();
  display.setTextSize(1);
  display.setCursor(0, 0);
  display.setTextColor(WHITE);

}

void loop() {
  
  int sig = analogRead(A0); //read raw value of hall sensor
   if (sig > refsig) val = HIGH; //when value of hall sensor is above refsig sets val as digital high
   else val = LOW;  // if not above refsig sets val to digital low
   if (prev_val == 0 && val == 1) { //if the prev_val was low and val goes high it has sensed the rising edge
   cur_t = micros();
     
  display.setCursor(0, 0);
  display.print("RPM: ");
  display.println(1000000 * 60 / (cur_t - t)); //print the rpm
  display.display(); //you have to tell the display to...display
  delayMicroseconds(2);
  display.clearDisplay();
  t = micros(); // sets time so the next loop around after reading the value cur_t - t =time elapsed between pulses
   }
}

Moderator added code tags

Your Post is very long so I may have missed something.

3.7 millisecs is a very long time for an Arduino

I don't understand why it is necessary to detect TDC specifically. Isn't it sufficient to detect some event before TDC that is a known time prior to TDC? Wouldn't that leave more time for your calculations?

If you want to measure speed or detect an event with precision then don't use analogRead() as it is a relatively slow function - takes a minimum of about 100 microsecs. Instead arrange your sensor to produce an digital pulse and detect it with an interrupt. See attachInterrupt() in the Reference section.

This is an extract from code I use to detect the speed of a small DC motor. It works fine up to 16,000 RPM and probably much faster.

volatile unsigned long isrMicros;
unsigned long latestIsrMicros;
unsigned long previousIsrMicros;
volatile boolean newISR = false;


void loop() {
   if (newISR == true) {
     previousIsrMicros = latestIsrMicros; // save the old value
     noInterrupts(); // pause interrupts while we get the new value
        latestIsrMicros = isrMicros;
        newISR = false;
     interrupts();
     microsThisRev = latestIsrMicros - previousIsrMicos;
}

void myISR() {
   isrMicros = micros();
   newISR = true;
}

It would make it a great deal easier to understand your requirement if you can post a diagram that shows the timing requirement.

...R

Thank you for the reply! I will try to write a simpler " to the point " explanation shortly along with a diagram to better explain what I'm trying to do. Again thank you for the input.

So you want to use relays because the rising edge of a MOSFET is too long, right?

Now the problem you will run into is the reaction time of the relay. To time the moment the pulse happens, you have to know how much in advance to power the relay coil. This will be more than the few microseconds you have a problem with in the MOSFET scenario.

That said, MOSFETs can switch really really fast. Just think of the many such transistors that make up the microprocessor of the computer you're working on, those can work with several GHz clock speeds. For your application, choose one with a very low gate capacitance, and don't put a resistor between the Arduino pin and the gate. You'll easily get switching speeds down to the nanoseconds.

How about the CMUDM7001TR which has a CISS of 9 pF, and a gate capacitance of 0.57 nC @ 4.5V. Or the CSD15380F3T with a CISS of 10.5 pF, but a gate capacitance of a mere 0.281 nC @ 10V. Those you should be able to switch fully on within 1-2 ns, with the 40 mA the Arduino can supply (the actual edge rise will be much faster, as much of this time is used to charge the gate to it's threshold value). Not likely you will see much if any difference with a relay switch, which also has to deal with stray capacitance.

There is no such thing as instant rise time. That's impossible. Stray capacitance and inductance of your wires alone prevent that from happening, that's just real world physics at play.

A quick Google search showed that the reaction time of relays is typically 5-15 ms. So that's 7 orders of magnitude greater than the time scale you want to work with. You may be able to find faster relays but physics get in the way of moving those contacts that much faster.

You mention you have periods of 3.759 ms, which is shorter than even the on or off switching time of a relay. A complete on/off cycle takes double the time given above, so 10-30 ms. This alone makes an electromechanical relay a no-go for your application.

Even if you can start the relay moving in advance of the time you want it to be closed or opened, the time it takes for the contacts to go from first touch to fully closed will be hundreds of times longer than the 1-2 nanoseconds possible with a MOSFET.

For most practical puposes, 0.000000001 seconds is close enough to 0 seconds. You can never truly have zero switching time. If you really care, then some work with proper MOSFET drivers can deliver more than 20A into the MOSFET gate to charge it really quickly. That's a thousand times more current than the Arduino can manage on its own.

A couple of nanoseconds is right on the edge of what you can meaningfully measure with a 100MHz scope. If you are seeing significant rise times with that equipment then something else is wrong.

Where is this code with delay(2) that you mention?

There are two ways of timing critical code in the Arduino. The easy way is to record the microseconds at the start and end of a loop which runs the code 1000 times over. Be careful that the compiler doesn't optimise away your code. The harder way is to disassemble the binary into readable assembler and count the instructions that the compiler produced for your critical section.This requies an instruction list for your exact chip to tell you how many clock cycles each different instruction uses.

Both my father and his father spent their lived trying to invent a perpetual motion machine. I detect the same here.

Paul

country4life89:
I am working with ideas that Nikola Tesla was working with and it requires a 0 second (instant) rise time so even a few nanoseconds would negate the purpose of the project.

I thought you were going to provide a diagram to show the timing you require.

A 16MHz Arduino has a clock time of 62.5 ns so that is the very best precision that could be achieved. In practice I doubt if you will get 4 times that.

Does that rule out an Arduino altogether?

And you have still produced a huge single paragraph in your Reply #4. That sort of thing works fine in a novel. But it makes technical stuff very hard to comprehend. A good test is to read your text out loud and see if it can be understood (and you can only take a breath between paragraphs :slight_smile: )

...R

Ok, I see the delayMicroseconds(2) now. That is a very poor way to use this display. Just display the data and don't clear it until you have new data.

Note that the fixed text like "RPM" should not be re-written to the display every time. Just update the parts of the display which actually change. Don't clear the whole display.

The Adafruit OLEDs I have used are relatively slow because they must write the whole screen in that display.display() method. The other methods are fast as they only update the Arduino memory. You never want to call .display() in timing-critical code.

Paul_KD7HB:
Both my father and his father spent their lived trying to invent a perpetual motion machine. I detect the same here.

Paul

perpetual motion NO but over-unity has been proven without a doubt in certain electrical devices...so yes you know what I am working towards but no it is NOT perpetual motion. During the very very small time when a source is connected to a load BEFORE the electrons move ohms law does not work. After that very brief moment everything is calculated as normal per ohms law....also when current is flowing in an inductive load and the source is disconnected for a very brief moment the same happens in reverse and the coil becomes the "source". when done correctly it becomes an open thermodynamic system which absorbs energy from around the coil during those moments. Think of it like this, if you use a 20 volt drill and drill a hole into a dam then hook a generator/hydro plant to that you get more energy out of the damn then you put in to release that energy because mother nature provides the power via rain. In certain electrical systems, this can be used and an analogous way. you use a small input pulse to trigger an event that puts the coil into a state that allows it to absorb energy from something other than your source battery. There are systems that have been proven to do this by many many people...the problem is finding what gets the "most" extra energy into the system. Tesla called it radiant electricity. those moments have effects that can not be explained by current electrical theory. for instance, if you put a radio in a Faraday cage that is grounded no radio waves or RF of any kind should be able to get to the radio, but if you run one of these motors that cause these events you can hear ticks on the radio every time the contacts are connected or disconnected. along with many other weird effects. The current machine i am working on is based off of US6392370B1 - Device and method of a back EMF permanent electromagnetic motor generator - Google Patents .

As for the code I think i confused the crap out of myself so i will sit down tonight and think it through again and test a few things and check back in with any questions. Thank you ALL for the input.

EDIT: I tried to upload a picture of a diagram i drew and the file is to large I am quite busy at the moment and will try to upload a smaller file size later this evening.

country4life89:
those moments have effects that can not be explained by current electrical theory. for instance, if you put a radio in a Faraday cage that is grounded no radio waves or RF of any kind should be able to get to the radio, but if you run one of these motors that cause these events you can hear ticks on the radio every time the contacts are connected or disconnected.

Time to dig out my tin-foil hat :slight_smile:

...R

Robin2:
Time to dig out my tin-foil hat :slight_smile:

...R

If it goes through a Faraday cage your hat won't work!

If by that you are judging me as some whackjob because I am trying to study "known science" that could one day stop you from having to pay for gas in your car or an electric bill for your house ....by all means feel free to stand behind your right of free speech but I would ask one thing out of respect from human to human. Look into it. While keeping in mind....the world used to be flat, heavier than air flight could not happen, and many other things.

This stuff has been proven many times, it is not some theory. The only problem so far is taking something that puts out 150 percent what is put in and being able to scale it up. It absolutely works. But when you consider to have 10,000 watts "extra" you have to have a machine running at 20,000 watts input because when you make it self contained you must take 20,000 watts of the output and send it back to the input to be able to get that extra 10,000.

This is not the purpose of this post. I apologise about the paragraph / books. I have ADHD and it's hard to not just ramble. I will go back and edit my post and upload the diagram and try to have the "actual " code up as soon as I can. As I said that code I just pieced together mostly to test the oled because I have never used one.

I am going to just try and keep everything to the point from here on out with diagrams and short paragraphs.

Robin2:
I don't understand why it is necessary to detect TDC specifically. Isn't it sufficient to detect some event before TDC that is a known time prior to TDC? Wouldn't that leave more time for your calculations?

The key aspect of the motor/generator that I currently want to run with this setup, is to have the drive coil turn on at a certain angle past TDC. I want this point to be variable so I can turn the coil on at a point between TDC and a few degrees later. Therefore I figured having a value of TDC and then adding an offset would be the easiest way of making that variable turn on point.

As the coil turns on it will push away the magnet. If left on past 45 degrees (in the diagram) then it would be counterproductive, because at that point it would begin to resist the magnet approaching from the other side. Therefore that is the MAX angle that the coil should ever be "on".

[/quote]

wvmarle:
A quick Google search showed that the reaction time of relays is typically 5-15 ms. So that's 7 orders of magnitude greater than the time scale you want to work with. You may be able to find faster relays but physics get in the way of moving those contacts that much faster.

Thank you for that information, and yes that shoots the relay idea out of the equation. The "first touch" of the relay and abrupt disconnect was the main reason why I wanted to use relays but if its not possible then I will have to try and use mosfets. Tesla describes a time when he throws a switch (one of the knife switches they used then) in the instant that the connection was made a purple glow was seen around the wire which could not be accounted for by normal theory and had anomalous effects. Most experiments I have seen that produce that effect always had mechanical contacts (brushes or mechanical switches).

The reason I did not want to use mosfets is because those moments where the anomalous reaction shows up creates voltage spikes many magnitudes larger than the input voltage. So if i use a mosfet capable of switching 12 volts it could be subjected to spikes in the hundreds of volts. If I use mosfets rated for hundreds of volts they do not switch the 12 volts very well. I have completely fried many 50 volt rated mosfets and transistors on 12 volts with these machines.

As for the code, and my last point, i can do whatever research is necessary to figure it out myself. To even begin that though, I need to figure out the feasibility of what switching method and the timing requirements of how to implement the values I need. I knew that relays took some time to turn on and honestly just assumed it was much less than what it is. So the thing I need to figure out is the best way to measure values so that I can have an adjustable on time of the coil at certain angles between the two dotted lines on the diagram.

I hope this is more clear and understandable and again I apologize for the rambling and length of my posts. Also thank you to everyone for all the input.

wvmarle:
There is no such thing as instant rise time. That's impossible. Stray capacitance and inductance of your wires alone prevent that from happening, that's just real world physics at play.

A quick Google search showed that the reaction time of relays is typically 5-15 ms. So that's 7 orders of magnitude greater than the time scale you want to work with. You may be able to find faster relays but physics get in the way of moving those contacts that much faster.

You mention you have periods of 3.759 ms, which is shorter than even the on or off switching time of a relay. A complete on/off cycle takes double the time given above, so 10-30 ms. This alone makes an electromechanical relay a no-go for your application.

The 5 to 15ms reaction time will not be consistent for a particular relay, so you using a relay you have a built in deviation for each activation from what you want of up to 15ms.
A MOSFET will be consistent and fast in its response.
Can you provide a diagram of your apparatus and a diagram/graph of the response you need from the timing circuit.
Can you please tell us your electronics, programming, Arduino, hardware experience?

perpetual motion NO but over-unity has been proven without a doubt in certain electrical devices...
so yes you know what I am working towards but no it is NOT perpetual motion.

During the very very small time when a source is connected to a load BEFORE the electrons move ohms law does not work.

After that very brief moment everything is calculated as normal per ohms law....
also when current is flowing in an inductive load and the source is disconnected for a very brief moment the same happens in reverse and the coil becomes the "source".

when done correctly it becomes an open thermodynamic system which absorbs energy from around the coil during those moments.

Think of it like this, if you use a 20 volt drill and drill a hole into a dam then hook a generator/hydro plant to that you get more energy out of the damn then you put in to release that energy because mother nature provides the power via rain.

In certain electrical systems, this can be used and an analogous way. you use a small input pulse to trigger an event that puts the coil into a state that allows it to absorb energy from something other than your source battery.

There are systems that have been proven to do this by many many people...the problem is finding what gets the "most" extra energy into the system.

Tesla called it radiant electricity. those moments have effects that can not be explained by current electrical theory.
for instance, if you put a radio in a Faraday cage that is grounded no radio waves or RF of any kind should be able to get to the radio,
but if you run one of these motors that cause these events you can hear ticks on the radio every time the contacts are connected or disconnected. along with many other weird effects. The current machine i am working on is based off of US6392370B1 - Device and method of a back EMF permanent electromagnetic motor generator - Google Patents .

There are systems that have been proven to do this by many many people...the problem is finding what gets the "most" extra energy into the system.

[soapbox]
If you can get even 5% more energy out than you put in, then why isn't it available now?
5% would revolutionary.
1000W in out of my mains supply, (Easy) and the machine gives me an extra 50W, give it to me.
50W of extra LED lighting for free in a factory lighting situation for every 1000W, got to save money, so why aren't we seeing this now?
I appreciate that there has to be experimenters out there prepared to deviate from the norm, but the demonstrations that I have seen of over unity either;

  • use black boxes that are never disclosed.
  • show apparatus, but never any details on coil construction or circuit description.
  • use very unorthodox methods of measuring energy in and out, so efficiency/over unity calcs are not valid.
  • the demonstrator confuses Potential and Kinetic Energy.
  • has the fixation that back EMF from a disconnecting coil is extra energy coming out of the ether.

[/soapbox]
Tom.. :slight_smile:

Hi,
OPs, diagram.

Thanks.. Tom... :slight_smile:

TomGeorge:
The 5 to 15ms reaction time will not be consistent for a particular relay, so you using a relay you have a built in deviation for each activation from what you want of up to 15ms.
A MOSFET will be consistent and fast in its response.
Can you provide a diagram of your apparatus and a diagram/graph of the response you need from the timing circuit.
Can you please tell us your electronics, programming, Arduino, hardware experience?

[soapbox]
If you can get even 5% more energy out than you put in, then why isn't it available now?
5% would revolutionary.
1000W in out of my mains supply, (Easy) and the machine gives me an extra 50W, give it to me.
50W of extra LED lighting for free in a factory lighting situation for every 1000W, got to save money, so why aren't we seeing this now?
I appreciate that there has to be experimenters out there prepared to deviate from the norm, but the demonstrations that I have seen of over unity either;

  • use black boxes that are never disclosed.
  • show apparatus, but never any details on coil construction or circuit description.
  • use very unorthodox methods of measuring energy in and out, so efficiency/over unity calcs are not valid.
  • the demonstrator confuses Potential and Kinetic Energy.
  • has the fixation that back EMF from a disconnecting coil is extra energy coming out of the ether.

[/soapbox]
Tom.. :slight_smile:

Its is available. A few different devices from a man named john bedini can do it. The aspect that makes it not feasible is a good section of the "reaction" occurs in lead acid batteries. The radiant electric spikes That are caused on purpose in his motor/generators are directed from the coil to a "charge" battery when properly tuned the amount of energy that ends up in the battery bank on the charge side cannot be accounted for. Many people have succeed with small systems in this way: Take one 12 volt battery and discharge it while measuring the energy that comes out of it so that you have a known capacity. Lets say for example that each battery (perfect scenario) have 100 watt hours of energy if you start at 12.5 volts and discharge down to 11.5. If you take these batteries and have the right generator tuned properly and you use one battery to run the machine while charging two batteries in parallel on the charge side. let the "run" battery discharge the predetermined value of 100 watt hours. when done you can take those two batteries that started at 11.5 and were charged to some higher value and discharge them back to 11.5 you will have over 100 watt hours from those two batteries. This has been replicated my quite a few people me being one of them. so for this particular setup you would need battery banks that could handle all the wattage you are looking for and when you calculate that it would take a very expensive battery bank to be able to get that "free" lighting. Therefore it works but is not economically feasible. The government knows of many devices that do this but will not consider it a success until 300 percent is achieved. At that point it becomes economically feasible.

Raymond kromrey built a device that also had an over unity aspect. One key to his generator is that when you pull more energy from the "charge" side the "run" side draws less current and the generator actually speeds up. This is backwards to conventional generators because on a normal generator the more power being used the more the reaction force in the generator winding causing it to be harder to turn the rotor therefore more energy being input via a gas engine or whatever kind of generator you are using. The kromrey converter, as it is called, also has the effect that the more energy you use on the output the colder the machine gets.

One thing that helps people wrap there head around how this stuff is "different" is the understanding that normal conventional electrical work is a positive pressure. Where negative force (whatever you want to call it) is "compressed" in one pole of a battery and positive force is "compressed" into the positive. when they are allowed to equalize through a load both sides are "discharging" the accumulated positive or negative charges from the battery into the load and the reaction is heat. In the radiant electricity the negative pole is discharged to become a "vacuum" for negative charge and the positive is discharged to create a vacuum for positive charge. when they are equalized through a load they actually discharge (the charge in the load) into the battery not from the battery....the reaction is cold.

I am not here to argue or prove what I am working on. I have seen the effects caused by this "different" form of electricity I don't need anymore proof and i don't need you to believe me to continue studying it. Just as I am not asking anyone to do research for me and simply help me with pointers. I will not do research for you or try to prove it to you. If you decide its a crock pot full of conspiracy crap....that's fine you may have your opinion.

Having said that .... I am NOT here to explain why I am researching whatever, and be talked down to from a [soapbox]. You can answer this question to yourself....have you experimented with any of these devices or have any knowledge, at all, about how they work or tested anything yourself when it comes to this. Or is your opinion based on what you read on google somewhere. Basically making it someone else's opinion that you have copied and state as fact because you truly have no idea.

On another note....most heat pumps put out more heat than the energy you put into them. So if you cannot ever get more out than you put in please explain that to me.

and also there is this http://www.collective-evolution.com/2013/10/11/multiple-scientists-confirm-the-reality-of-free-energy-heres-the-proof/

TomGeorge:
Can you please tell us your electronics, programming, Arduino, hardware experience?

Sure, I started messing with electronics at a very young age because my mother was a technician in the air force and always had electronics books laying around. From there I tinkered with everything from potato clocks to high power Tesla coils and the like. At 17 I joined the navy as an electronics technician specializing in radar/communications/and microscopic circuit board repair I advance to E-5 in 3 and a half years, mostly due to saving a crap ton of money by repairing circuits instead of buying new circuit boards. I now work for a communications company working on pretty much anything I can figure out. Mainly troubleshooting and repairing radios for police, fire, ems, and pretty much anybody else that would have a radio. We also do access control systems phone systems and camera systems.

As for the arduino I have a few years experience but can easily admit writing codes is not my strong suit. As I stated before I struggle with ADHD and medication I take only lasts about 5 hours and I work 9 hour days. So by the time I get home inability to focus is a real problem. circuits I know so it doesn't take a lot of focus to figure out. But writing a code with functions I have never used before takes me a while because my brain works on the "why". Most references tell you what a code does but never explains the "why". for instance the delay subject for the oled display. I have absolutely no understanding of why that is there or if it is necessary and searching for the reasoning behind it just gets me to a bunch of pages with examples that still leave me in the same place.

I would guesstimate I have written about 20 arduino sketches over the few years. I would say maybe 5 slightly complex ones but nothing super fancy at all.

As for the hardware, Not really sure what you mean by that. I do know a good bit about machining welding, and physically building things. I have an IQ of 147 and I do not mean that to be cocky at all because i am just not that kind of person. I just simply mean that I have the brains to figure out pretty much anything that my attention span will allow me to learn. writing sketches seems to be one of those roadblocks for me.

Hi,
If you look at the code posted in post #1, it is a good start to getting a good reliable tacho reading.

It is coded so you can do other processes such as calculate, control and display an output to activate your MOSFET and still get sensor readings.
You may want to add an analog input connected to a potentiometer to use a an input to set your delay time.

What voltage are you using on the solenoid and how much current does it consume?
The MOSFET characteristics will depend on the load characteristics.

What model arduino are you using?

Tom...... :slight_smile:

I hear a whole lot of excuses of why it doesn't work/scale/is available, but no good explanation of why it does work. Only that Tesla saw "a purple glow" and it could not be explained by science.

There are two things that strike me right away. The effect is supposed to work on the nanosecond level, or sub-nanosecond time. Human eyes don't react that fast, it's impossible to observe such events.

Secondly, there was A LOT that could not be explained by science in Tesla's time. Electricity itself, for example, is something that at the time wasn't exactly well explained - Tesla is one of the persons that really advanced that science. So if he saw something he couldn't explain, doesn't mean it can't be explained. Science has gone a lot further since Tesla's time, but we're certainly far from explaining everything that's out there. We've come a long way for sure but until we get rid of "dark energy" and "dark matter" that are now cluttering cosmic models we know we've got quite a way to go on probably both the atomic/quantum and cosmic levels. We haven't been able to explain how quantum level events effect the working of the cosmos, either.

If it's 50% (or even 5%) of free energy, the scale doesn't matter any more. Just use that free energy to produce more of them. It's exponential so very soon you're churning out huge numbers of those devices.

Perhaps there are relays that can switch in such a short time. I have not had one in many years, but there are "polar relays" that were used in the old teletype equipment. Ran 60 ma. current through the coils and the SPDT contacts did a great job of recreating tty signal. I think they ran perhaps 100 VDC.

Another relay may be some vacuum relays are capable of keeping up with sending Morse code.

Paul