|
To Use
———-
Buttons above digits increment the digit’s value, Buttons below decrease value. This corresponds to colours on the resistor cycling through the standard codes, being:
Black 0
Brown 1
Red 2
Orange 3
Yellow 4
Green 5
Blue 6
Purple 7
Grey 8
White 9
[Note that I’ve just ignored the Gold & Silver as it end up being too many components. So, no 0.1 or 0.01 multiplier, nor tolerance band.]
It’s pretty simple to use - all you need to do is push buttons till the tricolour LED colours match the actual resistor’s first three bands then read off the digits. For instance, if a 4-band resistor has its first three band colors being Brown, Red & Orange, cycle through the digits till you get the colours and the digits should then read ‘1’, ‘2’ and ‘3’. The resistors value is then the first two significant digits with the third digit’s worth of zeroes. In this case, 12 with 3 zeroes, or 12,000 ohms otherwise referred to as 12k ohms. The indicators to the right of the resistor will help with multiples of 1000 to make it easy to see if the significant digits are in kohms, Mohms, or Gohms. You’ll probably have to be patient as it takes a second or two (or 5!) for the logic gates to filter through and indicate correctly.
So, for more examples, if the actual resistor colours are Orange, Purple and Red, you get the digits ‘4’, ‘7’ and ‘2’, which is 47 followed by 2 zeroes, or 4,700 ohms = 4.7k ohms. Or, Brown, Black & Black = 10 ohms; Blue, Grey & Purple = 680M ohms; Black, Brown Black = 1 ohm, and so on. If we had gold & silver as colours for the third band, we could show 0.1 zeroes and 0.01 zeroes, which allows for fractions of an ohm, or milli ohms. [For interest, a 0 ohm resistor is denoted by the first two bands being black. The last band is also usually black but could be any colour.]
Info
——-
This circuit simulates a 3-band resistor colour code only due to available space, so working on a way to optimise further just for ‘fun’. I also want to do the tolerance band, but we’ll see. This is more to play with the tricolour LED and current mirrors, which would really be good if the output of all three colours wasn’t tied common, so I could actually use current mirrors and therefore lay out the space more efficiently.
Standard disclaimers apply, its just a toy, so enjoy!
More Info
——————
For those interested, to get desired resistor code colours, use:
FET switches SW1-6 = [R1 R2 G1 G2 B1 B2]
Rnum BIN(Rnum) SW1-6 !SW1-6
0 0000 000000 111111
1 0001 011010 100101
2 0010 110000 001111
3 0011 110100 001011
4 0100 111100 000011
5 0101 001100 110011
6 0110 001111 110000
7 0111 100011 011100
8 1000 010101 101010
9 1001 111111 000000
[Got A, B, C, D backwards relative to Every Circuits counter block in all my workings so note that ‘A’ is MSB - ‘D’ being LSB, my bad.]
Truth Table:
Rnum Inputs R1 R2 G1 G2 B1 B2
0 !A!B!C!D 1 1 1 1 1 1
1 !A!B!CD 1 0 0 1 0 1
2 !A!B!C!D 0 0 1 1 1 1
3 !A!B!CD 0 0 1 0 1 1
4 !AB!C!D 0 0 0 0 1 1
5 !AB!CD 1 1 0 0 1 1
6 !AB!C!D 1 1 0 0 0 0
7 !AB!CD 0 1 1 1 0 0
8 A!B!C!D 1 0 1 0 1 0
9 A!B!CD 0 0 0 0 0 0
Or, in Sum of Product (SOP) notation:
R1 (SW1) = !A!B!C!D + !A!B!CD + !AB!CD + !AB!C!D + A!B!C!D
R2 (SW2) = !A!B!C!D + !AB!CD + !AB!C!D + !AB!CD
G1 (SW3) = !A!B!C!D + !A!B!C!D + !A!B!CD + !AB!CD + A!B!C!D
G2 (SW4) = !A!B!C!D + !A!B!CD + !A!B!C!D + !AB!CD
B1 (SW5) = !A!B!C!D + !A!B!C!D + !A!B!CD + !AB!C!D + !AB!CD + A!B!C!D
B2 (SW6) = !A!B!C!D + !A!B!CD + !A!B!C!D + !A!B!CD + !AB!C!D + !AB!CD
Simplifies to (in POS as it resulted in less gates):
SW1 = (B + !C) . (!A + !C) . (!A + !D) . (!C + !D) . (!B + C + D)
SW2 = !A . (B + !C) . (B + !D) . (!B + C + D)
SW3 = (C + !D) . (!B + C) . (!A + !C)
SW4 = !A . (!B + C) . (B + !C + !D)
SW5 = (!A + !B) . (!A + !C) . (!B + !C) . (B + C + !D)
SW6 = !A . (!B + !C)
Combines to:
SW1 = S5 . S1 . (!A + !D) . (!C + !D). S3
SW2 = !A . S5 . (B + !D) . S3
SW3 = S7. S6 . S1
SW4 = !A . S6 . (S5 + !D)
SW5 = (!A + !B) . S1 . S2 . (B + S7)
SW6 = !A . S2
Where:
S1 = (!A + !C)
S2 = (!B + !C)
S3 = (S6 + D)
S4 = (!B + D) - NOT USED
S5 = (B + !C)
[ S6 = (!B + C) ]
[ S7 = (C + !D) ]
And where:
(R0||R1||R2, G0||G1||G2, and B0||B1||B2):
R0 = 620 (not switched)
R1 = 620
R2 = 310
G0 = 400 (not switched)
G1 = 400
G2 = 200
B0 = 400 (not switched)
B1 = 400
B2 = 200
For multiplier indicator logic (band 3 of resistor):
(10^3 - 10^5): k = !A . ((B . !C) + (!B . C . D))
(10^6 - 10^8): M = (!A . B . C) + (A . !B . !C . !D)
(10^9): G = A . !B . !C . D
For the decimal points between resistor digits:
DP1 = !A . ((B . C . D) + (B . !C . !D) + (!B . !C . D))
DP2 = !A!BC!D + !AB!CD + A!B!C!D
Or
DP1 = GaX + kaY + MaD
DP2 = ZY + kaX + Mb
Where
X = !AD
Y = !A!D
Z = !BC
And
Ma=!ABC
Mb=A!B!C!D
Ka=B!C
Kb=!BCD
Ga=!B!C
Gb=AD
(Ma/b, ka/b, Ga/b are parts of the expressions used for k, M & G multiplier indicators above. Tried to reuse gate outputs where possible to save space but does make the sim slower.)
|