transformerless power supply for 5v
Thanks everyone for the feedback!
pranam77, what do you mean by "post from CMOS" ?
R6 is really just to discharge C1, so the PSU will be safe to handle once disconnected. I chose 1M because I wanted it to be 1/4W resister. Peak voltage is about 315V, so at 470K the power dissipated will be around 0.21W, which seems to me marginally close to the 0.25W rating.
I consider adding an isolation transformer (yeah, I know it won't be a transformerless PSU afterward
) for safety (the application might have a trimmer that will be adjusted with a screwdriver while the circuit is "hot").
The main consideration is space - the application should have a small footprint. So I'm also looking for suggestions for small isolation solution...
I also consider splitting R5 to two 220Ohm resistors, to lower their power rating (although I'm sure its worth it).