CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PIC Tv Color/Pulse detector

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
thiaguetz



Joined: 03 Feb 2004
Posts: 12
Location: Brazil

View user's profile Send private message

PIC Tv Color/Pulse detector
PostPosted: Thu Feb 05, 2004 5:16 pm     Reply with quote

Hi doods,

Today i was watching tv and I started thinking about detecting pulses or colors from a TV.

ok ok... i will explain ;)

Is there a way that i can detect a flat screen color (think about a TV displaying on the entire screen the color red) or a pulse, like a morse code only generating a black-white-black interval?

In other words... think about a morse code using 2 colors sequence (black and white)...
I was thinking about using a LDR with a PIC that will "see" the lighting changes... but i remembered that a LDR is too slow...

Then i rembered that i can use a phototransistor... but the lightning enviroment can influence the phototransitor sensivity.

So... if i choose to use one of then, the logic could be...
i record a flat screen color on a video tape or something that the tv will only display the color red... than i could have a value table that correspond the light measure that the red can send...
and then i can detect that color...

what do you think?
anyone know a way to do this?

thanks!
fpgeh



Joined: 07 Sep 2003
Posts: 19
Location: Vancouver, BC

View user's profile Send private message

PostPosted: Thu Feb 05, 2004 6:58 pm     Reply with quote

I'm not quite sure what you are trying to do, but it's probably a lot harder than you'd expect. First, TV signals are usually modulated on a carrier frequency, which would require demodulation prior to any color processing.
Even if you had baseband signals, most TVs use composite video. Composite video is a single signal containing both the black and white intensity at baseband and the color information carried on a sub-carrier frequency. To do any color processing you would need to demodulate this color information.
Anyways, there is a lot to consider. Check out www.epanorama.net for more info. Goto the video "video" section. I think I saw some PIC circuits there for character overlays and such.
thiaguetz



Joined: 03 Feb 2004
Posts: 12
Location: Brazil

View user's profile Send private message

PostPosted: Fri Feb 06, 2004 6:50 am     Reply with quote

HI!

Well, i will visit the link that you post here.

My idea is place a circuit in front of the TV and when the TV show the color red on the entire screen the circuit play a siren or something.

I know how to build the entire circuit, but only this part i cannot figure it out.

Is there a way to do with a LDR or a phototransistor?

thanks
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Fri Feb 06, 2004 8:03 am     Reply with quote

You could simply put a colored filter on a phototransistor. Or better yet two different colors on two phototransistors and check their ratio. This will compensate for changes in brightness, temperature, supply voltage etc. A pair of LDRs should also work though I think they are more sensitive to green. Check the LDR spec sheet.
If you can get an RGB video signal you can easily electrically compare the colors. Extracting color information from a composite video signal is tough without specialized chips.
_________________
The search for better is endless. Instead simply find very good and get the job done.
thiaguetz



Joined: 03 Feb 2004
Posts: 12
Location: Brazil

View user's profile Send private message

PostPosted: Fri Feb 06, 2004 10:52 am     Reply with quote

Ummm...

The color filter is a nice idea Smile

I will try that.

Thanks SherpaDoug Smile
bwhiten



Joined: 26 Nov 2003
Posts: 151
Location: Grayson, GA

View user's profile Send private message

PostPosted: Fri Feb 06, 2004 12:08 pm     Reply with quote

Look at this web site, www.taosinc.com
Take a look at their TCS230 for multiple color detection or
the TSLx257 series for single color detection.
I have used all these successfully for testing the correct color of LEDs on a pcb production line.
diogoc



Joined: 12 Feb 2008
Posts: 19

View user's profile Send private message Visit poster's website MSN Messenger

PostPosted: Thu Jul 16, 2009 3:39 am     Reply with quote

hi

do you have an example code for tcs230?

thanks
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Thu Jul 16, 2009 10:04 am     Reply with quote

bwhiten wrote:
Look at this web site, www.taosinc.com
Take a look at their TCS230 for multiple color detection or
the TSLx257 series for single color detection.
I have used all these successfully for testing the correct color of LEDs on a pcb production line.


What a cool little product. Don't know what *I'd* use it for -- but it's cool!

As to the author of the thread,

That's the fun part for you to figure out!

:D

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
bwhiten



Joined: 26 Nov 2003
Posts: 151
Location: Grayson, GA

View user's profile Send private message

PostPosted: Thu Jul 16, 2009 11:49 am     Reply with quote

Sorry. Five long years ago and the code is now owned by a manufacturing test company in Alabama.
From what I remember it was not very complex to code.
John P



Joined: 17 Sep 2003
Posts: 331

View user's profile Send private message

PostPosted: Thu Jul 16, 2009 2:41 pm     Reply with quote

Surely a color filter would fail if the screen were all white? Then your sensor would see red, even if there were green and blue visible at the same time. You'd need three sensors, so you could say "Red, but not green or blue".

Also, how can you discriminate between a screen that's "mostly red" versus one that's "all red"?
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Thu Jul 16, 2009 3:32 pm     Reply with quote

The white filter will give a higher output than just the red...

So you'd want to scan through them all and compare... then you'd get an idea if a light source was white or just something else...

Also, to the original poster, you could do inverted PWM with INT0 interrupts and a timer...

I'd also look up the capture/compare units to see if they might be applicable. (I think they are).

Cheers,

-Ben

p.s. I used INT0 on PWM from ADXL202 accelerometers and it worked quite nicely.
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group