Sorry for my lasy ass (i didnt read all tread), but tel me please whats the difference between this project vs original old german project vs china clones?
Since a relay handles more current than a CMOS switch it's better to use the relay. The residual voltage you've mentioned is caused by an effect called "dielectric absorption" (https://en.wikipedia.org/wiki/Dielectric_absorption ), and for an electrolytic cap it can be 10-15% of the original voltage. Input protection was an afterthought for caps and resulted in the two simple circuit options which have some drawbacks. A proper input protection would require a complete redesign which would make the tester more complex and expensive. I'm a friend of discharging caps via a resistor before checking them with the tester.
Edit: I inserted a BC237B and now it comes on when I press and release the rotary encoder but it ignores whatever components I connect and goes straight to a screen where it flashes "Vext=0mV". It then stays there without switching off and doesn't not respond to the rotary encoder. Should I try another transistor?
Maybe a problem with the rotary encoder?
The rotary encoder seems very difficult to remove even when trying with an SMD rework hot air gun. Is it possible to test it in-circuit or does it need to be removed?
Any voltage higher than Vcc plus Vf of the pin's clamping diode can cause damage based on the current flowing. A low current is handled by the clamping diode (IIRC, 1mA for ATmega) but a larger current will damage the clamping diode, the I/O pin or even more. The protection relay and the TVS array are meant to take the larger part of the current of a charged cap.
TVS, is this the SRV05-4 and P6KE6V8A that is in Figure 2.2b?
A question about reusing pins: RC4 is currently connected to a 2.5V voltage reference, and RC5 measures battery voltage via a 1:4 voltage divider, if I also want to use PC4 and PC5 for I2C_SDA and I2C_SCL respectively, would it be possible? And similarly for PD2 and PD3 which I am currently using it as LCD_SCLK and LCD_D/C respectively but I would like to dual use as KEY_INC and KEY_DEC but what modification do I need to make to the circuit?
I noticed that Markus' version can support up to 20MHz. I am trying to decide whether I should unsolder 8MHz crystal and solder a 20MHz crystal in its place. What is the benefit of having MCU clock running at 20MHz vs 8MHz? Higher frequency generation and measurement. I think both are currently limited at 1/4 MCU clock. Faster PWM which is currently 1/1024 clock MCU. But more power would be used, although probably only a small fraction of ~50mA it's currently using, am I right? Would it measure components faster? What elese?
A question about reusing pins: RC4 is currently connected to a 2.5V voltage reference, and RC5 measures battery voltage via a 1:4 voltage divider, if I also want to use PC4 and PC5 for I2C_SDA and I2C_SCL respectively, would it be possible? And similarly for PD2 and PD3 which I am currently using it as LCD_SCLK and LCD_D/C respectively but I would like to dual use as KEY_INC and KEY_DEC but what modification do I need to make to the circuit?
If you disable the battery monitoring (BAT_NONE), the external voltage reference and the protection relay (both are disabled by default) you can free up PC4 and PC5 for I2C. The increase/decrease push buttons are wired the same way like the rotary encoder (see Karl-Heinz' documentation for the rotary encoder).
#define TP_REF PC4 /* test pin with 2.5V reference and relay */
#define TP_BAT PC5 /* test pin with 4:1 voltage divider */
to#define TP_REF AREF /* test pin with 2.5V reference and relay */
#define TP_BAT ADC6 /* test pin with 4:1 voltage divider */
I haven't make up my mind about using relay or not. I would probably have to keep 2.5V reference voltage at PC4 if I want to use relay since ADC6, 7, and AREF are all input only.5V--10K--|
PD--1K---|--<10K--LCD
|--PUSH_BUTTON--GND
PCD8544 's LCD_Data() calls SPI's SPI_Write_Byte() (bitbang version). And in there it sends data to LCD by callingSPI_PORT |= (1 << SPI_MOSI);
SPI_PORT &= ~(1 << SPI_MOSI);
which sets PD to either 5V or GND. LCD would see 5V when PD=1 and 0.4V when PD=0, so I think above circuit would work. But what about the problems I discussed earlier: Sharing I/O pins between display and rotary encoder usually requires the display's /CS to prevent the display to interpret input from the rotary encoder as data. By selecting the shared lines carefully it can work with a fixed /CS tied to ground. When the firmware reads the rotary encoder it changes the I/O pins from output mode (for the display) to input mode, and back again afterwards. The SPI bus is only active when data is sent to the display.
avrdude -CC:\Users\Demo\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM4 -b115200 -Uflash:w:ComponentTester.hex:i -U eeprom:w:ComponentTester.eep:i
avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
Copyright (c) 2000-2005 Brian Dean, [url]http://www.bdmicro.com/[/url]
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Demo\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf"
Using Port : COM4
Using Programmer : stk500v1
Overriding Baud Rate : 115200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.03s
avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as FD
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "ComponentTester.hex"
avrdude: writing flash (27730 bytes):
Writing | ################################################## | 100% 18.20s
avrdude: 27730 bytes of flash written
avrdude: verifying flash memory against ComponentTester.hex:
avrdude: load data flash data from input file ComponentTester.hex:
avrdude: input file ComponentTester.hex contains 27730 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 9.34s
avrdude: verifying ...
avrdude: 27730 bytes of flash verified
avrdude: reading input file "ComponentTester.eep"
avrdude: writing eeprom (760 bytes):
Writing | ################################################## | 100% 36.24s
avrdude: 760 bytes of eeprom written
avrdude: verifying eeprom memory against ComponentTester.eep:
avrdude: load data eeprom data from input file ComponentTester.eep:
avrdude: input file ComponentTester.eep contains 760 bytes
avrdude: reading on-chip eeprom data:
Reading | ################################################## | 100% 2.07s
avrdude: verifying ...
avrdude: 760 bytes of eeprom verified
avrdude: safemode: hfuse reads as D9
avrdude: safemode: efuse reads as FD
avrdude: safemode: Fuses OK (E:FD, H:D9, L:F7)
avrdude done. Thank you.
Is P6KE6V8A needed because..? Don't know, I originally thought maybe it has a lower clamp voltage, but it seems the clamp voltage is still higher than 5V. Why is P6KE6V8A and the 100nF capacitor needed? Wouldn't the thyrector in SRV05 work just as well? I can't find any relay with 3 throws or poles (forgot which) but I did find a relay with 2 ??. So maybe I use it on TP1 and TP3 and leave TP2 without protection.
I've noticed that fuses are not set unless you set them separately. I thought Makefile would calculate them and do that, but no. Bug or a feature?
I've noticed that fuses are not set unless you set them separately. I thought Makefile would calculate them and do that, but no. Bug or a feature?
In most cases the fuses have to be set just once (brand new ATmega). I don't see any benefit in setting the fuses to the same values again and again when programming a new firmware.
Btw: v0.3.0: https://github.com/atar-axis/tc1-u4/releases
What I meant to say is: adjusting the values in appropriate files, then compiling, then uploading does NOT set the fuses to required values posted elsewhere in this thread (even with the checkbox "set fuses" checked). I had to set them manually after programming. Thinking about it now, it could be Avrdudess problem?
I'm no command line fan, so I use "AVRDUDESS", a GUI addon for AVRDUDE.