Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Need help with robot project / color sensor

Status
Not open for further replies.

Indecent

New Member
Hello, I am a student and my friends are doing a project, I want to help them.

My friend told me that his problem is that he can't set up his color sensor to detect three separate colours using logic gates, he can only do either black or white, but he wants to differentiate between black, white and any other colour using logic gates, how can he do that ? with this color sensor logic gate thingy with 1's and 0's
 
You could try a comparator with an adjustment on its threshold (the voltage to which the sensed voltage is compared) to account for the reduced light getting through the color filters that is neither bright nor dark, but in between.

John
 
Maybe your friend should post his plan? If "red" is a logic state, then how will your friend determine what is "true?"

John
 
That's exactly the problem, our professor / instructor told us to do the project using logic gates like that. I am confused.

Edit: We would like to make it like, if it's white or black then it is true, if it is anything else it is false. Something like that.
 
You haven't said what family of logic you are using. Let's assume it is CMOS at 5V. The switch points are 1/3 and 2/3 of the supply voltage. Now, let's further assume that you can manipulate your color filter so its output is exactly half of what no filter gives. Darkness (not color, not light) is set to give less than 1/3 the supply voltage.

Then arrange your logic so color is "not light" and "not dark" (inverting the dark might help). Here's one approach. There are many.

Capture.PNG



While there are many solutions, the key is that color will not be light and will not be dark.

John
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top