Pages: [1]   Go Down
Author Topic: Project - Arduino to know the difference between 2 objects  (Read 869 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 227
Posts: 14048
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Rob Tillaart

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

0
Offline Offline
Full Member
***
Karma: 5
Posts: 241
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 71
Posts: 2614
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


the land of sun+snow
Offline Offline
Faraday Member
**
Karma: 159
Posts: 2927
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: November 09, 2012, 01:16:37 pm by oric_dan(333) » Logged

London
Offline Offline
Edison Member
*
Karma: 48
Posts: 1526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 71
Posts: 2614
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged


Queens, New York
Offline Offline
Faraday Member
**
Karma: 108
Posts: 3785
"Of all the things I've ever lost, I miss my mind the most" -Ozzy Osbourne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: November 16, 2012, 08:09:20 am by HazardsMind » Logged

Created Libraries:
TFT_Extension, OneWireKeypad, SerialServo, (UPD)WiiClassicController, VWID

Pages: [1]   Go Up
Jump to: