-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathClones
439 lines (387 loc) · 21.5 KB
/
Clones
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
------------------------------------------------------------------------------
Collection of settings for various tester models
------------------------------------------------------------------------------
DIY Kit "AY-AT"
- ATmega328
- ST7735 color LCD module (bit-bang SPI)
- rotary encoder (PD1 & PD3, in parallel with display)
- external 2.5V voltage reference (TL431)
- basic frequency counter with dedicated input (PD4)
- measurement of external voltage up to 45V (PC3)
- settings provided by flywheelz@EEVBlog
Hardware Options:
#define HW_ENCODER
#define ENCODER_PULSES 4 /* usually 4 pulses per step */
#define ENCODER_STEPS 20 /* usually 20 detents */
#define HW_REF25
#define HW_ZENER
#define HW_FREQ_COUNTER_BASIC
LCD module:
#define LCD_ST7735
#define LCD_GRAPHIC /* graphic display */
#define LCD_COLOR /* color display */
#define LCD_SPI /* SPI interface */
#define LCD_PORT PORTD /* port data register */
#define LCD_DDR DDRD /* port data direction register */
#define LCD_RES PD0 /* port pin used for /RESX */
#define LCD_CS PD5 /* port pin used for /CSX (optional) */
#define LCD_DC PD1 /* port pin used for D/CX */
#define LCD_SCL PD2 /* port pin used for SCL */
#define LCD_SDA PD3 /* port pin used for SDA */
#define LCD_DOTS_X 128 /* number of horizontal dots */
#define LCD_DOTS_Y 160 /* number of vertical dots */
#define LCD_FLIP_X /* enable horizontal flip */
//#define LCD_FLIP_Y /* enable vertical flip */
#define LCD_ROTATE /* switch X and Y (rotate by 90°) */
//#define LCD_OFFSET_X 4 /* enable x offset of 2 or 4 dots */
//#define LCD_OFFSET_Y 2 /* enable y offset of 1 or 2 dots */
//#define LCD_LATE_ON /* turn on LCD after clearing it */
#define FONT_10X16_HF /* 10x16 font, horizontally aligned & flipped */
#define SYMBOLS_24X24_HF /* 24x24 symbols, horizontally aligned & flipped */
#define SPI_BITBANG /* bit-bang SPI */
#define SPI_PORT LCD_PORT /* SPI port data register */
#define SPI_DDR LCD_DDR /* SPI port data direction register */
#define SPI_SCK LCD_SCL /* port pin used for SCK */
#define SPI_MOSI LCD_SDA /* port pin used for MOSI */
If you prefer that the tester starts with a cleared display uncomment LCD_LATE_ON.
Rotary Encoder:
#define ENCODER_PORT PORTD /* port data register */
#define ENCODER_DDR DDRD /* port data direction register */
#define ENCODER_PIN PIND /* port input pins register */
#define ENCODER_A PD1 /* rotary encoder A signal */
#define ENCODER_B PD3 /* rotary encoder B signal */
Input for the frequency counter is PD4 (T0).
Inductance compensation offsets for 20MHz model
- provided by indman@EEVBlog
- edit the section for high current mode in function MeasureInductor()
in inductor.c
#if CPU_FREQ == 20000000
/* 20 MHz */
if (Temp < 1500) /* < 1.5µs / < 100µH */
{
Offset = -10;
}
else if (Temp < 5000) /* 1.5-5µs / 100-330µH */
{
Offset = -10;
}
else /* > 5µs / > 330µH */
{
Offset = -30;
}
#endif
------------------------------------------------------------------------------
M12864 DIY Transistor Tester
- ATmega328
- ST7565 display (bit-bang SPI)
- rotary encoder (PD1 & PD3, in parallel with display)
- external 2.5V voltage reference (TL431)
Hardware Options:
#define HW_ENCODER
#define ENCODER_PULSES 4 /* not confirmed yet, could be also 2 */
#define ENCODER_STEPS 24 /* not confirmed yet */
#define HW_REF25
LCD module:
#define LCD_ST7565R
#define LCD_GRAPHIC /* graphic display */
#define LCD_SPI /* SPI interface */
#define LCD_PORT PORTD /* port data register */
#define LCD_DDR DDRD /* port data direction register */
#define LCD_RESET PD0 /* port pin used for /RES */
#define LCD_A0 PD1 /* port pin used for A0 */
#define LCD_SCL PD2 /* port pin used for SCL */
#define LCD_SI PD3 /* port pin used for SI (LCD's data input) */
#define LCD_DOTS_X 128 /* number of horizontal dots */
#define LCD_DOTS_Y 64 /* number of vertical dots */
//#define LCD_OFFSET_X /* enable x offset of 4 dots */
#define LCD_FLIP_Y /* enable vertical flip */
#define LCD_START_Y 0 /* start line (0-63) */
#define LCD_CONTRAST 11 /* default contrast (0-63) */
#define FONT_8X8_VF /* 8x8 font, vertically aligned & flipped */
#define SYMBOLS_24X24_VFP /* 24x24 symbols, vertically aligned & flipped */
#define SPI_BITBANG /* bit-bang SPI */
#define SPI_PORT LCD_PORT /* SPI port data register */
#define SPI_DDR LCD_DDR /* SPI port data direction register */
#define SPI_SCK LCD_SCL /* port pin used for SCK */
#define SPI_MOSI LCD_SI /* port pin used for MOSI */
Rotary Encoder:
#define ENCODER_PORT PORTD /* port data register */
#define ENCODER_DDR DDRD /* port data direction register */
#define ENCODER_PIN PIND /* port input pins register */
#define ENCODER_A PD1 /* rotary encoder A signal */
#define ENCODER_B PD3 /* rotary encoder B signal */
------------------------------------------------------------------------------
T3/T4
- ATmega328, 8MHz clock
- ST7565 display (bit-bang SPI)
- settings provided by tom666@EEVblog
LCD module:
#define LCD_ST7565R
#define LCD_GRAPHIC /* graphic display */
#define LCD_SPI /* SPI interface */
#define LCD_PORT PORTD /* port data register */
#define LCD_DDR DDRD /* port data direction register */
#define LCD_RESET PD4 /* port pin used for /RES */
#define LCD_A0 PD3 /* port pin used for A0 */
#define LCD_SCL PD2 /* port pin used for SCL */
#define LCD_SI PD1 /* port pin used for SI (LCD's data input) */
#define LCD_CS PD5 /* port pin used for /CS1 (optional) */
#define LCD_DOTS_X 128 /* number of horizontal dots */
#define LCD_DOTS_Y 64 /* number of vertical dots */
#define LCD_START_Y 0 /* start line (0-63) */
#define LCD_CONTRAST 11 /* default contrast (0-63) */
#define FONT_8X8_VF /* 8x8 font, vertically aligned & flipped */
#define SYMBOLS_24X24_VFP /* 24x24 symbols, vertically aligned & flipped */
#define SPI_BITBANG /* bit-bang SPI */
#define SPI_PORT LCD_PORT /* SPI port data register */
#define SPI_DDR LCD_DDR /* SPI port data direction register */
#define SPI_SCK LCD_SCL /* port pin used for SCK */
#define SPI_MOSI LCD_SI /* port pin used for MOSI */
------------------------------------------------------------------------------
GM328
- ATmega328, 8MHz clock
- ST7565 display (bit-bang SPI)
- settings provided by rddube@EEVblog
LCD module:
#define LCD_ST7565R
#define LCD_GRAPHIC /* graphic display */
#define LCD_SPI /* SPI interface */
#define LCD_PORT PORTD /* port data register */
#define LCD_DDR DDRD /* port data direction register */
#define LCD_RESET PD0 /* port pin used for /RES (optional) */
#define LCD_A0 PD1 /* port pin used for A0 */
#define LCD_SCL PD2 /* port pin used for SCL */
#define LCD_SI PD3 /* port pin used for SI (LCD's data input) */
#define LCD_CS PD5 /* port pin used for /CS1 (optional) */
#define LCD_DOTS_X 128 /* number of horizontal dots */
#define LCD_DOTS_Y 64 /* number of vertical dots */
#define LCD_START_Y 0 /* start line (0-63) */
#define LCD_CONTRAST 11 /* default contrast (0-63) */
#define FONT_8X8_VF /* 8x8 font, vertically aligned & flipped */
#define SYMBOLS_24X24_VFP /* 24x24 symbols, vertically aligned & flipped */
#define SPI_BITBANG /* bit-bang SPI */
#define SPI_PORT LCD_PORT /* SPI port data register */
#define SPI_DDR LCD_DDR /* SPI port data direction register */
#define SPI_SCK LCD_SCL /* port pin used for SCK */
#define SPI_MOSI LCD_SI /* port pin used for MOSI */
------------------------------------------------------------------------------
Fish8840 TFT
- ATmega328, 8MHz clock
- ST7565 display (bit-bang SPI)
- external 2.5V voltage reference (TL431)
- settings provided by indman@EEVBlog / [email protected]
LCD module:
#define LCD_ST7735
#define LCD_GRAPHIC /* graphic display */
#define LCD_COLOR /* color display */
#define LCD_SPI /* SPI interface */
#define LCD_PORT PORTD /* port data register */
#define LCD_DDR DDRD /* port data direction register */
#define LCD_RES PD3 /* port pin used for /RESX (optional) */
//#define LCD_CS PD5 /* port pin used for /CSX (optional) */
#define LCD_DC PD2 /* port pin used for D/CX */
#define LCD_SCL PD0 /* port pin used for SCL */
#define LCD_SDA PD1 /* port pin used for SDA */
#define LCD_DOTS_X 128 /* number of horizontal dots */
#define LCD_DOTS_Y 156 /* number of vertical dots */
#define LCD_FLIP_X /* enable horizontal flip */
//#define LCD_FLIP_Y /* enable vertical flip */
#define LCD_ROTATE /* switch X and Y (rotate by 90°) */
#define LCD_OFFSET_X /* enable x offset of 4 dots */
#define LCD_OFFSET_Y /* enable y offset of 2 dots */
#define LCD_LATE_ON /* turn on LCD after clearing it */
//#define FONT_10X16_HF /* 10x16 font, horizontally aligned & flipped */
#define FONT_8X16_CYRILLIC_HF /* 8x16 cyrillic font, horizontally aligned & flipped */
#define SYMBOLS_30X32_HF /* 30x32 symbols, horizontally aligned & flipped */
#define SPI_BITBANG /* bit-bang SPI */
#define SPI_PORT LCD_PORT /* SPI port data register */
#define SPI_DDR LCD_DDR /* SPI port data direction register */
#define SPI_SCK LCD_SCL /* port pin used for SCK */
#define SPI_MOSI LCD_SDA /* port pin used for MOSI */
------------------------------------------------------------------------------
Multifunction Tester TC-1
- ATmega324 (very poor pin assignment), 16MHz clock
later models may have an ATmega644
- ST7735 display (bit-bang SPI)
- external 2.5V voltage reference (TL431)
- fixed IR receiver module
- boost converter for Zener check
- fixed adjustment cap
- powered by Li-Ion cell 3.7V
- sample testers provided by jellytot@EEVblog and joystik@EEVblog
- initial information provided by indman@EEVblog
Hints:
- Control MCU U4 needs to be replaced with a simple control circuit (TC1-Mod,
see source repository for Hardware/Markus/TC1-Mod.kicad.tgz, 5µA standby
current in total) or reprogrammed with a modified firmware (see
https://github.com/atar-axis/tc1-u4).
- Set extended fuse byte to 0xfd (brown-out detection).
- If D2 (rectifier diode for Zener test voltage) gets hot replace it with a
Schottky diode rated for 80V reverse voltage or higher, e.g. SS18.
- Replace C11 and C12 (filter caps for Zener test voltage) with a 10 or 22µF
low-ESR electrolytic cap rated for 100V or higher because of the MLCC DC
bias capacitance derating issue.
- Based on the LCD module used you might have to set LCD_FLIP_X instead of
LCD_FLIP_Y.
- The TC-1 can't provide signal output (PWM/squarewave/etc.) on probe #2. Use
PD4 (OC1B) as dedicated signal output (add a resistor to limit current) and
enable HW_FIXED_SIGNAL_OUTPUT in config.h.
- If you like to add a rotary encoder or in/decrease buttons please use
PB5 (display's D/C) and PB6 (display's SDA).
- You can also get the frequency counter by using PB0 (T0) as input und adding
a simple input stage.
Hardware Options:
#define HW_REF25
#define HW_ZENER
#define HW_IR_RECEIVER
#define HW_ADJUST_CAP
Misc settings:
#define BAT_DIRECT
#define BAT_OFFSET 0
#define BAT_WEAK 3600
#define BAT_LOW 3400
LCD module:
#define LCD_ST7735
#define LCD_COLOR /* color graphic display */
#define LCD_SPI /* SPI interface */
#define LCD_PORT PORTB /* port data register */
#define LCD_DDR DDRB /* port data direction register */
#define LCD_RES PB4 /* port pin used for /RESX (optional) */
//#define LCD_CS PB? /* port pin used for /CSX (optional) */
#define LCD_DC PB5 /* port pin used for D/CX */
#define LCD_SCL PB7 /* port pin used for SCL */
#define LCD_SDA PB6 /* port pin used for SDA */
#define LCD_DOTS_X 128 /* number of horizontal dots */
#define LCD_DOTS_Y 160 /* number of vertical dots */
//#define LCD_FLIP_X /* enable horizontal flip */
#define LCD_FLIP_Y /* enable vertical flip */
#define LCD_ROTATE /* switch X and Y (rotate by 90°) */
#define LCD_LATE_ON /* turn on LCD after clearing it */
#define LCD_OFFSET_X 2 /* enable x offset of 2 or 4 dots */
#define LCD_OFFSET_Y 1 /* enable y offset of 1 or 2 dots */
#define FONT_10X16_HF /* 10x16 font, horizontally aligned & flipped */
//#define FONT_8X16_CYRILLIC_HF /* 8x16 cyrillic font, horizontally aligned & flipped */
#define SYMBOLS_30X32_HF /* 30x32 symbols, horizontally aligned & flipped */
#define SPI_BITBANG /* bit-bang SPI */
#define SPI_PORT LCD_PORT /* SPI port data register */
#define SPI_DDR LCD_DDR /* SPI port data direction register */
#define SPI_SCK LCD_SCL /* port pin used for SCK */
#define SPI_MOSI LCD_SDA /* port pin used for MOSI */
Pinout for test probes:
#define TP_ZENER PA4 /* test pin with 10:1 voltage divider */
#define TP_REF PA3 /* test pin with 2.5V reference */
#define TP_BAT PA5 /* test pin with 4:1 voltage divider */
#define TP_CAP PA7 /* test pin for self-adjustment cap */
Pinout for probe resistors:
#define R_PORT PORTC /* port data register */
#define R_DDR DDRC /* port data direction register */
#define R_RL_1 PC0 /* Rl (680R) for test pin #1 */
#define R_RH_1 PC1 /* Rh (470k) for test pin #1 */
#define R_RL_2 PC2 /* Rl (680R) for test pin #2 */
#define R_RH_2 PC3 /* Rh (470k) for test pin #2 */
#define R_RL_3 PC4 /* Rl (680R) for test pin #3 */
#define R_RH_3 PC5 /* Rh (470k) for test pin #3 */
Pinout for power control:
#define POWER_PORT PORTD /* port data register */
#define POWER_DDR DDRD /* port data direction register */
#define POWER_CTRL PD2 /* controls power (1: on / 0: off) */
Pinout for test button:
#define BUTTON_PORT PORTD /* port data register */
#define BUTTON_DDR DDRD /* port data direction register */
#define BUTTON_PIN PIND /* port input pins register */
#define TEST_BUTTON PD1 /* test/start push button (low active) */
Pinout for fixed IR detector/decoder:
#define IR_PORT PORTD /* port data register */
#define IR_DDR DDRD /* port data direction register */
#define IR_PIN PIND /* port input pins register */
#define IR_DATA PD3 /* data signal */
Pinout for fixed cap for self-adjustment:
#define ADJUST_PORT PORTC /* port data register */
#define ADJUST_DDR DDRC /* port data direction register */
#define ADJUST_RH PC6 /* Rh (470k) for fixed cap */
------------------------------------------------------------------------------
Hiland M644
- ATmega 644, 8MHz clock
- ST7565 display (bit-bang SPI)
- rotary encoder (PB7 & PB5, in parallel with display)
- external 2.5V voltage reference (TL431)
- boost converter for Zener check
- extended frequency counter
- fixed adjustment cap
- settings provided by Horst O. ([email protected])
Hardware Options:
#define HW_ENCODER
#define ENCODER_PULSES 4 /* 4 */
#define HW_REF25
#define HW_ZENER
#define HW_FREQ_COUNTER_EXT
#define FREQ_COUNTER_PRESCALER 16 /* 16:1 */
#define HW_ADJUST_CAP
LCD module:
#define LCD_ST7565R
#define LCD_GRAPHIC /* graphic display */
#define LCD_SPI /* SPI interface */
#define LCD_PORT PORTB /* port data register */
#define LCD_DDR DDRB /* port data direction register */
#define LCD_RESET PB4 /* port pin used for /RES (optional) */
//#define LCD_CS PB2 /* port pin used for /CS1 (optional) */
#define LCD_A0 PB5 /* port pin used for A0 */
#define LCD_SCL PB6 /* port pin used for SCL */
#define LCD_SI PB7 /* port pin used for SI (LCD's data input) */
#define LCD_DOTS_X 128 /* number of horizontal dots */
#define LCD_DOTS_Y 64 /* number of vertical dots */
//#define LCD_FLIP_X /* enable horizontal flip */
//#define LCD_OFFSET_X /* enable x offset of 4 dots */
#define LCD_FLIP_Y /* enable vertical flip */
#define LCD_START_Y 0 /* start line (0-63) */
#define LCD_CONTRAST 3 /* default contrast (0-63) */
#define FONT_8X8_VF /* 8x8 font, vertically aligned & flipped */
#define SYMBOLS_24X24_VFP /* 24x24 symbols, vertically aligned & flipped */
#define SPI_BITBANG /* bit-bang SPI */
#define SPI_PORT LCD_PORT /* SPI port data register */
#define SPI_DDR LCD_DDR /* SPI port data direction register */
#define SPI_SCK LCD_SCL /* port pin used for SCK */
#define SPI_MOSI LCD_SI /* port pin used for MOSI */
Pinout for test probes:
#define TP_ZENER PA3 /* test pin with 10:1 voltage divider */
#define TP_REF PA4 /* test pin with 2.5V reference */
#define TP_BAT PA5 /* test pin with 4:1 voltage divider */
#define TP_CAP PA7 /* test pin for self-adjustment cap */
Pinout for probe resistors (matches defaults):
#define R_PORT PORTD /* port data register */
#define R_DDR DDRD /* port data direction register */
#define R_RL_1 PD2 /* Rl (680R) for test pin #1 */
#define R_RH_1 PD3 /* Rh (470k) for test pin #1 */
#define R_RL_2 PD4 /* Rl (680R) for test pin #2 */
#define R_RH_2 PD5 /* Rh (470k) for test pin #2 */
#define R_RL_3 PD6 /* Rl (680R) for test pin #3 */
#define R_RH_3 PD7 /* Rh (470k) for test pin #3 */
Pinout for power control:
#define POWER_PORT PORTB /* port data register */
#define POWER_DDR DDRB /* port data direction register */
#define POWER_CTRL PB1 /* controls power (1: on / 0: off) */
Pinout for test button (matches defaults):
#define BUTTON_PORT PORTC /* port data register */
#define BUTTON_DDR DDRC /* port data direction register */
#define BUTTON_PIN PINC /* port input pins register */
#define TEST_BUTTON PC7 /* test/start push button (low active) */
Rotary Encoder:
#define ENCODER_PORT PORTB /* port data register */
#define ENCODER_DDR DDRB /* port data direction register */
#define ENCODER_PIN PINB /* port input pins register */
#define ENCODER_A PB7 /* rotary encoder A signal */
#define ENCODER_B PB5 /* rotary encoder B signal */
Pinout for extended frequency counter (matches defaults):
#define COUNTER_PORT PORTB /* port data register */
#define COUNTER_DDR DDRB /* port data direction register */
#define COUNTER_IN PB0 /* signal input T0 */
#define COUNTER_CTRL_PORT PORTC /* port data register */
#define COUNTER_CTRL_DDR DDRC /* port data direction register */
#define COUNTER_CTRL_DIV PC0 /* prescaler */
#define COUNTER_CTRL_CH0 PC1 /* channel addr #0 */
#define COUNTER_CTRL_CH1 PC2 /* channel addr #1 */
Pinout for fixed cap for self-adjustment:
#define ADJUST_PORT PORTC /* port data register */
#define ADJUST_DDR DDRC /* port data direction register */
#define ADJUST_RH PC6 /* Rh (470k) for fixed cap */
------------------------------------------------------------------------------