the open source idea is interpreted one-sidedly by some people!
Short cables (2x solid core cable) for self-adjustment do work.
Long and thin wires with high internal resistance as well as wires that introduce significant additional capacitance and inductance must not be used with this device!
Please post the values displayed during the self-adjustment.
Limits:
- probe resistance < 1.50 Ohms for two probes in series
- probe capacitance < 100 pF
- IO pin's internal resistance in low mode (RiL) < 25 Ohms
- IO pin's internal resistance in high mode (RiH) < 29 Ohms
avr-gcc v. 12.1.0
Program: 35988 bytes (109.8% Full)
Data: 269 bytes (13.1% Full)
EEPROM: 22 bytes (2.1% Full)
avr-gcc v. 11.1.0:
Program: 35252 bytes (107.6% Full)
Data: 269 bytes (13.1% Full)
EEPROM: 22 bytes (2.1% Full)
avr-gcc v. 10.1.0
Program: 35196 bytes (107.4% Full)
Data: 251 bytes (12.3% Full)
EEPROM: 22 bytes (2.1% Full)
avr-gcc v. 9.2.0
Program: 35190 bytes (107.4% Full)
Data: 251 bytes (12.3% Full)
EEPROM: 22 bytes (2.1% Full)
avr-gcc v. 9.1.0
Program: 35190 bytes (107.4% Full)
Data: 251 bytes (12.3% Full)
EEPROM: 22 bytes (2.1% Full)
avr-gcc v. 8.3.0
Program: 32546 bytes (99.3% Full)
Data: 251 bytes (12.3% Full)
EEPROM: 22 bytes (2.1% Full)
avr-gcc v. 8.2.0
Program: 32536 bytes (99.3% Full)
Data: 251 bytes (12.3% Full)
EEPROM: 22 bytes (2.1% Full)
avr-gcc v. 8.1.0
Program: 32536 bytes (99.3% Full)
Data: 251 bytes (12.3% Full)
EEPROM: 22 bytes (2.1% Full)
avr-gcc v. 7.3.0 (Arduino-Version)
Program: 32612 bytes (99.5% Full)
Data: 251 bytes (12.3% Full)
EEPROM: 22 bytes (2.1% Full)
avr-gcc v. 5.4.0 (Debian-Stable-Version)
Program: 32742 bytes (99.9% Full)
Data: 251 bytes (12.3% Full)
EEPROM: 22 bytes (2.1% Full)
avr-gcc v. 8.3.0 (my default)
Program: 31770 bytes (97.0% Full)
Data: 244 bytes (11.9% Full)
EEPROM: 22 bytes (2.1% Full)
avr-gcc v. 7.3.0 (Arduino-Version)
Program: 31810 bytes (97.1% Full)
Data: 244 bytes (11.9% Full)
EEPROM: 22 bytes (2.1% Full)
avr-gcc v. 5.4.0 (Debian-Stable-Version)
Program: 32096 bytes (97.9% Full)
Data: 244 bytes (11.9% Full)
EEPROM: 22 bytes (2.1% Full)
1) When i measure 680Ohm (0.1%) i get (quite stable) 677.5Ohm no matter how its adjusted or with/without cables. 470k (0.1%) shows 469.5k that should be ok i guess.
Can i shift the RL value? There is 'RH_OFFSET' in config.h but no 'RL_OFFSET'.
2) I have a 470uF 63V cap. When testing in normal mode it shows 471uF 0.38Ohm. In 'C-Monitor' it shows 453uF with a slightly higher ESR. Do they have different testing methods?
Same probes. ZIF socket shows same behavior. Tried different power supplies and different caps.
If you want to create your own firmware version, choosing the right compiler version can noticeably reduce the code size.
...
Does that happen only for electrolytic caps?
I recently did a comparison of different avr-gcc versions. I took all the versions available for Linux (Debian stable) and compiled a 1.50m (with an identical setup for my AY-AT with 20 MHz xtal).
madires,hm... but then we should see exactly the same effect on a k-firmware clone if we measure the same capacitance first on pins 1-2 and then on pins 1-3, on which the monitor mode is automatically turned on? But I do not observe such an effect, or am I wrong? This effect does not bother me much, since I know that electrolytic capacitors can have a large deviation from the nominal capacity. But it was just interesting to understand why.
The self adjustment doesn't seem to work. After shorting the probes, it calculates Ri+-, etc., and on next click gives an error.
Any ideas?
Could you post the assembly output from the 8.3 and 12.1 compilers? I would be interested in comparing the two.
See this link for generating an assembly listing interleaved with source:
https://stackoverflow.com/a/1289907
0000338a <MeasureESR>:
338a: a4 e0 ldi r26, 0x04 ; 4
338c: b0 e0 ldi r27, 0x00 ; 0
338e: eb ec ldi r30, 0xCB ; 203
3390: f9 e1 ldi r31, 0x19 ; 25
3392: 0c 94 d6 3e jmp 0x7dac ; 0x7dac <__prologue_saves__>
3396: 9c 83 std Y+4, r25 ; 0x04
3398: 8b 83 std Y+3, r24 ; 0x03
339a: 89 2b or r24, r25
339c: 51 f4 brne .+20 ; 0x33b2 <MeasureESR+0x28>
339e: 2f ef ldi r18, 0xFF ; 255
33a0: 3f ef ldi r19, 0xFF ; 255
33a2: 3c 83 std Y+4, r19 ; 0x04
33a4: 2b 83 std Y+3, r18 ; 0x03
33a6: 8b 81 ldd r24, Y+3 ; 0x03
33a8: 9c 81 ldd r25, Y+4 ; 0x04
33aa: 24 96 adiw r28, 0x04 ; 4
33ac: e2 e1 ldi r30, 0x12 ; 18
33ae: 0c 94 f2 3e jmp 0x7de4 ; 0x7de4 <__epilogue_restores__>
33b2: eb 81 ldd r30, Y+3 ; 0x03
33b4: fc 81 ldd r31, Y+4 ; 0x04
33b6: 63 81 ldd r22, Z+3 ; 0x03
33b8: 74 81 ldd r23, Z+4 ; 0x04
33ba: 85 81 ldd r24, Z+5 ; 0x05
33bc: 96 81 ldd r25, Z+6 ; 0x06
33be: a7 ef ldi r26, 0xF7 ; 247
33c0: ea 2e mov r14, r26
33c2: 0a e0 ldi r16, 0x0A ; 10
33c4: 10 e0 ldi r17, 0x00 ; 0
33c6: 20 e0 ldi r18, 0x00 ; 0
33c8: 30 e0 ldi r19, 0x00 ; 0
33ca: 42 81 ldd r20, Z+2 ; 0x02
33cc: 0e 94 a5 11 call 0x234a ; 0x234a <CmpValue>
33d0: 87 fd sbrc r24, 7
33d2: e5 cf rjmp .-54 ; 0x339e <MeasureESR+0x14>
33d4: 0e 94 f4 13 call 0x27e8 ; 0x27e8 <DischargeProbes>
33d8: 80 91 91 01 lds r24, 0x0191 ; 0x800191 <Check>
33dc: 81 30 cpi r24, 0x01 ; 1
33de: f9 f2 breq .-66 ; 0x339e <MeasureESR+0x14>
33e0: eb 81 ldd r30, Y+3 ; 0x03
33e2: fc 81 ldd r31, Y+4 ; 0x04
33e4: 11 81 ldd r17, Z+1 ; 0x01
33e6: 00 81 ld r16, Z
33e8: 17 b8 out 0x07, r1 ; 7
33ea: 18 b8 out 0x08, r1 ; 8
33ec: 14 b8 out 0x04, r1 ; 4
33ee: 15 b8 out 0x05, r1 ; 5
33f0: 40 e0 ldi r20, 0x00 ; 0
33f2: 61 2f mov r22, r17
33f4: 80 2f mov r24, r16
33f6: 0e 94 b4 10 call 0x2168 ; 0x2168 <UpdateProbes>
00004614 <MeasureESR>:
* - ESR in 0.01 Ohm
* - UINT16_MAX on any problem
*/
uint16_t MeasureESR(Capacitor_Type *Cap)
{
4614: a7 e0 ldi r26, 0x07 ; 7
4616: b0 e0 ldi r27, 0x00 ; 0
4618: e0 e1 ldi r30, 0x10 ; 16
461a: f3 e2 ldi r31, 0x23 ; 35
461c: 0c 94 a4 44 jmp 0x8948 ; 0x8948 <__prologue_saves__>
00004620 <.L1^B33>:
4620: 8e 83 std Y+6, r24 ; 0x06
4622: 9f 83 std Y+7, r25 ; 0x07
00004624 <.LVL1075>:
uint32_t Sum_1; /* sum #1 */
uint32_t Sum_2; /* sum #2 */
uint32_t Value;
/* check for a capacitor >= 10nF */
if ((Cap == NULL) ||
4624: 2e 81 ldd r18, Y+6 ; 0x06
4626: 3f 81 ldd r19, Y+7 ; 0x07
4628: 23 2b or r18, r19
462a: 51 f4 brne .+20 ; 0x4640 <.L605>
0000462c <.L607>:
(CmpValue(Cap->Value, Cap->Scale, 10, -9) < 0)) return ESR;
462c: 6f ef ldi r22, 0xFF ; 255
462e: 7f ef ldi r23, 0xFF ; 255
4630: 7a 83 std Y+2, r23 ; 0x02
4632: 69 83 std Y+1, r22 ; 0x01
00004634 <.L604>:
Cfg.Ref = ADC_REF_BANDGAP; /* we've used the bandgap reference */
DischargeProbes(); /* discharge DUT */
return ESR;
}
4634: 89 81 ldd r24, Y+1 ; 0x01
4636: 9a 81 ldd r25, Y+2 ; 0x02
4638: 27 96 adiw r28, 0x07 ; 7
463a: e2 e1 ldi r30, 0x12 ; 18
463c: 0c 94 c0 44 jmp 0x8980 ; 0x8980 <__epilogue_restores__>
LDFLAGS += -Wl,--relax
avr-gcc (GCC) 8.5.0
AVR Memory Usage
----------------
Device: atmega328
Program: 32920 bytes (100.5% Full)
(.text + .data + .bootloader)
Data: 265 bytes (12.9% Full)
(.data + .bss + .noinit)
EEPROM: 884 bytes (86.3% Full)
(.eeprom)
avr-gcc (GCC) 8.5.0
CFLAGS += -flto
AVR Memory Usage
----------------
Device: atmega328
Program: 32342 bytes (98.7% Full)
(.text + .data + .bootloader)
Data: 263 bytes (12.8% Full)
(.data + .bss + .noinit)
EEPROM: 884 bytes (86.3% Full)
(.eeprom)
avr-gcc (GCC) 13.2.0
AVR Memory Usage
----------------
Device: atmega328
Program: 28926 bytes (88.3% Full)
(.text + .data + .bootloader)
Data: 261 bytes (12.7% Full)
(.data + .bss + .noinit)
EEPROM: 756 bytes (73.8% Full)
(.eeprom)
avr-gcc (GCC) 13.2.0
CFLAGS += -flto
AVR Memory Usage
----------------
Device: atmega328
Program: 28044 bytes (85.6% Full)
(.text + .data + .bootloader)
Data: 260 bytes (12.7% Full)
(.data + .bss + .noinit)
EEPROM: 756 bytes (73.8% Full)
(.eeprom)
The self adjustment doesn't seem to work. After shorting the probes, it calculates Ri+-, etc., and on next click gives an error.
Please post the values displayed during the self-adjustment.