Hi,
As others have said, there are some safety issues that come up with using a
transformerless power supply. If you can get hold of a small wall wart as one
poster pointed out that would definitely be better if you dont have too much
experience with electrical circuits. The wall wart has the added benefit in
that it will be isolated from the line too, so you dont get a shock.
It's also true that the single capacitor (or two cap for the filtered version)
transformerless solution works, and it works well and for a long time, but
it has to be designed with a lot more care, and it has to be designed with the
load type in mind. If something isnt sized right it could burn up or even blow
up violently sending hot parts flying into the eyes and what have you.
At 120vac this is a problem and dangerous, but at 230vac it's about four times
more dangerous because of the increase in energy vs time available.
The first rule therefore is to make sure it is designed right so that it is safe and
can run for a long time without overheating.
There are a few things that have to be addressed with these offline power
supplies too, and one of them is surge current. A resistor of the correct size
has to be in series with the cap so that the surge doesnt blow anything up.
A small fuse should also be used to protect against a common cap failure mode
where it shorts out. Without the fuse the resistor would overheat and cause a
fire.
A practical unit i had designed several years ago was used to find out how practical
this kind of power supply would be in running a small while LED as a night light.
It ran just fine for a year or two, after which i started buying commercial units
that were packaged nicely and had light sensors to turn off in the day time.
The advantage in this kind of application over a single resistor is of course power
dissipation. The single resistor dissipates lots of power (wasted) while the
series cap solution uses about a half watt! Thus, it doesnt get hot at all,
not even warm. As mentioned before though, these power circuits have to be
designed just right or very serious safety issues come up.
In short, if you dont have a lot of experience with electrical circuits you should
go with a wall wart.