Tiny 240/120V AC power supply for logic device