Skip to content

Commit adfe92e

Browse files
version 2.1-2
1 parent 3d5b461 commit adfe92e

File tree

7 files changed

+70
-14
lines changed

7 files changed

+70
-14
lines changed

LR_meter/LR_meter.ino

+7-7
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ void scale_one()
160160
pinMode(Res1M, INPUT);
161161
digitalWrite(Res2K, LOW);
162162
float R2 = 0;
163-
float R1 = 2.009; // Set this value to the value of the used resistor in K ohms
163+
float R1 = 2.005; // Set this value to the value of the used resistor in K ohms
164164
R2 = calc_Res(R1, 1000);
165165
if (R2 > (R1 * 1000))
166166
{
@@ -183,8 +183,8 @@ void scale_two()
183183
pinMode(Res1M, INPUT);
184184
digitalWrite(Res20K, LOW);
185185
float R2 = 0;
186-
float R1 = 21.3; // Set this value to the value of the used resistor in K ohms
187-
R2 = calc_Res(21.3, 1);
186+
float R1 = 18.3; // Set this value to the value of the used resistor in K ohms
187+
R2 = calc_Res(20.03, 1);
188188
if (R2 > R1)
189189
{
190190
mode = 8; //increase scale
@@ -206,7 +206,7 @@ void scale_three()
206206
pinMode(Res1M, INPUT);
207207
digitalWrite(Res200K, LOW);
208208
float R2 = 0;
209-
float R1 = 182; // Set this value to the value of the used resistor in K ohms
209+
float R1 = 218; // Set this value to the value of the used resistor in K ohms
210210
R2 = calc_Res(R1, 1);
211211
if (R2 > R1)
212212
{
@@ -228,7 +228,7 @@ void scale_four()
228228
pinMode(Res1M, OUTPUT);
229229
digitalWrite(Res200K, LOW);
230230
float R2 = 0;
231-
float R1 = 1.006;// Set first value to the value of the used resistor in K ohms
231+
float R1 = 1.006;// Set first value to the value of the used resistor in M ohms
232232
R2 = calc_Res(R1, 1);
233233
if (R2 > 2)
234234
{
@@ -396,14 +396,14 @@ void AnalogDisplay()
396396
//Function L_test: Calculates Inductance
397397
void L_test()
398398
{
399-
double pulse, frequency, capacitance, inductance;
399+
double pulse, frequency, capacitance, inductance = 0;
400400
digitalWrite(OutLtestPin, HIGH);
401401
delay(5);//give some time to charge inductor.
402402
digitalWrite(OutLtestPin, LOW);
403403
delayMicroseconds(100); //make sure resonation is measured
404404
pulse = pulseIn(PulseInPin, HIGH, 5000); //returns 0 if timeout
405405
if (pulse > 0.1) { //pulse returns 0 if no complete pulse was received within the timeout
406-
406+
407407
capacitance = 2.E-6; // - insert Cap value here
408408

409409
frequency = 1.E6 / (2 * pulse);

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Parts List:
2929
>
3030
> Arduino NANO or UNO
3131
>
32-
> Resistors: 2kohms, 20kohms, 200kohms, 1Mohms, 150ohm, 330ohm.
32+
> Resistors: 2kohms, 20kohms, 200kohms, 1Mohms, 150ohm, 330ohm, 4.7Kohms X 2 .
3333
>
3434
> Capacitors: 2 uF non-polarized
3535
>
@@ -39,7 +39,7 @@ Parts List:
3939
>
4040
> LM393 comparator IC [datasheet](https://www.onsemi.com/pub/Collateral/LM393-D.PDF) or LM339
4141
>
42-
> Output terminal or socket connections
42+
> ZIF test socket , Output terminal or socket connections
4343
>
4444
4545

@@ -110,7 +110,7 @@ We can now solve the equation for inductance.
110110

111111
**Display ADC in digital value and Voltage.**
112112

113-
This displays the voltage and ADC digital value measured on AO, This can be sued for testing potentiometers,
113+
This displays the voltage and ADC digital value measured on A0, This can be used for testing potentiometers,
114114
sensors or measuring voltage levels.
115115

116116
Copyright

documentation/CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,11 @@
88
replaced joysticks control with pushbuttons.
99
Analog input display added.
1010
Status LED added.
11+
12+
* Version 2.1-2 April 2009
13+
Added pull up resistors for OLED I2C.
14+
Added initialize value of zero to variables in Inductance function,
15+
in order to prevent random values being reported in event of zero pulse.
16+
Finalized resistor values for finished produced prototype PCB.
17+
1118

documentation/Notes.txt

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
ZIF TEST socket pin layout
2+
----------------------------------
3+
4+
1. A2 n/c n/c n/c R R R R
5+
6+
2. A0 n/c GND n/c VCC n/c L L
7+
8+
9+
10+
Resistors values used in code:
11+
12+
1. 2.005 Kohms
13+
2. 20.03 Kohms
14+
3. 218 Kohms
15+
4. 1.006 Mohms
16+
17+
Capacitor value
18+
19+
1. 2uF

documentation/eagle/LR_meter.sch

+34-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!DOCTYPE eagle SYSTEM "eagle.dtd">
3-
<eagle version="9.3.0">
3+
<eagle version="9.3.1">
44
<drawing>
55
<settings>
66
<setting alwaysvectorfont="no"/>
@@ -10658,7 +10658,7 @@ SparkFun BigTime Watch Kit&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
1065810658
<part name="D1" library="diode" library_urn="urn:adsk.eagle:library:210" deviceset="1N4148" device="DO35-10" package3d_urn="urn:adsk.eagle:package:43344/2" value="1N4148"/>
1065910659
<part name="C2" library="capacitor-wima" library_urn="urn:adsk.eagle:library:116" deviceset="C" device="5/2.5" package3d_urn="urn:adsk.eagle:package:5426/1" value="2uF"/>
1066010660
<part name="R7" library="resistor" library_urn="urn:adsk.eagle:library:348" deviceset="R-EU_" device="0207/15" package3d_urn="urn:adsk.eagle:package:25947/1" value="330"/>
10661-
<part name="IC1" library="linear" library_urn="urn:adsk.eagle:library:262" deviceset="LM393" device="N" package3d_urn="urn:adsk.eagle:package:16409/2" value="LM339"/>
10661+
<part name="IC1" library="linear" library_urn="urn:adsk.eagle:library:262" deviceset="LM393" device="N" package3d_urn="urn:adsk.eagle:package:16409/2" value="LM393"/>
1066210662
<part name="SUPPLY1" library="supply2" library_urn="urn:adsk.eagle:library:372" deviceset="GND" device=""/>
1066310663
<part name="SUPPLY2" library="supply2" library_urn="urn:adsk.eagle:library:372" deviceset="GND" device=""/>
1066410664
<part name="SUPPLY4" library="supply2" library_urn="urn:adsk.eagle:library:372" deviceset="VCC" device=""/>
@@ -10673,6 +10673,9 @@ SparkFun BigTime Watch Kit&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
1067310673
<part name="S1" library="SparkFun-Switches" library_urn="urn:adsk.eagle:library:535" deviceset="MOMENTARY-SWITCH-SPST" device="-PTH-6.0MM-KIT" package3d_urn="urn:adsk.eagle:package:40170/1" value="SPST Mode button"/>
1067410674
<part name="S2" library="SparkFun-Switches" library_urn="urn:adsk.eagle:library:535" deviceset="MOMENTARY-SWITCH-SPST" device="-PTH-6.0MM-KIT" package3d_urn="urn:adsk.eagle:package:40170/1" value="SPST Test Button"/>
1067510675
<part name="SUPPLY6" library="supply2" library_urn="urn:adsk.eagle:library:372" deviceset="GND" device=""/>
10676+
<part name="R1" library="eagle-ltspice" library_urn="urn:adsk.eagle:library:217" deviceset="R" device="0207/10" package3d_urn="urn:adsk.eagle:package:13275/1" value="4.7k"/>
10677+
<part name="R8" library="eagle-ltspice" library_urn="urn:adsk.eagle:library:217" deviceset="R" device="0207/10" package3d_urn="urn:adsk.eagle:package:13275/1" value="4.7K"/>
10678+
<part name="SUPPLY8" library="supply2" library_urn="urn:adsk.eagle:library:372" deviceset="VCC" device=""/>
1067610679
</parts>
1067710680
<sheets>
1067810681
<sheet>
@@ -10742,7 +10745,7 @@ SparkFun BigTime Watch Kit&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
1074210745
<attribute name="VALUE" x="-23.495" y="40.005" size="1.778" layer="96" rot="R180"/>
1074310746
</instance>
1074410747
<instance part="J4" gate="G$1" x="-45.72" y="48.26" smashed="yes">
10745-
<attribute name="VALUE" x="-55.88" y="60.706" size="1.778" layer="96" font="vector" align="top-left"/>
10748+
<attribute name="VALUE" x="-55.88" y="37.846" size="1.778" layer="96" font="vector" rot="R90" align="top-left"/>
1074610749
<attribute name="NAME" x="-50.8" y="56.134" size="1.778" layer="95" font="vector"/>
1074710750
</instance>
1074810751
<instance part="J3" gate="J$1" x="-20.32" y="96.52" smashed="yes" rot="R270">
@@ -10770,6 +10773,17 @@ SparkFun BigTime Watch Kit&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
1077010773
<instance part="SUPPLY6" gate="GND" x="27.94" y="109.22" smashed="yes" rot="R180">
1077110774
<attribute name="VALUE" x="29.845" y="112.395" size="1.778" layer="96" rot="R180"/>
1077210775
</instance>
10776+
<instance part="R1" gate="G$1" x="-38.1" y="88.9" smashed="yes" rot="R90">
10777+
<attribute name="NAME" x="-39.5986" y="85.09" size="1.778" layer="95" rot="R90"/>
10778+
<attribute name="VALUE" x="-39.878" y="92.71" size="1.778" layer="96" rot="R90"/>
10779+
</instance>
10780+
<instance part="R8" gate="G$1" x="-35.56" y="88.9" smashed="yes" rot="R90">
10781+
<attribute name="NAME" x="-31.9786" y="92.71" size="1.778" layer="95" rot="R90"/>
10782+
<attribute name="VALUE" x="-32.258" y="85.09" size="1.778" layer="96" rot="R90"/>
10783+
</instance>
10784+
<instance part="SUPPLY8" gate="G$1" x="-38.1" y="104.14" smashed="yes">
10785+
<attribute name="VALUE" x="-40.005" y="107.315" size="1.778" layer="96"/>
10786+
</instance>
1077310787
</instances>
1077410788
<busses>
1077510789
</busses>
@@ -10963,6 +10977,15 @@ SparkFun BigTime Watch Kit&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
1096310977
<junction x="-22.86" y="88.9"/>
1096410978
<pinref part="SUPPLY3" gate="G$1" pin="VCC"/>
1096510979
</segment>
10980+
<segment>
10981+
<pinref part="R8" gate="G$1" pin="2"/>
10982+
<wire x1="-35.56" y1="93.98" x2="-35.56" y2="101.6" width="0.1524" layer="91"/>
10983+
<wire x1="-35.56" y1="101.6" x2="-38.1" y2="101.6" width="0.1524" layer="91"/>
10984+
<wire x1="-38.1" y1="101.6" x2="-38.1" y2="93.98" width="0.1524" layer="91"/>
10985+
<pinref part="R1" gate="G$1" pin="2"/>
10986+
<pinref part="SUPPLY8" gate="G$1" pin="VCC"/>
10987+
<junction x="-38.1" y="101.6"/>
10988+
</segment>
1096610989
</net>
1096710990
<net name="VRX" class="0">
1096810991
<segment>
@@ -10979,6 +11002,9 @@ SparkFun BigTime Watch Kit&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
1097911002
<pinref part="J4" gate="G$1" pin="4"/>
1098011003
<pinref part="U$1" gate="G$1" pin="A5"/>
1098111004
<wire x1="-38.1" y1="53.34" x2="-12.7" y2="53.34" width="0.1524" layer="91"/>
11005+
<wire x1="-38.1" y1="53.34" x2="-38.1" y2="83.82" width="0.1524" layer="91"/>
11006+
<junction x="-38.1" y="53.34"/>
11007+
<pinref part="R1" gate="G$1" pin="1"/>
1098211008
</segment>
1098311009
</net>
1098411010
<net name="N$2" class="0">
@@ -10988,7 +11014,11 @@ SparkFun BigTime Watch Kit&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
1098811014
<wire x1="-12.7" y1="55.88" x2="-33.02" y2="55.88" width="0.1524" layer="91"/>
1098911015
<wire x1="-33.02" y1="55.88" x2="-33.02" y2="50.8" width="0.1524" layer="91"/>
1099011016
<pinref part="J4" gate="G$1" pin="3"/>
10991-
<wire x1="-33.02" y1="50.8" x2="-38.1" y2="50.8" width="0.1524" layer="91"/>
11017+
<wire x1="-33.02" y1="50.8" x2="-35.56" y2="50.8" width="0.1524" layer="91"/>
11018+
<wire x1="-35.56" y1="50.8" x2="-38.1" y2="50.8" width="0.1524" layer="91"/>
11019+
<wire x1="-35.56" y1="50.8" x2="-35.56" y2="83.82" width="0.1524" layer="91"/>
11020+
<junction x="-35.56" y="50.8"/>
11021+
<pinref part="R8" gate="G$1" pin="1"/>
1099211022
</segment>
1099311023
</net>
1099411024
<net name="N$5" class="0">

documentation/images/lr_meter2.png

1.02 KB
Loading

documentation/images/project.jpg

74.6 KB
Loading

0 commit comments

Comments
 (0)