Wrap an insulated wire around the live wire, maybe 20cm or so long. For clarity do not connect the wrapped wire to the live wire. Connect the wrapped wired to a CMOS 40106 inverter input and use a 10M Ohm pull up resistor to 5V. Hopefully you will get a 50Hz square wave on the output of the inverter when the live wire is live, and low when not. You can use one of the spare inverters in the 40106 if you want the idle state to be high.
At the risk of repeating myself: No electrical connection to the mains should be made anywhere, just an insulated wire wrapped around the live wire.
I still don't understand. Why is the point 'to connect it to the PCB'? Surely the point is to detect if it is live. My suggestion does so without an electrical connection to the live wire.
Still, you have other suggestions, maybe go with one of those.
To ilustrate l just want to test if wire has voltage or not.
Same like u do with this (check image) but just i need to get lets say a 3.3v or 5v signal that i can read in arduino when wire has voltage or wire dont have
the question is: lets say im building a pcb ( its not that i will build myself coz i know i will get 100 messages saying u cant do it , u are not qualified to do it etc etc. )
How can this be achieved if we just want to connect wire to a pcb screw terminal and then read the signal in arduini.
Insteand of wrapping a wire to the live wire is there a way to do this in a pcb.
Example: some antenas are integrated in pcb. (I dont know what example to get)
You'd have to put live and Arduino tracks close to each other, but the point of what I am suggestion is that it's safe because there's no connection to the live wire, and the live wire is not on the PCB. Bringing the live wire to the PCB is dangerous, however carefully you design the PCB. If you can't make my suggestion work for you then you have other suggestions from other people to think about.