Closed nkrackow closed 8 months ago
@nkrackow do keep an eye on https://github.com/sinara-hw/Thermostat/issues/46 and compare
Note to self: two channels: the noise bandwidth is 500 Hz
There is a slight, likely thermal effect of the TEC output back to the adc channels. Same settings as with "10K ref data", 3A TEC current when enabled. TEC output channel 3 traces seems to be the closest to all of the adc inputs on the layout. You can roughly make out in the data where the TEC output was turned on/off and the timeconstants after the changes. The TEC driver heated up to about 85 °C without a cooling fan. Note that the timescales here are not the same and shorter than in the earlier plots. The spectrum looks exactly the same as above (without TEC output) when the TEC output is driven.
Deviation: 13.6 LSB
Deviation: 6.7 LSB
Deviation: 10.7 LSB
How large is it?
How large is it? I annotated it in the comment.
The following data was taken under the same conditions again. At three times I heated up some part of the boards with a hot air station.The times of disturbance are annotated and the corresponding thermal image and maximum deviation is shown below. DIfference is with respect to the start of the time series.
Max. deviation: 350 LSB
Max. deviation: -80 LSB
ambient (before disturbance): heated: Max. deviation: 570 LSB
By far the biggest disturbance I noticed is by aspirating onto the bottom of the headboard such that a little moisture condensates on the board. It is visible as tiny droplets (usual condensation) but those were difficult to photograph. The board temperature only changes by about 2 °C.
I have aspirated only about the first 15% of the disturbance in the data. Then the deviations stays roughly constant until it rapidly goes back to the initial value. This is consistent with visibility of condensation on the board.
Max. deviation: 3440 LSB, about 0.02 °C
I could see the effect on a 6.5 digit multimeter measuring the resistance. The 5K SMD reference resistors changed by about 2 ohm, the 10K ref connected where the NTC would normally be changed by about 5 ohm when aspirating onto the bottom of the headboard.
For the frequency response and group delay measurements the temperature conversion step was substituted by just a constant conversion coefficient so that the input-output relation is linear over the full scale. All the other processing like IIR and current to dac_code conversion are still present. The group delay should therefore not be significantly effected since much of it is in the ADC/DAC.
The following frequency magnitude responses measurements were done with a 2 V peak to peak, 2.5 V offset stimulation between the positive differential ADC input and the negative reference. The negative ADC input is still pulled to the negative reference by a 5K reference resistor on the headboard. The output was taken over a 1 ohm load resistor connected at the TEC output for the analog discovery measurements. For HP89410A the output was taken from the high output side of the load resistor to ground. The IIR only had the first b coefficient ("proportional gain") set to a value such that the output is between about 0.3 and 0.8 A. First input channel (ADC0 ch 0) and first output channel were used.
First plot is from HP89410A with 100x averaging, second from an Analog Discovery. The ADC first order CIC response (with 1007 Hz effective rate) can clearly be seen. Since only half the samples go to each ADC channel, the nyquist rate for one channel is about 250 Hz. In the analog discovery plot (wich is not averaged) you can see some beating effects around the nyquist rate.
Group delay is about 3.2 ms.
The driver switching frequency can be seen at bout 580 kHz.
Output time constant is about 210 us. The 1000 kHz lowpass installed between DAC and TEC driver should have about 160 us.
The analog discovery has a differential input with floating shield? Ans why is the second lobe now -23 dB? Is that understood from the filter/decimation chains? Some quantitative numbers would be useful. It's ok if they have a errorbar (then estimate that errorbar).
The analog discovery has a differential input with floating shield?
Differental yes, floating no. You can measure up to 50 V wrt. ground differentially.
Ans why is the second lobe now -23 dB? Is that understood from the filter/decimation chains?
I think it was the same yesterday. Also the one plot is from yesterday and there it is about that too.
Some quantitative numbers would be useful. It's ok if they have a errorbar (then estimate that errorbar).
- TEC current thermal crosstalk magnitude (LSB/K)
The main thermal crosstalk points are the ADCs and the reference resistors on the headboard. The crosstalk magnitude of the reference resistors is about 5.7 LSB/K, the crosstalk at the ADCs about 3.5 LSB/K. This corresponds to 0.34 ppm/K and 0.2 ppm/K respectively. The reference resistors and ADCs are both specified at 0.2 ppm/K. The higher measured value can potentially be attributed to thermocouple effects since the areas were quickly heated in a local area. 1 LSB corresponds to 5.3 uK at 25°C.
- TEC current direct crosstalk (or upper limit if not detected)
The worst case direct crosstalk from output current to adc input is about 4.5 LSB/A. This was the output channel with the driver chip closest to the adc input traces. Not all channel combinations were tested exhaustively. Note that the crosstalk effect is thermal as you can see by the long timeconstants.
- output ripple (A pk-pk worst case)
- output 580 kHz amplitude (A pk-pk worst case)
About 200 uApp right at this frequency. Too small to see in the time domain. The y scale in the spectrum is in absolute V peak to peak (with a 1 ohm load). The worst case pk-pk switching ripple should therefore be below 0.5 mApp.
- a reasonable magnitude of the tempco of the board (LSB/K)
This is not easy to say since I have not heated the board uniformly. Effects at various points might compound or potentially cancel out. I would say as a rough estimate it should be below 20 LSB/K.
- Common mode voltage ripple (or upper limit)
TODO
Cool!
The following modifications to the code were made for the CMRR measurements:
For the differential response a -50 mV offset, 10 mV amplitude stimulus was used applied like in the freq. response before.
For the common mode response the input was shorted with a thick solid wire. It looks like very good contact was made and the expected difference to a 0.22 ohm resistor inserted at the same place could be verified. The stimulus to this shorted ADC input was 2 V offset, 1 V amplitude. The -100 dB around 10 Hz is consistent with the ADC datasheet. I'm not sure where the first order high pass response comes from.
Currently doing a longer series from 1 Hz to 100 kHz.
If you expect the ripple to be at 500 kHz, shouldn't you choose a horizontal scale in the ~µs/div range instead of ms/div? But you may be able to say that the DM current ripple is < 1 mA.
RC mismatch maybe? how large would the capacitance or resistance mismatch need to be? Oh. And your stimulus may also be affecting/driving the REF+ channel (finite impedance). Maybe try removing the broken 5k ref resistor and using just that channel (should not need to touch anything else).
If you expect the ripple to be at 500 kHz, shouldn't you choose a horizontal scale in the ~µs/div range instead of ms/div?
That was just the timescale where the most noise was apparent. As stated above, the 570 kHz aren't visible in the time domain.
RC mismatch maybe? how large would the capacitance or resistance mismatch need to be? Oh. And your stimulus may also be affecting/driving the REF+ channel (finite impedance). Maybe try removing the broken 5k ref resistor and using just that channel (should not need to touch anything else).
Good point, currently trying that.
But -90 dB at 50 Hz also sounds good.
This is on the input channel with the broken 5K that i just removed. The other difference is that I changed the offset in the ADC sucht that I could apply +10 mV offset to the differential stimulus, still 10 mV amplitude.
Now it's even a bit better but still some highpass dynamic going on. Maybe even more gain in the IIR would help to see more but one measurement takes about 20 min..
Ah. You used the same stimulus and same IIR gain for both measurements? There is no need for that. In your figure you are limited by your measurement noise for CM < 10 Hz and both CM and DM > 1 kHz. The data doesn't say much in those regions. Why not large stimulus (~V) in both cases, and setting the IIR gain so that you get maximum signal (at the DAC) in each case? Then just correct the transfer functions for the difference in gain. I presume this is still using the DAC and the Analog Disco board or are you just using the ADC samples and RTT?
Anyway. This is good enough already. Nothing to worry about. You can stop now ;)
Ah. You used the same stimulus and same IIR gain for both measurements?
No, like in the first CMRR measurements 2 V offset 1 V amplitude for common mode stimulus. Just the differential stimulus changed to 10 mV offset, 10 mV amplitude. Changing the IIR coefficient would require calculating that back out. But now that I exported the data and used python it would have been easy too, yeah.
I presume this is still using the DAC and the Analog Disco board or are you just using the ADC samples and RTT?
Yes, DAC and sampling the voltage over the load resistor.
Increasing the IIR coefficient for CMRR is what raises the CM signal out of the output stage quantization, ripple, and measurement noise. Just give it 40-80 dB more gain than DM. And why was the DM amplitude only 10 mV? Don't you want large amplitude there as well to not be limited?
And why was the DM amplitude only 10 mV?
Because that already makes about 0.5 A peak to peak output. I guess I could have increased it by a factor of six but then I'd have to hit exactly mid scale with the offset and that's not much in dB..
Doing one more set with 40 dB more gain for CM now.
For DM the gain should be low. Otherwise with low stimulus you'll be limited by the noise of your stimulus.
For DM the gain should be low. Otherwise with low stimulus you'll be limited by the noise of your stimulus.
Yeah, again, I initially didn't want to calculate the gain back out and that's why I did it with the same gain.
Here it is with 60 dB additional gain for CM: I subtracted the 60 dB for the Difference (CMRR). Looks very similar to me.
Shows 50 dB more cmrr above 10 kHz. Bow you are only limited by SNR for DM. Anyway. Goot enough. Let's move on.
Not sure about the meaningfulness of the data above 2-3 kHz. Even with less gain for DM I'd still have to counter the ADC filter roll-off. I guess you might see the high-pass trend continue to a bit higher up then.
Exactly. That's what you want to see, not the noise floor of your Stimulus.
@nkrackow it would be great to summarize the measurements in numbers in the style of a datasheet where possible. AFAICT a couple take home messages already:
nothing to be done here