I would like to switch on my AC load (aprox 4 amps 230v) only for 5 sec after I switch ON and must switch off till I disconnect main switch.
I'm better in software and can write c++ code if I use ATTiny & Triac for this purpose.
please help me to have the circuit with bare minimum components.
I somehow collected transformer less 5v power and Triac circuits. But, I cannot think of 5sec delay and combining all of these due to my little electronics knowledge.
The easiest option is to buy a timer-relay module, no need to make a PSU,only other thing you need is a switch. For example DH48S-S on ebay is $17 including postage from Hong Kong.
if you want to do it by cheap cost just use a relay only and avoid using triac
by using microcontroller you can create 5sec delay ad trigerr your relay only for 5sec and after that make your microcontroller pin as low
or you can create it using 555 timer if you dont want to use microcontroller but the problem is after very 5 sec pulse will generate in timer and you can trigger your relay or triac circuit