Abstract Aging of porous silicon (PS) material is one of the important constraints for its large-scale commercial use as an accurate and reliable humidity sensor. It causes gradual drift of the sensor output with the passage of time. Present paper reports the systematic studies on the aging of the porous silicon humidity sensor with an objective to develop a signal-processing unit to compensate its long-term drift. Drift of the porous silicon sensor is first determined experimentally by periodic recalibration of the sensor with respect to a standard sensor. An ANN-based model is then developed, which can compensate drift due to its aging. Compensating ANN model is then hardware implemented using a simple electronics circuit. Experimental results using the circuit show that drift of approximately 13.5% has been compensated effectively.