With HV4205E you can build a simple single chip voltage converter. With IC and a few external components connected like in the schematic you can obtain dc stabilized voltages between 5 to 24V directly from main power source (100 to 260V ac). The maximum output current is 50mA.
The main chip contains a preregulator which ensure C2 charging voltage (a large capacitance). The charging process continues untill the capacitor voltage has reached a level of approximately the desired voltage + 6V.
When this stage is reached, C2 delivers the required voltage to the regulator, the output of this regulator can be adjusted between 5V and 24V with P1 and is available at IC pin 6.
Because this circuit is coupled directly to the main supply do not touch any part of it!