Ir sensors beer pong cups

I need some help. I wanted to build the beer pong table that has leds. I need some help in building the rgb pods so that when a cup is on the pod, it changes to the color green and when the cup is out, it turns red. How should I build this? Would reflective IR sensors do the job? how should I wire it up?

Your idea is good but at this point you need to start from the design, how big the table gonna be, how many cups you gonna use, after that we can see how many leds, resistors, IR leds and other electronics you need
and yes a IR leds/sensor will do the job.

Here you can see my example of IR leds you need

Thanks,
D.60

the table is a 2ft x 8ft marine plywood 3/4. 10 cups at each side so a total of 20 cups. I made a led matrix on the center of the table powered by an arduino and it works fine. Now i just want to add these cup sensing pods and I'm really having a hard time finding a tutorial on building these. I have IR sensors in mind but would it do great even through a sheet of plexi glass?

So it's 61cm x 244cm, you gonna use 10 cups per side, ...

I made a led matrix on the center of the table powered by an arduino and it works fine. Now i just want to add these cup sensing pods and I'm really having a hard time finding a tutorial on building these.

Wait, you want under each cup a a led + sensor or just a sensor and do the rest with the led matrix
you already have on the center of the table?

I have IR sensors in mind but would it do great even through a sheet of plexi glass?

Yes it will do fine, make sure to use a transparent one.

So I hope you already know about IR leds there is 2 types a transmitter like a normal led and a received
most of the are black.

You will need as well that kind of circuit :

Now as you see from the detector/receiver IR led it's connected to Analog pin. Using the simple
analog read code :

void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
  // read the input on analog pin 0:
  int sensorValue = analogRead(A0);
  // print out the value you read:
  Serial.println(sensorValue);
  delay(1);        // delay in between reads for stability
}

You will need to read the value of the received led from 0 to 1023 usually, you need to put the leds
close to eachother and in between them a paper or put some heatshrink tube above the leds,
while you close up your hand or an object the transmiter light get's reflected and it's received by the other IR RX led.

You can see my example videos bellow

and

You take the value of the received led thru Analog pin which the value is 0 means is low and 1023 means
is high (receiving reflected light) you can take that value and light up a led or use mapping like in the
2nd video.

Thanks,
D.60