Go Down

Topic: Project - Arduino to know the difference between 2 objects (Read 894 times) previous topic - next topic

ch_91

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!

robtillaart

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.

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

wwbrown

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.

Riva

What about placing a different colour label on bottom of food & water things and using a colour detector.
http://forum.arduino.cc/index.php?action=unread;boards=5,67,10,11,66,12,15,17,21,22,23,24,25,29;ALL

oric_dan

#4
Nov 09, 2012, 07:13 pm Last Edit: Nov 09, 2012, 07:16 pm by oric_dan(333) Reason: 1
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.

Henry_Best


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.

Riva


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://forum.arduino.cc/index.php?action=unread;boards=5,67,10,11,66,12,15,17,21,22,23,24,25,29;ALL

HazardsMind

#7
Nov 16, 2012, 02:04 pm Last Edit: Nov 16, 2012, 02:09 pm by HazardsMind Reason: 1
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.
My GitHub:
https://github.com/AndrewMascolo?tab=repositories

Go Up