The Hardware Developer Kit (HDK) published by LEGO Mindstorms provides technical documentation and schematics for the NXT, its bluetooth interface, and its light, touch, sound, and ultrasonic sensors. This documentation may help you in developing your own sensors and actuators.