entry : oldParameters.entrySet()) {
511 | Parameter parameter = entry.getKey();
512 | if (!parameters.containsKey(parameter)) {
513 | changes.put(parameter, null);
514 | }
515 | }
516 | return changes;
517 | }
518 |
519 | private static boolean same(Object o1, Object o2) {
520 | if (o1 == o2) {
521 | return true;
522 | } else if (o1 == null || o2 == null) {
523 | return false;
524 | } else {
525 | return o1.equals(o2);
526 | }
527 | }
528 | }
529 |
--------------------------------------------------------------------------------
/Girinoscope/src/org/hihan/girinoscope/ui/about.html:
--------------------------------------------------------------------------------
1 | Girinoscope
2 | A simple graphical user interface for
3 |
4 | Girino, a Fast Arduino Oscilloscope.
5 |
6 |
7 | Get the source code from GitHub.
--------------------------------------------------------------------------------
/Girinoscope/src/org/hihan/girinoscope/ui/images/Icon.java:
--------------------------------------------------------------------------------
1 | package org.hihan.girinoscope.ui.images;
2 |
3 | import java.awt.Image;
4 | import java.io.IOException;
5 | import java.net.URL;
6 |
7 | import javax.imageio.ImageIO;
8 | import javax.swing.ImageIcon;
9 |
10 | /**
11 | * For the records, all the icons in this package have been found in my
12 | * '/usr/icons/Mint-X/actions/16' folders.
13 | */
14 | public class Icon {
15 |
16 | public static ImageIcon get(String name) {
17 | URL url = Icon.class.getResource(name);
18 | if (url != null) {
19 | return new ImageIcon(url);
20 | } else {
21 | throw new IllegalArgumentException("Icon '" + name + "' does not exist.");
22 | }
23 | }
24 |
25 | public static Image getImage(String name) {
26 | URL url = Icon.class.getResource(name);
27 | if (url != null) {
28 | try {
29 | return ImageIO.read(url);
30 | } catch (IOException e) {
31 | throw new RuntimeException(e);
32 | }
33 | } else {
34 | throw new IllegalArgumentException("Icon '" + name + "' does not exist.");
35 | }
36 |
37 | }
38 |
39 | private Icon() {
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Girinoscope/src/org/hihan/girinoscope/ui/images/application-exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangorrin/arduino-oscilloscope/a9ac22a6279a096e597d586bbdbc9de32744ea0e/Girinoscope/src/org/hihan/girinoscope/ui/images/application-exit.png
--------------------------------------------------------------------------------
/Girinoscope/src/org/hihan/girinoscope/ui/images/help-about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangorrin/arduino-oscilloscope/a9ac22a6279a096e597d586bbdbc9de32744ea0e/Girinoscope/src/org/hihan/girinoscope/ui/images/help-about.png
--------------------------------------------------------------------------------
/Girinoscope/src/org/hihan/girinoscope/ui/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangorrin/arduino-oscilloscope/a9ac22a6279a096e597d586bbdbc9de32744ea0e/Girinoscope/src/org/hihan/girinoscope/ui/images/icon.png
--------------------------------------------------------------------------------
/Girinoscope/src/org/hihan/girinoscope/ui/images/media-playback-stop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangorrin/arduino-oscilloscope/a9ac22a6279a096e597d586bbdbc9de32744ea0e/Girinoscope/src/org/hihan/girinoscope/ui/images/media-playback-stop.png
--------------------------------------------------------------------------------
/Girinoscope/src/org/hihan/girinoscope/ui/images/media-record.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangorrin/arduino-oscilloscope/a9ac22a6279a096e597d586bbdbc9de32744ea0e/Girinoscope/src/org/hihan/girinoscope/ui/images/media-record.png
--------------------------------------------------------------------------------
/LTSpice/LM324.txt:
--------------------------------------------------------------------------------
1 | * LM324 OPERATIONAL AMPLIFIER "MACROMODEL" SUBCIRCUIT
2 | * CREATED USING PARTS RELEASE 4.01 ON 09/08/89 AT 10:54
3 | * (REV N/A) SUPPLY VOLTAGE: 5V
4 | * CONNECTIONS: NON-INVERTING INPUT
5 | * | INVERTING INPUT
6 | * | | POSITIVE POWER SUPPLY
7 | * | | | NEGATIVE POWER SUPPLY
8 | * | | | | OUTPUT
9 | * | | | | |
10 | .SUBCKT LM324 1 2 3 4 5
11 | *
12 | C1 11 12 5.544E-12
13 | C2 6 7 20.00E-12
14 | DC 5 53 DX
15 | DE 54 5 DX
16 | DLP 90 91 DX
17 | DLN 92 90 DX
18 | DP 4 3 DX
19 | EGND 99 0 POLY(2) (3,0) (4,0) 0 .5 .5
20 | FB 7 99 POLY(5) VB VC VE VLP VLN 0 15.91E6 -20E6 20E6 20E6 -20E6
21 | GA 6 0 11 12 125.7E-6
22 | GCM 0 6 10 99 7.067E-9
23 | IEE 3 10 DC 10.04E-6
24 | HLIM 90 0 VLIM 1K
25 | Q1 11 2 13 QX
26 | Q2 12 1 14 QX
27 | R2 6 9 100.0E3
28 | RC1 4 11 7.957E3
29 | RC2 4 12 7.957E3
30 | RE1 13 10 2.773E3
31 | RE2 14 10 2.773E3
32 | REE 10 99 19.92E6
33 | RO1 8 5 50
34 | RO2 7 99 50
35 | RP 3 4 30.31E3
36 | VB 9 0 DC 0
37 | VC 3 53 DC 2.100
38 | VE 54 4 DC .6
39 | VLIM 7 8 DC 0
40 | VLP 91 0 DC 40
41 | VLN 0 92 DC 40
42 | .MODEL DX D(IS=800.0E-18)
43 | .MODEL QX PNP(IS=800.0E-18 BF=250)
44 | .ENDS
45 |
--------------------------------------------------------------------------------
/LTSpice/girino.asc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangorrin/arduino-oscilloscope/a9ac22a6279a096e597d586bbdbc9de32744ea0e/LTSpice/girino.asc
--------------------------------------------------------------------------------
/LTSpice/pwm-threshold.asc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangorrin/arduino-oscilloscope/a9ac22a6279a096e597d586bbdbc9de32744ea0e/LTSpice/pwm-threshold.asc
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # arduino-oscilloscope
2 |
3 | This repository contains a few materials for creating a simple oscilloscope
4 | with arduino. Arduino oscilloscope based on Girino.
5 | The arduino and oscilloscope applications were open source, and I only
6 | patched them slightly for my needs.
7 |
8 | For a detailed explanation check my blog post:
9 | http://sangorrin.blogspot.jp/2015/06/arduino-oscilloscope.html
10 |
11 | -- Daniel Sangorrin
12 |
--------------------------------------------------------------------------------
/arduino-oscilloscope.txt:
--------------------------------------------------------------------------------
1 | Arduino oscilloscope (based on Girino/Girinoscope)
2 | 2015 (c) Daniel Sangorrin
3 | -------------------------------------------------------------------------------
4 |
5 | Ref: http://www.instructables.com/id/Girino-Fast-Arduino-Oscilloscope/?ALLSTEPS (main guide)
6 | Ref: http://www.instructables.com/files/orig/FQ1/8HPC/GZV1CF98/FQ18HPCGZV1CF98.7z (arduino code and circuit)
7 | Ref: https://hackaday.io/project/5881-small-scope (replica with pcb and gui)
8 |
9 | Overview
10 | ========
11 |
12 | Waveform Digitizers:
13 | - incoming signal should be decoupled from the arduino to preserve it
14 | - with an offset of the signal it is possible to see negative signals
15 | - the sampling data should be buffered instead of being sent one by one
16 | - a hardware trigger is required to catch the signals
17 | - a circular buffer can be used to store a few samples of the signal just before the trigger
18 | - using lower lever functions that the standard ones makes the program run faster.
19 |
20 | Specs:
21 | - Input range: -2,5..2,5V (0..5V without level shifter)
22 | - Resolution: 8bit/sample
23 | - Sampling freq: 153.8 Ksamples/s (307.7 Ksamples/s for ATmega328)
24 | -> Calculation: Clock/Preescaler/CyclesPerSample
25 | - Clock: 16MHz or 20Mhz
26 | - Preescaler: 2..128
27 | - CyclesPerSample: 13
28 | Ref: http://www.openmusiclabs.com/learning/digital/atmega-adc/
29 | Ref: http://www.openmusiclabs.com/learning/digital/atmega-adc/in-depth/
30 | - Samples/trigger: 512 samples (1280 samples for ATmega328)
31 | - Threshold PWM freq: 62.5 KHz (with a low pass filter at 560Hz)
32 |
33 | Arduino hardware
34 | ================
35 |
36 | ATMega328P
37 | Ref: Ref: http://www.atmel.com/images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet_Complete.pdf (ATMMega328P datasheet)
38 |
39 | Pinout
40 | - [Opt] errorPin: pin13 (connected to led, commented out in code by default)
41 | - pin 3 (PWM)
42 | + it is used to generate a PWM wave that gets filtered and
43 | serves as the threshold for the trigger to work
44 | [Note] instead, you can use a potentiometer
45 | - pin 7 (V- of analog comparator)
46 | + connected to the threshold signal (either the PWM signal filtered, or
47 | the one coming from a potentiometer)
48 | - pin 6 (V+ of analog comparator)
49 | + connected to the input signal after ofset level and buffering.
50 | + when V+ > V- it generates an interrupt
51 | Ref: http://www.instructables.com/id/Girino-Fast-Arduino-Oscilloscope/step11/How-the-Analog-Comparator-works/
52 | - pin A0 (analog input 0)
53 | + also connected to the input signal.
54 |
55 | ADC registers (see Inits.cpp):
56 | - ADMUX:
57 | + set reference voltage for ADC (AVCC with external capacitor at AREF pin)
58 | + enable A0 pin
59 | + left adjust the sample so that it is stored in ADCL
60 | - ACSR: analogue comparator settings
61 | + trigger event (rising)
62 | + threshold option (don't use the internal bandgap)
63 | - ADCSRA:
64 | + select preescaler
65 | -> division factor: 128 (16MHz/128=125KHz)
66 | + enable ADC sample available interrupt
67 | - ADCSRB:
68 | + select Free Running mode.
69 | + enable AnalogComparator for triggering
70 | - ADCH: high part of the sample (not used in girino)
71 | - ADCL: low part of the sample
72 | - DIDR0: disable the digital input buffer of A0-A5 (use them as analog pins)
73 | - DIDR1: disable the digital input buffer of pins 6-7 (use them as analog comparator)
74 | - TCCR2A, TCCR2B: set to fast PWM 0xFF, no preescale (for the threshold), timer 2
75 | - Output Compare Registers A/B (OCRnx): are used to set the signal duty cycle.
76 | Ref: f = clock_freq/prescaler/TCNTn_maximum = 16MHz/1/256 = 62.5 KHz
77 | [Note] TCNTn_maximum for Timer 0 and 2 (8-bit) is 256
78 | [Note] TCNTn_maximum for Timer 0 and 2 (8-bit) is 65536
79 | Ref: http://arduino.cc/en/Tutorial/SecretsOfArduinoPWM
80 |
81 | Girino hardware
82 | ===============
83 |
84 | Power supply (akiduki 650yen, http://akizukidenshi.com/catalog/g/gM-01805/)
85 | - 15V power supply: 2
86 | Voltage regulators
87 | - 7812: 1 (+12V) (akiduki 50yen, http://akizukidenshi.com/catalog/g/gI-00163/)
88 | - 7912: 1 (-12V) (akiduki 50yen, http://akizukidenshi.com/catalog/g/gI-03973/
89 | OpAmps
90 | - LM324: 4 (akiduki 150yen, http://akizukidenshi.com/catalog/g/gI-00959/)
91 | [Alt] TL084 (akiduki 300yen, http://akizukidenshi.com/catalog/g/gI-04083/)
92 | - IC socket 14pin: 1 (akiduki 100yen, http://akizukidenshi.com/catalog/g/gP-00006/)
93 | Resistors
94 | - 1K: 2
95 | - 1M: 1
96 | - 10K: 4
97 | - 1K8: 1
98 | Potentiometer
99 | - 1K: 1 (akiduki 80yen, http://akizukidenshi.com/catalog/g/gP-00973/)
100 | Jumper
101 | - pin header: 1 (akiduki 100yen, http://akizukidenshi.com/catalog/g/gC-00167/)
102 | - jumper: 4 (akiduki 100yen, http://akizukidenshi.com/catalog/g/gP-03688/)
103 | Capacitors
104 | Ref: http://www.electronics2000.co.uk/calc/capacitor-code-calculator.php
105 | - 10uF: 3 (electrolitic, have a +) <-- filters low-freq noise
106 | - 1uF: 2 (ceramic) <-- filters high-freq noise
107 | - 2.2uF: 1 (electrolitic)
108 | - 0.33uF: 1 (electrolitic)
109 | - 100nF=0.1uF: 3 (ceramic)
110 | Universal board
111 | - for arduino (akiduki 200yen, http://akizukidenshi.com/catalog/g/gP-06877/)
112 |
113 | [Opt] Probe 60MHz (aitendo 900yen, http://www.aitendo.com/product/6705)
114 | [Opt] BNC connector (aitendo)
115 | [Note] Bypass Capacitors should be put as close as possible to the
116 | alimentation pins of the IC. They are used usually in couple, one
117 | ceramic and one electrolytic because they can filter out different
118 | frequencies.
119 |
120 | My hardware modifications
121 | =========================
122 |
123 | Ref: http://www.lcardaba.com/articles/opamps.html
124 | Ref: https://github.com/marvin-sinister/small-scope-electronics (replica's Kicad project)
125 |
126 | [Opt] Input voltage protection circuit (add clamp diodes)
127 | Ref: http://electronics.stackexchange.com/questions/35807/how-would-i-design-a-protection-clipper-circuit-for-adc-input
128 | + To protect the input stage against overvoltage I'd add clamping diodes to
129 | VCC and VSS, respectively, right at the place where the 1 MOhm resistor is.
130 | Good, cheap, fast, low-capacitance diodes would be e.g. 1N914
131 | + Other diodes: 1SS380, 1S2076A, JFET transistor with S and D connected..
132 |
133 | [Opt] Shift voltage:
134 | + use an OpAmp in buffer configuration before the 10kohm resistor
135 |
136 | [Opt] Threshold:
137 | - Use a better filter
138 | Ref: http://www.analog.com/designtools/en/filterwizard/#/type
139 | - Use the 3.3V provided by arduino as threshold value
140 | - Use a trimmer (potentiometer) to set the voltage level
141 | - using the internal bangap reference we can use a fixed level.
142 | Ref: http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/
143 | Ref: http://electronics.stackexchange.com/questions/997/monitoring-voltage-without-a-known-reference
144 | [Opt] For arduino, I could use a 20MHz clock.
145 | [Opt] Low-pass filter: using a 1.8k resistor and a 1uF capacitor gets you a
146 | cut-off frequency of 88.5Hz [ 1/(2*pi*R*C) ], not 560Hz [ 1 / (R*C) ]
147 | which is rad/s.
148 | [Opt] One thing to be careful about: If you supply the op-amp with +/-12V it
149 | can drive almost as much into your Arduino - which will most likely kill
150 | the latter! Would be a good idea to add a series resistor after the last
151 | op-amp stage, and behind that two clamping diodes (Schottky type) going
152 | to 0V and 5V, respectively.
153 | [Opt] The third op-amp stage isn't really needed. Did you try to run without it?
154 | (make sure the unused op-amps inputs are tied to VCC and VSS, respectively,
155 | to avoid oscillations).
156 |
157 | Girino code
158 | ===========
159 |
160 | Ref: https://github.com/marvin-sinister/small-scope (replica's code)
161 |
162 | Overview of the program:
163 | - flow
164 | + an interrupt samples the signal every xx us and stores it in a circular buffer.
165 | + when the signal surpasses a threshold: there is a trigger interrupt!
166 | [Note] we specify the threshold with analogwrite (PWM + filter)
167 | + after the trigger, we take 'waitDuration' samples (sweep) and then disable/freeze sampling (holdoff)
168 | + then, we send the samples (the ones before the trigger plus the waitDuration samples) to the host.
169 | + finally, we enable sampling again.
170 | - data structures
171 | + Inter-communication flags
172 | -> boolean freeze (send_samples_flag): if True send the buffer to the serial port (set by ADC_vect)
173 | -> boolean wait (trigger): indicates that the threshold was surpassed, and we must freeze after waitDuration more samples.
174 | -> uint16_t waitDuration (samples_per_trigger): samples to take after the trigger (by default: 1280 - 32)
175 | + Circular buffer
176 | -> uint8_t ADCBuffer[1280]: circular buffer with the 8bit samples.
177 | -> uint16_t ADCCounter: cursor to the next empty slot in ADCBuffer.
178 | -> uint16_t stopIndex: cursor to the last slot to sample before freezing.
179 | + Settings
180 | -> uint8_t prescaler: system_clock_freq / ADC_input_clock (default 128)
181 | -> uint8_t triggerEvent: type of trigger (0:toggle, 2: falling edge, 3: rising edge. Default: 3)
182 | -> uint8_t threshold: the threshold voltage for triggering (analogwrite PWM, default 127)
183 | -> char commandBuffer[4+1]: used to change settings from the host
184 | - setup
185 | + Baudrate: 115200
186 | + Init data structures
187 | + Enable interrupts: sei()
188 | + initPins();
189 | + initADC();
190 | + initAnalogComparator();
191 | - loop
192 | + if freeze is true
193 | -> Send "ADCBuffer" through serial port
194 | -> cbi(PORTB,PORTB5);
195 | -> wait = false;
196 | -> freeze = false;
197 | + if serial input available
198 | -> parse command
199 | - interrupts
200 | Ref: http://www.nongnu.org/avr-libc/user-manual/group__avr__interrupts.html
201 | + ADC_vect: ADC Conversion Complete Interrupt
202 | -> gets 8bit sample into the ADCBuffer
203 | -> ADCCounter++
204 | -> if wait
205 | if (stopIndex == ADCCounter) <-- buffer is filled
206 | disable ADC and stop Free Running Conversion Mode: cbi( ADCSRA, ADEN );
207 | send to the host: freeze = true;
208 | + ANALOG_COMP_vect: Analog Comparator interrupt
209 | [Note] compares a signal with a reference voltage. If the signal
210 | surpasses it it raises an interrupt.
211 | -> disable Analog Comparator interrupt: cbi( ACSR,ACIE );
212 | -> sbi( PORTB, PORTB5 );
213 | -> wait = true;
214 | -> stopIndex = ( ADCCounter + waitDuration ) % ADCBUFFERSIZE;
215 |
216 | Util functions
217 | DEBUG: enable debugging messages
218 | dprint(x): writes to the serial port something like: # x: 123
219 | dshow("Some string"): writes the string
220 | cbi(sfr, bit): clears a bit in register sfr
221 | sbi(sfr, bit): sets a bit in register sfr
222 |
223 | Patch (from girinoscope)
224 | - Girino.h, line 41:
225 | // Replaced 3 by 4 since the wait duration range is [0, 1280].
226 | #define COMBUFFERSIZE 4 // Size of buffer for incoming numbers
227 | - Girino.ino, line 224:
228 | // Added a necessary x2 factor since we read 16 bits now.
229 | delay(COMMANDDELAY * 2);
230 | - Girino.ino, line 229:
231 | // Replaced 'uint8' by 'uint16' for the same reason.
232 | uint16_t newT = atoi( commandBuffer );
233 |
234 | Patch (from Woami http://www.instructables.com/member/womai/) for efficiency (ISR.cpp)
235 | 1) Integer division is time consuming:
236 | -ADCCounter = ( ADCCounter + 1 ) % ADCBUFFERSIZE;
237 | +if (++ADCCounter >= ADCBUFFERSIZE) ADCCounter = 0;
238 | 2) Avoid the variable wait by setting stopIndex to a value that the counter never reaches
239 | when you aren't yet in the post-trigger phase (when starting a new sweep)
240 | -if(wait)
241 | +stopIndex = ADCBUFFERSIZE + 1;
242 |
243 | ISR(ANALOG_COMP_vect) {
244 | // Disable Analog Comparator interrupt
245 | cbi( ACSR,ACIE );
246 | // Turn on errorPin
247 | //digitalWrite( errorPin, HIGH );
248 | sbi( PORTB, PORTB5 );
249 | stopIndex = ( ADCCounter + waitDuration ) % ADCBUFFERSIZE;
250 | }
251 |
252 | ISR(ADC_vect) {
253 | ADCBuffer[ADCCounter] = ADCH;
254 | if (++ADCCounter >= ADCBUFFERSIZE) ADCCounter = 0;
255 | if ( stopIndex == ADCCounter ) {
256 | cbi( ADCSRA, ADEN );
257 | freeze = true;
258 | }
259 | }
260 |
261 | If error "HardwareSerial::HardwareSerial' is not a type"
262 | -HardwareSerial::HardwareSerial
263 | +HardwareSerial
264 |
265 | [Opt] Patch to increase the speed of the serial port to 1Mbps
266 | Ref: https://mekonik.wordpress.com/2009/03/02/modified-arduino-library-serial/
267 | Ref: https://github.com/marvin-sinister/small-scope-qt (replica's GUI)
268 |
269 | Oscilloscope frontend
270 | =====================
271 |
272 | Ref: https://github.com/Chatanga/Girinoscope/releases (oscilloscope frontend code)
273 |
274 | Linux
275 | $ sudo apt-get install ant
276 | $ git clone https://github.com/Chatanga/Girinoscope.git
277 | $ cd Girinoscope
278 | $ vi src/xxx/comm/Girino.java
279 | -> change buffer size 1280 to 512
280 | $ ant build
281 | $ ant run
282 | --> it works
283 | Windows
284 | - Download release and just double-click girinoscope.bat
285 |
286 | Ref: https://github.com/marvin-sinister/small-scope-qt (replica's GUI)
287 |
288 | TODO
289 |
290 | Signal gnerator
291 | ===============
292 |
293 | You can build a simple analog signal generator with an Arduino driving a
294 | R-2R resistor network (google the term and you'll get plenty of hits)
295 | from an 8-bit port. Use 1% resistors and you'll get almost 8 bits of
296 | resolution. You can the scale an buffer the signal with an op-amp stage.
297 | Just a few cents worth of parts apart from the arduino.
298 | Here is such a project that uses an AVR, ready to be copied:
299 | http://www.myplace.nu/avr/minidds/index.htm
300 |
301 |
302 |
303 |
304 |
305 |
306 |
307 |
308 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
--------------------------------------------------------------------------------
/pass/AITENDO-ARDU.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangorrin/arduino-oscilloscope/a9ac22a6279a096e597d586bbdbc9de32744ea0e/pass/AITENDO-ARDU.bmp
--------------------------------------------------------------------------------
/pass/AITENDO-ARDU_.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangorrin/arduino-oscilloscope/a9ac22a6279a096e597d586bbdbc9de32744ea0e/pass/AITENDO-ARDU_.bmp
--------------------------------------------------------------------------------
/pass/POWER-JACK.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangorrin/arduino-oscilloscope/a9ac22a6279a096e597d586bbdbc9de32744ea0e/pass/POWER-JACK.bmp
--------------------------------------------------------------------------------
/pass/backside-blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangorrin/arduino-oscilloscope/a9ac22a6279a096e597d586bbdbc9de32744ea0e/pass/backside-blue.png
--------------------------------------------------------------------------------
/pass/backside-green.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangorrin/arduino-oscilloscope/a9ac22a6279a096e597d586bbdbc9de32744ea0e/pass/backside-green.png
--------------------------------------------------------------------------------
/pass/frontside-blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangorrin/arduino-oscilloscope/a9ac22a6279a096e597d586bbdbc9de32744ea0e/pass/frontside-blue.png
--------------------------------------------------------------------------------
/pass/frontside-green.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sangorrin/arduino-oscilloscope/a9ac22a6279a096e597d586bbdbc9de32744ea0e/pass/frontside-green.png
--------------------------------------------------------------------------------
/pass/universal-pcb-board-memo.txt:
--------------------------------------------------------------------------------
1 | Universal PCB board
2 | 2015 (c) Daniel Sangorrin
3 | ------------------------------------------------------------------------------
4 |
5 | Structure of an Universal PCB board
6 | ===================================
7 |
8 | - matrix of pads/holes where the leads of the components are inserted
9 | + typically holes are 1mm of diameter and the pitch is 2.54mm
10 | - sometimes include bus lines (straigth line connecting several pads)
11 | - normally leads are connected on the underside (solder side)
12 |
13 | Main methods to join pads
14 | =========================
15 |
16 | Ref: http://electronics.stackexchange.com/questions/55236/how-to-make-traces-on-an-universal-pcb
17 |
18 | - solder bridges (use solder to join pads)
19 | + Procedure for connecting pads:
20 | -> place components in such a way that leads that need to be connected
21 | are placed in adjacent holes.
22 | -> set your soldering iron to a lower temperature
23 | -> put some solder on the pads.
24 | -> put some solder on your iron and tip in between the pads. Luckily, you’ll connect them.
25 | + Disadvantage: take a lot of solder, especially long ones.
26 | - jumper/solder wire (typical wire with plastic insulation)
27 | + typical wire
28 | Ref: http://www.radioshack.com/50-ft-blue-insulated-wrapping-wire-30awg/2780503.html
29 | [Note] wire means one single conductor or strand (as opposed to cable)
30 | Ref: http://www.differencebetween.info/difference-between-cable-and-wire
31 | + best for when you can't go around an existing solder joint.
32 | + without solder: http://en.wikipedia.org/wiki/Wire_wrap
33 | - bare/naked wire (a wire without the plastic wrapper)
34 | + allows connecting non-adjacent holes easily
35 | + useful for straight lines and buses, using less solder than solder bridges.
36 | + disadvantage: could easily make contact with an adjacent pad that should not be connected
37 | - using the leads (legs) of the components
38 | + procedure: bend the leads (legs) of the components and connect to adjacent pads
39 | + disadvantage: leads are usually thicker than wire.
40 |
41 | Universal board layout software
42 | ===============================
43 |
44 | PasS
45 | ----
46 |
47 | Ref: http://www.geocities.jp/uaubn/pass/ (official site)
48 | Ref: http://airvariable.asablo.jp/blog/2012/05/04/6434269 (blog of a user)
49 | Ref: http://okgnz.web.fc2.com/passcad/index.htm (blog of a user, many circuits!)
50 | Ref: http://blog.livedoor.jp/cielo_cielo/archives/65820452.html (blog of a user, he used to use paper too)
51 |
52 | License:
53 | - Free to use only in private.
54 |
55 | Installation:
56 | - Install Microsoft Visual Basic 5 runtime (Msvbvm50.exe)
57 | Ref: https://support.microsoft.com/en-us/kb/180071
58 | - Un compress "pass-program.lzh" and "pass-parts.lzh" in a user folder (C:\Users\dsl\pass)
59 | - Fix locale settings:
60 | Ref: http://users.wfu.edu/yipcw/atg/microsoft/applocale/
61 | + Download apploc.mxi > Right-click > Properties > Compatibility with WinXP SP3 > Install it
62 | Ref: http://www.microsoft.com/en-us/download/details.aspx?id=13209
63 | + Open C:\Windows\AppPatch\AppLoc.exe with Admin permissions
64 | - Open AppLoc.exe and follow the wizard to open Pass.exe using Japanese locale
65 | [Note] check create a link, so you can open directly with launchy! :D
66 | --> It works!
67 |
68 | Overview
69 | - Upper bar
70 | + change to 1/2 pitch
71 | -> this is not related with the board's pitch which is 2.54mm (10 pixels)
72 | but with a mode that allows you route lines between two pads.
73 | -> It consumes double memory, so don't use it unless needed.
74 | -> You can also change to 1/2 pitch mode after finishing, for retouching
75 | some line. BUT then you cannot go back to normal pitch mode!
76 | + rotate 90 degrees
77 | + select 1-side or 2-sides board
78 | - Left (parts)
79 | + boards (akiduki), capacitors, connectors, IL connectors,
80 | diodes, drill holes, ICs, jacks/terminals, LEDs,
81 | others (buzzer, transformer, crystal, LCS..), pin headers,
82 | pin sockets, transistors, resistors, IC sockets, sensors, switches,
83 | labels, tools (fill with color for GND, thru holes), user parts.
84 | - Right (board)
85 | + components side (front side)
86 | -> move mode (for placing parts)
87 | -> lines mode (for connecting parts)
88 | + front (red)
89 | + back (blue) <-- typically use this
90 | + front using jumper wire (orange)
91 | + back using jumper wire (green)
92 | + external line (gray): defines the shape of the board after cutting
93 | -> zoom 2x (only for connecting parts with lines)
94 | -> draw/delete a draft
95 | -> display/hide lines, pin numbers, borders, or labels
96 | -> save temporarily or periodically, defaults to 10min (alternative to Ctrl-Z)
97 | -> copy to clipboard (to save it in word or paint)
98 | + soldering side (back side)
99 | -> information about amount of wire used
100 | -> show/hide lines, parts border
101 | -> refresh
102 | -> copy to clipboard (to save it in word or paint)
103 |
104 | Typical procedure
105 | - Create new file
106 | + Choose 'no' if they ask you for 1/2 pitch mode (you can set it later anyway)
107 | - Move mode (click button with a cursor)
108 | + Drag a board to the right part, like Akizuki type C (pitch 2.54mm, diagonal 3.58mm)
109 | Ref: http://akizukidenshi.com/catalog/g/gP-03229/
110 | + Drag parts into the board (maximum: 500)
111 | + Move parts: left-click + drag
112 | + Select parts: left-click + drag a rectangle
113 | + Right-click on a part: delete, copy, rotate, move to other side
114 | -> Ctrl-C won't work!
115 | + Double-click on a part: input reference number and name
116 | - Line connection mode (click button with the type of line you want to use, or 2-click board)
117 | + zoom 2x. and click lower-right rectangle to zoom the window
118 | + paint by dragging
119 | + right-click menu works here too.
120 | + try to avoid 90 degree corners, use 45 degree instead
121 | + if you need to route wires between pads, change to 1/2 pitch mode
122 | + if you need to cross a line, use thru holes
123 | - Export the result
124 | + gerber: use Gonpass addon (based on Gconpass), open in PCBE
125 | Ref: http://okgnz.web.fc2.com/passcad/index.htm (Gonpass)
126 | Ref: http://www.geocities.jp/uaubn/gconpass/ (Gconpass)
127 | + Click on clipboard button, and paste in word or paint
128 |
129 | Creating your own parts
130 | - All parts are BMP files copied to C:\Users\dsl\pass\parts\USR\xxx.bmp (or to a section).
131 | + Edit with Paint!
132 | - Boards
133 | Ref: pass-doc-create-your-board.pdf
134 | + Max size: 900x550 pixels (970x830 dots)
135 | + Colors: see the pdf for exact RGB values (or pick them from existing boards)
136 | + Holes (in white) must be located at (X,Y) that are multiple of 10.
137 | + Back side:
138 | -> change the name xxx.bmp -> xxx_.bmp
139 | -> the horizontal axis is inverted
140 | -> the upper-left corner pixel must be the same as the front side
141 | - Components
142 | + Pins are 1 red pixel. They must be separated 10 pixels.
143 | + Pin numbers defined by the red color level (0..255)
144 |
145 | Adding lettering
146 | - use the smallfonts.png as a reference and draw letters/numbers with
147 | paint or FireAlpaca pixel-by-pixel.
148 |
149 | Fritzing
150 | --------
151 |
152 | Ref: http://fritzing.org/home/ (official site)
153 | Ref: http://fab.fritzing.org/fritzing-fab (converts design into a PCB)
154 |
155 | MBE: Minimal Editor Board
156 | -------------------------
157 |
158 | Ref: http://www.suigyodo.com/online/mbe/mbe.htm (official site)
159 | Ref: http://www.ne.jp/asahi/air/variable/picmel/applications/melody/index.html (blog of a user)
160 |
161 |
162 |
163 |
164 |
165 |
166 |
--------------------------------------------------------------------------------
/pass/universal-pcb-oscilloscope.pas:
--------------------------------------------------------------------------------
1 | *** Version
2 | "Version 1.5.2 (20100621)"
3 | *** Pitch
4 | 1
5 | *** Board
6 | "\Board\AITENDO-ARDU.bmp","\Board\AITENDO-ARDU_.bmp"
7 | *** Type
8 | 1
9 | *** Parts
10 | "\IC\ICT-3.bmp",220,238,40,17,0
11 | "7912",220,255
12 | "",220,267
13 | "\C\CE-1.bmp",226,271,19,19,0
14 | "2.2u",229,291
15 | "",226,302
16 | "\C\CC-1.bmp",266,276,19,9,0
17 | "0.1u",263,274
18 | "",266,297
19 | "\C\CE-1.bmp",236,211,19,19,0
20 | "1u",229,222
21 | "",236,242
22 | "\C\CC-1.bmp",346,146,19,9,180
23 | "0.1u",350,134
24 | "",346,167
25 | "\C\CC-1.bmp",266,176,9,19,90
26 | "0.1u",255,164
27 | "",266,197
28 | "\C\CE-1a.bmp",325,250,32,32,90
29 | "10u",332,282
30 | "",325,294
31 | "\R\R-4.bmp",336,198,9,45,90
32 | "10k",327,216
33 | "",332,259
34 | "\R\R-4.bmp",346,198,9,45,90
35 | "10k",347,217
36 | "",342,259
37 | "\R\R-4.bmp",356,218,9,45,270
38 | "10k",359,238
39 | "",352,279
40 | "\C\CS-2.bmp",236,136,29,9,0
41 | "1u",242,143
42 | "",236,157
43 | "\PH\PH1-1.bmp",255,305,11,11,0
44 | "Vcc",245,316
45 | "",255,328
46 | "\PH\PH1-1.bmp",305,305,11,11,0
47 | "Ain",311,316
48 | "",305,328
49 | "\PH\PH1-1.bmp",285,305,11,11,0
50 | "15V",287,317
51 | "",285,328
52 | "\PH\PH1-2.bmp",265,305,21,11,0
53 | "gnd",266,316
54 | "",265,328
55 | "\PH\PH1-1.bmp",285,115,11,11,0
56 | "TH",281,104
57 | "",285,138
58 | "\PH\PH1-1.bmp",295,115,11,11,0
59 | "An",298,103
60 | "",295,138
61 | "\PH\PH1-1.bmp",325,115,11,11,0
62 | "PWM",323,104
63 | "",325,138
64 | "\C\CE-1a.bmp",340,164,32,32,0
65 | "10u",351,175
66 | "",340,208
67 | "\C\CE-1a.bmp",224,169,32,32,270
68 | "10u",213,166
69 | "",224,213
70 | "\R\R-5.bmp",278,136,55,9,0
71 | "1k8",302,136
72 | "",278,157
73 | "\PH\PH1-1.bmp",265,195,11,11,0
74 | "Sig",246,195
75 | "",265,218
76 | "\R\R-4.bmp",266,208,9,45,270
77 | "1M",252,212
78 | "",262,269
79 | "\R\R-4.bmp",278,236,45,9,180
80 | "1k",294,231
81 | "",274,297
82 | "\R\R-4.bmp",278,246,45,9,180
83 | "1k",292,249
84 | "",274,307
85 | "\C\CE-1.bmp",281,256,19,19,270
86 | "0.33u",253,260
87 | "",281,287
88 | "\SC\ICS-14.bmp",285,153,41,74,90
89 | "",285,194
90 | "",285,206
91 | "\CN\POWER-JACK.bmp",157,256,57,84,0
92 | "",157,340
93 | "",157,352
94 | "\IC\ICT-3.bmp",261,286,40,17,180
95 | "",261,303
96 | "",261,315
97 | "\R\R-4.bmp",326,178,9,45,270
98 | "",326,187
99 | "",326,199
100 | "\PH\PH1-1.bmp",205,115,11,11,0
101 | "GND",204,102
102 | "",205,138
103 | *** BottomLine
104 | 330,130,330,140
105 | 290,130,290,140
106 | 290,140,290,150
107 | 290,150,290,160
108 | 290,160,290,170
109 | 320,160,320,170
110 | 320,150,320,160
111 | 300,150,310,150
112 | 310,150,320,150
113 | 300,130,300,140
114 | 300,140,300,150
115 | 320,200,330,200
116 | 330,200,340,200
117 | 340,200,350,200
118 | 290,210,290,220
119 | 290,220,290,230
120 | 290,230,300,230
121 | 300,230,310,230
122 | 310,230,320,230
123 | 320,230,330,230
124 | 330,230,340,230
125 | 340,230,340,240
126 | 290,270,290,280
127 | 290,280,290,290
128 | 290,290,290,300
129 | 270,280,270,290
130 | 250,220,250,230
131 | 250,230,250,240
132 | 250,240,250,250
133 | 240,250,240,260
134 | 240,260,240,270
135 | 240,270,240,280
136 | 280,180,290,180
137 | 280,140,280,150
138 | 280,150,280,160
139 | 280,160,280,170
140 | 280,170,280,180
141 | 260,140,270,140
142 | 270,140,280,140
143 | 240,190,250,190
144 | 250,190,260,190
145 | 260,190,270,190
146 | 270,190,280,190
147 | 280,190,290,190
148 | 210,290,220,290
149 | 220,290,230,290
150 | 230,290,240,290
151 | 240,280,240,290
152 | 260,240,260,250
153 | 260,250,260,260
154 | 260,260,260,270
155 | 260,270,260,280
156 | 260,280,260,290
157 | 260,290,260,300
158 | 260,240,270,240
159 | 270,240,280,240
160 | 320,210,330,210
161 | 330,210,340,210
162 | 340,210,350,210
163 | 350,210,360,210
164 | 320,240,320,250
165 | 280,250,280,260
166 | 280,260,280,270
167 | 280,270,280,280
168 | 280,280,280,290
169 | 280,290,280,300
170 | 320,250,330,250
171 | 330,250,340,250
172 | 340,250,350,250
173 | 350,240,350,250
174 | 360,210,360,220
175 | 330,210,330,220
176 | 310,220,320,220
177 | 310,180,310,190
178 | 310,190,310,200
179 | 310,200,310,210
180 | 310,210,310,220
181 | 310,180,320,180
182 | 320,180,330,180
183 | 340,250,340,260
184 | 280,260,290,260
185 | 290,260,300,260
186 | 300,260,310,260
187 | 310,260,320,260
188 | 320,260,320,270
189 | 320,270,330,270
190 | 330,270,340,270
191 | 340,270,350,270
192 | 350,270,360,270
193 | 360,260,360,270
194 | 360,270,370,270
195 | 370,190,370,200
196 | 370,200,370,210
197 | 370,210,370,220
198 | 370,220,370,230
199 | 370,230,370,240
200 | 370,240,370,250
201 | 370,250,370,260
202 | 370,260,370,270
203 | 320,190,330,190
204 | 330,190,340,190
205 | 340,190,350,190
206 | 350,180,350,190
207 | 350,150,350,160
208 | 350,160,350,170
209 | 350,170,350,180
210 | 360,150,360,160
211 | 360,160,360,170
212 | 360,170,360,180
213 | 360,180,360,190
214 | 360,190,370,190
215 | 210,280,220,280
216 | 220,280,230,280
217 | 230,140,230,150
218 | 230,150,230,160
219 | 230,160,230,170
220 | 230,170,230,180
221 | 230,180,230,190
222 | 230,190,230,200
223 | 230,200,230,210
224 | 230,210,230,220
225 | 230,220,230,230
226 | 230,230,230,240
227 | 230,240,230,250
228 | 230,250,230,260
229 | 230,260,230,270
230 | 230,270,230,280
231 | 210,130,210,140
232 | 210,140,220,140
233 | 220,140,230,140
234 | 230,140,240,140
235 | 230,180,240,180
236 | 240,180,250,180
237 | 250,180,260,180
238 | 260,180,270,180
239 | 230,220,240,220
240 | 270,200,280,200
241 | 280,200,290,200
242 | 270,200,270,210
243 | 270,250,280,250
244 | *** TopLine
245 | *** BottomJump
246 | 270,190,270,200
247 | 270,200,270,210
248 | 270,210,270,220
249 | 270,220,270,230
250 | 270,230,270,240
251 | 270,240,270,250
252 | 270,250,270,260
253 | 270,260,270,270
254 | 270,270,270,280
255 | 270,190,280,190
256 | 280,190,290,190
257 | 250,180,250,190
258 | 250,190,250,200
259 | 250,200,250,210
260 | 250,210,250,220
261 | 250,180,260,180
262 | 260,180,270,180
263 | 270,180,280,180
264 | 280,180,290,180
265 | 290,180,300,180
266 | 300,180,310,180
267 | 310,180,320,180
268 | 320,180,320,190
269 | 310,300,320,300
270 | 320,300,330,300
271 | 330,130,330,140
272 | 330,140,330,150
273 | 330,150,330,160
274 | 330,160,330,170
275 | 330,170,330,180
276 | 330,180,330,190
277 | 330,190,330,200
278 | 330,200,330,210
279 | 330,210,330,220
280 | 330,220,330,230
281 | 330,230,330,240
282 | 330,240,330,250
283 | 330,250,330,260
284 | 330,260,330,270
285 | 330,270,330,280
286 | 330,280,330,290
287 | 330,290,330,300
288 | 300,130,310,130
289 | 310,130,320,130
290 | 320,130,330,130
291 | *** TopJump
292 | *** Area
293 |
--------------------------------------------------------------------------------