Maker Pro
Maker Pro

5 volt supply straight from 240v AC mains

T

techie_alison

Hi,

Please may I ask what the arrangement is when you see a single LED powered
straight off of a mains power supply without any transformers or switch mode
circuitry? In other words, totally uninsulated or regulated.

I have an old computer with an external hard disk which needs about 30
seconds to spin-up before the computer. With a small timing circuit, 555,
or using a PIC even (have dozens) after a set time a relay would be set,
thus powering on the computer. A 7805 could be introduced to take into
account the voltage swing. Half wave rectification could result in 120v
too.

This doesn't need to be insulated from the outside world, safety is not a
concern, just that roughly 5v should be available for the small circuit and
the 3amp relay.

Any ideas?? Just interested to hear of how this is done. Or would it be
easier to just buy a small tordial TX and make the box a bit bigger?

Thanks,

Aly
 
T

Tom Lucas

techie_alison said:
Hi,

Please may I ask what the arrangement is when you see a single LED
powered
straight off of a mains power supply without any transformers or
switch mode
circuitry? In other words, totally uninsulated or regulated.

I think you'll find that that is a neon lamp and not an LED. LED's
connected directly across the mains will give light in the form of fire.
I have an old computer with an external hard disk which needs about 30
seconds to spin-up before the computer. With a small timing circuit,
555,
or using a PIC even (have dozens) after a set time a relay would be
set,
thus powering on the computer. A 7805 could be introduced to take
into
account the voltage swing. Half wave rectification could result in
120v
too.

Why not buy a 5V supply to run the electonics off rather than mess with
mains yourself?
This doesn't need to be insulated from the outside world, safety is
not a
concern, just that roughly 5v should be available for the small
circuit and
the 3amp relay.

SAFETY IS THE PRIMARY CONCERN! Mains is not something to be fooled with
or it WILL kill you. Insulate everything or when you (or somebody else)
is not at full concentration you will touch something and die. There
should be fuses and other protection in the circuit as well. This is why
you should seriously think about buying a supply and letting someone
else handle the high voltage design - and the legal concerns that go
with it.
Any ideas?? Just interested to hear of how this is done. Or would it
be
easier to just buy a small tordial TX and make the box a bit bigger?

If it were me then I would use 5V from the Hard drives supply to trigger
a PIC (but a 555 or an RC circuit would be just as good) to control the
PC's power switch. If the PC has an ATX supply, then great because you
can stay low voltage and use a simple relay to replace the PC power
switch (remembering that only a pulse is required to simulate a buton
press). If the PC supply is AT then the power switch is mains and you
could use a mains relay switched by 5V but you need to be sure that the
terminals are properly insulated on the mains side.

Seriously, your tone doesn't sound like you are giving mains electricity
the respect it needs. I know enough people who have died from electric
shocks and each time it was because they thought safety wasn't a
concern. Be careful.
 
P

Peter

techie_alison said:
Hi,

Please may I ask what the arrangement is when you see a single LED powered
straight off of a mains power supply without any transformers or switch
mode
circuitry? In other words, totally uninsulated or regulated.

I have an old computer with an external hard disk which needs about 30
seconds to spin-up before the computer. With a small timing circuit, 555,
or using a PIC even (have dozens) after a set time a relay would be set,
thus powering on the computer. A 7805 could be introduced to take into
account the voltage swing. Half wave rectification could result in 120v
too.

This doesn't need to be insulated from the outside world, safety is not a
concern, just that roughly 5v should be available for the small circuit
and
the 3amp relay.

Any ideas?? Just interested to hear of how this is done. Or would it be
easier to just buy a small tordial TX and make the box a bit bigger?

Thanks,

Aly

Half wave rectification would NOT result in 120V and a 7805 can't drop
anywhere near that much voltage. If you don't know this then it would be a
very bad idea for you to make any live circuit. I recommend that you use a
wall wart for your 5V.

Having said that, a mains rated capacitor in series can be used as a sort of
voltage dropper followed by a rectifier to get low voltage. I actually found
a circuit like this in a Russian battery charger from the 60s. Yikes! You
get small size at the expense of safety and I don't think that its
worthwhile.

Peter
 
P

Paul Keinanen

Hi,

Please may I ask what the arrangement is when you see a single LED powered
straight off of a mains power supply without any transformers or switch mode
circuitry? In other words, totally uninsulated or regulated.

Typically a series capacitor is used with a capacitive reactance
sufficiently large at the mains frequency to limit the current to a
desired value. Due to harmonics and other high frequency noise usually
present on the mains, the capacitor reactance at these high
frequencies are quite low, thus quite large peak currents could flow,
thus, it is a good idea to also include a series resistor.

These kind of circuits only makes sense with very low current demand,
since at higher currents, the capacitors become quite large.
This doesn't need to be insulated from the outside world, safety is not a
concern, just that roughly 5v should be available for the small circuit and
the 3amp relay.

In order to minimise the load current and hence the required capacitor
size, it would be a good idea to use a relay with a large coil voltage
(and hence low coil current) driven by a high voltage open collector
output or a separate high voltage transistor.

Paul
 
T

techie_alison

Paul Keinanen said:
On Thu, 13 Jul 2006 11:07:16 +0100, "techie_alison"

Paul

Mmmm, hi Paul

Thanks :)

I think I'll stick with a small toroidal. Much more in line with what I've
done before, just had seen the LED concept out there before and wondered how
applicable it was.

Aly
 
M

Marc Guardiani

Peter said:
Having said that, a mains rated capacitor in series can be used as a sort of
voltage dropper followed by a rectifier to get low voltage. I actually found
a circuit like this in a Russian battery charger from the 60s. Yikes! You
get small size at the expense of safety and I don't think that its
worthwhile.

I still have a US made battery charger from the 60s that is composed
of:
* 2 safety interlock switches to disconnect both sides of the line when
the lid is opened.
* a rectifier.
* a 4 watt night light bulb.

Marc
 
J

Jim Stewart

Marc said:
I still have a US made battery charger from the 60s that is composed
of:
* 2 safety interlock switches to disconnect both sides of the line when
the lid is opened.
* a rectifier.
* a 4 watt night light bulb.

Yeah. Sounds like a good idea.

In my youth I had an early model airplane R/C
set. The battery pack was charged with an on-
line charger.

I can painfully remember touching the wrong part
and doing the chicken walk.
 
D

Donald Harris

Go to Microchip's website and look at the AP note TB008 "Transformerless
Power Supply". The example is for 115 VAC, but the concept is the same.

Don
 
J

John Perry

Tom Lucas wrote:
....>
I think you'll find that that is a neon lamp and not an LED. LED's
connected directly across the mains will give light in the form of fire.

Actually, the neon lamp will explode :). Unless you're careful to get
a neon _indicator_, which will have the necessary current limiting
resistor built into the package.

John Perry
 
N

Neil

Tom said:
I think you'll find that that is a neon lamp and not an LED. LED's
connected directly across the mains will give light in the form of fire.


Why not buy a 5V supply to run the electonics off rather than mess with
mains yourself?


SAFETY IS THE PRIMARY CONCERN! Mains is not something to be fooled with
or it WILL kill you. Insulate everything or when you (or somebody else)
is not at full concentration you will touch something and die. There
should be fuses and other protection in the circuit as well. This is why
you should seriously think about buying a supply and letting someone
else handle the high voltage design - and the legal concerns that go
with it.


If it were me then I would use 5V from the Hard drives supply to trigger
a PIC (but a 555 or an RC circuit would be just as good) to control the
PC's power switch. If the PC has an ATX supply, then great because you
can stay low voltage and use a simple relay to replace the PC power
switch (remembering that only a pulse is required to simulate a buton
press). If the PC supply is AT then the power switch is mains and you
could use a mains relay switched by 5V but you need to be sure that the
terminals are properly insulated on the mains side.

Seriously, your tone doesn't sound like you are giving mains electricity
the respect it needs. I know enough people who have died from electric
shocks and each time it was because they thought safety wasn't a
concern. Be careful.

Actually Some power strips use and LED. And a large resistor.
 
D

default

Hi,

Please may I ask what the arrangement is when you see a single LED powered
straight off of a mains power supply without any transformers or switch mode
circuitry? In other words, totally uninsulated or regulated.

I have an old computer with an external hard disk which needs about 30
seconds to spin-up before the computer. With a small timing circuit, 555,
or using a PIC even (have dozens) after a set time a relay would be set,
thus powering on the computer. A 7805 could be introduced to take into
account the voltage swing. Half wave rectification could result in 120v
too.

This doesn't need to be insulated from the outside world, safety is not a
concern, just that roughly 5v should be available for the small circuit and
the 3amp relay.

Any ideas?? Just interested to hear of how this is done. Or would it be
easier to just buy a small tordial TX and make the box a bit bigger?

Thanks,

Aly
Piece of cake if you know the current consumption of your circuit. I
run LED's and small circuits directly from the 120 VAC 60 HZ mains all
the time.

Use a capacitor to drop the voltage. - no heat and no energy wasted.

You take your circuit - measure the current and voltage it needs.
Subtract the voltage from the mains supply voltage and calculate a
"dropping capacitor" for the voltage you want to drop with the current
you need.. Use the formula for capacitive reactance.

Put the cap and a 100 ohm 1/2 W resistor in series with one side of
the mains - the resistor is to limit inrush current as the cap charges
and works as a fuse if the cap shorts. That goes to your four diode
full wave bridge rectifier.

Here I use ~.47 ufd/250 Volt caps for lighting a LED or two or three
in series from the 120/60 mains

If you are just interested in using an LED on the mains supply - you
can just bypass the LED with a small diode to keep the reverse voltage
from getting over .6 volts instead of using a rectifier or use back to
back LED's and light two with no rectifier.

The cap should be a non-polar type with an AC rating for the mains
voltage or 3X the DC rating.

Don't use the circuit with no load - the output voltage will be high.

When powering circuits you have to take into consideration your load -
if you're driving a relay, for instance, the current will be much
higher when the relay is energized. So in addition to solving the
capacitive reactance for the relay current + circuit, you also have to
give it some means to prevent voltage overshoot when the relay is not
energized - a simple shunt regulator with a single 1 watt zener may be
all you need -

I posted the data from the Siemens 1990 Optoelectronics data book
"Operating LEDs on AC Power, Appnote 6 " on
alt.binaries.schematics.electronic a couple of months ago

Another way to steal a little bit of power that may come in handy for
your disc spin up timing - a current transformer. Just add a few
turns of wire to a transformer with an open core (like a toroid or
side by side bobbin transformer) and put the load on the low voltage
windings - A trick we frequently use to turn on solid state relays
when an X-ray machine or other dangerous piece of equipment is running
- to sound horns or work warning lights. A little trial and error
involved - but that ties the output to a load - whenever the load is
drawing current the output is there.
 
B

Byron A Jeff

Please may I ask what the arrangement is when you see a single LED powered
straight off of a mains power supply without any transformers or switch mode
circuitry? In other words, totally uninsulated or regulated.

First off it's a dangerous one. A non isolated, non stepped down, non regulated
circuit connected to 240V is a terrible accident waiting to happen.
I have an old computer with an external hard disk which needs about 30
seconds to spin-up before the computer. With a small timing circuit, 555,
or using a PIC even (have dozens) after a set time a relay would be set,
thus powering on the computer. A 7805 could be introduced to take into
account the voltage swing. Half wave rectification could result in 120v
too.

Why? Any old wall wart you have laying around can safely bring the voltage
down to a safe level.

There's no apparent reason as to why you wouldn't want to take the much
more safer route.
This doesn't need to be insulated from the outside world, safety is not a
concern, just that roughly 5v should be available for the small circuit and
the 3amp relay.

Unless you have a cost concern here, there's no justification for throwing
safety out the window. None whatsoever.
Any ideas?? Just interested to hear of how this is done. Or would it be
easier to just buy a small tordial TX and make the box a bit bigger?

If you are determined, Microchip has a Technical Brief for a transformerless
power supply. You can find it here:

http://ww1.microchip.com/downloads/en/AppNotes/91008b.pdf

This is dangerous. The brief says that it's dangerous. I'm telling you that
this is dangerous and that you shouldn't do it. It's a safety hazard and a
fire hazard and there's no good justification.

My suggestion: DON'T DO IT!

'nuff said.

BAJ
 
B

Byron A Jeff

Tom Lucas wrote:
...>
Actually, the neon lamp will explode :). Unless you're careful to get
a neon _indicator_, which will have the necessary current limiting
resistor built into the package.

Absolutely. BTW you can connect an LED directly to the mains under a
couple of conditions:

1) You use sufficient current limiting.
2) You make sure to wire your LED with another diode (which can be another LED)
in antiparallel configuration. This limits the reverse voltage for each of the
diodes.

I rigged up a cheap 120VAC motion sensor by tying the LED of an optoisolator
directly to the 120V light fixture of motion sensing lights. I used a 10K
2W resistor and a reverse LED as a local indicator. The optoisolator converted
the dangerous 120VAC into a safe optoisolated 12VDC.

BTW the current limiting applies to neon bulbs also.

BAJ
 
M

Mark Fortune

techie_alison said:
Hi,

Please may I ask what the arrangement is when you see a single LED powered
straight off of a mains power supply without any transformers or switch mode
circuitry? In other words, totally uninsulated or regulated.

If memory serves, I have seen this done once with an LED using a pair of
resistors as a voltage divider - it might have even just been the one
resistor. Personally I think it was cheap workmanship though. This will
work with an LED, although it will flicker as it's only illuminated for
less than half the time, I think it can work with only one resistor but
only when you know the resistance of the device it is powering.
For hard disks this is a non option - as thier resistance varies wildly
as it spins up, settles, and does all its internals stuff, and the
resistors would have to be big mothers as hard disks draw a hefty
current. No no no no no
I have an old computer with an external hard disk which needs about 30
seconds to spin-up before the computer.

forgive me if I seem a little dense here... but if it's an external hard
disk, does it not have its own regulated power supply? could this not be
utilised in some fashion? but what sort of interface is it? ide, scsi,
parallel? that might give us some clues as to what would be a good solution.
With a small timing circuit, 555,
or using a PIC even (have dozens) after a set time a relay would be set,
thus powering on the computer. A 7805 could be introduced to take into
account the voltage swing. Half wave rectification could result in 120v
too.

This doesn't need to be insulated from the outside world, safety is not a
concern,

safety is always a concern.
just that roughly 5v should be available for the small circuit and
the 3amp relay.

I need a bit more information on your set up really, but I can envisage
two possible scenarios:

scenario 1) you have a true external hard disk, in an external hard disk
caddy with all the wiring and gubbins and some sort of parallel
interface whotnot. The drive is powered independantly of the computer.
If this is the case I would utilise the regulated 5v line powering the
hard disk

however, I think scenario 2 is more likely:

scenario 2) You have a hard disk that is external of the computer -
connected via an IDE lead and the computers power supply. You need the
hard disk to power up before the computer - although I dont know why at
this stage, but i'll pretend for now there is good reason for it. If
this is the case, you NEED a good regulated power supply for the drive,
and not just the 5v line if its a 3.5" drive - 12v will be required as
well or it wont spin up. 2.5" disks generally only require the 5v line.
Your best bet is a regulated 5v/12v power supply - which should be
fairly simple to construct. then simply run the timer circuit off that
supply.
 
T

Tomi Holger Engdahl

techie_alison said:
Hi,

Please may I ask what the arrangement is when you see a single LED powered
straight off of a mains power supply without any transformers or switch mode
circuitry? In other words, totally uninsulated or regulated.

I have an old computer with an external hard disk which needs about 30
seconds to spin-up before the computer. With a small timing circuit, 555,
or using a PIC even (have dozens) after a set time a relay would be set,
thus powering on the computer. A 7805 could be introduced to take into
account the voltage swing. Half wave rectification could result in 120v
too.

This doesn't need to be insulated from the outside world, safety is not a
concern, just that roughly 5v should be available for the small circuit and
the 3amp relay.

Any ideas?? Just interested to hear of how this is done. Or would it be
easier to just buy a small tordial TX and make the box a bit bigger?

Check out this:

Step-down rectifier makes a simple dc power supply
http://www.edn.com/archives/1998/040998/08df_06.htm

Link was picked from http://www.epanorama.net/
 
D

Dorian McIntire

techie_alison said:
Hi,

Please may I ask what the arrangement is when you see a single LED powered
straight off of a mains power supply without any transformers or switch
mode
circuitry? In other words, totally uninsulated or regulated.

I have an old computer with an external hard disk which needs about 30
seconds to spin-up before the computer. With a small timing circuit, 555,
or using a PIC even (have dozens) after a set time a relay would be set,
thus powering on the computer. A 7805 could be introduced to take into
account the voltage swing. Half wave rectification could result in 120v
too.

This doesn't need to be insulated from the outside world, safety is not a
concern, just that roughly 5v should be available for the small circuit
and
the 3amp relay.

Any ideas?? Just interested to hear of how this is done. Or would it be
easier to just buy a small tordial TX and make the box a bit bigger?

Thanks,

Aly

You could use a 12K (12000 ohm) limiting resistor in series the the LED to
limit the average current of the LED to around 20ma. The 12K resistor will
need to be at least a 5 watt unit and will get pretty warm during operation.
You will also need a bypass diode hooked across the LED with the anode of
this diode to cathode of the LED and vise-versa to limit the reverse voltage
of the LED.

The avoid the loss of power and subsequent heat generated by the resistor
you can use a 0.22 uf capacitor in place of the resistor. Make sure the
voltage rating of the capacitor is at least around twice the peak value of
the AC or around 600 volts. It must be a non-polar capacitor (most
electrolytics are polar).

C is calculate from the following formula: C = 1/2*Pi*f*Xc
this formula is an algebraic variation of the capacitive reactance formula

We use to use this technique to limit current for indicator lights in 440
volt power distribution switchboards.

NOTE: You can still get shocked by this arrangement if either or both of the
diodes open. 20ma of current across your heart is enough to kill you. Don't
even try this if your not familiar with the proper electrical safety
measures.


The safest technique, by far, is to use a small, step-down transformer
because of the increased level of isolation it offers.

Dorian
 
T

thinh

Tom Lucas viết :
I think you'll find that that is a neon lamp and not an LED. LED's
connected directly across the mains will give light in the form of fire.


Why not buy a 5V supply to run the electonics off rather than mess with
mains yourself?


SAFETY IS THE PRIMARY CONCERN! Mains is not something to be fooled with
or it WILL kill you. Insulate everything or when you (or somebody else)
is not at full concentration you will touch something and die. There
should be fuses and other protection in the circuit as well. This is why
you should seriously think about buying a supply and letting someone
else handle the high voltage design - and the legal concerns that go
with it.


If it were me then I would use 5V from the Hard drives supply to trigger
a PIC (but a 555 or an RC circuit would be just as good) to control the
PC's power switch. If the PC has an ATX supply, then great because you
can stay low voltage and use a simple relay to replace the PC power
switch (remembering that only a pulse is required to simulate a buton
press). If the PC supply is AT then the power switch is mains and you
could use a mains relay switched by 5V but you need to be sure that the
terminals are properly insulated on the mains side.

Seriously, your tone doesn't sound like you are giving mains electricity
the respect it needs. I know enough people who have died from electric
shocks and each time it was because they thought safety wasn't a
concern. Be careful.
 
D

default

Unless you have a cost concern here, there's no justification for throwing
safety out the window. None whatsoever.

There's no question that a wall wart is safer than a non-isolated
supply, for some applications. But this vociferous reaction about how
dangerous it is - is just not justified.

Many of us learned on vacuum tubes where the plate supply was an order
of magnitude more lethal than any mains voltage one might encounter.
Ever see the inside of a 100 KW transmitter power supply? Build a
Tesla or Induction coil? Rail Gun? Coil Gun? Vacuum tube amp or
transmitter? Line regulator? Repair a TV set? Power Factor
correction circuit? etc..

When all you need is a small indicator or circuit it makes sense to
use a cap to drop voltage - more efficient than a wall wart, takes up
less space, less cost, lighter, no waste heat to speak of. The
enclosure provides the shock protection.

For tinkering with circuits on a breadboard - or just learning
electronics, I'd agree it is too dangerous. But the op mentions it
doesn't need to be isolated, so he probably already thought of using a
wall wart.
 
S

Spehro Pefhany

For tinkering with circuits on a breadboard - or just learning
electronics, I'd agree it is too dangerous. But the op mentions it
doesn't need to be isolated, so he probably already thought of using a
wall wart.

IMHO, 99% of the time this topic comes up, it falls into the category
of "if you have to ask, don't use it". The 1% are mostly sensible
reliability and regulatory compliance concerns from people who do know
fairly well what they are doing.


Best regards,
Spehro Pefhany
 
P

Paul Keinanen

First off it's a dangerous one. A non isolated, non stepped down, non regulated
circuit connected to 240V is a terrible accident waiting to happen.

At least in Europe, all tube televisions and many tube radios had a
universal (AC/DC) power supply, with a half wave rectifier generating
the B+ line about 200-250 V, thus there was only a rectifier between
the other mains plug terminal to the B+, while the other mains plug
terminal was directly connected to the metallic chassis. Depending on
the way the mains plug is inserted into the wall socket, you either
have the Neutral in the chassis or the full 220 Vac Live in the
chassis. Also the tube heaters were in series and across the Live and
Neutral, possibly with a VDR in series to limit the inrush current.

When working with such equipment I have used two main principles,
before starting to work, I _always_ checked the mains plug orientation
by measuring the metallic chassis voltage. When working with active
equipment, I put my left hand in the pocket and only work with my
right hand inside the equipment. This avoids the risk of having the
current flow through your heart. If you get a muscular cramp in your
right hand due to an electric shock, you still have the left hand
operational to cut the power.

Regarding low power devices powered by a series capacitor, I would
suggest using capacitors intended for mains filters.

Instead of a single capacitor on the live side, put two in series,
each connecting one side to the respective mains plug terminal, while
the other terminal of each capacitor goes to the load (rectifier
etc.). In this configuration, the small signal circuit is floating
around 110 Vac. If you accidentally touch the small signal circuit,
there is still the other capacitor in series between the mains voltage
and you, limiting the current through your body. If you want to limit
the worst case current to 30 mA, the normal circuit current
consumption must be below 10-15 mA, since in normal operation, there
are two capacitors in series.

Paul
 
Top