I am using a BC557 as a switch to turn on a variable voltage line.I connected the base via a resistor a pin on arduino.I am toggling the pin high and low to turn off or turn on the transistor respectively.Problem is the emitter is connected to a line from a buck boost Vout which outputs voltage gradually from 0 to a max of 4.7V. Now even if the transistor switch is off the Load LED connected to the transistor lights up some times. I am unable to understand why.I am reading the voltage to reach 4.7V and then I turn the transistor ON but even before the Logic PIN is set LOW (to turn on the PNP) the LED lights up. I want to turn the VOUT ON only if the voltage builds up in the capacitor and reaches 4.7v but that is not happening, the voltage does not build up because the load is connected (even though the load is switched off with the PNP). Is it because the VOUT line from the buck boost is not a solid HIGH the transistor is misbehaving? Please let me know what to do here..