Has radio frequency identification technology ever been used for this particular application?
We have seen applications in which RFID is used in exactly this way. But the answer to your question depends on a variety of factors.
First, you would need to have a place within the machine to place the RFID reader and antenna. There are some very small reader modules designed for this purpose, so you should be able to find one that would work for your needs. Second, you would need to be able to place the tag in or on the consumable in such a way that it would not interfere with the dispensing and/or use of the consumable.
If these two issues are not problems for your device and consumable, then you would need to choose the right technology. Passive high-frequency (HF) or passive ultrahigh-frequency (UHF) might work for your application. If the reader antenna can be placed close to the consumable, then a short-range HF system might be best—but HF tags are typically a bit more expensive than UHF tags.
—Mark Roberti, Founder and Editor, RFID Journal