Go Down

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



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.


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.


Nov 16, 2012, 02:04 pm Last Edit: Nov 16, 2012, 02:09 pm by HazardsMind Reason: 1
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.
Created Libraries:
TFT_Extension, OneWireKeypad, SerialServo, (UPD)WiiClassicController, VWID

Go Up