Hi,
I am making a water level controller using ultrasonic sensor HC-SR04 and PIC16F877A. There is a 25 m long cable between sensor and uC. I am using 8 LEDs connected to PORTB through 320 ohm resistances to display water level. The problem is that I am getting a dip in voltage of about 2 volts in Power supply whenever the LEDs are ON. for power supply I am using 12v adapter regulated by LM7805. The voltage dip is on the 5V side of 7805 . and one more thing the same problem is not there if I don't use long cable i.e. when sensor is directly connected using short leads. Please help ....Regards