Hi Alect_T, thanks for the help, much appreciated. I was already trying a new approach with the counter, before I read your comment. Since I now have these components lying around.. it might be easier to at least try to make it work.
My circuit drawing skills are not that good. I therefore I added a drawing of the circuit on the breadboard.
I now have a 4017 decade counter, that counts on the PIR input. After it reaches the desired count it trips the cam via relay 1 and at the same time powers the 555 timer. I did not manage to make the 4017 work directly on the 555 timer output, so I added another relay.
It works, but the counting of the 4017 via the 555 input is unreliable, probably due to noise? Could you give advice on where to place a bypass cap?
In the circuit I combined two outputs from the NO terminal of relay 1. In my test, I used a third relay because I wasn't sure if I could wire it like that. Should I place diodes on the wires to the cam? Or is it okay like this?
Last question: I also did some testing with a dual PIR setup, that gives a signal via an AND gate. The AND gate is constructed with two 2n2222 transistors, the collector of transistor 1 is connected to +6v, the emitter goes to the collector of transistor two and via a 4.7k ohm to GND and output. The PIR 1 and 2 outputs are connected via a 10k Ohm resistor to the base of transistor 1 and 2, respectively. This setup works when fed directly to the IN of the relay, but when I connect the output of the AND gate to pin 3 of the 4017 nothing happens. Any idea why not?