Lifespan and healthspan machines can undergo C. elegans image segmentation errors due to changes in lighting conditions, which produce non-uniform images. Most C. elegans monitoring machines use backlight techniques based on the transparency of both the container and media. Backlight illumination obtains high-contrast images with dark C. elegans and a bright background. However, changes in illumination or media transparency conditions can produce non-uniform images, which are currently alleviated by image processing techniques. Besides, these machines should avoid C. elegans exposure to light as much as possible because light stresses worms, and can even affect their lifespan, mainly when using (1) long exposure times, (2) high intensities or (3) wavelengths that come close to ultraviolet. However, if short exposure of worms to light is required for visual monitoring, then light can also be used as a movement stimulus. In this paper, an active backlight method is analysed. The proposed method consists of controlling the light intensities and wavelengths of an illumination dots matrix with PID regulators. These regulators adapt illumination to some changing conditions. The experimental results shows that this method simplifies the image segmentation problem because it is able to automatically compensate not only changes in media transparency throughout assay days, but also changes in ambient conditions, such as smooth condensation on the lid and light derivatives of the illumination source during its lifetime. In addition, the strategic application of wavelengths could be adapted for the requirements of each assay. For instance, a specific control strategy has been proposed to minimise stress to worms and trying to stimulate C. elegans movement in lifespan assays.