Relay problems G5V-1 using ultrasonic Distance Sensor

Hi,
What model Arduino are you using?

First you need capacitors around the 7805, consult the data sheet.

You cannot drive a UJT like BC547 directy to the base, you need a current limiting resistor in series with the base.

Please include on your circuit, where MOTSENSE and DISTSENSE are connected to.

Also some 0.1uF bypass capacitors around the circuit would help too.

You need about 1K, resistors in series with each of the bases of the BC547 transistors.

Tom... :slight_smile: