Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

power supply for logic circuit

Status
Not open for further replies.

csdave

Member level 5
Joined
Feb 11, 2011
Messages
87
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
2,122
Hi all,
As some of you might remember I am working on a little project to power a water fountain whenever my cat gets near it.

The logic part of the circuit drives a 2N2222 which in turn drives a relay.

My original plan was to power the logic circuit on batteries and have the mains voltage on the relay side only, but I am now thinking of integrating a little power supply circuit so I can power the whole thing from mains.

However there are a couple of points I am not so sure of. Here is what I am doing.

transformer output into a full bridge rectifier, then smoothing capacitor, then a 7505 with another cap on its output.
I am putting a fuse between the output of the transformer and the rectifier. And here come the first questions:
- do I need fuses on both secondary lines?
- what the fuse is doing is save the transformer in case of a short or other current surge in the downstream circuit. Would it be better to place it further downstream? Why or why not?
- I would tend to put a fuse on the primary side, but what is this fuse protecting? The outlet?

Finally, should I earth/ground anything on the digital/secondary side? What is the proper way to do this?

thanks
 

I too would opt for the fuse on the primary side. You ask what is it protecting? It's protecting your project. If you get a failure in any component, transformer, diodes, caps, anything that shorts, the fuse would blow and prevent further damage. You must however size the fuse correctly but just guessing something like an 1/2 or 1/4 amp slow blow would be fine.

As for grounding, if this is going to be plugged into a grounded outlet then ground the secondary side to that ground. It is going to be plugged into a non-grounded outlet then just leave the secondary side ground floating. Make sure you construct the project to have a clear visual isolation between the primary and secondary sides.

Ray
 

regarding fuses my other doubt is always whether I need two (one on each line) or only one. If I know which the live wire is, then I'd put one on the live wire, but I don't necessarily know (italian outlets are not polarized for example). Moreover, there's no neutral on the secondary side, unless I ground one of the terminals....

Regarding the clear visual isolation I have the transformer physically separating the two worlds, but everything is in the same enclosure. Relay and transformer are mounted on the protoboard, but the primary or otherwise mains wires are not wired to the board.

---------- Post added 03-05-11 at 00:01 ---------- Previous post was 02-05-11 at 23:57 ----------

As for grounding, it shouldn't be an issue here, but consider a wall wart adaptor. This normally doesn't have a ground wire as it is in a plastic box, so the secondary is happily floating.

Would this be a safety concern in any circumstance?
 

To protect the primary side from any kind direct short like a primary wire coming loosea and flopping around, you need a fuse in both lines the outlet is not polarized. But you need only one fuse (on either primary wire) to protect from secondary shorts. Adding the second primary fuse does provide extra peace of mind.

You don't want to force a neutral. Leave the primary side floating if there is not a 3rd ground wire.

The layout sounds good. Using the transformer to physically separate the pri / sec side is the best way to go.

Ray

---------- Post added at 15:34 ---------- Previous post was at 15:14 ----------

As for grounding, it shouldn't be an issue here, but consider a wall wart adaptor. This normally doesn't have a ground wire as it is in a plastic box, so the secondary is happily floating.

Would this be a safety concern in any circumstance?

Wall warts have well seperated primary and secondary wiring, fuse protection and finally they are hi-potted to prove there is good insulation between the primary and seconday sides. Your approach has got the first 2 items covered, as for the hi-pot the best you can do one of the following:
1. Unpowered insure there are megaohms between the primary and secondary circuit grounds.
2. With the circuit powered check for <100uA AC leakage between the secondary circuit ground and a real earth ground.

You do that and you will have done more than most people building circuits.

Ray
 

You don't want to force a neutral. Leave the primary side floating if there is not a 3rd ground wire.
You mean the secondary, right?

---------- Post added at 05:23 ---------- Previous post was at 05:20 ----------

1. Unpowered insure there are megaohms between the primary and secondary circuit grounds.
2. With the circuit powered check for <100uA AC leakage between the secondary circuit ground and a real earth ground.
1- is straightforward,
As for 2, I am not sure what you mean.... leakage through what? an ammeter between secondary mass and earth?

thanks!
 
Last edited:
You mean the secondary, right?

---------- Post added at 05:23 ---------- Previous post was at 05:20 ----------


I read the original post wrong. The choice of a secondary neutral or ground has no bearing on safety. You do what you like there.


1- is straightforward,
As for 2, I am not sure what you mean.... leakage through what? an ammeter between secondary mass and earth?

thanks!

Yes, connect an AC ammeter between any point on the secondary circuit and earth. This is the fault path that a person, or cat, would see if they touched some part of the low voltage side of the circuit and earth. If you get more than a few hundred microamps you'll start to feel the juice if get between ground and the secondary side.

Ray
 
  • Like
Reactions: csdave

    csdave

    Points: 2
    Helpful Answer Positive Rating
I read the original post wrong. The choice of a secondary neutral or ground has no bearing on safety. You do what you like there.

Gotcha. All that matters is isolation btw primary and secondary, right?
What was worrying me is that there could be a potential difference between the secondary circuit and ground. But that would be a static potential independent of the circuit being the secondary of a transformer, right?


Yes, connect an AC ammeter between any point on the secondary circuit and earth. This is the fault path that a person, or cat, would see if they touched some part of the low voltage side of the circuit and earth. If you get more than a few hundred microamps you'll start to feel the juice if get between ground and the secondary side.

A DC ammeter wouldn't do the trick, would it?

---- few more questions:

- does it make sense to have one fuse for each secondary terminal? or is one enough? What difference does it make if I put the secondary fuse before or after the rectifier?

- if there was ever the risk that a primary wire could touch the secondary then I'd have to ground the secondary, wouldn't I?
- how do you properly ground the secondary? connect the DC gnd to primary earth? (there's no such a thing a mass wire, it's called ground, right? Damn Italian :p)

thanks again ;)
 

Gotcha. All that matters is isolation btw primary and secondary, right?
What was worrying me is that there could be a potential difference between the secondary circuit and ground. But that would be a static potential independent of the circuit being the secondary of a transformer, right?

There will be a potential difference between a floating secondary and ground. And yes it's kind of like static in that it's a very low current.


A DC ammeter wouldn't do the trick, would it?

DC won't work. It's AC from the line that you would be trying to measure. You could take 1K Ohm resistor and connect it from the secondary circuit ground to earth ground and measure the AC voltage across the resistor, 1V = 1mA so you would be looking for less than 0.1V AC.

---- few more questions:

- does it make sense to have one fuse for each secondary terminal? or is one enough? What difference does it make if I put the secondary fuse before or after the rectifier?

- if there was ever the risk that a primary wire could touch the secondary then I'd have to ground the secondary, wouldn't I?
- how do you properly ground the secondary? connect the DC gnd to primary earth? (there's no such a thing a mass wire, it's called ground, right? Damn Italian :p)

thanks again ;)

If you are going to fuse the secondary you only need one (assuming you are not using a center tapped arrangement) and I would definitely put it before the rectifiers. They are a likely failure point and could short the transformer output.

Yes, if there was a risk of a primary to secondary short then the best way to protect the user is to connect the secondary DC ground to earth ground (the third prong here in the USA). That way a short from the primary hot to the secondary would cause an over current in the primary line and trip the main breaker. Depending on what exactly shorted you may or may not have much circuitry damage.

But if there was no ground available and you do get a pri / sec short, the last line of defense would be a GFI, ground fault interrupter. It would detect that current is going to ground and open the circuit. That's assuming the user is completing the circuit by touching the secondary (with primary short) and ground (hand on water faucet). GFIs are really a last resort because if they fail to open then somebody is getting shocked.

Since most equipment (at least here in the USA) is not grounded there are very strict safety requirements (UL / CSA / CE / etc) that do a very good job of preventing primary faults to user controls or metal parts of the chassis.

Ray
 
  • Like
Reactions: csdave

    csdave

    Points: 2
    Helpful Answer Positive Rating
Thanks Ray for the very detailed reply.

Since most equipment (at least here in the USA) is not grounded there are very strict safety requirements (UL / CSA / CE / etc) that do a very good job of preventing primary faults to user controls or metal parts of the chassis.

Here in Europe only metal-case equipment and high-power (16A plug) devices are grounded.
So if I understand correctly CE is relying on isolation between primary and secondary as well as between the circuit and the user.
 

That is correct. They want more than one insulation or some minimum visually inspectable distance (creepage / clearance distance) between the primary and the user. So transformers are wound with insulated wire and either wound on separate sections of the bobbin or layer of insulation like fish paper between the windings. PCBs have a visible gap between the primary and secondary circuit with only safety rated parts bridging the gap, transformers, optical isolators, etc.

That is why I stress project layouts should have a clearly definable primary/secondary division, like the transformer in your design.

Keep the pri/sec division and the double insulation in mind for any mains driven project and you'll be fine.

Ray
 

If you are going to fuse the secondary you only need one (assuming you are not using a center tapped arrangement) and I would definitely put it before the rectifiers. They are a likely failure point and could short the transformer output.

And two in the case of center tapped, right?

The transformer I have is has two pairs of terminals on each side. So I am configuring it by wiring the two 115primaries in series and the two 9v secondaries in parallel, but in principle I could wire the secondary as center tapped by placing them in series and then using only two diodes instead of a full rectifier. Would that have any advantage whatsoever? In terms of components I would need half the diodes but twice the fuses. But other than that?

Also the 9v are effective with peak being 12.73, if I am not mistaken. What output should I expect to get after the smoothing cap? I bought the 9v transformer because the alternative of 6v would be too small for properly driving the 7805, but I am not so sure anymore. 7.5 would have been best but I couldn't find it.
 

Yes two fuses if you use CT configuration.

This is pure conjecture but I believe that in the olden days an extra tap on the transformer was cheaper than a couple more diodes but the transformer is not utilized as well. You don't see this configuration much these days.

So for CT you would only need 2 diodes but if you choose to fuse the secondary, 2 fuses would be necessary.

The transformer are usually rated at full load which takes the winding losses into account. An unloaded transformer will have a higher output voltage than the 9V * 1.414 you calculated.

Depending on the load and the transformer size, even a 6V transformer might have been good enough. If the 2V dropout of the regulator becomes a problem there are much better LDOs to be had.

Ray
 

Thanks Ray,
you're right I could have used something like an LM2940 with the 6V transformer, but I think a small heatsink on the 7805 will be fine with the 9V transf, what do you think?

Also, please look at the pic: **broken link removed**

Given the fact that I fuse mains as soon as it gets into the box, I could get rid of F3 and put 2A fuses as F1 and F2 (the secondary fuse is not in the pic, I forgot to draw it, but it is 400mA), what do you think?
Or would you fuse the relay's out?

---

Also, I am having trouble sizing the smoothing cap (the 100uF is there from a cut and paste and I forgot to remove it) if I assume 400mA (actual current will be lower) and allow a ripple of 5V (12-5 =7 so it should make the 7805 happy) I get 0.4A/(100Hz * 5V) = 800uF. It looks pretty big... what am I doing wrong?
 

F3 is not necessary, F1/F2 will blow before the relay is damaged.

As for the cap size 800uF is correct for your assumptions and for a linear power supply is really not that large. But it likely could be smaller say 500uF or possibly even 300uF for several reasons. First I'm guessing the transformer is loaded less than it's rated current so it's output voltage will be higher, second the 2V dropout of the 7805 will likely be less, and thirdly as you state your actual current will be less than 400mA. So my gut says 500uF would not a problem but 300uF will probably be cutting it close. On the flip side 800uF will always work. It depends on where you need or want to cut corners.

Ray
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top