Isolated dual power supply from 5V

The transformer can be hand wound in a mini
ferrite pot core. you can use 2N2222 or any other
fast transistor. The transformer should have 1KV
isolation. The dot polarity of TR1 should be
properly observed, else it may fail to oscillate
or give output.

Diode should be fast recovery type, for less than
100mA use 1N4148. transformer, pri-20-20,
sec-60-60, a SWG-AWG to suit the current you
design for, any fast switching transistor would
work, no regulation, use regulators like 78L12 if
you want, circuit like multivibrator used for
flashing LED lights.

SMPS designs should have clear line or patch of
isolation for product safety and long term
reliability. If you use opto-couplers they need to
have 5kV or better isolation and 10mm between pins.
The Live circuitry and the output circuitry should
not overlap on PCB, tracks should not stray to the
opposite side.

Power Supplies and SMPS, Transformers, Drive
circuits for Motors, Heaters and Solenoids are all
Power Electronics. Thyristors, Mosfets and High
Power Transistors are important components used in
these circuits.