Go to Post Work hard. Then work even harder. Work until there is nothing left to work on, then work more. - RoboChair [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 21-12-2006, 17:02
subzero15 subzero15 is offline
Registered User
FRC #0011 (MORT)
Team Role: Mechanical
 
Join Date: Dec 2006
Rookie Year: 2002
Location: New Jersey
Posts: 5
subzero15 is an unknown quantity at this point
Send a message via AIM to subzero15
RC and TAOS Color Sensor

I am looking at using the TCS230 Color Sensor Evaluation Kit from parallax.com on a project for my robotics class. I want to control it with the RC. Unfortunately, I have no idea how to wire it to the controller. Any help you can give me would be appreciated.

Here are some links about the color sensor:

http://www.parallax.com/dl/docs/prod/datast/TCS230.pdf
the parallax documentation

http://taosinc.com/images/product/do...TCS230-E21.pdf
the TAOS Documentation

thanks.
  #2   Spotlight this post!  
Unread 21-12-2006, 19:18
chris31 chris31 is offline
Team 2021 Captain
AKA: Chris Davidson
FRC #2021 (FA Robotics)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2006
Location: Atlanta, GA/ Fredericksburg,VA
Posts: 949
chris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond repute
Send a message via AIM to chris31
Re: RC and TAOS Color Sensor

I havent looked at the datasheets but you should be able to qire them up via the digital inputs and digital outputs. Have you written any code to use it. All code for it will be written using PBASIC so you would have to write a C version of the code they give you to interface the sensor with the Basic stamp.
  #3   Spotlight this post!  
Unread 21-12-2006, 19:20
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 7,011
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: RC and TAOS Color Sensor

Um, it'll be a bit of a pain to interface this to the RC, but not impossible.

The first step is understanding what this thing is giving you, which is a variable frequency square wave, frequency varies accoring to light brightness (Between about 8 and 24 kHz max at one scaling factor).

You first set two pins (s0 and S1) for the scaling factor. Likely these will be just jumpers to +5 or Gnd.
Then set two pins (S2/S3) to determine which "color" you are detecting. (For all 4 pins see the Taos sheet, Table 1)(You'll set these by software, using digital outputs of the RC, and change them real fast)

So, you want to detect of the color is Green. Strobe through all four colors (one 'color' is clear) and measure the output (=brightness =frequency) for each color, then use math to figure out the percentage of red/green/blue/white (brightness overall) to get the color.

Don
__________________

I am N2IRZ - What's your callsign?
  #4   Spotlight this post!  
Unread 21-12-2006, 21:32
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,717
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: RC and TAOS Color Sensor

So there are two intelligent ways to interface this to the RC, in my not entirely humble opinion. The control of it should probably follow Don's recommendations, but taking a reading from this might end up being more of a pain than you think.

First, directly mesuring a frequency of potentially atleast 12 kHz with the RC is generally difficult or problematic. If we had full access to the PIC's pins, you'd just use a CCP pin or two and mesaure the period of the signal, but that's sadly not possible on the IFI RC. So I think you have two options.

A. Use a frequency-to-voltage converter. This chip takes a frequency input, and outputs a voltage based on it. So you'd set it up so it puts out 5V at 10 or 12 kHz, and you'd take this output to one of the analog inputs on the RC.
Advantage: Much easier to code for. Mostly instantaneous value changes. Disadvantages: Yet another chip to wire up. Voltage range is going to depend on resistor and capacitor values, so the scaling will change between devices depending on the precision of your components. Also, it can be non-linear at the extremes of the range.

B. Use a very particular digital IO pin on the RC as a Timer1/3 clock input on the RC. 57 did this to measure the speed of our shooter wheel. Exactly one of the digital IO pins can be programmed so you can use Timer1 or Timer3 as a counter. I can provide more details if you're interested in this solution.
Advantages: No additional circuitry required. Potentially better resolution than the 10-bit analog input. Disadvantages: Harder to code. Resolution will depend on sampling time. (Faster sampling == less resolution) The value you're measuring will perforce be the average value of the frequency over your sampling period, not the instantaneous value. This may or may not be desirable.

The third option is to put the output on an interrupt pin and basically treat it like an encoder, but then your RC will be dealing with potentially a lot of interrupts. And as long as you're just using one of these, I don't think there's a reason not to go with option B for direct wiring to the controller.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
  #5   Spotlight this post!  
Unread 21-12-2006, 22:11
subzero15 subzero15 is offline
Registered User
FRC #0011 (MORT)
Team Role: Mechanical
 
Join Date: Dec 2006
Rookie Year: 2002
Location: New Jersey
Posts: 5
subzero15 is an unknown quantity at this point
Send a message via AIM to subzero15
Re: RC and TAOS Color Sensor

Thanks for all the help,

here is an e-mail I sent to an electrical engeineering friend of mine... maybe it willl give you a better idea of what I am trying to do. I am up to any suggestions.


For my class robotics project I am building an automated workcell. My design is to analyze and catalog different colored boxes.

This is how the system will work:
first the colored box enters the system, it lands on a conveyor belt.
That conveyor belt drops the box off at a staging area.
once on the staging area, I will use a Light-to-Frequency Sensor like this to identify what color the box is.
Next, an arm will pick up the box and place the box on the next conveyor
This conveyor will take the box and drop it off in a reptacle for its respective colored box.
I have attatched a picture of the CAD drawing of the project. I have updated the drawing but the princible is still the same.

I will be powering the conveyor belts and the arm with continuoous rotation servos like these.
I will be tracking the positioning of the arm with optical incremental encoders like these
I will be using a limit switch for other things like detecting if there is a box on the staging area.

So my problem is that I am having a hard time finding a microprocessor with enough inputs and/or outputs.

right now i have:
9 continuous rotation servos (1 digital input each)
1 limit switch (1 digital input)
2 optical incremental encoders (2 analog inputs, i think)
1 TCS230 light-to-frequency converter (6 digital inputs)
2 Leds (2 digital outputs)

Some of the microprocessors that I have looked at were basic stamp, sx, and IFI robotics' microchip Robot Conctrollers(here and here)

I wanted to use a SX controller but I don't think they have Analog I/O's, I thought about adding more limit switches to replace the encoders. I like these chips because then I could make my own circuit board later on...

I think I could use IFI's microchip robot controllers. Would be hard to get the TCS230 light-to-frequency converter to work with this?
Do you know of any other microcontrollers that I could use? Any suggestions would be appreciated.

thanks,
Nick DiCola

please ignore the mechanical faults of the design... I am still learning Inventor.
Attached Thumbnails
Click image for larger version

Name:	UPS ISO 11-20.jpg
Views:	48
Size:	50.9 KB
ID:	4777  
  #6   Spotlight this post!  
Unread 21-12-2006, 23:43
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is offline
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,717
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: RC and TAOS Color Sensor

Firstly, encoders go to digital inputs, 2 for each encoder. Secondly, if you had 1 less servo, I think you could just use a Vex controller, provided you had a good way to interface the TCS. It looks like some of your servos could be paired up with a Y-cable. For instance, the two lifting that bar up and down will always need to turn the same amount in the same direction, so no reason they can't be run through a Y-cable. So really, I'd recommend a Vex controller, as it's more affordable than a full scale RC, which might be overkill for your application. Plus it can run in autonomous mode with no OI connected to it.

Lastly, you still have other options available to you for color sensing. Just googling color sensor came up with one other good option. And a CMUCam would work for color sensing as well.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
  #7   Spotlight this post!  
Unread 23-12-2006, 12:47
subzero15 subzero15 is offline
Registered User
FRC #0011 (MORT)
Team Role: Mechanical
 
Join Date: Dec 2006
Rookie Year: 2002
Location: New Jersey
Posts: 5
subzero15 is an unknown quantity at this point
Send a message via AIM to subzero15
Re: RC and TAOS Color Sensor

I think I am going to use the miniRC. My team had one spare one that was not being used...

thanks for all the help.
  #8   Spotlight this post!  
Unread 23-12-2006, 13:08
chris31 chris31 is offline
Team 2021 Captain
AKA: Chris Davidson
FRC #2021 (FA Robotics)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2006
Location: Atlanta, GA/ Fredericksburg,VA
Posts: 949
chris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond repute
Send a message via AIM to chris31
Re: RC and TAOS Color Sensor

A vex would work but if you wanted something that you owned and would be cheaper there are some nice PICs out there that would do what you need nicely.
  #9   Spotlight this post!  
Unread 24-12-2006, 00:38
subzero15 subzero15 is offline
Registered User
FRC #0011 (MORT)
Team Role: Mechanical
 
Join Date: Dec 2006
Rookie Year: 2002
Location: New Jersey
Posts: 5
subzero15 is an unknown quantity at this point
Send a message via AIM to subzero15
Re: RC and TAOS Color Sensor

where should I look for PIC's. I looked at parallax's SX chips, which I liked. I thought that I could use those...

If I cant find a nice PIC controller I will probably end up using the MiniRC...

I would definitely like to use a PIC controller so that I can make my own circuit board.
  #10   Spotlight this post!  
Unread 24-12-2006, 08:35
chris31 chris31 is offline
Team 2021 Captain
AKA: Chris Davidson
FRC #2021 (FA Robotics)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 2006
Location: Atlanta, GA/ Fredericksburg,VA
Posts: 949
chris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond reputechris31 has a reputation beyond repute
Send a message via AIM to chris31
Re: RC and TAOS Color Sensor

You can get them directly from Microchip (http://microchip.com/). Also you can look into buying programmers and development board from SparkFun (http://sparkfun.com) if you want.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Radio Control and Ultrasonic Sensor jeffmorris FIRST Tech Challenge 3 25-03-2006 11:06
microswitches and other sensor question chippermonky Electrical 3 08-02-2005 09:30
What color would go good with a Yellow and a Purple? (Think 2X and 5pt Ball colors) Elgin Clock Chit-Chat 17 06-10-2004 15:50
wiring and installing a sensor HuskieRobotics Programming 9 26-03-2004 19:21
banner sensor positioning and times bob1million Programming 4 16-02-2004 13:40


All times are GMT -5. The time now is 04:41.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi