I am currently working on calculating the output voltage of the ADC channel on a PICO RP2040. I have set up the system with an input peak-to-peak voltage of 1.2 V at a frequency of 100 Hz. The trigger value (falling edge) is set at 0.8 V, and the measured triggered output value is 0.790 V. To determine how closely the measured value aligns with the calculated value, and thus develop a correction factor, I am performing the following calculations:
I multiply the measured value of 0.790 V by 2\sqrt{2}2 to convert it to an RMS value, which results in approximately 1.117 V.
I then double the RMS value to obtain the peak-to-peak voltage, which gives me 2.23 V. This value is higher than the input voltage.
Could you please guide me on where I might be making a mistake? Should I also consider the frequency factor in my calculations? I would appreciate any guidance you can provide
Hi Hasham
That looks like a lot of nonsense. If you are triggering a measurement at 0.8V it is not going to matter what the input voltage is (as long as it is greater than 0.8V peak) you are going to measure the same
Peak to Peak = RMS*(2*√2) or RMS * 2.83.
In another post you were asked to clarify and provide a schematic of exactly what you are trying to measure and how you are measuring it.
It is 9 days now and you have not responded in any manner at all
If your method of response is to ask the same question in another form I for one am out of here.
If you are not prepared to provide any information don’t be surprised if you cannot get any help.
Cheers Bob
First of all, sorry from my side. As for the earlier post, I identified a mistake in my Picomite code; due to that, I was getting higher values than the triggered set value.
Once again, I apologies for my behavior …
I am evaluating the accuracy of the measured output voltage from an ADC channel by comparing it to the calculated output voltage. To determine the peak voltage from the measured output value of 0.790 V, I first multiply it by sqrt(2). Then, to obtain the peak-to-peak value, I multiply this result by 2. The input peak-to-peak voltage was set to 1.2 V at a frequency of 100 Hz. I want to verify whether the measured output value is accurate or if it needs correction. Could you please guide me on whether this method is correct or if adjustments are necessary?
I am evaluating the accuracy of the measured output voltage from an ADC channel by comparing it to the calculated output voltage. To determine the peak voltage from the measured output value of 0.790 V, I first multiply it by sqrt(2). Then, to obtain the peak-to-peak value, I multiply this result by 2. The input peak-to-peak voltage was set to 1.2 V at a frequency of 100 Hz. I want to verify whether the measured output value is accurate or if it needs correction. Could you please guide me on whether this method is correct or if adjustments are necessary?
Hi Hasham
It won’t be correct because the 0.790V is NOT the RMS value. It is the value you happen to measure when your measurement is triggered at 0.8V and will probably be much the same no matter what the input voltage is as long as the input is above 0.8V. If below it just should not trigger.
Your formula is correct by the way you just wrote it different to me
P-PV=RMS*(2*√2).
If you are just trying to measure the p-p voltage there are easier ways to do it. BUT we need to see EXACTLY what you are trying to measure and how you are doing it.
Getting information is like pulling teeth.
Cheers Bob
I want to see accuracy between calculated expected output values and measured values , then compare it with measured output value and see the difference between measured and calculated values …
What value are you trying to calculate. If you are triggering at 0.8V that is what you are going to measure it will not matter what the input is. I am not prepared to continue going in circles. I have more to do with my time so unless you can supply the details asked for previously I am done.
Cheers Bob
so should I consider 0.8 V as the reference voltage and actual input value. As whatever I feed input, once it is triggered, it will capture the values and lower the trigger value as I select the falling edge of the trigger value. Please guide me.
If you want to re-start the discussion then it’s best to start at the beginning. What is your circuit (a proper schematic diagram, not just a photo) and what is your code?
If you are really trying to measure the input voltage at the ADC channel of the MCU (which is not quite what you said but is the only way I can read it) then the additional calculation is not required. The measurement simply consists of converting the ADC reading by scaling it to the ADC reference voltage. The additional calculations you are asking about indicate that you are trying to do something entirely different.
Hasham does not quite get it. If he triggers a measurement at 0.8V then this is what he is going to measure irrespective of the input voltage as long as the input is greater than the trigger point.
So if he is trying to measure an input the whole exercise is meaningless. he will measure 0.8V (or thereabouts) at all times.
The variation with frequency is easily explained. There WILL be a finite delay between trigger and measurement plus measurement time. This should result in a value slightly less than the trigger point. As the frequency goes up the slope at the trigger point will steepen but the delay WILL REMAIN THE SAME resulting a measurement point a bit further down the slope thus lower.
This variation then will change with adjustment gf the trigger point. It will increase as the trigger gets closer to the steepest point (Zero volts) and decrease when the trigger gets to where the sine wave starts to flatten at the top.
If he does as asked he might be able to get some help but if not I don’t hold out much hope of any result.
Cheers Bob
If you dont mind I am sharing my method then please correct me where I am doing wrong stuff
I am using this equation to calculate triggered value in which frequency is 360 Hz, t is sample interval in case of PICO RP2040 it is 1/48 MHz, theta I calculated by taking sine inverse of (trigger Val/input peak voltage)
I think this is what you are actually trying to do.
A 100Hz AC signal with peak-to-peak voltage of 1.2 will trigger a negative-going 0.8V comparator at x S from the positive-going zero transition. What will the voltage be at x + y S, where y is the time required to read the voltage using an ADC?
So you need to know theta at 0.8V negative-going trigger and you need to know the time taken to make the ADC measurement. From that you can calculate theta at the time of the measurement, and that will give you the voltage for that time.
This is not the title of your post or the opening sentence. If that’s what you are doing then it is a geometry question, not an electrical question. There are plenty of on-line calculators available to do this calculation, but you have to start with a full set of data. Then you can start to apply some maths.
To echo some of the others here we need some more information of your system to really understand what we are dealing with. If you could send through some photos/wiring diagrams and give us an overview of what exactly you are trying to achieve we are more than happy to help out.
Thanks for your reply. I apologize for my mistaken title of the post, and at the same time, thanks for your guidance as I did this, and I have attached a document with this post as an attachment.