Colpitts and temperature change.

Go To Last Post
36 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Freaks,

I am using the attached circuit to detect the presence of an object inside the coil. The output is connected to the ICP on an Attiny84. The firmware measures the period of the output and toggles a pin based on the measured period.

The difficulty I am having relates to the amount of drift that occurs with this circuit. For example, if on power up the oscillator cycles at 30khz it will increase by 1.5khz over the next 20mins. After that it is fairly stable.

The power to the oscillator is regulated to 9VDC. The regulator is fairly small in size but it never appears warm to the touch. I have measured the change in temp with an infra-red thermometer and only see a temp increase of 2 degC.

1. Is there any way to increase the stability of this ckt?
2. Is there a more stable oscillator that can be used?
3. Can this initial drift be attributed to anything besides temperature?

On the bench I could weed this out in firmware but in the field I have no control over the temperature. It may need to function in the range of 60 to 120 degF.

I appreciate any feedback.

A.

Attachment(s): 

AVR Studio 4 Ver. 4.18 684
avr-gcc Ver. 4.3.0
ISIS 7
ELECTRA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, I can't read any of your component values.

You have several effects:
dimensional change in coil
temperature stability of your (unspecified) capacitors.
dielectric of the atmosphere affecting the capacitance of your hand / body / foreign object.
conductance of atmosphere 'inside' coil.

If you had grown up with AM radios, you would appreciate that oscillator stability with humidity, temperature has always been a problem.

Of course, if you are using this 'circuit' to detect proximity of foreign objects, you can probably just differentiate the frequency wrt time. i.e. your central heating / air conditioning will change slowly compared to the burglar / fox / jehova's witness.

In practice, you compensate the inductance with special capacitors with known temperature characteristics. Then apply the 'high pass filter'.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

andrew,

I worked with a Colpitts oscillator in metal detector circuits in the past. I experienced similar drift problems and solved them with a variety of remedies. In brief, there are many factors which contribute to "drift".

Here are my initial questions.

1. What is the nature of your coil? Is it air core? Metal core? How many turns? Type of wire? Potted?

2. What type of capacitors are you using in the tank circuit?

3. What type of op amp? (I can't read the number on your schematic.)

4. How long is the connection between the capacitors and the coil? What type of wire.

Also, you could probably get more sensitivity out of the circuit if you used the "beat frequency" topology in which you mix the oscillator output with a crystal-controlled frequency of similar frequency. Are you aware of this topology?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

David / Chuck,

The opamp is an AD825.

The coil is #32 enameled magnet wire wound in a single layer over a 0.650" diameter borosilicate glass tube. The coil is 1" in length and my inductance meter tells me it measures 103uH.

The caps are 470n SMD types. I do not know their temperature coefficient. If needed I could get my hands on a specific type.

At the moment the connections between the coil and the ckt are about 3" long. When installed I can hold this length without issue. They are just a continuation of the coil wire at this point.

On the bench, the coil core is glass and air. In operation the center of the glass tube will have conductive ink inside. The ink has a conductivity of around 1500uS.

I am detecting a 440C stainless ball that will run up and down the center of the tube.

At this point, once stabile, the setup functions perfectly. The real issue is that change in period while settling ( 20 mins ) almost exceeds the deflection when the ball is detected.

Thanks,

A.

AVR Studio 4 Ver. 4.18 684
avr-gcc Ver. 4.3.0
ISIS 7
ELECTRA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

David / Chuck,

It appears that temperature is the culprit.

I found a way to heat the PCB up by 5 degC. The result was another 1.5khz increase in frequency. The coil temp was not changed but the caps were for sure.

A.

AVR Studio 4 Ver. 4.18 684
avr-gcc Ver. 4.3.0
ISIS 7
ELECTRA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

andrew,

1. You need to use either silver-mica or COG capacitors. Silver-mica are the most stable. COG have better stability than most other dielectrics, but not nearly as good as silver-mica. Silver-micas are considerably more expensive than COGs, but worth the price if you are looking for stability.

The more common dielectrics like Z4R, etc. have absolutely atrocious temp coefficients and various longterm drift problems, they are virtually useless in a circuit like this.

2. You need to bond the #32 wire to the glass so that the coil windings are absolutely fixed in position.

The wire turns should be laid down in such a way that they have a space between adjacent turns. That is, adjancent turns should not touch each other as this maximizes unwanted interwinding capacitance. There are a few ways to achieve this. One way is to wind the coil with two wires in a bifilar manner, then remove one of the wires after completion, leaving the desired gap between adjacent turns. Another way is to do the bifilar winding, but use a piece of monofilament fishline for the exta winding and leave it in place in the finished coil.

3. What's up with the conductive ink? What purpose does it serve? This could affect stability in several ways.

4. Try different op-amps. I found that the most important op-amp parameter is its effective output impedance at the oscillation frequency. This is not a parameter which is generally given in the data sheet, but it is quite real nonetheless. This parameter has a sizeable effect on the output freq of the oscillator. Therefore, as this parameter changes with temperature, the output frequency will change significantly.

One way to test this is to let the op-amp warm-up with a dummy resistance load, then disconnect the dummy load and connect in the resonant LC part of the oscillator. Compare warm-up characterstics with and without the "false" warm-up engaged. You can use a simple three pin header and 0.1" shunt jumper to achieve the quick switchover between the resistor and LC. Then you will know if you have an op-amp warm-up problem or its something else in the circuit (Caps, coil, wires, etc).

Having said all of that, I think the capacitors are the most like "colpritts".

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Why not measure the temperature and compensate for it?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Chuck,

Thanks for the primer. The NPOs are already on order.
I will see if these minimize the startup effect before I implement some of the other helpful tips.

jj,

I came up with a couple of ways to compensate for the resonant frequency shift but this creates more problems than it solves.

Basically the device is measuring the viscosity of a liquid. It is critical that the switch point in the detector remains constant. I had several methods for measuring the frequency shift but once I started to move the switch points, my measurements contained errors.

Thanks,

A.

AVR Studio 4 Ver. 4.18 684
avr-gcc Ver. 4.3.0
ISIS 7
ELECTRA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jayjay,

What temperature would you measure? Of the coil? Of the caps? Of the op-amp? Of the air?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You need to measure the temperature of the coil. I would guess that the borosilicate will expand with temperature. Just do a calculation for the inductance of a single layer coil with D and D+d diameter.

As others have said, you need high-stability capacitors anyway.

Plot the frequency against temperature. Then adjust the capacitance by using appropriate combination of capacitors with the correct effective temp coefficient.

Having got a reasonable electrical circuit, you can then apply software corrections. e.g. temperature, time etc.

Ah-ha. A 470nF silvermica will be very large and very expensive. Check out poly capacitors.

Or run at a higher frequency.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

David,

I have managed to track down the caps at DigiKey. They are a bit larger than I would like but that's the cards I'm dealt. The cost is not prohibitive for the project they are going into.

As far as the expansion of the glass is concerned, I believe this is very stabile stuff. With a linear coefficient of 3.3 I'm fairly sure I'm safe.

The final installation will have a bulkhead between the ckt board and coil housing. The coil will be in a Delrin enclosure mounted to a SS or Alu bulk head.

Thanks for the assistance.

A.

AVR Studio 4 Ver. 4.18 684
avr-gcc Ver. 4.3.0
ISIS 7
ELECTRA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have no idea what "linear coefficient of 3.3" means.

Quote:
L = (d2n2) / (l + 0.45d) [μH]

If your coil is longer than the diameter, you can see that it is proportional to the square of D. Hence a smal dimensional change can be quite noticeable. Mind you, length is likely to expand at the same rate as diameter.

What are you trying to detect? A ball falling through viscous ink, or a ball floating on viscous ink?

I would guess that viscosity will be far more temperature dependent than any passive electronic components.

Surely you will be constantly recalibrating your device. It is only the presence of the ball that will make the difference. Or do you want to know its exact height/depth?

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you have a system that is sensitive to temperature changes, and there is no way of "fixing" this fact, the next step is to simply control the temperature instead! Can you house the device in some form of insulating enclosure and heat it (using a power resistor or similar) to above the highest ambient temp it will experience? Of course, you will need to add extra componentry to drive the heater (ideally in a closed loop format) but it could be your best option??

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

David,

The trick is to measure the time it takes for the ball move between two fixed points through the ink. Precision to 1/100s is required for my particular application. I know we could probably get away 1/10s but why take a step back.

You are correct re viscosity and temperature. Even moving the ink in our system can cause a measured change in viscosity. Our current ball and tube hardware has proven to be very stabile in the environments we see.

Both the ball and tube have a tolerance of +/-0.0005". Clearance between the ball and the ID of the tube is about 0.003". I can actually measure the change in viscosity that occurs in some inks in 120 seconds of solvent evaporation.

We have been using this method for some years using 2 inductive proximity detectors spaced about 3' apart against the tube. This is the standard method used in my industry.

We never need to know the actual density or viscosity of the ink except when we are calibrating the viscometer. From that point on our equipment just needs to know how far off the reference it is and then it adjusts the ink viscosity by adding solvent if needed.

Max,

Unfortunately, this I have very little control over. The electronics are housed in an enclosure with typical box fan cooling but I cannot control temperature of the air coming into the enclosure, The fluids and the coil will be exposed to temperatures found on you average factory floor.

I will go the better part route before I investigate the other ( More expensive ) options.

Thanks again,

A.

AVR Studio 4 Ver. 4.18 684
avr-gcc Ver. 4.3.0
ISIS 7
ELECTRA

Last Edited: Sun. Aug 25, 2013 - 02:42 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

From your process control point of view, you need to measure viscosity at a known temperature and atmospheric pressure.

If you have plotted viscosity against temperature at some stage, you know how to roughly compensate in software. In fact, you can 'look after' several things in software.

Your ultimate quality control is going to be laboratory tests. But your day to day control of the machinery can just do some simple compensations.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

andrew99 wrote:
David / Chuck,

It appears that temperature is the culprit.

I found a way to heat the PCB up by 5 degC. The result was another 1.5khz increase in frequency. The coil temp was not changed but the caps were for sure.

A.


Besides the Capacitors, you might want to take a look at the resistors in the circuit since they control the gain of the OPAMP. Try using some good quality 1% resistors.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You can forget about temp instability altogether if you compare the phase of the current through the coil with the phase of the voltage across the coil.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ront1234,

The gain for the oscillator is set to approx. 10. This produces a clean square wave. At all temps the rise and fall time of the wave is consistent and stabile. With the exception of the caps and the inductor, all of the parts are 1%.

I have ordered some NPO caps and another couple of prototype boards and will see if this gives me more stability.

RickB,

I don't know what the phase angle difference would be between 103uH 130uH or how difficult this would be measure. ( I guess I could just do the math )

At this point I'm going to continue down the current ( no pun intended ) path.

Thanks,

A.

AVR Studio 4 Ver. 4.18 684
avr-gcc Ver. 4.3.0
ISIS 7
ELECTRA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If the coil is so temperature sensitive, maybe a coil made of another material exhibits less temperature sensitive, like NiChrome wire?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

jayjay,

At this point I suspect the caps. One way or the other, I should know by Tuesday.

David,

The viscosity of the fluid in the system needs to be fairly stabile. ( I know that's subjective ) In testing +/-0.5 centipoise is okay. Sudden changes in temperature and therefore viscosity are compensated for in other parts of the process.

The volume of ink being controlled is about 0.25 to 1 liter. Changes in the temperature of the ink do not occur so fast that either the viscosity control routines or other compensation methods are unable to correct for it.

In this system, the major influence on viscosity is evaporation. The ink we us is MEK based. This material flashes off very quickly and is highly flammable. A drop on a dish would be gone in less than 5 mins. A liter left open will reduced to half a liter in 24 hours.

The balance of the control system is up and functioning. I just need to reliably detect this damn ball. :)

A.

AVR Studio 4 Ver. 4.18 684
avr-gcc Ver. 4.3.0
ISIS 7
ELECTRA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

andrew,

If you find that the capacitors are too large, you should increase the inductance of the coil by adding more turns. The required capacitance to resonate the coil at he same frequency will then drop. The formula is F=square root of L x C. So as long as you keep the LC product numerically the same, the freq will stay the same (I couldn't read the cap values in your original schematic or I would have tipped you off to this earlier.)

Also, the gain of the op-amp is not very important to the stability of the circuit, so long as it is high enough to allow oscillation to start and be sustained. If you are getting a square wave output you have way more than enough gain and may want to cut the gain back a little for a variety of reasons.

I didn't realize that the tube was actually filled with conductive ink while you are measuring the frequency. I thought you meant the inside of the tube was coated with the ink for some reason. The presence of the ink can have a dramatic affect on the resonant freq of the LC circuit because of the Eddy current losses it causes in the coil's magnetic field. A simple test is to measure the output freq of the circuit with and without the ink present in the tube.

Most metal detector coils incoporate a Faraday Shield around the coilfor various reasons. I am not sure you need one in this application. But if you later experience various sporadic operation anomalies, let me know as you may need the shield in shis instance. This is an unusual metal detection app and I am not sure I understand all of the operational possibilites.

One last point. You will probably want to convert the op-amp's output to a logic level square wave using a Schmidt Trigger (e.g. 74HCT14)rather than the MOS-FET circuit you show in your schematic.

And one more question: How long does it take the ball to pass thru the active part of the coil's field? How many cycles of the oscillator output does this amount to?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Chuck,

The conductivity of the ink is tightly controlled in manufacturing so we can count on this as being a constant.
Final calibration will have ink in place and should zero out any effects of the conductivity. I should mention that although the ink is conductive, it contains no metals. The conductivity is the result of specialized salts.

Our current setup allows the ball to travel between sensors that 3" apart in 60s. So we are looking at an interval of around 20s.

I am sampling the oscillator period 64 times and taking an average of the output. At 30khz that provides for a test every 2.1ms. This is well within our requirements.

The initial test was setup with an oscillator gain of 100, but after seeing the initial drift I lowered this to 10. The drift was slightly less but not enough to discount it. The output is squared up ( It is almost perfectly squared already ) with a 2N7002 MOSFET.

I should be able test the new caps by Tuesday of next week. I will make sure to post my findings.

Thanks again,

A.

AVR Studio 4 Ver. 4.18 684
avr-gcc Ver. 4.3.0
ISIS 7
ELECTRA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

andrew99 wrote:
The balance of the control system is up and functioning. I just need to reliably detect this damn ball. :)

I'm a little unclear, you mentioned above the industry-standard uses two coils - are you using two, or trying to use one ?

Using two has many advantages, as one coil will always be a reference while the other passes the ball.
The sense (trigger) points will also track, so that error will be removed as well.

You can also measure Inductance by building a LR oscillator.
This has similar waveforms to a RC oscillator, but as there is no C, there is no C drift element.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

andrew,

Just one last point. It is a common misbelieve that "metal detectors" can only detect magnetic (ferrous) metals within the coil's field. Not true. They can detect non-ferrous metals as well - such as opper tin, lead, etc. They can actually detect any conductive material within the coil's field. That includes conductive salts, such as those found in soil which become conductive when the ground becomes damp.

There are two separate electro-magnetic effects at work in the coil, which in turn affect the frequency at which the circuit will ultimately oscillate freely (resonate). Ferrous metals directly affect the inductance of the coil by the commonly known mechanism of adding iron to the the coil's core. This effect increases the the coil's inductance, and in-turn will usually ( as in this type of Colpitt's oscillator) drop the resonance frequency of the oscillator driving it.

The non-ferrous metals within the coil's magnetic field create a loss of energy in the field and also a "bucking" magnetic field within the coil's core by a principle known as Lenz's Law. This effect reduces the the inductance of the coil and thus increases the resonant frequency of the oscillator.

Conductive ferrous metal objects like your ball will cause both effects to come into play. But, the inductance increase caused by the ferrous content of the object will usually dominate over it's conductive properties and cause the oscillator's freq to decrease. Is that what you are seeing, a decrease in frequency?

Please keep us posted of your findings with the new caps and the actual installation of your system.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me,

You are correct sir!

The current standard uses two detectors, approximately 3" apart. They are several advantages to this but in our application a few disadvantages.

In our application the size of off the inductive prox. switches causes some issues with hardware positioning. This we could probably work around.

The next issue is one of accuracy. With two prox's positioned at three inches, any changes in sensitivity, ( Assuming sensitivity would change in the same manor in both prox's ) will either increase of decrease the overall reading. With a single coil and sensor we can guarantee that over a 15-30s reading that the switch points will be almost identical.

The closest we can get an external prox. to the tube is around 20mm. This requires the use of large diameter ( 30mm ) units.

I did not consider an LR oscillator. I will know by next week if maybe I should have.

At this point feel free to call BS because as I have stated, the original setup did the job. :)

Thanks for the feedback.

Chuck,

I knew of course that materials like brass would dampen a field or that current could be induced in non-ferrous materials. I have not seen any of this effect when using standard inductive prox. sensors so I didn't even consider it.

Just for fun, once I have the temperature problem worked out, I will measure the oscillators frequency with and without the presence of ink. Even it has does have an effect, we will be calibrating and running in the presence of ink.

I will probably test some other caps on Monday morning. It came to me that I may even have some 20 year old silver mica caps. They are not SMD types but the will allow me to test effects of temperature variations in just the capacitors.

Thanks again for the feedback.

Andrew

AVR Studio 4 Ver. 4.18 684
avr-gcc Ver. 4.3.0
ISIS 7
ELECTRA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

After minimising drift as much as possible by judicious choice of components & materials, slow drift can be easily compensated for using Huff n Puff stabilisers.
This one in particular might do the job for you!

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

andrew99 wrote:
Who-me,
You are correct sir!

The current standard uses two detectors, approximately 3" apart. They are several advantages to this but in our application a few disadvantages.

In our application the size of off the inductive prox. switches causes some issues with hardware positioning. This we could probably work around.

The next issue is one of accuracy. With two prox's positioned at three inches, any changes in sensitivity, ( Assuming sensitivity would change in the same manor in both prox's ) will either increase of decrease the overall reading. With a single coil and sensor we can guarantee that over a 15-30s reading that the switch points will be almost identical.


I'm not quite following the reasoning.

This will have skirts/slopes on the sense, with two sensors (nominally identical) that skirt does not matter, they both will trip at some fixed phase, relative to ball edge.

With a single sensor, that skirt shape now matters, and shifts will change the apparent ball diameter, and so mess your readout.

That said, you may be able to correct for this, by sampling many times during the transit, and thus fully graphing the L-D 'bell curve'.

Then, you can 'fit' and correct for Zero, and peak, and thus trim the slice points.

How much does your L vary, during transit ?
Have you plotted L-D ?

I would also suggest trying a HC/LVC4060 as the LR or LCR Osc, so you can scale the sample rate, and avoid large precision caps. 4060 should allow cheap, low value NPO's.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

andrew,

The 20 year old silver micas will be fine, they are very sturdy and will last decades. However, one caution. Understand that these capacitors are made by plating silver onto opposite faces of a mica sheet. These are the plates of the capacitor and the mica block is the dielectric. Therefore, the plates are directly under the enamel coating of the capacitor.

You can influence the value of the capacitor and create unwanted AC coupling into it by placing the capacitor surface too close or in the wrong orientation to metal surfaces or other components.

In a Colpitts oscillator you have the situation where a pair of these caps are connected directly together ( in series) and therefore in close proximity. Do not mount the capacitors with their broad surfaces mating or een closely parallel. Mount the coplanar with the thin edges adjacent and separated by 1/4" or more. Orient the capacitors so the plates which are connected in series are on the same side of both capacitors. On larger value mica capacitors this is usually apparent from the construction of the capacitor because you can see the impression of the leads running under the coating.

COG capacitors can have similar "geometry" issues depending on the actual type you are using (e.g. disc vs chip).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Chuck,

I was able to scrounge up the silver micas form my retired parts bin but alas they were way to small for the design.

I decided to remove the SMD type caps and replace them with a couple of epoxy dipped ceramics. They were mounted about 0.25" from the surface of the board. These greatly reduced the settling from 20 mins. down to around 2 mins. This change also reduced the frequency drift to under 400hz. I also heated these parts to check drift due to temperature. Although I could not measure the exact temperature applied, I set my soldering iron to its lowest setting ( 550F ) and held it between the caps. The added heat altered the frequency by about 600hz.

I thought this might meet our requirements so I now needed a way to accurately measure the switch points and any change in their positions.

The only method I could come up with was to mount the ball on the end of a plastic rod. Place the opposite end of the rod in collet on a milling machine. With the coil and tube mounted in the vise, ( The coil sits more than 2" away from any metal ) I could then adjust the position of the ball in the tube accurate to 0.001".

Well, the initial results were pretty bad. The switch points would move +/-0.035". By my estimation this would produce an error in and around the 6% range. If the errors were averaged out by the slow fluctuations of viscosity in a liter of ink, maybe this could still work.

Just as I was about to move onto something else, the NPOs arrived. I do not have the reworked PCB to mount the larger caps so I thought I would just mount them on the legs remaining from the 2 epoxy dipped units that I clipped from the board. The NPOs also sit about 0.25" off the board.

So..

Settling time was reduced to under 10s. Frequency drift during that period was about 8hz. When I measured the switch points I was surprised.

In 100 measurements over two hours, the point at which the ball was detected entering the coil varied by +/- 0.002". At the exit point there was no measurable change. I suspect the difference between the entry point and exit point measurements is a result of the milling machine arbor being moved around without load.

By my estimation this error will produce readings that are +/-0.2% accurate. This will more than meet the requirements.

Thank you for your assistance.

Who-me,

You are probably correct in stating that changes in the switch point of either a single or two sensor system will cause measurement errors. I don't know why I believed that a single coil would by less problematic. At this point I think I have this nailed down. ( With some help of course ).

I have some mounting hardware to design and a test enclosure to modify then I will be doing some further testing. We will run a viscosity standard through the viscometer and should see any unseen issues fairly quickly.

Thanks again for the help.

LDEVRIES,

I think I have this one beat but I will have a look and the links.

Thanks,

A.

AVR Studio 4 Ver. 4.18 684
avr-gcc Ver. 4.3.0
ISIS 7
ELECTRA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nice work!

It would also be good to test the long term accuracy of the oscillator.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Moral to the story:
All capacitors are not created equal.

Andrew, I admire your thoroughness. Don't drop the ball now, make sure you validate all of your assumptions about the conductive ink and its affect on oscillation characteristics. Also, make sure the whole thing is stable by waving your hands in the vicinity of the coil and circuit board while observing the output freq of the oscillator.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ront1234,

Thank you.

I understand why the testing of long term accuracy would be important but I think I have managed to design a little bit of flexibility into the program to cover this.

The difference between the frequency of the oscillator with the ball present and without it present ( NPO caps ) is about 800hz.

I have measured the non-detect frequency and added half of the oscillator range. I have also included about 100hz of hysteresis for good measure. This gives me about 300hz of range above and below the switch points for the oscillator to drift.

During my 2 hour test, the oscillator seemed to be fairly stable. I will run a test for a couple of days starting tomorrow but based on what I have seen I think I will be okay. If memory serves me correct, over the 2 hours of testing, there was no prominent drift in any particular direction.

I am going to add some semi-automatic calibration. The removal or placement of a jumper will cause the firmware to measure the base frequency and store it in
EEprom. Calibration of the viscometer is done once a year when the equipment is serviced. Really long term drift will be corrected by this service calibration. ( I think ).

I will post of the medium term test.

Chuck,

I will do the Theremin test and see what it does to the output. I did lay a metal screwdriver down beside the coil and found a small change in frequency.

As far as the caps go, you really don't have any idea what the actual capacitance is with some of the SMD parts. Not only is there no labeling but caps with different characteristic can appear identical.

Thanks for the help.

A.

AVR Studio 4 Ver. 4.18 684
avr-gcc Ver. 4.3.0
ISIS 7
ELECTRA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

When you do the Theremin test, wear rings. Or find someone who does... metal watch strap, also.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

andrew99 wrote:

I am going to add some semi-automatic calibration. The removal or placement of a jumper will cause the firmware to measure the base frequency and store it in
EEprom. Calibration of the viscometer is done once a year when the equipment is serviced. Really long term drift will be corrected by this service calibration. ( I think ).

You should be able to fully-automate base-freq calibrate/zero tracking ?

The Ball will have a distinct transit signature, and there should be enough no-ball time, to use a filtered minimum as the zero.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me,

I had thought of this but there can be an issue if the ball becomes stuck. The viscometer is connected to another processor that handles measurement and fluid control. I know when the ball should be at the bottom, but I cannot guarantee the position of the ball at any given time.

At this point in the project, there several things I can do to compensate for oscillator drift.

1. I can use an external signal to reset the baseline when I expect the ball to be out of range of the coil.
2. The system includes a frequency counter sampling several other frequencies. I can add the output from the oscillator to the list items that are monitored. From this processor I could warn the system or reset the viscometer.
3. I could do as you suggest and come up with a method to track the highest frequency. I'm not sure how I would accomplish this but it may be worth a look.

I like the idea of having the sensor self compensate for drift. I will give some thought to this. Maybe there is something simple that will work. I will have a look at the mid-term stability, this should give me some idea of whether or not to spend additional time on this.

Thanks for the input.

A.

AVR Studio 4 Ver. 4.18 684
avr-gcc Ver. 4.3.0
ISIS 7
ELECTRA

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

andrew,

Another idea for self calibration, drift comp and perhaps failure detection. But it will take a fundamental change to your physical equipment. Add a parallel glass tube which gets filled with the same ink sample and around which another identical coil is wound. Use the frequency of this "reference tube" (which will not be the same as the other two coil-oscillators) as an indicator of environmental conditions which cause frequency change for a variety of reasons.

Ceramic Chip Capacitors:
"CCC"s (not to be confused with the other CCC - "Cheap Chinese Crap" ) are a pet peeve of mine. Why do they not have markings? What makes them so different from chip resistors, that their manufacturers can't provide this fundamental requirement of any manufactured part (i.e. an identifying mark as to value, manufacturer, etc)? I think somehow the manufactuers opted out of this as a cost savings measure. I have never heard a reasonable techincal explanation as to why they can't be marked just like chip resistors. I know that some manufactuers will provide the marking on special orders. So, it can be done.

And it's not just the capacitance value, we can deal with that as I describe below. It's the fact that there are about 5 different commonly found dielectrics ( X7R, COG, etc) which masquerade as otherwise identical units waiting to wreak havoc and confusion in the lab and on the production floor.

Here's how I've learned to deal with the situation:

A. Never trust a "secondary identification" of a CCC. That is, once the CCC has left the original delivery packaging (e.g. a DigiKey bag, or P&P tube, or tape reel), the CCC should be considered "unknown" - I call them "tramps". This rule has many ramifications, some quite distasteful. So, the RULE is: Don't remove CCCs from their original delivery packaging until they are to be soldered into the circuit (PCB, breadboard, etc).

You will run into this problem when the longstanding industry practice of "kitting" parts for a build is encountered. Here, the CCCs are usually removed from their original delvery package and placed in a small paper envelope, anti-static-bag, compartmented tray, or the like. Sooner or later, these will get mixed up and the big problems will begin; although no one will know it until much later.

2. Tramp CCCs should always be subjected to verification with a capacitance meter. We keep a handheld LCR digital meter on the bench for this exact reason. But there are other possibilities, including many DVMs which today have a capacitance measurement mode. There are also those neat DVM tweezers.

Therefore, RULE #2 is: Always measure the capacitance of any "tramps' to verify their value. If the tramps are loose pieces in one envelope, I'll check 2 or 3 of the batch. If they're in a clipped length of P&P tape, I'll check one piece, then wrap a "flag" of masking tape on the clipped P&P tape and mark it with the measured value. (I do this because these clipped P&P tapes are just as easily mixed up during the build process as are the individual CCCs they contain.)

Of course, merely measuring the capacitance of a CCC doesn't tell you what dielectric it is. For this I have NO answer! (I am open to suggestions from other Freaks.) But, this "dielectric masquerading" leads me to RULE #3....

3. Every CCC, even those soldered to PCBs by completely trustworthy assembly houses, should be trusted less than a used car salesman or career politician.

How many times have I had this situation:

A filter or timing circuit uses a 0.01 or 0.1 MFD CCC specified with a 5% or 10% tolerance. There's a problem with the operation of the circuitry. I desolder the 0.01 or 0.1 CCC and find it measures 0.016 or 0.13 MFDs. Conclusion: somewhere in the assembly process the 5/10% units got mixed up with the 0.01 or 0.1 MFD bypass capacitors (typically +/- 20%, or -20%/+80%) which dominate the remaining PCB assembly, and ended up in my filter circuit. (The missing-in-action, more expensive 5% CCCs are probably hiding somewhere else on the PCB, "masquerading" as bypass caps.)

The BAD NEWS...
The chip resistor manufacturers are moving to the same insane methodology as their sister CCC manufacturers! I'm seeing more and more unmarked resistors show up on contract-house-assembled PCB assemblies. The joke, if there is one in all of this, is that the CCCs and unmarked chip Rs were manufactured and subseuently assembled under ISO-9000 and 6-Sigma conditions!