I am using an Uno to create a ballot box/postbox project. When people post their postcards into a slot in the box, there will be an LED that flashes.
I am still quite new to electronics and I was wondering what type of sensor would be best to put either side of the slot? Would PIR work with a postcard?
PIR sensors only sense movements of objects that are warmer than the ambient air temperature. That is unlikely with a postcard, so the postcard would be invisible to the PIR sensor. I suggest that you use an IR reflectance sensor. You can get cheap modules commonly used for line tracking robots:
these are subject to interference from ambient sources of IR radiation like sunlight and other light sources. That might not be such an issue for a box with a small slot that doesn't allow much light to enter, I can't say.
I found this style to be more reliable:
I seem to remember reading this was because they use modulated IR to reduce sensitivity to IR interference, but now I don't see anywhere that says they are modulated.
but that would require the slot in your box to be almost the same size as the postcard so that you would be sure the postcard would always pass through the sensor's slot. Of course, you could make your own interrupter with an IR LED on one side of the slot and an IR receiver on the other.