A beverage preparation machine comprising: a beverage dispenser ; a cup holding region located below the beverage dispenser , adapted to support and lift a cup, said beverage preparation machine comprising: a light source configured to transmit light across a portion of the cup holding region ; a receiver configured to receive at least a portion the light transmitted by the light source ; and a processor operably coupled to the receiver and the beverage dispenser , the processor configured to: determine whether a transparent cup has been sufficiently inserted into the cup holding region 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 ; or an inverted trough in a light level of the light transmitted by the light source ; wherein the processor is further configured to: upon a determination that the transparent cup 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 has subsequently been lifted to the desired height upon the determination that the transparent cup is not at the desired height. a beverage dispenser ; a cup holding region located below the beverage dispenser , adapted to support and lift a cup, said beverage preparation machine comprising: a light source configured to transmit light across a portion of the cup holding region ; a receiver configured to receive at least a portion the light transmitted by the light source ; and a processor operably coupled to the receiver and the beverage dispenser , the processor configured to: determine whether a transparent cup has been sufficiently inserted into the cup holding region 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 ; or an inverted trough in a light level of the light transmitted by the light source ; wherein the processor is further configured to: upon a determination that the transparent cup 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 has subsequently been lifted to the desired height upon the determination that the transparent cup is not at the desired height. a light source configured to transmit light across a portion of the cup holding region ; a receiver configured to receive at least a portion the light transmitted by the light source ; and a processor operably coupled to the receiver and the beverage dispenser , the processor configured to: determine whether a transparent cup has been sufficiently inserted into the cup holding region 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 ; or an inverted trough in a light level of the light transmitted by the light source ; a trough in a light level of the portion of the light received at the receiver ; or an inverted trough in a light level of the light transmitted by the light source ; wherein the processor is further configured to: upon a determination that the transparent cup 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 has subsequently been lifted to the desired height upon the determination that the transparent cup is not at the desired height. upon a determination that the transparent cup 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 has subsequently been lifted to the desired height upon the determination that the transparent cup is not at the desired height. <EOS>