Ok now i am a little surprised, maybe i made something wrong with the schematic.
On the schematic:
The stable 12V input is the VCC on the chip right?
2.The pulse input should be the same as touching the VCC with the input(pin 1) because the VCC and the Pulse input have the same voltage.
The pin 0 should hold the signal and send it to the Relay.
The difference is the Schottky on the pin 0, 2 stabilzators and another relay but it is in disconnected state.
ups... sorry You are right there is no setup, SORRY!!
The stable 12V input is the VCC on the chip right?
I hope not. The stable 12V goes through 7805 regulator to produce 5V and that is on the input of Vcc input of the chip.
2.The pulse input should be the same as touching the VCC with the input(pin 1) because the VCC and the Pulse input have the same voltage.
If you are just touching the input pin then when you are not touching the pin it is floating and can take on any level. I think what you are taking as working is just the charge on the input pin decaying back to a logic zero. On the photograph you have nothing connected so if you want to trigger it from just touching it to the Vcc line then you need a pull down resistor on this pin.
The difference is the Schottky on the pin 0, 2 stabilzators and another relay but it is in disconnected state.
The diode on your PCB will lower the voltage fed to the relay. What current should that relay take? And will it trigger off 4.5V?
First i want to thank You for helping me with this!
Yes of course, the 12V first go to the regulator and then to VCC.
The current is about 30mA with the 5V, it will also work with the 3V at 17mA or more of course.
You are right...this is not effect of the code that it holds it for a second.
Now i added one 0 to the time in the code and i see only the time for detect the signal rise but the output will be cut when i take the input out. Can the code be corrected the way it will work on that pcb?
I think the problem with this code is a fact that even very small voltage will set the HIGH value. Probably i should use the Analog input and set the limits ?
I don't have time to study your design right now but all I have to say is that it is very unorthodox and does not conform to standard design practices.