@@ -4,61 +4,61 @@ Measures the frequency of mains power.
4
4
## Overview
5
5
This device was built as an exercise in digital electronics.
6
6
It uses a reciprocal frequency counter approach to measure the frequency of the mains voltage supplying it.
7
- Using two SN74LV8154N 32bit counters, it counts pulses of the mains signal and the reference clock.
8
- The start and end of measurement are syncronized to the input signal using a D-FlipFlop to open the main gate.
7
+ Using two SN74LV8154N 32-bit counters, it counts pulses of the mains signal and the reference clock.
8
+ The start and end of the measurement are synchronized to the input signal, using a D-Flip-Flop to open the main gate.
9
9
This eliminates the influence of gate time accuracy on the measurement.
10
10
The measurement result is then calculated as follows:
11
11
$f_ {measured} = \frac{n_ {SignalCounter}}{n_ {RefCounter}} \times f_ {Ref}$
12
- The measured value is send out over serial (J2).
13
- Find a graph explaining the signal flow [ here] ( Charts/Signalflow.pdf ) .
12
+ The measured value is sent out over serial (J2).
13
+ Find a graph explaining the signal flow [ here] ( Charts/Signalflow.pdf ) .
14
14
15
15
## Board overview
16
- ![ Topside of circuit board] ( Images/board_overview.png )
16
+ ![ Topside of the circuit board] ( Images/board_overview.png )
17
17
18
18
## Connectors/Headers
19
- - GND: Ground connection for scope ground clips.
19
+ - GND: Ground connection for scope ground clips.
20
20
- TP4: DC voltage rails.
21
- - J2: Serial interface. Connected to D0/ D1 of Arduino. (5V max.)
21
+ - J2: Serial interface. Connected to D0 and D1 of the Arduino. (5V max.)
22
22
- J5: Debug pins. (SBUS0, SBUS1, SBUS2, SBUSE, CounterClear, GateTime, CounterRegClock, Reset)
23
23
- J6: CBUS. Used to read out the counter values.
24
- - CN1: Mains input. Fuse with 5x20mm 32mA glass fuse in F1.
25
- - CN2: External reference input. BNC. 0- 5V square wave only. HiZ input.
24
+ - CN1: Mains input. Fuse with a 5x20mm 32mA glass fuse in F1.
25
+ - CN2: External reference input. BNC. 0– 5V square wave only. HiZ input.
26
26
27
27
## Jumpers
28
- - JMP1 (J3): Selects if measured signal is inverted. This should not affect the measurement. Recommended setting is INV.
29
- - JMP2 (J4): Selects external or internal reference clock. Check TP11 for selected signal.
28
+ - JMP1 (J3): Selects if the measured signal is inverted. This should not affect the measured value. The recommended setting is INV.
29
+ - JMP2 (J4): Selects an external or internal reference clock. Check TP11 for the selected signal.
30
30
31
31
## Test points
32
32
- TP1: Offset voltage to compensate for the clipping diode drop. (~ 500mV DC)
33
- - TP2: Divided and clipped transformer output voltage. (~ 4V<sub >p</sub > half wave rectified sine)
33
+ - TP2: Divided and clipped transformer output voltage. (~ 4V<sub >p</sub > half- wave rectified sine)
34
34
- TP3: Unregulated rectified and smoothed transformer voltage. (> 17V DC)
35
- - TP4: DC Supply rails. (+5V and +3.3V DC)
36
- - TP5: Reference oscillator signal. (1MHz or 10MHz 0- 5V square wave)
37
- - TP6: Gate-Enable signal from FlipFlop . High if main gate is open and measurement running.
35
+ - TP4: DC supply rails. (+5V and +3.3V DC)
36
+ - TP5: Reference oscillator signal. (1 MHz or 10 MHz 0– 5V square wave)
37
+ - TP6: Gate-Enable signal from Flip-Flop . High if the main gate is open and the measurement is running.
38
38
- TP7: Input to the signal counter.
39
39
- TP8: Input to the reference counter.
40
40
- TP9: Transformer output voltage to measurement circuit. (> 12V AC)
41
41
- TP10: External reference clock input.
42
- - TP11: Reference input to the main gate. Should show the same signal as TP10 or TP5 depending on JMP2 (Clock select).
43
- - TP12: Signal input to the main gate. (0-5V square wave with same frequency as mains)
42
+ - TP11: Reference input to the main gate. Should show the same signal as TP10 or TP5 depending on JMP2 (clock select).
43
+ - TP12: Signal input to the main gate. (0-5V square wave with the same frequency as the mains)
44
44
45
45
## Trimmers
46
46
- RP1: Use this pot to adjust the voltage of the 5V rail.
47
47
48
48
## Firmware
49
49
Find the firmware for this project in this [ repository] ( https://github.com/ndornseif/MSM501-Firmware ) .
50
- You can just upload it using the official Arduino IDE onto the Arduino nano (U7).
50
+ You can just upload it using the official Arduino IDE onto the Arduino Nano (U7).
51
51
Remove the Arduino from the board when uploading firmware.
52
- Measurement results are in uHz and send out over serial.
53
- They are send as ASCII and LF, CR seperated.
54
- Default parameters: 115200 baud, 8 data, 1 stop, no parity
52
+ Measurement results are in uHz and sent out over serial.
53
+ They are sent as ASCII and separated by LF and CR.
54
+ Default parameters: 115200 baud, 8 data, 1 stop, no parity
55
55
56
56
## Example data
57
57
![ Mains Frequency in Germany] ( Images/freq_23-06-03.png )
58
58
59
59
## Considerations
60
- Trying to power the Arduino through its USB header while the device is connected to mains is not recommended.
61
- Use J2 (Serial ) for communication while mains is applied.
60
+ Trying to power the Arduino through its USB header while the device is connected to the mains is not recommended.
61
+ Use J2 (serial ) for communication while mains is applied.
62
62
63
63
## Other
64
64
Published under CERN-OHL-S license.
0 commit comments