A sample collector to collect samples has a chassis with a receptacle that is sized to receive a container, and a restraint positioned about the receptacle to restraint the container in the receptacle. The restraint has an open position that allows a container to be inserted into, or released from, the receptacle, and a locked position in which the container is locked in and cannot be removed from the receptacle. A controller determines a status signal, and in response to the status signal, sends to the restraint, either of (i) an open signal to set the restraint to the open position, (ii) a lock signal to set the restraint to the locked position, or (iii) a stand-by signal to maintain the open or locked position of the restraint.