Show Posts
Pages: 1 [2] 3 4 ... 23
16  International / Proyectos / Re: voltimetro true rms con arduino on: May 30, 2014, 06:33:18 am

Para medir cualquier frecuencia de manera automatica (solo para senales periodicas sinusoides o no) puedes colocar un detector de cruces por cero. Si usas el rectificador de precision anteriormente mencionado, entonces es solo detectar cuando la senal se hace cero y cada 2 cruces por cero calculas el valor rms. Reduce los 250 microsegundos para que sea mas rapido y obtengas mas muestras (probablemente te incremente la precision de esta manera??). Si no quieres hacer el rectificador, entonces es cuando cruza por el Vcc/2 que tienes (509).

Mas o menos asi:

if(lectura==0&&Count==2)
{
Count=0;
EndCycle=i;
CalculateRMS();
}
else
{
Count++;
}

void CalculateRMS(); //Lo mismo que ya tu hiciste solo que termina en la muestra donde termina un ciclo (EndReading)
{
   for(byte j=0;j<EndCycle;j++)     // otro for para calcular los cuadrados
  {   
   // Serial.println(lecturas[j]); // para debuguear
    suma=suma+pow((lecturas[j]),2);  // calcula la suma de los cuadrados, se resta el valor de VCC
  //  Serial.println(suma);  // para debuguear
  }
}

Suerte.
17  International / Proyectos / Re: voltimetro true rms con arduino on: May 30, 2014, 06:04:44 am
Esta muy bueno tu Proyecto. Muy buena idea...

Sugerencia:

Utiliza un rectificador de precision de onda completa antes de enviar la senal a Arduino. Esto te permitira duplicar el voltage que puedes medir (casi hasta 5V pico) y ademas podras medir cualquier senal, no solo sinusoides puras.

La ecuacion seria entonces:

suma=suma+pow((lecturas[j]),2); 

Muy, muy bueno tu Proyecto.
Buena suerte.

18  Topics / Science and Measurement / Re: problems in data measurement on: May 29, 2014, 12:20:09 pm
Quote
Please see the above link for the inductor. Its order code is 22r224c
OK good 220uH, confirmed.
Quote
Ron of my Multiplexer is 300 ohm when supplying +15 v.
Kind of high Ron; but you don't have too many options to solve that, I guess. Then you have to live with that for now and increase amplification until something better arises (if needed). The problem is that with XL=28 Ohm most of the energy is lost overheating the multiplexer. Then you need to be careful not to fry it.
Quote
i will make the calculations and see how it goes.
Good. By the way, I made a mistake when explaining to you how to measure the rms voltage with the Oscilloscope (2 replies ago).
Quote
To do that with the Oscilloscope, you measure the peak to peak Voltage (Vpp) and Vrms=Vpp/sqrt(2)
Wrong, it should be the "peak voltage" (Vp) and not the "peak to peak voltage" (Vpp). Peak voltage means from zero to peak. Therefore:
 Vrms=Vp/sqrt(2).
Sorry about that, too many things going on at the same time, I guess...
Quote
Whenever i solve problem another seems to arise
That's normal and the reason why its so easily to get frustrated while building these things. Persevere!
Quote
When i connect the oscilloscope at the filter output, i can clearly see the rectified wave
That is a clear indication something is terribly wrong. You can't see the rectified signal if the filter is working properly. The filter must remove the carrier  (cutoff freq<<carrier freq), so what you ought see is your original modulation signal, which should be a slow varying one with a DC level added. In other words, an average of the carrier peak voltage or its envelope. With no signal at the input all you must see is a DC level there corresponding to the amplitude (peak voltage) of the non-modulated carrier.
I think we already checked the 100 pF Cap for the filter was wrong.
Also, place a 1K Resistor as the filter load (connected to ground right before the Arduino input). That way the Arduino ADC input will not be contributing to the impedance "seeing" by the filter at its output significantly (the 1K is almost unaffected by it) and you can control everything better. Furthermore, lower the 6OK resistor to about 1K also. The OPAMP can handle that with no problems and you will have a lower impedance driving the ADC. Then you calculate the Cap for a cutoff freq of about 2 KHz (10 times lower than your carrier for instance) to filter out the 20KHz rectified half wave. Read previous posts for how to do that.
Quote
But when i connect it to thearduinos adc it reverts back to sine wave.
That I don't know why. Solve the filter problem first, please.
You are close already. Keep going.
19  Topics / Science and Measurement / Re: problems in data measurement on: May 26, 2014, 07:48:36 pm
It is important to mention the difference in circuit analysis in the time domain and the frequency domain. Your equations apparently are mixing them both and that's also part of the problems with your results. Although they are related through the Laplace Transform (fortunately something we don't have to worry about), the time domain analysis will give you instantaneous "behavior" of the variables, that is, at any given instant in time. The frequency domain on the other hand, is used in AC circuits analysis to obtain variables "behavior" with frequency and it is invariant in time. Therefore, if both are mixed it won't work, that's why you can't calculate the rms current (Iac) using instantaneous voltage (E(t)) and reactance. The E(t) is the voltage at any t=timeyouselect instant during the AC signal, while the rms voltage as it is a periodic sine wave signal does not change with time (in the analysis).
20  Topics / Science and Measurement / Re: problems in data measurement on: May 26, 2014, 02:02:35 pm
Quote
E = -L di/dt => - 224x10^-6(0.036) => 8.064 micro volts.
That's the instantaneous Voltage (E(t)) across an Inductor (L) through which a current I(t) is circulating. That's not the rms voltage which is what you are after. In order to get the rms voltage you would need to perform complicated calculations with that E(t) including integration in time (http://en.wikipedia.org/wiki/Root_mean_square). If it is a periodic signal then the rms of the signal is equal to that of one period. Since all that is not very practical to do, then what you do, is to measure the rms voltage. To do that with the Oscilloscope, you measure the peak to peak Voltage (Vpp) and Vrms=Vpp/sqrt(2) if it is a sine wave signal, as I suspect. If its not a sine wave, then that's not the equation. Another way is to use a true rms multimeter capable of operating at that frequency (20KHz in your case) and it will read the rms voltage directly for you. That could be the reason for the differences you are observing, depending on which multimeter you are using. You can read the specs and find out if it can operate at that freq. I studied these things long ago and might not remember the details very well though.
Quote
I = Vac/ XL = 10 / 2*Pi*20*10^3*224*10^-6 => 0.36;
That looks somehow true, except for the fact that the 10Vac is applied to the serial combination of the multiplexer and the coil. That creates a voltage drop across the multiplexer also depending on its ON resistance and the current passing through. Therefore the 10Vac is not applied in its totality to the coil, part of it is lost in overheating the multiplexer. If too much, multiplexer blows.
So in reality it looks like:
I=Vac/(ZL+Ron)
and
VL=Vac*ZL/(ZL+Ron)       VL-(Inductor Voltage)      Ron-(Multiplexer ON Resistance)       ZL=R+XL (Inductor Impedance)

The multiplexer datasheet should tell you its ON Resistance. In a normal case, the multiplexer Ron should be way less than the Impedance of the load you are driving through it, so the voltage drop across it is negligible and most of it gets applied to the load where you want it.
Furthermore, you are not considering the Ohm Resistance of the coil and calculating its impedance (Z=R+XL). That could be acceptable, if it is very low compared to its XL at the operating freq; but I have no idea about the wire gauge they are made of and the amount of turns which directly affect its Ohm Resistance.
Anyways, at f=20KHz,  XL=2*PI*20*10^3*224*10^(-6)~28 Ohms. That is low and very well in the same order of magnitude of the inductor Ohm Resistance, therefore its Z may differ substantially from its XL. Please measure the coil resistance with a regular Ohmmeter to check how much it is. Furthermore, that low XL value could be also in the same order of magnitude of the multiplexer ON Resistance (I don't know); please check that also. If that's the case then most of the Vac is lost in the multiplexer and not in your useful load (the coils)
I have the impression the 224 uH value you are mentioning may not be right though. That looks like and odd value (particularly the 4 at the end). Like caps and resistors they are "mostly" manufactured in series of standard values (from what I have seeing). If that's what you are reading on the coil itself, then the 4 may mean the multiplier and the value could be 0.22uH or 22uH  instead (I don't know). If you have not done it yet, I suggest you use an inductance or RLC meter and double check the inductors' real values.  Can you post a picture of the actual coil you are using?

EDIT:
By the way, I made a mistake when explaining to you how to measure the rms voltage with the Oscilloscope .
Quote
To do that with the Oscilloscope, you measure the peak to peak Voltage (Vpp) and Vrms=Vpp/sqrt(2)
Wrong, it should be the "peak voltage" (Vp) and not the "peak to peak voltage" (Vpp). Peak voltage means from zero to peak. Therefore:
 Vrms=Vp/sqrt(2).
Sorry about that, too many things going on at the same time, I guess...
21  Topics / Science and Measurement / Re: problems in data measurement on: May 26, 2014, 05:37:33 am
HI:
Glad you made it work somehow.
Quote
Most of the times it gets burned
That means destroyed?
Quote
Now i am trying to improve the current being sent to the inductor, I am not sure how i can send more current to it. There is a multiplexer stage in-between the sensor and the frequency generator and if i send more than 20 mA current to the multiplexer it will definitely get burned. So clearly I need to send it afterwards.
One way could be using relays to switch the signal instead of the multiplexers. You can still use the multiplexers to activate the relays.
Quote
...Voltage drop across the inductor = AC voltage / Inductor. => VL = Vac / L...

 Inductive Reactance= w*L=2*PI*freq*L

The voltage drop across the inductor is the voltage you measure across the inductor, either with the multimeter or the oscilloscope. I don't think you need to calculate that; but measure it.

I still think you need to lower the frequency to get better results with the devices you are using. It all depends of the frequency of the original signal you are sampling, that is, the one you are measuring.
22  Topics / Science and Measurement / Re: Functions Generator on: May 10, 2014, 05:43:59 am
Quote
Hello Pito,

thx for this great work!

Nice. Thanks
23  International / Proyectos / Re: Medicion de Volumen (Metodo Seco) on: May 07, 2014, 05:59:15 pm
Bueno, retomando al tema que me ocupa aqui, como les decia, prepare un video con pruebas realizadas donde pueden observar como se obtuvieron los resultados mostrados en la foto anterior. Para las pruebas, utilice baterias como patrones de volumem, que aunque no lo son en realidad, sino solo una aproximacion aceptable, me ayudan a comprobar el metodo y sistema construidos. Las pruebas mostraddas se realizaron para una y 3 batterias dentro del envase. Estas son solo pruebas preliminaries y es necesario utilizar verdaderos patrones de volumen de los cuales no dispongo por el momento.
Agradeceria sus sugerencias y comentarios.
Aqui esta el video nuevamente, para los que tengan interes en el tema.
https://www.youtube.com/watch?v=OwI0EfT3fg8
24  International / Proyectos / Re: Medicion de Volumen (Metodo Seco) on: May 07, 2014, 02:23:46 pm
Solo que no logro comprender el por que de todas esas opiniones aqui y te agradeceria que en mis "posts" te enfoques en debatir las cuestiones tecnicas que es el tema que me trae a este foro. Lo demas como ya te dije, sinceramente no me interesa.
25  International / Proyectos / Re: Medicion de Volumen (Metodo Seco) on: May 07, 2014, 01:42:26 pm
No entiendo las motivaciones de tus opiniones, que en realidad no son mas que eso, opiniones que se basan en tus experiencias personales y que a mi en realidad no me interesan, ni creo que este foro dedicado a cuestiones tecnicas, sea el lugar apropiado para ellas. Tampoco necesito, ni me interesa tu coaching.
26  International / Proyectos / Re: Medicion de Volumen (Metodo Seco) on: May 07, 2014, 10:29:52 am
Hola:

Prepare un video mostrando como se obtuvieron los resultados mostrados en la foto anterior de la pantalla (durante la misma prueba) mas otra adicional.
https://www.youtube.com/watch?v=OwI0EfT3fg8

Gracias.
27  Topics / Science and Measurement / Re: Volume Meassurement (Dry Method) on: May 07, 2014, 10:26:37 am
Hi:
I prepared a video showing how the results on the previous screen picture (of the same test) were obtained and others also.
https://www.youtube.com/watch?v=OwI0EfT3fg8
Thanks.
28  Topics / Science and Measurement / Re: Volume Meassurement (Dry Method) on: May 06, 2014, 08:59:34 am
Well, not so much though... That's and "idealistic statement" very hard to follow as humans and perhaps another reason why we all fail so often.
29  Topics / Science and Measurement / Re: Volume Meassurement (Dry Method) on: May 06, 2014, 07:16:30 am
@dlloyd. Sorry, I missed your reply and only looked at the last one (Chagrin's one). Really sorry for that. I really appreciate your thoughts and suggestions and I know you were trying to sincerely help. I'lll carefully consider everything you've said and perhaps there is room for improvement with some of your thoughts about this. Discussion is always good and your points helped me explain better what I've have done here.
Thank you so much!!
30  Topics / Science and Measurement / Re: Volume Meassurement (Dry Method) on: May 06, 2014, 06:29:52 am
Also, if the thing is scaled up, to reduce the times the Pr needs to be increased and not all objects can be submitted  to high pressures without damage. That will seriously limit the application scope of this. In reality, as very often the case in practice, there is no universal instrument capable of measuring at all ranges with the same accuracy. This will have to be adapted to particular cases, as required by the nature of the objects to be measured.
Pages: 1 [2] 3 4 ... 23