Author Topic: Basic electronics question  (Read 5367 times)

zahc

  • friend
  • Senior Member
  • ***
  • Posts: 5,803
Basic electronics question
« on: November 17, 2013, 08:07:01 PM »
When building a basic power supply with a transformer and bridge rectifier, it is typical to include a capacitor on the output as a filter. How big should this capacitor be? The time constant of an RC circuit is R*C, and we want it to be >> 1/60th of a second. But we don't know the resistance of the load so what do you use for R?
Maybe a rare occurence, but then you only have to get murdered once to ruin your whole day.
--Tallpine

geronimotwo

  • friend
  • Senior Member
  • ***
  • Posts: 3,796
Re: Basic electronics question
« Reply #1 on: November 17, 2013, 08:33:22 PM »
since you're using a bridge rectifier, aren't you trying to get your output to be dc (0 hz)?
make the world idiot proof.....and you will have a world full of idiots. -g2

RocketMan

  • Mad Rocket Scientist
  • friend
  • Senior Member
  • ***
  • Posts: 13,673
  • Semper Fidelis
Re: Basic electronics question
« Reply #2 on: November 17, 2013, 10:03:09 PM »
What is the desired output voltage?  Also, what will it power?  For some things an unregulated supply such as the one you are talking about will work fine.  But if it powers a car stereo, a two-way radio or similar device, you will want a regulated supply that can supply a constant voltage with almost no ripple.
If there really was intelligent life on other planets, we'd be sending them foreign aid.

Conservatives see George Orwell's "1984" as a cautionary tale.  Progressives view it as a "how to" manual.

My wife often says to me, "You are evil and must be destroyed." She may be right.

Liberals believe one should never let reason, logic and facts get in the way of a good emotional argument.

zahc

  • friend
  • Senior Member
  • ***
  • Posts: 5,803
Re: Basic electronics question
« Reply #3 on: November 17, 2013, 11:32:56 PM »
since you're using a bridge rectifier, aren't you trying to get your output to be dc (0 hz)?

Yes; that is the point of the capacitor.

Quote
What is the desired output voltage?  Also, what will it power? 

What difference does it make? Regulation will come later.
Maybe a rare occurence, but then you only have to get murdered once to ruin your whole day.
--Tallpine

CypherNinja

  • friend
  • Member
  • ***
  • Posts: 467
Re: Basic electronics question
« Reply #4 on: November 18, 2013, 12:19:38 PM »
since you're using a bridge rectifier, aren't you trying to get your output to be dc (0 hz)?

The output of the rectifier itself is just series of voltage "humps" created by the polarity of one side of the AC sine wave being reversed. It needs more work to be smooth.
“Fear of death increases in exact proportion to increase in wealth,” Hemingway once said. Today, many of us have become rich in the currency of cowardice. We have so many things and so few experiences. We are desperate to live as long as possible, not as large as possible. We are so afraid to say goodbye to the world that we never say hello.
-Marty Beckerman (from a Wired article of all things)

Headless Thompson Gunner

  • friend
  • Senior Member
  • ***
  • Posts: 8,517
Re: Basic electronics question
« Reply #5 on: November 18, 2013, 02:10:57 PM »
You can't determine how much capacitance you need unless you have some idea of what your load will be and how much ripple you can tolerate on the output.  

Edit:  Can you guess what the load will be, even just to within a few orders of magnitude?  Size the cap to be large enough for your worst case guess, plus a little extra for good measure.  Too much capacitance shouldn't hurt the circuit, so just aim for a value that's bigger than you'll ever need.
« Last Edit: November 18, 2013, 02:38:30 PM by Headless Thompson Gunner »

Firethorn

  • friend
  • Senior Member
  • ***
  • Posts: 5,789
  • Where'd my explosive space modulator go?
Re: Basic electronics question
« Reply #6 on: November 19, 2013, 12:00:03 AM »
Too much capacitance shouldn't hurt the circuit, so just aim for a value that's bigger than you'll ever need.

This will also help with longevity of the circuit; most capacitors tend to degrade over time.

Zahc - What's the voltage/amperage/maximum wattage of the circuit you're supplying?  Also, are you using a half wave rectifier, full wave, or is this in an industrial setting where you're using a three phase one?

This requires some thought, but it gives you the necessary math.  The trick is 'how much voltage drop/jitter is acceptable'.

C=Capacitor value, in Farads
f=frequency of DC peaks after the rectifier.  60 for a half-wave on US power, 120 for a full-wave
Xc=Maximum allowed resistance for your capacitor.
C=.159/f*Xc (.159= 1/(2pi))
Let's say your rough load is 100 watts at 12 volts*.  That's 8.33A.  R=V/I means 1.44 ohms. 
Let's also say that we want it to have a minimum of 10V, IE the 1.44ohm is 10/12th the circuit part, leaving 2/12 for the capacitor.  Xc=.288
Full wave rectifier = .159/(120*.228)=.00581 farads, or about 6 millifarads, 6k uf.  Or one of these for $4.52

More load = bigger cap, smoother load = bigger cap, etc...

*We're powering a big laptop computer or something.

RocketMan

  • Mad Rocket Scientist
  • friend
  • Senior Member
  • ***
  • Posts: 13,673
  • Semper Fidelis
Re: Basic electronics question
« Reply #7 on: November 19, 2013, 05:22:59 AM »
What difference does it make? Regulation will come later.

Okay then.  Have fun.
If there really was intelligent life on other planets, we'd be sending them foreign aid.

Conservatives see George Orwell's "1984" as a cautionary tale.  Progressives view it as a "how to" manual.

My wife often says to me, "You are evil and must be destroyed." She may be right.

Liberals believe one should never let reason, logic and facts get in the way of a good emotional argument.

geronimotwo

  • friend
  • Senior Member
  • ***
  • Posts: 3,796
Re: Basic electronics question
« Reply #8 on: November 19, 2013, 02:57:30 PM »
The output of the rectifier itself is just series of voltage "humps" created by the polarity of one side of the AC sine wave being reversed. It needs more work to be smooth.

yes, but his goal is 0 hz vs 60 hz, unless i'm missing something?
make the world idiot proof.....and you will have a world full of idiots. -g2

Firethorn

  • friend
  • Senior Member
  • ***
  • Posts: 5,789
  • Where'd my explosive space modulator go?
Re: Basic electronics question
« Reply #9 on: November 20, 2013, 02:12:58 AM »
yes, but his goal is 0 hz vs 60 hz, unless i'm missing something?

Depending on the hz of the input and the rectifier, it's actually going to be 50,60,100,120.

If the power demand is high enough I'd recommend a full up switchmode power supply - more efficient and actually cheaper.

zahc

  • friend
  • Senior Member
  • ***
  • Posts: 5,803
Re: Basic electronics question
« Reply #10 on: November 20, 2013, 07:54:48 AM »
I wouldn't be building a power supply except I need 24VAC to run a contactor, so I will use a 10:1 transformer on the 240VAC. I can add a bridge rectifier to the 24VAC and use a 7805 to get my 5V logic supply.

 I guess I could still use a separate SMPS on the 240VAC for the logic, but most of them are packaged to be plugged into a receptacle and I don't want to install a receptacle inside my enclosure just for that purpose.
Maybe a rare occurence, but then you only have to get murdered once to ruin your whole day.
--Tallpine

CNYCacher

  • friend
  • Senior Member
  • ***
  • Posts: 4,438
Re: Basic electronics question
« Reply #11 on: November 20, 2013, 09:01:05 AM »
When building a basic power supply with a transformer and bridge rectifier, it is typical to include a capacitor on the output as a filter. How big should this capacitor be? The time constant of an RC circuit is R*C, and we want it to be >> 1/60th of a second. But we don't know the resistance of the load so what do you use for R?

R=V/I

Sounds snarky, but it's actually a direct approximation.  If you are drawing a 10A load off a 120v circuit, the load is functionally identical to a 12-Ohm resistor.

If you are going full-bridge, you can approximate for 120hz instead of 60, I suspect that solving for 1/120s = VC/I is going to get you close.

I also suspect that "close" is going to be much larger than you need, because we are effectively planning for a 1/120s total power dropout, which isn't really what happens in a rectified waveform.

The preceding has been based on a more Dunkin Donuts coffee than I should be consuming, a layman's understanding of OHM's law, and zero practical experience.
On two occasions, I have been asked [by members of Parliament], "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question.
Charles Babbage

geronimotwo

  • friend
  • Senior Member
  • ***
  • Posts: 3,796
Re: Basic electronics question
« Reply #12 on: November 20, 2013, 10:12:44 AM »
I wouldn't be building a power supply except I need 24VAC to run a contactor, so I will use a 10:1 transformer on the 240VAC. I can add a bridge rectifier to the 24VAC and use a 7805 to get my 5V logic supply.

 I guess I could still use a separate SMPS on the 240VAC for the logic, but most of them are packaged to be plugged into a receptacle and I don't want to install a receptacle inside my enclosure just for that purpose.

for the ac portion you shouldn't need a capacitor. (assuming you are using 60hz 240vac, and want 60hz at 24vac). 
make the world idiot proof.....and you will have a world full of idiots. -g2

Nick1911

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,492
Re: Basic electronics question
« Reply #13 on: November 20, 2013, 10:46:35 AM »
I wouldn't be building a power supply except I need 24VAC to run a contactor, so I will use a 10:1 transformer on the 240VAC. I can add a bridge rectifier to the 24VAC and use a 7805 to get my 5V logic supply.

 I guess I could still use a separate SMPS on the 240VAC for the logic, but most of them are packaged to be plugged into a receptacle and I don't want to install a receptacle inside my enclosure just for that purpose.

I've actually tied this.  Fried the 7805.  I was using a 40VA transformer, rated at 24vac, but running closer to 26-7vac rms due to it being lightly loaded.  Voltage post rectification was over the 7805's maximum input of 35v.

Headless Thompson Gunner

  • friend
  • Senior Member
  • ***
  • Posts: 8,517
Re: Basic electronics question
« Reply #14 on: November 20, 2013, 12:27:55 PM »
I wouldn't be building a power supply except I need 24VAC to run a contactor, so I will use a 10:1 transformer on the 240VAC. I can add a bridge rectifier to the 24VAC and use a 7805 to get my 5V logic supply.
In that case, 1,000uF should be plenty for your filter cap.  Your load will be limited more by the power dissipation of the 7805 than by the filter capacitance.  

Also see Nicks warning about too much voltage.  Again, we're back to the 7805 as the component that defines the circuit's limits.

I guess I could still use a separate SMPS on the 240VAC for the logic, but most of them are packaged to be plugged into a receptacle and I don't want to install a receptacle inside my enclosure just for that purpose.
There are plenty of ac-to-dc power supplies available that aren't wall warts.  That's probably an easier solution.  Check Newark or Digikey.

Example:  TDK DSP10-5

Azrael256

  • friend
  • Senior Member
  • ***
  • Posts: 2,083
Re: Basic electronics question
« Reply #15 on: November 20, 2013, 03:36:43 PM »
Figure the power dissipation from pulling 24v down to 5v (that's going to be quite a bit unless you're driving one 3mm LED) and check against the 7805's spec sheet.  Unless you're down in like double digit milliamps, you'll need a serious heat sink.  The datasheet may include a chart for that.

ETA: Fairchild doesn't have a nice chart, but their datasheet is written with a Vi of only 10V.

KEC's datasheet is better... Max Pd WITH heat sink of 20W.  Without, 2W.  Stay under the design limit and use a heat sink that meets spec and you'll be fine.  With no heat sink... Like I said, double digit milliamps or the smoke will come out.
« Last Edit: November 20, 2013, 03:49:50 PM by Azrael256 »

Nick1911

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,492
Re: Basic electronics question
« Reply #16 on: November 20, 2013, 03:59:44 PM »
Figure the power dissipation from pulling 24v down to 5v (that's going to be quite a bit unless you're driving one 3mm LED) and check against the 7805's spec sheet.  Unless you're down in like double digit milliamps, you'll need a serious heat sink.  The datasheet may include a chart for that.

ETA: Fairchild doesn't have a nice chart, but their datasheet is written with a Vi of only 10V.

KEC's datasheet is better... Max Pd WITH heat sink of 20W.  Without, 2W.  Stay under the design limit and use a heat sink that meets spec and you'll be fine.  With no heat sink... Like I said, double digit milliamps or the smoke will come out.

Very interesting point!

I had forgotten that the LM78xx series are linear devices, instead thinking they were switched mode.

Imax = 20Watt / (24voltrms*root(2) - 5volt) = 0.69A

Is there a simple and inexpensive way to solve this problem without incurring these losses?

Azrael256

  • friend
  • Senior Member
  • ***
  • Posts: 2,083
Re: Basic electronics question
« Reply #17 on: November 20, 2013, 04:59:55 PM »
Uh, Nick, we already went through the rectifier and the smoothing cap.  It's all DC at the regulator.

Simple answer: Dual voltage transformer.  How many amps we talking here?  A 24VAC/12VDC wall wart isn't hard to find and saves you having to rectify.

I don't know if 240V means two hot 120s or you're going to England, but Hammond 162J24 gets you down to 12VAC, which is much more manageable.
« Last Edit: November 20, 2013, 05:56:20 PM by Azrael256 »

zahc

  • friend
  • Senior Member
  • ***
  • Posts: 5,803
Re: Basic electronics question
« Reply #18 on: November 20, 2013, 09:53:48 PM »
It might actually end up as 208V. It depends how they wire it at work.

I should just use a SMPS except for the 24VAC thing. Why would a 24VAC contactor not run fine on 24V? I assumed that they used AC to prevent the coil from becoming permanently magnetized and "failing closed". Regulated 24VDC via SMPS would be easier and I could run industrial goodies if I want to later.

Maybe a rare occurence, but then you only have to get murdered once to ruin your whole day.
--Tallpine

Nick1911

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,492
Re: Basic electronics question
« Reply #19 on: November 20, 2013, 10:09:23 PM »
I should just use a SMPS except for the 24VAC thing. Why would a 24VAC contactor not run fine on 24V?

Because 24VAC coils use induction to limit their current flow.  This inductive reactance isn't present if 24VDC is applied.  Thus the coil would draw too much power and overheat.

Testing this theory, I attempted this with a 24VAC control contactor and a 24VDC power supply.  The coil drew 2.52A, for a total dissipation of 60 watts.  The coil was too hot to touch in under 10 seconds.
« Last Edit: November 20, 2013, 10:13:30 PM by Nick1911 »

Azrael256

  • friend
  • Senior Member
  • ***
  • Posts: 2,083
Re: Basic electronics question
« Reply #20 on: November 20, 2013, 10:17:09 PM »
Testing this theory, I attempted this with a 24VAC control contactor and a 24VDC power supply.  The coil drew 2.52A, for a total dissipation of 60 watts.  The coil was too hot to touch in under 10 seconds.

Pfft.

It was at least 15 seconds, and your hand was cold from the beer you handed to whoever was "watch[ing] this."

Nick1911

  • Administrator
  • Senior Member
  • *****
  • Posts: 8,492
Re: Basic electronics question
« Reply #21 on: November 20, 2013, 10:27:52 PM »
Pfft.

It was at least 15 seconds, and your hand was cold from the beer you handed to whoever was "watch[ing] this."

Hrm, how did you know?


Azrael256

  • friend
  • Senior Member
  • ***
  • Posts: 2,083
Re: Basic electronics question
« Reply #22 on: November 20, 2013, 11:58:33 PM »
Hrm, how did you know?

That's what I would do.  No way I'd try to grab that sober.

LM2596 and a honking TO-220 heat sink can't be more than $2.  It'll handle more current anyway.  You just have to power a small fan off the 5V output because that's just funny to me.  Oh, and logic loves sitting in parallel with an inductive load downstream from the regulator.

slugcatcher

  • friend
  • Member
  • ***
  • Posts: 370
Re: Basic electronics question
« Reply #23 on: November 21, 2013, 08:36:05 AM »
You can buy 24VAC to 5VDC converters for $50 or less.  I understand the urge to do it yourself but it's much faster, easier and cheaper to just buy off the shelf items.

How much current is your logic pulling on that 5V line?  I may have missed that.

zahc

  • friend
  • Senior Member
  • ***
  • Posts: 5,803
Re: Basic electronics question
« Reply #24 on: November 21, 2013, 06:59:43 PM »
Maybe 300mA
Maybe a rare occurence, but then you only have to get murdered once to ruin your whole day.
--Tallpine