I apologize in advance if my question rubs any of you the wrong way; as I seem to have a knack for the things that forums hate (re-asking old questions, putting threads in the incorrect forum, etc.)
In any case, I have a problem that I'm hoping somebody here can help me with. I have attached an image illustrating exactly what I am trying to achieve. Basically I need to determine how to programmatically measure/determine three characteristics of an AC signal. First I need to determine how, using an arduino, to measure the amplitude of a sine. Second (though I think this is third in my illustration. apologies.) I need to determine whether the sine is being cut forward phase or reverse phase. And finally I need to determine the "cut frequency" I suppose you would say. That is to say, I need to determine how deeply each half cycle is being cut, so that I may use this data to find averages etc. The graphic explains this better than I can, apologies.
Please let me know if anyone can help. Thank you for your time.
Whether you can do this, mostly depends on the AC frequency. For regular 50/60Hz AC it's easy - just take a number of samples, the ADC is fast enough to do thousands of samples on a single cycle, and do your calculations on it.
Your main limitation is the amount of data the Arduino can store in its memory.
I appreciate your responses! The signal is just a standard american AC signal.
Thank you for the resource! I believe this will help me with the amplitude challenge. The problem I am still having in a theoretical sense is the one of determining whether the beginning of the wave is cut or the end of the wave. I know that I could just look at a scope, but the goal is to determine forward or reverse programmatically so that I may automate a response.
Your attached image does not reflect the reality present in an actual waveform. The "missing" part of the waveform should reflect zero voltage. For example, the grey area of B1 should be zero volts. Zero is a quantity. The absence of voltage is zero voltage which is quantifiable, it's not "missing".
In image #2, the equations of B1 - B2 = X is meaningless. What is your purpose in showing these three statements?
The "beginning or end of the wave being cut" tells me you really don't understand what you're presenting. Once you go back and fix your drawing as mentioned in point 1, you'll see that the order of voltage is exactly what you're asking about. I think. Zero->max->decreasing is C1, increasing->max->zero = C2.
What will be controlling the waveform? A triac or SCR? If so, the case of waveform C1 can never happen, only C2 can be generated by a standard AC phase control device.
I'm also confused by the diagram, and what is represented by C1 and C2.
Many triac dimmers are normally cut off from the zero crossing until the trip point, so the first part of the waveform produces zero volts on the load. The waveform actually looks like this:
A couple things:
if you look at the difference between reverse phase dimming and forward phase dimming, it is what I am representing with "C1 vs C2" and whether a state is C1 or C2 is what I am trying to determine programmatically. I don't understand what is confusing.
Second, when I said "the beginning or end of the wave is being cut, I was quoting the engineers who designed these dimming protocols. I have been working in this industry for 5 years and I understand it just fine; I was simply trying to state it in a way that a non-industry engineer would understand. There's no need to be offensive.
Also, I'm not sure why you quoted the word "missing". You said "missing", not me.
In any case, if you want the blind questions and no attempt to explain them, they are as follows.
I need to determine whether a dimmed source is forward phase or reverse phase, regardless of source, knowing that it is 60hz 100-277VAC. I need to determine what "percentage dimmed" it is, which can be represented as B1-B2=x, obviously. and I need to programmatically read amplitude.
Your diagram does not make sense to us, because it is inadequately explained.
As we explained in posts #4 and #5, it does not reflect the reality of 0 volts (for some regions of the input waveform) in the output waveform. The "equations" add no useful information.
I have been working in this industry for 5 years and I understand it just fine
Then you need to improve your communications skills, and probably have no need to post on this forum.
Regardless, the link in post #1 gives you a framework in which to use Arduino to analyze the output waveform, whatever shape the waveform takes.
I need to determine whether a dimmed source is forward phase or reverse phase, regardless of source, knowing that it is 60hz 100-277VAC. I need to determine what "percentage dimmed" it is, which can be represented as B1-B2=x, obviously. and I need to programmatically read amplitude.
I think you could determine forward phase or reverse phase dimming and the percentage by reading the voltage at fixed intervals after zero crossing. If initial readings are zero, then you have forward edge dimming.
Percentage dimmed might be determined by when after zero cross you see a voltage present or if reverse phase dimmed when the voltage goes to zero.
To use an Arduino you will need to get the output ac signal converted to 0-5v. With default analogRead() times of 110us, you can take and store a reading easily every 150 microseconds, which will give over 50 readings on the 8333 us period. Your precision on duty cycle would be 2%.
You can speed up the standard analog reading from the default settings if you need.
Possibly, you could use a faster AD than the standard arduino, or an AD capable of handling + and - voltage.
Let me begin by thanking you all for the remarks that were helpful; that is to say, those that weren't simple criticism of HOW I asked the question. It is apparent that some people need things to be just a certain way; though I think you'll agree for the non-critical responses that this isn't absolutely necessary. Regardless; I have, using said comments, successfully solved my problem. I appreciate the assistance immensely.
To go further, while perhaps not being helpful per se, analysis of method while disregarding content seems to be the norm; and so I will follow suit. That it doesn't make sense to you is not a universal verisimilitude.
Here's a link by way of an example. The diagram was created by seasoned industry professionals, is drawn to be attainable by someone who isn't such a professional, (which is why I used it in a forum that focuses on amateur programmatic control and hobby development environments) and I imagine you will at least silently agree; closely resembles the diagram I forwarded. http://www.lutron.com/TechnicalDocumentLibrary/LutronDimmingBasics.pdf
By posting on this forum, I am simply asking how I would go about using this particular brand of microcontroller development board. It is cheap and quick and I thought it would be useful before any type of 2nd stage PCB rollout.
Perhaps I do need to improve my communications skills. I am not a salesman and I therefore don't have nuance is speaking with someone who is not a professional engineer.
In any case, I have gotten what I needed and I appreciate that which was helpful.