A medicine container includes a controller and a scale connected with the controller. The scale is configured to measure a weight of a content contained in the medicine container. An inertial measurement unit connects with the controller. The inertial measurement unit is configured to detect a position of the medicine container. The controller is configured to process the position information to ensure that the container is located in an upright position before the weight measurement is considered.