loading
Picture of
The idea of paint shopping just sends chills down my spine. In order to get rid of the hassle of paint shopping i came up with a device that reads and displays the RGB value of the color scanned. That way color shopping is no longer looking at paint sample cards but instead looking at the color actually being used.  

This instructable will teach you how to make and use "Ur Choice".

"Ur Choice" is a device that detects the RGB value of a particular color and displays it on a LCD Screen. The information given can be used in different life situations such as matching or finding colors for jobs such as painting. The uses of this product are not limited so please don't limit yourselves.  
 
Remove these adsRemove these ads by Signing Up

Step 1: Materials

Picture of Materials
download.jpg
images.jpg
The following materials is what is needed to build "Ur Choice": First you will need a  TCS3200-DB Color Sensor, db expander, a switch, and a Parallax 2x16 Serial LCD, 3 pin expander, and a soldering iron a basic stamp Home work Board and a roll 22 gauge wire.



Materials you must order: TCS3200-DB Color Sensor, db expander, Parallax 2x16 Serial LCD
 

Step 2: LCD

Picture of LCD
Wire LCD to bread board as shown  in the following diagram. make sure to run a wire to the bread board in a separate row. 

Step 3: Sensor

Picture of Sensor
Plug the DB expander into the color sensor. Then insert the DB expander on the bread board as followed in the PDF file. Adjust pins as needed while connecting the the ground as the same row as the LCD allowing both devices to run on the same ground.

Step 4: Switch

Picture of Switch
Take the two 22 gauge wires and solder one wire on the peg that says power and take the other wire and solder that wire on the peg that says ACC. Connect ACC into vss and take the wire that says power and insert it in the same row as the LCD and Sensor connecting the circuit with the switch.

Step 5: Code

Type in the following code shown below.  
' {$STAMP BS2}
' {$PBASIC 2.5}

TX              PIN     0


#SELECT $STAMP
  #CASE BS2
    T19K2       CON     32
#ENDSELECT

LcdBkSpc        CON     $08             ' move cursor left
LcdRt           CON     $09             ' move cursor right
LcdLF           CON     $0A             ' move cursor down 1 line
LcdCls          CON     $0C             ' clear LCD (use PAUSE 5 after)
LcdCR           CON     $0D             ' move pos 0 of next line
LcdBLon         CON     $11             ' backlight on
LcdBLoff        CON     $12             ' backlight off
LcdOff          CON     $15             ' LCD off
LcdOn1          CON     $16             ' LCD on; cursor off, blink off
LcdOn2          CON     $17             ' LCD on; cursor off, blink on
LcdOn3          CON     $18             ' LCD on; cursor on, blindfgdfk off
LcdOn4          CON     $19             ' LCD on; cursor on, blink on
LcdLine1        CON     $80             ' move to line 1, column 0
LcdLine2        CON     $94             ' move to line 2, column 0


charIn          VAR     Byte            ' input from user
baud            VAR     Word            ' baud rate for Serial LCD
' ---         ---   -----------
  S0     PIN   3    '    A
  S1     PIN   15    '    B
  OUT    PIN   6    '    C
  LED    PIN   4    '    D
  S2     PIN   8    '    E
  S3     PIN   5    '    F

' -----[ Constants ]-------------------------------------------------------

' Define count periods for each color. Adjust these for readings just under
' 255 for a white sheet of paper.

pRED     CON   13     'Red reading period.
pGREEN   CON   12     'Green reading period.
pBLUE    CON   11     'Blue reading period.

' -----[ Variables ]-------------------------------------------------------

RED      VAR   Word   'Red color reading.
GREEN    VAR   Word   'Green color reading.
BLUE     VAR   Word   'Blue color reading.


  HIGH  S0            'Maximum output rate.
  HIGH  S1            '        "
  HIGH  LED           'Turn on LED.



baud = T19K2



main:



  DO
    SEROUT TX, baud, [LcdBLon]
    PAUSE 500

      GOSUB  Color        'Get the color data, and output to DEBUG.
  DEBUG  "R", DEC3 RED
  DEBUG  " G", DEC3 GREEN
  DEBUG  " B", DEC3 BLUE
  DEBUG  CR

SEROUT TX, baud, ["R", DEC3 RED]           ' send char/num to LCD
SEROUT TX, baud, [" G", DEC3 Green]
SEROUT TX, baud, [" B", DEC3 Blue]
    PAUSE 500


  END
  LOOP
  END




' -----[ Initialization ]--------------------------------------------------

  HIGH  S0            'Maximum output rate.
  HIGH  S1            '        "
  HIGH  LED           'Turn on LED.

' -----[ Program Code ]----------------------------------------------------



' Color: Read all three color components.

Color:
  LOW  S2                   'Address the red output.
  LOW  S3
  COUNT  OUT, pRED, RED     'Read the red component.
  HIGH  S3                  'Address the blue output.
  COUNT  OUT, pBLUE, BLUE   'Read the blue component.
  HIGH  S2                  'Address the green output.
  COUNT  OUT, pGREEN, GREEN 'Read the green component.
  RETURN

Step 6: Finished Product

The finished product would have a box around the wiring allowing the LCD, the sensor, and the switch able to use. due to time and limited resources we were only able to have our finished product. Don't let this stop you. Building a box ca be easy just make sure you take measurements in order to have the product fit in the box. Make cut outs in order for the parts to have exposure and you have a pretty Ur Choice. 
temper2 years ago
What does Ur stand for?
SatCenterEngDes (author)  temper2 years ago
"Ur" is just short hand for your. we thought it would be a cool and catchy title.
Surely it's shorthand for "you are"? In which case it reads "you are choice" which, in my parlance means you are on the nose...
very cool idea! how much doe the lighting affect you readouts? color balance is such a tricky subject in photography, have you found that you can get reproducible results with this setup?
SatCenterEngDes (author)  amandaghassaei2 years ago
You are absolutely right, color balance is very tricky. we found that at a particular range gives a better and more accurate output. When turning the sensor on the LED comes on. when the LEDs come on try to make a perfect circle with the lighting of the LED on the object. that should give a pretty accurate reading. We were not able to test the device due to lack of time. Please, if you ever have time, create the device and test for yourself. let us know on your data. Hope this helped. I'm glad you liked the idea.