Determining Electric Charge with a Sensor