Webcontrol - timing errors?

There are interrupts on this chip, but what event to trigger the interrupt is to consider. From original communication, I thought you would count pulses for 10 seconds or longer then divide them to get a frequency.

Yes, that was my original thought too, but I hadn't realised at the time that short-duration events were as important as they turn out to be.

Using FCOUNTER then picking the smaller value over few readings might be better. We will have to think how to make this work better for you.

Here's the last half hour odd of 5-minute samples, just for curiosity.
time, minimum, maximum frequencies, difference and variation expressed as parts-per-million.
Given I'm looking for variations in the tens of PPM, you can see why this variation is killing me!

09:35:03 min:63344 max:63794 diff:450 PPM:71040
09:40:03 min:63304 max:63831 diff:527 PPM:83249
09:45:03 min:63490 max:64183 diff:693 PPM:109151
09:50:03 min:63054 max:63737 diff:683 PPM:108319
09:55:03 min:63452 max:63790 diff:338 PPM:53268
10:00:03 min:63080 max:63903 diff:823 PPM:130469

I did notice it was FAR worse when I accidently left a browser on the "Program PLC" page - it was constantly updating the clock and caused huge variations - around 400,000 PPM!
 
Ross,
We will make some logic change and send you a free eval board to see if this new logic change would help you or not.
 
What's the temperature coefficient of the webcontrol oscillator, and is there a way I can better compensate it??

magnetometer.gif

The spiky drops are the freq errors I've been talking about - this is substantially less bad than earlier, I'm taking readings over 5 seconds and using only the lowest over that time. 5 seconds is really too long still, but it looks like I still need to do much longer - I'll be keen to see the modified code!

However - the downward curve from 22:00 (far left) to about 07:00 was as the office cooled overnight. The sudden drop between 08:15 and 09:00 was when I opened a filing cabinet 8 feet away... it caused a change in the magnetic field I hadn't noticed at the time. But the upward trend and great spike to 18:00 was as the day got warmer. From 17:00 the webcontrol board was getting some indirect heat because I had a door open near it. At 18:10 I closed the door and sealed the room. Temperature dropped quickly. This is only about 15-20 degrees C variation! Where the board has to go, it will experience at least 50 degrees C seasonal variation!! I don't want to have to put it in an oven, or make a temperature controlled environment for it - running that much power to the sensing site is not practical!

Is it poor crystal? Poor capacitor? Or just a bad match of thermal characteristics? Thoughts or suggestions??
 
Interesting chart, Ross. Do you have temperature chart to match the frequency during the same period of time?
For frequency measurement, we re-make the release with some changes that should be better. You will be able to tell when you receive the board we sent to you.

For best matched crystal performance, you can change the C21 and C22 to be variable 5-25pF capacitors and fine tune their value. Please note if the frequency is too far from 25MHz, the Ethernet will not sync up with your network switch. We do rough adjustment during QA testing the board to make sure Ethernet is stable.
 
Ross,
I checked the testing board with latest firmware to measure 2MHZ not calibrated clock source. I am reading between 2041650 and 2039887Hz, (max-min)/min accuracy is better than 0.087% or 8.67/10000. Lower frequency is less accurate, for example, 60Hz reading is between 60 and 61. I think that has something to do with not enough pulses to count during the measurement time. Test does have an external capacitor crossing the pin1 and pin3 of the temp sensor terminal to reduce the power noise. We have send a board to you with the latest firmware We will love to hear from you the temperature testing result with this board..

Thanks for your inputs on this.
CAI_Support
 
Interesting chart, Ross. Do you have temperature chart to match the frequency during the same period of time?
No, while I've been working on this issue, I've (deliberately) kept the board devoid of all other sources of activity.
I will probably put a couple of temp sensors on today though - one to measure ambient temperature, one to measure the webcontrol board temperature, and one to measure the FGM temperature.


For best matched crystal performance, you can change the C21 and C22 to be variable 5-25pF capacitors and fine tune their value.
I'm less concerned about the absolute accuracy of the the oscillator than I am about its temperature stability.

That the frequency "appears" to go up with temperature suggests that the clock frequency goes down with temperature.
Not sure what temp coefficient the xtal has - it would make sense for its frequency to lower with higher temperatures (because the resonating element will expand and thus have a lower resonant frequency), but it behaves like perhaps the caps have a positive coefficient too (or less negative than the crystal is positive).

I know this probably isn't where you wanted to take the product - but I would like to think it's relevant and useful feedback!
 
Ross,

Thanks for your detailed analysis. We will have to talk to our crystal supplier to find out more informaiton you talked about.
Of course we want to make the measurment as accurate as possible. If you have any suggestion on it, we like to hear it.
If there is a curve based on temperature, then user can implement some kind of compensation in software. We have customers
using WebControl from -30C to +45C or higher temperature. That is a wide temperature range. Do you know any crystal and
capacitor combination can provide flat response in that range?

CAI_Support
 
We have customers using WebControl from -30C to +45C or higher temperature. That is a wide temperature range. Do you know any crystal and
capacitor combination can provide flat response in that range?
I'm quite sure the board will manage it - but for the vast majority of cases, the exact speed of operation is completely irrelevant.
Reading temperature or humidity sensors, the A/D input, logic in and out etc - if it was running 0.1% fast or slow - would make absolutely no difference.
Measuring frequency of course is a whole new ballgame - because suddenly time becomes *the* measurement reference! :)
 
I'm quite sure the board will manage it - but for the vast majority of cases, the exact speed of operation is completely irrelevant.
Reading temperature or humidity sensors, the A/D input, logic in and out etc - if it was running 0.1% fast or slow - would make absolutely no difference.
Measuring frequency of course is a whole new ballgame - because suddenly time becomes *the* measurement reference! :)

That is probably a lot of lab equipment require certain lab temperature range, unless the equipment is designed for field use - because field temperature is not a constant.
If the crystal change is linear, then it can be compensate easily by a linear formula.
 
That is probably a lot of lab equipment require certain lab temperature range, unless the equipment is designed for field use - because field temperature is not a constant.
In my early days of precision time and frequency standards, we always built the oscillators to run at elevated temperatures, and put them in tiny little ovens inside the equipment. They would run at around 50 deg C and had temperature sensors so they would hold that temperature within a fraction of a degree, and we had amazingly accurate and stable references. Time and frequency references within 0.05 PPM.

If the crystal change is linear, then it can be compensate easily by a linear formula.
To an extent, yes. I somehow doubt it'll be completely linear, and 2nd or 3rd order polynomial correction with integer maths just isn't going to happen :)
 
OK, we're a few hours into Saturday.... not conclusive yet, but more time will confirm.

Here was after I did nothing but added two temperature sensors. One is stuck to the webcontrol board in the blank area where the RS232 stuff used to be, and one is with the fluxgate magnetometer core.

The large step-change in magnetometer output is either because I have put a tool down somewhere where it wasn't before (could be anywhere within several feet), or I've bumped something, or the stainless steel cases of the temperature sensors are not perfect and are influencing the magnetic field very slightly.

mag1a.gif


So I've re-centrered the graph and here is the mag output (basically the lowest frequency measured over 5 seconds, then plotting the lowest low and highest low seen each 5 minutes.... and immediately under it, the temperature of the WC board and mag core:

mag2a.gif


mag2b.gif


Who is the manufacturer, and what is their part number for the SMD 25MHz crystal you're using?
A quick check shows a wide range available, but without knowing the cut, I can't work out what its temperature characteristics might be. (Eg, a fork-cut crystal is usually right on frequency at 20C, but goes down as temperature goes either up OR down, others are linear, some are sine.... depends on purpose)
 
Ross,
We will make some logic change and send you a free eval board to see if this new logic change would help you or not.

Guys, the new board turned up yesterday morning thanks. It has "BAD" written on it in black felt marker - should I be concerned?

Anyhow, I powered it up, loaded my code, set its various parameters (timezone, network settings, temperature sensors) and set it off.
The change in frequency stability is quite dramatic.... here is the before and after (same vertical scale):
webcontrol-fgm.gif


The red and blue are the maximum and minimum in each 5-minute period, the green is the average. As you can see, FAR less jitter.

The temperature however is now all over the place. Channel 1 seems ok, channel 2 reads ok for a few samples, then reads 85.0 C, then returns to the correct temperature again. Same sensors as before. Is this the problem with the board, or has something else changed?

Can you tell me exactly what you've done to the frequency reading code to make this improvement, so I can better understand exactly what my instrument is telling me?

Thanks guys, looks like we might be heading on the right track though!
 
We changed logic to read the CPU register for clock information, instead of using timer value from software variables.
他he CPU register value does not make any sense from outside the firmware, since we have to disable interrupt to do that, so that we can not provide that to the users in PLC.

The board is fine. The marker just means not for resale.

You may want to adjust TDSO in general tab to see if your 1-wire timing need to be fine tuned.
 
Curious how the min readings on the red and the max readings on the blue correspond to what appears to be the true readings.

Yes, quite. When I put my frequency meter on the sensor itself, I see less than 1Hz noise, which is why the hundreds of Hz variation I was seeing with the WC board made it look like I was in a total writeoff situation.

The new board is still seeing >20Hz jitter, even with some pretty savage averaging, but I'm hopeful we can get something useful out of it. I don't want to have to build a precision counter and input the LSB to the WC board to handle it... that'd be very ugly.
 
Back
Top