Arduino Forum

Using Arduino => Project Guidance => Topic started by: ch_91 on Nov 09, 2012, 02:25 pm

Title: Project - Arduino to know the difference between 2 objects
Post by: ch_91 on Nov 09, 2012, 02:25 pm
Hello,

I need help deciding which sensor would do the job. The problem is I am doing a project with a Arduino Uno what is 'acting' like a desktop pet where I have 2 LEDs which notify the user that if one goes off it wants some food and the other if it wants a drink. I have made 2 small physical objects that will act as the food and water. And when you press them against the device the LEDs will go off.

Is there a sensor or something that will know the difference between each object? I was thinking of using a RFID reader and placing the tags into the 2 objects. Will this work, and/or is there another way I can do this?

Sorry if it sounds confusing.

Thanks!
Title: Re: Project - Arduino to know the difference between 2 objects
Post by: robtillaart on Nov 09, 2012, 03:32 pm
RFID is my first thought too. you can also place magnets in the pets with different orientation, but that might be not discriminating enough for a hall sensor.

Title: Re: Project - Arduino to know the difference between 2 objects
Post by: wwbrown on Nov 09, 2012, 04:05 pm
If I was looking to do this in volume I would try to find a material that was opaque in the visible yet transparent in the IR and another material that was opaque in the IR and transparent in the visible and arrange matching photodiodes/transistors.  When the objects were brought in they would block the photodiode from its inband light and you could read the values on the PD's to determine what was in front of it.

I say in volume as it may be expensive to set up a run initially for the "water" and "food" objects.
Title: Re: Project - Arduino to know the difference between 2 objects
Post by: Riva on Nov 09, 2012, 04:16 pm
What about placing a different colour label on bottom of food & water things and using a colour detector.
Title: Re: Project - Arduino to know the difference between 2 objects
Post by: oric_dan on Nov 09, 2012, 07:13 pm
Quote
What about placing a different colour label on bottom of food & water things and using a colour detector.


Along these lines,

http://www.parallax.com/Store/Sensors/ColorLight/tabid/175/CategoryID/50/List/0/SortField/0/Level/a/ProductID/429/Default.aspx

For a somewhat cheaper form of this, you might try using a blue Led and a red Led, and a simple CdS photoresistor for
pickup. First flash one Led, then flash the other Led.
Title: Re: Project - Arduino to know the difference between 2 objects
Post by: Henry_Best on Nov 10, 2012, 05:58 am

Hello,

I need help deciding which sensor would do the job. The problem is I am doing a project with a Arduino Uno what is 'acting' like a desktop pet where I have 2 LEDs which notify the user that if one goes off it wants some food and the other if it wants a drink. I have made 2 small physical objects that will act as the food and water. And when you press them against the device the LEDs will go off.

Is there a sensor or something that will know the difference between each object? I was thinking of using a RFID reader and placing the tags into the 2 objects. Will this work, and/or is there another way I can do this?

Sorry if it sounds confusing.

Thanks!


You don't say how big your 'food' and 'water' objects are. I'll assume that they are 2" long.
For a cheap solution, place two small magnets in one (say food) 2" apart and another two in the other (say water) 1" apart. In your 'receiver' place three magnetic reed switches with 1" gaps between them (at 0", 1" and 2") . Wire switch 1 in series with switch 2 and also switch 1 in series with switch 3, a "Y" formation. When brought close enough the 'food' will activate switches 1 and 3 and 'water' will activate switches 1 and 2, so the output (switch 2 or switch 3) will tell the 'receiver' which has been brought near.
Title: Re: Project - Arduino to know the difference between 2 objects
Post by: Riva on Nov 11, 2012, 09:52 am

Quote
What about placing a different colour label on bottom of food & water things and using a colour detector.


Along these lines,

http://www.parallax.com/Store/Sensors/ColorLight/tabid/175/CategoryID/50/List/0/SortField/0/Level/a/ProductID/429/Default.aspx

That idea but a lot cheaper. Something like this http://www.ebay.co.uk/itm/SainSmart-3-5V-TCS230-TCS3200-Color-Recognition-Sensor-Detector-Module-4-Arduino-/280959048831?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item416a76dc7f (http://www.ebay.co.uk/itm/SainSmart-3-5V-TCS230-TCS3200-Color-Recognition-Sensor-Detector-Module-4-Arduino-/280959048831?pt=UK_BOI_Electrical_Components_Supplies_ET&hash=item416a76dc7f)
Title: Re: Project - Arduino to know the difference between 2 objects
Post by: HazardsMind on Nov 16, 2012, 02:04 pm
Quote
Will the Uno be able to power the RFID, accelerometer, piezo and 3 LEDs or will I need to use a external power source?

Also, I want the 'food' and 'drink' LED's to notify the user about every 30 minutes. Will I be able to code this in or will I need a timing device of some sort?


Yes the ARD will be able to power all of those, as for notifying the user every 30 minutes, that you may want to use a clock circuit of some kind. Yes you can do the timer with the ARD but it will look something weird like this.

delay(1800000) => 30 minutes  OR you can use a nested loop like this,

for(count = 0; count <= 30, count++)             // 30 minute delay
{
       for(count2 = 0; count2 < 60; count2++)  // 1 minute delay
       {
            delay(1000);                                     // 1 second delay
       }
}

Hope this helps.