A beverage preparation machine (100, 200) comprising: a beverage dispenser; a cup holding region (110, 210) located below the beverage dispenser, adapted to support and lift a cup, said beverage preparation machine comprising: a light source (104, 204A, 204B, 204C) configured to transmit light across a portion of the cup holding region (110, 210); a receiver (108, 208A, 208B, 208C) configured to receive at least a portion the light transmitted by the light source (104, 204A, 204B, 204C); and a processor operably coupled to the receiver (108, 208A, 208B, 208C) and the beverage dispenser (100, 200), the processor configured to: determine whether a transparent cup (120, 220) has been sufficiently inserted into the cup holding region (110, 210) and is at a desired height by a detection of: a trough in a light level of the portion of the light received at the receiver (108, 208A, 208B, 208C); or an inverted trough in a light level of the light transmitted by the light source (104, 204A, 204B, 204C); wherein the processor is further configured to: upon a determination that the transparent cup (120, 220) is not sufficiently inserted or is not at the desired height, prevent the beverage dispenser from dispensing a beverage; and detect whether the transparent cup (120, 220) has subsequently been lifted to the desired height upon the determination that the transparent cup (120, 220) is not at the desired height. a beverage dispenser; a cup holding region (110, 210) located below the beverage dispenser, adapted to support and lift a cup, said beverage preparation machine comprising: a light source (104, 204A, 204B, 204C) configured to transmit light across a portion of the cup holding region (110, 210); a receiver (108, 208A, 208B, 208C) configured to receive at least a portion the light transmitted by the light source (104, 204A, 204B, 204C); and a processor operably coupled to the receiver (108, 208A, 208B, 208C) and the beverage dispenser (100, 200), the processor configured to: determine whether a transparent cup (120, 220) has been sufficiently inserted into the cup holding region (110, 210) and is at a desired height by a detection of: a trough in a light level of the portion of the light received at the receiver (108, 208A, 208B, 208C); or an inverted trough in a light level of the light transmitted by the light source (104, 204A, 204B, 204C); wherein the processor is further configured to: upon a determination that the transparent cup (120, 220) is not sufficiently inserted or is not at the desired height, prevent the beverage dispenser from dispensing a beverage; and detect whether the transparent cup (120, 220) has subsequently been lifted to the desired height upon the determination that the transparent cup (120, 220) is not at the desired height. a light source (104, 204A, 204B, 204C) configured to transmit light across a portion of the cup holding region (110, 210); a receiver (108, 208A, 208B, 208C) configured to receive at least a portion the light transmitted by the light source (104, 204A, 204B, 204C); and a processor operably coupled to the receiver (108, 208A, 208B, 208C) and the beverage dispenser (100, 200), the processor configured to: determine whether a transparent cup (120, 220) has been sufficiently inserted into the cup holding region (110, 210) and is at a desired height by a detection of: a trough in a light level of the portion of the light received at the receiver (108, 208A, 208B, 208C); or an inverted trough in a light level of the light transmitted by the light source (104, 204A, 204B, 204C); a trough in a light level of the portion of the light received at the receiver (108, 208A, 208B, 208C); or an inverted trough in a light level of the light transmitted by the light source (104, 204A, 204B, 204C); wherein the processor is further configured to: upon a determination that the transparent cup (120, 220) is not sufficiently inserted or is not at the desired height, prevent the beverage dispenser from dispensing a beverage; and detect whether the transparent cup (120, 220) has subsequently been lifted to the desired height upon the determination that the transparent cup (120, 220) is not at the desired height. upon a determination that the transparent cup (120, 220) is not sufficiently inserted or is not at the desired height, prevent the beverage dispenser from dispensing a beverage; and detect whether the transparent cup (120, 220) has subsequently been lifted to the desired height upon the determination that the transparent cup (120, 220) is not at the desired height.