Go Down

Topic: problems in data measurement (Read 19128 times) previous topic - next topic

LsensorRSH

Sorry about that.

Should have attached the PDF files the first time.

The files are attached. After this amplifier stage I tried to connect the output from the amplifier to the Arduino adc and opened the serial monitor, compared the observing values in oscilloscope and serial monitor in the arduino, some of the values are not matching. This led me to think may be the rectifier is not working properly or might be something wrong with the capacitor attached to the filter circuit.

When the values are observed in the oscilloscope, they are coming in the U shaped, means for every signal transmitted the result will be in U shaped. I will provide an data of those after i take few more readings this afternoon.

I also tried using analog reference voltage from 1 -3 volts using a voltage divider circuit, but that was not useful. It ended up producing more abnormal values.

I think I need to learn more on this data acquisition circuits.

I thank you again for your guidance.

arduinoadrian

#16
Feb 27, 2014, 02:52 pm Last Edit: Feb 27, 2014, 02:58 pm by arduinoadrian Reason: 1
-The OP37E is an excellent choice. BTW, check pages 13 and 14 of its datasheet http://www.analog.com/static/imported-files/data_sheets/OP37.pdf for the Phono and Mic preamps configurations mentioned before. I still think that's a better choice than the Instrumentation Amp config  you are using in this particular case. The reasons for that are the high freq and gain levels you are using.
-Consider using another OP37E instead of the LM741P.  Although I can't find the datasheet for the P version you are using, I suspect, it might introduce more noise and its temp offset drift is probably higher and that will cause problems as explained before. What you are trying to build is uncommonly difficult and requires extreme care and attention to details. If you don't follow already known procedures and techniques you won't get acceptable results.
-I think there is no need for a buffer last stage unless the voltage level is too low; but having so many stages already that's difficult to accept if everything was done right. The low pass filter stage to recover the signal envelope acts as a buffer already. Adding another stage introduces more noise and problems. If there is not enough voltage try to increase the gain of that and previous stages with care not to surpass the Gain Bandwith product and slew rate as advised before. The more active components the more noise is introduced and the more problems are added. Plus added cost
-The 10pF cap used apparently is not right . According to f=1/2PIxRxC, with R=47K and c=10pF the cutoff freq should be 1/(2xPIx47x10^(3)x10^(-11))=1/(2xPIx47x10^(-8))~344KHz that's way above the 20KHz carrier and the cutoff freq. must be way below it for correctly detecting the envelope by averaging and properly measure the voltage. The filter is simply not filtering and the 20KHz half wave carrier is passing through. Arduino is sampling the non averaged signal and since there is no sync between it and the Arduino sampling rate, it gets the reading at any point of the "rectified signal" and therefore the readings are erratic. There could be other problems though, like the amplitude actually getting to Arduino, noise, bad rectification, etc. But lets begin by fixing that. Double check my calculations for accuracy please. I did it quickly and they may be wrong.
-Please post a picture of the "U shaped waveform" you are getting? Sounds like  a clear indication of distortion taking place along the signal path. Troubleshoot with the scope by measuring the signal at different points in its path, that is, at all amplifier stages inputs and outputs and check where that distortion begins to appear. That's the stage introducing it. Must be revised then.
-Please post scope screen pics of the signal waveforms at inputs and outputs where you think there is a problem.

LsensorRSH

Hi,

Thanks for the guidances,

The precision rectifier has stopped working, I need to get some diodes for it to work.  Played with it in the morning and now it stopped. [Me and my hands]

The U shaped curve is obtained by the plotting of the observed values on a graph, sorry if I made you misunderstand that it is appearing on the scope. Its the values of the receiver for each transmitter inductor.

I need to understand a lot about my design and circuit. As you said, Its really difficult, and even a minor mistakes in the circuit stops it from working.

The output  voltage coming from the filter circuit is really less and when fed into arduino nothing other than 0 appears on the screen. So, I had to amplify it at the end.

will update on this tomorrow.

Thank you.

arduinoadrian

I suggest this:
-Take a couple of days of break from the build up and go to the library with your circuits on hand, carefully read the postings and deeply study the subjects recommended. Compare what you learn with what you have actually built. When you have a better picture of the possible mistakes and only then return to the lab to continue with the build up. I honestly have told you everything I consider necessary for your approach to succeed to the best of my knowledge and experience.
-Talk to your project tutor and request some onsite help also. Its hard to figure out the details from reading posts. From short distance, he will have better clues than me.

LsensorRSH

Hi,

Thanks for all your help. I made it work. But most the times the arduino adc is not working well. Most of the times it gets burned.

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.

Currently I am sending ac 10V at 20KHz frequency to my inductor but i want to send 1 Amp current or more to it. how can i Possibly send more ?

Also one more thing i need to ask. I have a inductor of value 220microHenry. I am supplying 10V at 20KHz frequency. The voltage drop across the inductor to 4V. I calculated using different formulas but none of them seems to be correct.
Voltage drop across the inductor = AC voltage / Inductor. => VL = Vac / L
And not sure how to calculate the change in current.

want to seriously improve my knowledge, please help me out.


Thanks


arduinoadrian

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.

LsensorRSH

Yes the multiplexer pins got destroyed.

I did measure them with the oscilloscope and multimeter but they are very different from each other.
for eg:
When I supply Vac = 10V at 20Khz frequency, to a inductor of 224micro henry, the voltage drop

E = -L di/dt => - 224x10^-6(0.036) => 8.064 micro volts.
I = Vac/ XL = 10 / 2*Pi*20*10^3*224*10^-6 => 0.36;
E volts  I Amp      wL      di/dt
0       0              27.64  0
1        0.036      27.64  0.036
2       0.072      27.64  0.036
………………………………………

10    0.360      27.64  0.036


So the result is in micro volts, but I am seeing milli volt values in the oscilloscope and the multimeter is also showing a different reading. This is one problem.

The other one i noticed when i tried to plot the graph is that voltage drop is always constant when i substitute di/dt = 0.036, but it changes when i substitute the actual current values i.e., I = 0.036, 0.072…0.36 where E ranges from 8.064 microvolts to 80.64 microvolts.

Please let me know what I am doing wrong.

arduinoadrian

#22
May 26, 2014, 09:02 pm Last Edit: May 29, 2014, 07:23 pm by arduinoadrian Reason: 1
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...

arduinoadrian

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).

LsensorRSH

HI,
http://www.murata-ps.com/data/magnetics/kmp_2200r.pdf

Please see the above link for the inductor. Its order code is 22r224c. My phone cam got busted and i am unable to take any pics.

I  measured their resistance using a multimeter. It was 0.8 ohms/ 800 milli ohms.

Ron of my Multiplexer is 300 ohm when supplying +15 v.

i will make the calculations and see how it goes.

Whenever i solve problem another seems to arise. This time its the adc.

I made a new circuit of 2 stage amplification, one is the amplification stage and the other is the precision rectification and after that a low pass filter. When i connect the oscilloscope at the filter output, i can clearly see the rectified wave. But when i connect it to thearduinos adc it reverts back to sine wave.

how do i understand what happens here?  I thought the adc is busted and connected it to the potentiometer and varied to check if the readings changes, It does changes but it doesn't work with the circuit i made.

arduinoadrian

#25
May 29, 2014, 07:20 pm Last Edit: May 29, 2014, 08:03 pm by arduinoadrian Reason: 1
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.

LsensorRSH

Hi,

I made it work finally and properly this time. I used a inductor of 4.5 mH from murata solutions. The circuit only worked with this inductor and not any other. I also managed to integrate a DDS Chip Ad9833 instead of the frequency generator.

i am trying to make it work with a inductor of value 138UH but the ac signal becomes DC when the inductor is loaded to the circuit. Is there a way to correct the loading problems with the circuit?

I have a dds as a source an opamp after that increasing the voltage as the output from the DDS is 0.60 Volts, this opamp is connected to mux ad508 and then the inductor sensor array is connected. Will using RLC circuit solve this problem?

Thank you very much


arduinoadrian

Yes, I think there are several ways to solve that; but all of them will require major changes in your design.
The fact that you are using a pure sine wave to drive the coils is a major limitation, I think. To increase the power applied to the coils  that way, you will need to use linear amplifiers which are difficult to build or expensive to buy. Also that limits your ability to use the multiplexers in the driver circuits and you have to use them to apply the signal to the coils at any power you are using. These muxs, as we already checked,  can't handle to much power and introduce heavy looses in your signal path as your coils reactance is very low and that's a huge limitation for your design. Furthermore, the lower the coil inductance value (L) the worst the situation is regarding to loses in the muxs Ron. Therefore, there is a need to take the muxs out of the equation, in regards to power applied to the coils to get serious improvements to your project.
To achieve AM modulation of your 20KHz carrier it does not really need to be a pure sine wave (I think) and you could use something like a "Chopper" circuit and a square wave as a carrier. Using a square wave instead of the sinusoid will free your design from having to use a linear amp as the final stage to increase power and a simple non linear switching transistor can do the job. This will allow you to use the muxs in the driver stages where they will be submitted to way less power. The transformer configuration created by your coils (Tx/Rx in front of each other) will definitely introduce some distortion to the square wave signal as the whole spectrum will not pass through. Still this could be made to have a negligible effect for you application which may tolerate some THD; but I don't know as that (how much distortion is allowed) depends on the original signal you are using as the modulator (what you are trying to measure). A switching transistor as the final stage will allow you to increase Power by simply increasing the Power Supply voltage. Your modulating signal will still (I believe) affect the amplitude of the induced signal in the RX coil and you will be able to recover it the same way by using AM demodulation. You can try also to tune the coils to the fundamental freq of the square wave carrier by making a tank circuit using a cap in parallel with the coil. That way  the signal will be more like the sine wave you are using now, as it will attenuate most of the other freq components. How effective the tunning is, depends on the Q factor you achieve for the tank.
Another way could be using FM instead of AM, by making the Tx coil part of an oscillator circuit like a "Colpitts" design for instance. Your modulation signal will probably affect the freq (and probably amplitude also) of the signal generated because of changing the properties of the Tx/Rx transformer (coils). The received signal after amplification can be demodulated  using a PLL FM demodulation circuit which is not very difficult to implement using the 4046. What I don't know though, is how linear all that process will be allowing for correct reproduction (undistorted)  of your original signal at the end. That requires testing and/or knowledge I don't have.
Back to the square wave AM circuit, the attached picture (in general terms) is the approach I was mentioning to you. Please be careful when increasing the Power Supply voltage (Vcc) as if it is too much, the current will saturate the coils core with max possible magnetic flux  and any further increase will just be converted to heat and no useful magnetic energy, possibly destroying the coils.
Furthermore you will need to make sure this approach does not produce unacceptable distortions or nonlinearities in your end demodulated signal which has to match the original one.
Hope it helps.

LsensorRSH

Hi,

Thanks again for the help.

Actually i am trying to anlayse a open loop gain opamp connection which worked on the last design. I made it by accident.
The transmitter part has a DDS chip sending a waveform of freq =20Khz and voltage 0.60volts to the openloop opamp.
At the output pin 6 i connected oscilloscope, but there was no output and when i connected the inductor array of 4.5mH, the sine waveform was there and voltage/current  was enough to drive the sensor array.

It was amazing, when it started working without a feedback, i always thought that the opamp requires feedback to work properly. but this entirely changed my opinion and I am unable to anlayze what is happening and how was the sine wave produced at the output when inductor was connected.

Attached is the PDF of that part.

arduinoadrian

Probably you have built an oscillator. Open loop OpAmps can have gains of perhaps 300000. "...Too much gain and you are risking building an Oscillator instead..." (mentioned some replies ago). The coil is connected to the output and DGND. There should be a feedback network from the output to the input through the coil somewhere,  probably in the ground loop as you have AGND and DGND or through some of the caps. Sometimes its through a poorly filtered Power Supply (I don't see the low value caps in the Power Supply rails, next to the OpAmp). The tiny feedback voltage drop in the feedback network, with such a huge gain is enough to provide the feedback voltage necessary to sustain the oscillation satisfying the Barkhausen critera. The 4.5mH coil is apparently the only one producing enough feedback voltage to satisfy the criteria and sustain oscillation nor the 220UH neither the 138UH you are trying to use. Lower inductance is equivalent to lower XL producing a lower voltage drop.
This is a very unstable system and the freq of operation depends on factors difficult to control. To confirm this, you can remove the DDS chip (be careful to maintain everything else the same) and observe if the oscillation persists. I would walk away from such "lucky solution" and build something one can have real control of its operation.

Go Up