Searching \ for '[PIC] How to achieve 10 bit PWM resolution at vari' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=pwm
Search entire site for: 'How to achieve 10 bit PWM resolution at vari'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] How to achieve 10 bit PWM resolution at vari'
2011\05\10@094121 by RNGolding

picon face
Hi, my first request to the list, so please be gentle with me!
I have an application that requires generation of a 10bit resolution PWM  signal at various repetition frequencies between 100Hz and 1kHz.  The PWM duty cycle and repetition frequency commands
will be received via the serial bus @ 115200 baud.
Required PWM frequencies are 105Hz, 140Hz, 300Hz and 1kHz, but other  frequencies may be required in the future.
I'm currently using a PIC18F4423 (but that can be changed if unsuitable).  Generating a 10bit PWM at a single frequency is pretty straightforward using a  suitable master clock frequency and Timer 2 values but I can't see how to get other frequencies (via PR2 value) without losing the  10bit resolution. i.e. setting a PR2 register value below 255 to set the other  frequencies reduces PWM resolution.
I've read the data sheet 'till I'm blue in the face and can't see a way of  achieving 10bit resolution at the various
frequencies.
My present thoughts are to use two PICs. The PIC1 to generate the required  clock frequency for PIC2, which generates the 10 bit PWM (PIC2 using fixed  Timer 2 values). The PWM duty cycle demand would
then be communicated from  PIC1 to PIC2 via SPI or I2C bus.
Clumsy, but can anyone suggest a more elegant way of doing it?
Thanks
RN

2011\05\10@101530 by Olin Lathrop

face picon face
RNGolding@aol.com wrote:
> I'm currently using a PIC18F4423 (but that can be changed if
> unsuitable). Generating a 10bit PWM at a single frequency is pretty
> straightforward using a  suitable master clock frequency and Timer 2
> values but
> I can't see how to get other frequencies (via PR2 value) without
>  losing the 10bit resolution. i.e. setting a PR2 register value below
> 255 to set the other  frequencies reduces PWM resolution.

It sounds like the standard 16/18 PIC CCP module is not suitable for what
you are trying to do.  You probably want to use some sort of dsPIC, like a
24H.  The PWM period generation is much more flexible.  Even with the normal
"output compare" modules, you get PWM period resolution down to one
instruction cycle.  At the maximum speed of 40 MIPS, you can achieve a
minimum of 10 bit resolution at 39 kHz and lower.  The duty cycle and period
registers are 16 bits, so you have 6 bits of headroom in your case.  The
lowest PWM frequency you can achieve at 40 MIPS is 610 Hz without any
prescaler.  Clearly there is lots of room for you to get 10 bit resolution
at a range of frequencies.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000

2011\05\10@105453 by alan.b.pearce

face picon face
Olin Lathrop wrote:
> spam_OUTRNGoldingTakeThisOuTspamaol.com wrote:
> > I'm currently using a PIC18F4423 (but that can be changed if
> > unsuitable). Generating a 10bit PWM at a single frequency is pretty
> > straightforward using a  suitable master clock frequency and Timer 2
> > values but
> > I can't see how to get other frequencies (via PR2 value) without
> >  losing the 10bit resolution. i.e. setting a PR2 register value below
> > 255 to set the other  frequencies reduces PWM resolution.
>
> It sounds like the standard 16/18 PIC CCP module is not suitable for what
> you are trying to do.  You probably want to use some sort of dsPIC, like a
> 24H.  The PWM period generation is much more flexible.  Even with the normal
> "output compare" modules, you get PWM period resolution down to one
> instruction cycle.  At the maximum speed of 40 MIPS, you can achieve a
> minimum of 10 bit resolution at 39 kHz and lower.  The duty cycle and period
> registers are 16 bits, so you have 6 bits of headroom in your case.  The
> lowest PWM frequency you can achieve at 40 MIPS is 610 Hz without any
> prescaler.  Clearly there is lots of room for you to get 10 bit resolution
> at a range of frequencies.

That was my immediate thought too. The PWM module in the 24 series chips is just so much more flexible I would seriously suggest you go that way. -- Scanned by iCritical.

2011\05\10@164400 by Denny Esterline

picon face
{Quote hidden}

In general, I have to agree with everyone else, you're asking for more than
the hardware is capable of.
Moving to more capable hardware is the simple and obvious answer, but there
are a couple other things to consider depending on what you're doing with
the PWM signal.

First, you may not really need a full 10 bits resolution - that's going to
depend on whatever your driving with the PWM signal. Even 8 bits gives you
0.5% resolution, few mechanical systems can respond more precisely than
that.

There's also a technique called "dithering" (others may use a different
term). Essentially the hardware PWM generator runs inside a software PWM
generator and the hardware PWM duty cycle is moved back and forth between X
and X+1. The ratio of time it spends at each of these settings gives you an
average in the middle. I will say however, I've really only seen this as
effective on systems where the driven device has a response frequency much,
much, much lower than the PWM frequency.

I've also seen a case where a specified "bits of resolution" was based on a
poor understanding of what was being done. In that case they needed 5mv or
better resolution on the signal, (suggesting 10 bits over 5V drive) but the
dynamic range was severely restricted (0 to 1v IIRC) In that case we cut
back to 8bit resolution and shifted the range in the analog side.

So, there are some possibilities, but it all depends on what you're driving..

-Denn

2011\05\10@171727 by Olin Lathrop

face picon face
Denny Esterline wrote:
> First, you may not really need a full 10 bits resolution - that's
> going to depend on whatever your driving with the PWM signal. Even 8
> bits gives you
> 0.5% resolution, few mechanical systems can respond more precisely
> than that.

Particularly if this PWM signal is inside a feedback loop.  In that case you
can probably make due with far less than 10 bits.

For example, you may want a motor to drive something to 10 bits of position
accuracy.  However, that doesn't mean the motor needs to be driven to 10
bits of drive level since the higher level feedback will compensate.  Even 3
bits may be good enough (8 different drive levels).  In this case, the
ultimate accuracy comes from the ability to measure the position.  In other
words you need at least a 10 bit A/D or whatever provide the position
feedback.

> There's also a technique called "dithering" (others may use a
> different term). Essentially the hardware PWM generator runs inside a
> software PWM generator and the hardware PWM duty cycle is moved back
> and forth between X and X+1. The ratio of time it spends at each of
> these settings gives you an average in the middle. I will say
> however, I've really only seen this as effective on systems where the
> driven device has a response frequency much, much, much lower than
> the PWM frequency.

That's because the dithering introduces lower frequencies than the PWM
frequency.

In a recent project I used a Bresenham style algorithm to dither the output
to some heaters.  Each heater is fully on or off each half power line cycle..
Since there are many many 1/2 power line cycles within the first order time
constant of the heaters, there is not problem introducing low frequencies.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000

2011\05\10@173547 by Jesse Lackey

flavicon
face
Humm.... do you only need 1 output at the desired frequency?

Are these frequencies exactly required, or would it be OK if they are off a little, maybe a little low, then a little high, averaging to the desired frequency?

One possibility that may or may not work: do it in software, have an ISR run at some convenient frequency (maybe really fast), and in the ISR you turn on/off the output after some number of invocations of the ISR.  You can play tricks with the timer that generates the ISR (slowing down the invocation rate) to give a wider range of achievable PWM frequencies, and maybe you can hit the ones you need.  Some experimentation/calculation will be required.

Another possibility, that may be easier: in your ISR, you turn on/turn off the output, then calculate how many timer ticks should elapse before the next turn on/off, and set the timer (that generates the ISR interrupt) appropriately.  If you are able to handle the fastest case (1Khz with narrow on or off time) then everything else is doable.  And if you can't do a 1Khz with an on/off time of 1/1024 (10-bit), you could just code that special case, for example.

By doing some clever (if I do say so myself) coding, I was able to do the ISR with timer set to expire for the next needed on/off transition trick to do 32 individual 10-bit PWM channels @ 125Hz with a 40Mhz 18F6520:
<www.celestialaudio.com/ca_dmx_32_nfet/index.html>
This software PWM generation method has the benefit of being able to directly tradeoff PWM refresh rate, resolution, and number of channels.

Good luck!
J


.....RNGoldingKILLspamspam@spam@aol.com wrote:
{Quote hidden}

> RN

2011\05\11@124238 by Michael Rigby-Jones

flavicon
face


> -----Original Message-----
> From: piclist-bouncesspamKILLspammit.edu [.....piclist-bouncesKILLspamspam.....mit.edu] On
Behalf
> Of EraseMERNGoldingspam_OUTspamTakeThisOuTaol.com
> Sent: 10 May 2011 14:41
> To: piclistspamspam_OUTmit.edu
> Subject: [PIC] How to achieve 10 bit PWM resolution at various
> frequencies?
>
> Hi, my first request to the list, so please be gentle with me!
>
> I have an application that requires generation of a 10bit resolution
PWM
> signal at various repetition
> frequencies between 100Hz and 1kHz.  The PWM duty cycle and repetition
> frequency commands
> will be received via the serial bus @ 115200 baud.
>
> Required PWM frequencies are 105Hz, 140Hz, 300Hz and 1kHz, but other
> frequencies may be
> required in the future.
>
> I'm currently using a PIC18F4423 (but that can be changed if
unsuitable).
> Generating a 10bit PWM at a single frequency is pretty straightforward
> using
> a  suitable master clock frequency and Timer 2 values but
> I can't see how to get other frequencies (via PR2 value) without
losing
> the
>  10bit resolution. i.e. setting a PR2 register value below 255 to set
the
> other  frequencies reduces PWM resolution.
>
> I've read the data sheet 'till I'm blue in the face and can't see a
way of
> achieving 10bit resolution at the various
> frequencies.
>
> My present thoughts are to use two PICs. The PIC1 to generate the
required
> clock frequency for PIC2,
> which generates the 10 bit PWM (PIC2 using fixed  Timer 2 values). The
PWM
> duty cycle demand would
> then be communicated from  PIC1 to PIC2 via SPI or I2C bus.
>
> Clumsy, but can anyone suggest a more elegant way of doing it?


If available, you could probably use the CCP module in compare mode.
This can be configured to automatically clear or set the CCP pin on a
match condition as well as raise an interrupt.  Within the CCP interrupt
you would need to switch between these modes and reload the CCPR
registers with appropriate values for the duty cycle and frequency you
wish to operate at.

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2011\05\11@193354 by Joe Koberg

flavicon
face
On 2011-05-10 16:18, Olin Lathrop wrote:
>
> In a recent project I used a Bresenham style algorithm to dither the output
> to some heaters.  Each heater is fully on or off each half power line cycle.
> Since there are many many 1/2 power line cycles within the first order time
> constant of the heaters, there is not problem introducing low frequencies..

I think "re-invented" a similar algorithm for a toaster controller a few weeks ago and surprised myself at just how simple and effective it can be.


    uint16 current_setting, accumulator;

    void change_heater_setting( float desired_fraction ) {
        current_setting = desired_fraction * 65535;
        }

    void zero_crossing_isr( void ) {
        if (accumulator < current_setting)
            heater_output = ON;
        else
            heater_output = OFF;
        accumulator -= current_setting;
        }


The ISR runs on every negative-going zero crossing (the AC line is connected to an external interrupt pin via multi-megohm resistor). So it only switches whole cycles. This basically produces pulse density modulation with 16-bit resolution.  At the lowest setting it would output a one-cycle pulse every 1092 seconds (a very low frequency indeed.)

It was my understanding that it's "bad" to draw DC from the line, so I was wary of drawing half-cycles. (Imagine if your output setting was 50% and you were consuming every other half cycle).

Joe Koberg

2011\05\11@203848 by Robert Rolf

picon face


Joe Koberg wrote:
> It was my understanding that it's "bad" to draw DC from the line, so I
> was wary of drawing half-cycles. (Imagine if your output setting was 50%
> and you were consuming every other half cycle).

Why would DC draw be bad? Full wave rectifier transformers draw DC on each half of the secondary, so that can't be an issue.

Some simple minded lamp dimmers just use a power diode to cut out half the power line cycles to get 50% dimming.

Some power engineer care to enlighten us?

R

2011\05\11@205204 by IVP

face picon face
> Why would DC draw be bad?

I thought adding a lot of inductance or capacitance to the line is
frowned upon if PFC measures aren't added too, but not small
drains like switchmode PSUs or transformerless lighting dimmer

2011\05\11@211512 by Joe Koberg

flavicon
face
On 2011-05-11 19:38, Robert Rolf wrote:
>
> Why would DC draw be bad? Full wave rectifier transformers draw DC on
> each half of the secondary, so that can't be an issue.

But that doesn't lead to a DC bias on the line side, does it?


> Some simple minded lamp dimmers just use a power diode to cut out half
> the power line cycles to get 50% dimming.

But I suspect those would be frowned upon as well.


> Some power engineer care to enlighten us?
>
> R
>
I found this page that mentions it: http://sound.westhost.com/articles/xfmr-dc.htm

   There are a few older household appliances that can create a DC
   offset, although most are (probably) no longer permitted due to
   increasing problems caused by the DC component.
   ...
   Most of the time, the DC offset is transient - it appears for a
   short while, then goes away again. When it is there, toroidal
   transformers may complain loudly, by making growling or buzzing
   noises. It is important to understand just how this happens, and
   what can be done about it if it causes problems.
   ...
   With larger transformers (500VA and above), the DC resistance is
   usually so low that even a very small offset will cause mechanical
   noise due to saturation.





Joe Koberg

2011\05\12@080628 by Olin Lathrop

face picon face
part 1 1616 bytes content-type:text/plain; charset="iso-8859-1" (decoded quoted-printable)

Joe Koberg wrote:
>      uint16 current_setting, accumulator;
>
>      void change_heater_setting( float desired_fraction ) {
>          current_setting = desired_fraction * 65535;
>          }
>
>      void zero_crossing_isr( void ) {
>          if (accumulator < current_setting)
>              heater_output = ON;
>          else
>              heater_output = OFF;
>          accumulator -= current_setting;
>          }

That's the basic idea, although use of floating point and 16 bit integers is
totally silly if this was done on a PIC.  Just because you can do something
easily in a higher level language doesn't make it a good idea.  The problem
with 16 bits is that the repetition period can be very long, much longer
than the thermal time constants.

In my implementation I used 8 bit integers, 0 is full off and 255 full on.
Even that is more resolution than needed considering it's inside the
feedback loop.  I attached the salient part of my code since the comments
would probably wrap and make a mess if pasted here.  This runs once for each
of the 32 heaters on every line cycle zero crossing.  The PIC is a 18F4550.

> It was my understanding that it's "bad" to draw DC from the line, so I
> was wary of drawing half-cycles.

It's probably not great if lots of devices did it all synchronized.  In my
case the unit is driving 32 heaters, each independently controlled.  The
chance of them all turning on every other half cycle and being in sync for
more than a few cycles is pretty much zero.


part 2 640 bytes content-type:text/plain; name="x.txt"
(decoded base64)

        ;
        ;   The desired output level is in W, and FSR0 is pointing to the
        ;   dither error accumulator.
        ;
        addwf   indf0       ;add the output into the error accumulator
        skip_carr           ;turn on output this half-cycle ?
        jump    acupd_noton ;no
        movf    ireg1, w    ;get mask for this output bit
        iorwf   indf1       ;set bit for this AC output
        movlw   255
        subwf   indf0       ;update dither accumulator to output on this half-cycle
acupd_noton                  ;skip to here to not turn on output

part 3 181 bytes content-type:text/plain; name="ATT00001.txt"
(decoded base64)

--
http://www.piclist.com PIC/SX FAQ & list archive
View/change your membership options at
mailman.mit.edu/mailman/listinfo/piclist

2011\05\12@081430 by Olin Lathrop

face picon face
Robert Rolf wrote:
> Full wave rectifier transformers draw DC on
> each half of the secondary,

Huh?  I can't even begin to imagine where you got that from.

It's also not clear what a "full wave rectifier transformer" is supposed to
be, so I'll assume you really meant a typical transformer-coupled full wave
rectifier circuit, such as were common before switching power supplies
became cheaper.  The power line drives the primary, which is a simple
2-terminal winding.  The secondary is center tapped, and usually connected
to ground.  There is a diode at each end of the secondary, both pointing in
the same direction with respect to the transformer.  Only one half of the
secondary conducts each half-cycle, but the primary conducts both
half-cycles.  The load to the power line is symmetric to the extent the two
halves of the secondary are ballanced.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000

2011\05\12@095825 by KPL

picon face
By the way, can anybody direct me to a good optically isolated
zero-crossing detector circuit?
I know it must be really simple, but probably there is already a well
known circuit? Somehow google search did not help much.

The idea is to create a short pulse at zero crossing. Circuits I have
seen were working the other way around, that is, led in a optocoupler
was "on" all the time, except short period at zero crossing. That seem
ineffective to me, since that LED requires much more power. If voltage
has to be dropped from 230V to optocoupler's operating voltage, this
should make a huge difference in heat dissipated on voltage dropping
resistor.

On Thu, May 12, 2011 at 02:34, Joe Koberg <@spam@joeKILLspamspamosoft.us> wrote:
{Quote hidden}

>

2011\05\12@100515 by Joe Koberg

flavicon
face
On 2011-05-12 07:07, Olin Lathrop wrote:
>
> That's the basic idea, although use of floating point and 16 bit integers is
> totally silly if this was done on a PIC.  Just because you can do something
> easily in a higher level language doesn't make it a good idea.  The problem
> with 16 bits is that the repetition period can be very long, much longer
> than the thermal time constants.

It is being done on a PIC, and I am happy with the reasoning process that lead me there.  The float argument makes for an easy interface to the rest of the PID code which uses floating point in C.  But you are right, there is no real point in using a 16-bit integer for the accumulator.  This is an 18F2680 with loads of code and data space remaining, and I decided to trade off space optimizations for high-level maintainability a while ago.  I am enjoying the luxury of normal math.  The ISR remains all-integer and pretty minimal.  Even if I wanted to, I couldn't reduce the PID cycle time below the 300ms required for the thermocouple ADC to take a sample.

>> It was my understanding that it's "bad" to draw DC from the line, so I
>> was wary of drawing half-cycles.
> It's probably not great if lots of devices did it all synchronized.  In my
> case the unit is driving 32 heaters, each independently controlled.  The
> chance of them all turning on every other half cycle and being in sync for
> more than a few cycles is pretty much zero.

Indeed.  If you were crazy you could always accumulate the half-cycle error and feed that back too :)

Joe

2011\05\12@112302 by Sergey Dryga

flavicon
face
KPL <kpl.listes <at> gmail.com> writes:

>
> By the way, can anybody direct me to a good optically isolated
> zero-crossing detector circuit?
> I know it must be really simple, but probably there is already a well
> known circuit? Somehow google search did not help much.

Why bother with detecting zero-crossing point at all?  Most AC control systems
use triac to switch the load, just use a triac driver with zero-cross detection
built in, something like MOC3043 or similar.  Search mouser.com for "zero
crossing". Then, on the PIC side, it becomes regular PWM with long period.
Sergey Dryga
http://beaglerobotics.com

2011\05\12@124844 by KPL

picon face
>>
>> By the way, can anybody direct me to a good optically isolated
>> zero-crossing detector circuit?
>> I know it must be really simple, but probably there is already a well
>> known circuit? Somehow google search did not help much.
>
> Why bother with detecting zero-crossing point at all?  Most AC control systems
> use triac to switch the load, just use a triac driver with zero-cross detection
> built in, something like MOC3043 or similar.  Search mouser.com for "zero
> crossing". Then, on the PIC side, it becomes regular PWM with long period..
>
> Sergey Dryga
> http://beaglerobotics.com

I have done this with U2008B chip, for controlling a heater, and it works fine.
I am not sure if I want to do that way for motor control, seems like
MCU would be missing a lot of control over situation. Those
controllers do not provide proportional drive.

-- KPL

2011\05\12@130107 by RussellMc

face picon face
Without looking at the prior thread:

This

>> Full wave rectifier transformers draw DC on
>> each half of the secondary,

And this

> Only one half of the
> secondary conducts each half-cycle,

seem to be different ways of saying the same thing, so, if so, then
you can get an answer to your query

> Huh?  I can't even begin to imagine where you got that from.

from your own response.

Would that all technical questions were so easily and rapidly addressed ;-)


    Russell

2011\05\12@141311 by Olin Lathrop

face picon face
RussellMc wrote:
> This
>
>>> Full wave rectifier transformers draw DC on
>>> each half of the secondary,
>
> And this
>
>> Only one half of the
>> secondary conducts each half-cycle,
>
> seem to be different ways of saying the same thing,

Clearly not.  First, there is no such thing as a "full wave rectifier
transformer".  There is nothing special about a transformer because it
happens to be used in a full wave rectifier circuit except that it needs at
least a center tapped secondary.  However, there are many other applications
for a center tapped secondary, and the existance of one doesn't make it a
"full wave rectifier" transformer.

Second, we were talking about load on the AC power line.  Whether a
transformer is used in a configuration so that DC runs thru parts of its
secondary has nothing to do with that.  It is neither a argument for or
against whether drawing net DC from the power line is OK.

In short, it was a meaningless comment making little sense and certainly
having on bearing on the point in question.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000

2011\05\12@153053 by RussellMc

face picon face
Nobody is "right"here :-).
It's in part a matter of semantics.

Technically the fact that each transformer half can have a net DC
component does not necessarily mean that the primary having one is
good - so Robert's assertion is in fact incorrect - but that is
irrelevant to the semantics of what is being said.
....

> > seem to be different ways of saying the same thing,

> Clearly ...

:-)
English she is such a marvellous language,


> ... not.  First, there is no such thing as a "full wave rectifier
> transformer".  There is nothing special about a transformer because it
> happens to be used in a full wave rectifier circuit except that it needs at
> least a center tapped secondary.

Semantics.
ie you are picking at a point which essentially does not exist.
A FWRT can reasonable be taken as meaning ä transformer used with a
FWR". There is no implication that it is "special".
It may be special (eg it may have high DC saturation rating in the
secondary limbs because of the way it is used, but that was not
relevant to the statement.)

To be clear (unusual for me :-), you seem very much to be picking at
what is said because Robert said it. You seem to be ön his case"and
trying to find ways to criticise him. When you build straw men to
knock down in order to try to make somebody else look silly, you run
the severe risk of making yourself look silly, or if not silly, then
trivially vindictive.
The "seeming" MAY be all in my mind alone. But, I think not.

> However, there are many other applications
> for a center tapped secondary, and the existance <sic>  of one doesn't make it a
> "full wave rectifier" transformer.

Straw man.
When a T is used to drive a FWR it is a FWRT by normal understanding.
A very very very trivial and unworthy point to to be arguing if the
aim is to try to make somebody look silly. Take care, you may succeed.

> Second, we were talking about load on the AC power line.

True.

> Whether a
> transformer is used in a configuration so that DC runs thru parts of its
> secondary has nothing to do with that.

May have nothing <-- has nothing.

>It is neither a argument for or
> against whether drawing net DC from the power line is OK.

True.

> In short, it was a meaningless comment making little sense and certainly
> having on bearing on the point in question.

not very much <--- on

not especially pertinent <--- meaningless

and while it was entirely sensible <--- making little sense

____________

Nobody wins in argy bargy like this.
You may wish to stand back slightly and see how vindictive and trivial
such picking may look to others.
Or may not :-).

You may explain it as valid technical comment, but the Bard's Queen
Gertrude would have something to say about that.



          Russell

2011\05\12@155738 by Olin Lathrop

face picon face
RussellMc wrote:
> You may explain it as valid technical comment, but the Bard's Queen
> Gertrude would have something to say about that.

I don't know what that means and I'm not going to look it up.  The point
remains it was a dumb comment that was poorly worded enough to be confusing..
It only has half a chance of making sense if you assume the author knows
what he's talking about, which is not a good assumption given the apparent
meaning of the comment.

It isn't, or at least shouldn't be, your business to apologize for everyone
making dumb statements.  At best you're only confusing people who may be
listening in and not sure what's right.

2011\05\12@162623 by Oli Glaser

flavicon
face
On 12/05/2011 20:58, Olin Lathrop wrote:
> RussellMc wrote:
>> >  You may explain it as valid technical comment, but the Bard's Queen
>> >  Gertrude would have something to say about that.
> I don't know what that means and I'm not going to look it up.

I suspect the reference is to "The lady doth protest too much, methinks", from Hamlet.

2011\05\12@173008 by Robert Rolf

picon face


Joe Koberg wrote:

> On 2011-05-11 19:38, Robert Rolf wrote:
>
>>Why would DC draw be bad? Full wave rectifier transformers draw DC on
>>each half of the secondary, so that can't be an issue.
>
> But that doesn't lead to a DC bias on the line side, does it?

Does it matter WHICH transformer sees only half cycle loading?

 >>Some simple minded lamp dimmers just use a power diode to cut out half
>>the power line cycles to get 50% dimming.
>
> But I suspect those would be frowned upon as well.


Sure, but WHY?

{Quote hidden}

This suggests that the problem is due to a DC BIAS on the line, causing the core to saturate on one side of the cycles. But if you are only drawing current on one half of the cycles, HOW is that an issue? It's not like the transformer 'averages' the input current. The DI/Dt will still be the same, given that the primary has low impedance to DC.

I just played with an audio transformer driving a diode. I see 'normal' half cycles and clipped other half cycles. The input side looks a bit asymmetric (from reflected load) but so what? We're talking POWER lines here, where I can't see half cycles being an issue. Don't industrial heaters (KW and up) do half cycles?

If this really is an issue I would like understand the WHY,  and if it is something to avoid doing.

Thanks.

R

2011\05\12@174201 by IVP

face picon face
> By the way, can anybody direct me to a good optically isolated
> zero-crossing detector circuit?

http://home.clear.net.nz/pages/joecolquitt/txless.html

Jo

2011\05\12@174441 by Olin Lathrop

face picon face
Robert Rolf wrote:
>>> Why would DC draw be bad? Full wave rectifier transformers draw DC
>>> on each half of the secondary, so that can't be an issue.
>>
>> But that doesn't lead to a DC bias on the line side, does it?
>
> Does it matter WHICH transformer sees only half cycle loading?

It matters whether the AC line sees the DC, since that's what we're talking
about.  If the DC is in the secondary of a transformer which is not directly
connected to the AC line, then it is irrelevant.

Once again, the question was whether it's bad to draw net DC **from the AC
power line**.  How exactly do you imagine a transformer-coupled full wave
rectifier has any bearing on this?

To be clear (since you weren't I'm going to pick something), the AC line is
driving the transformer primary.  The secondary is center tapped with the
center tied to ground and each end of the secondary drives the positive
supply thru a diode.  Please explain how that presents a net DC load on the
AC line, or is even relevant to the discussion.  Invoking dead fish or phase
of moon is not allowed.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000

2011\05\12@181305 by Robert Rolf

picon face
Olin Lathrop wrote:

> Robert Rolf wrote:
>
>>>>Why would DC draw be bad? Full wave rectifier transformers draw DC
>>>>on each half of the secondary, so that can't be an issue.
>>>
>>>But that doesn't lead to a DC bias on the line side, does it?
>>
>>Does it matter WHICH transformer sees only half cycle loading?
>
>
> It matters whether the AC line sees the DC, since that's what we're talking
> about.  If the DC is in the secondary of a transformer which is not directly
> connected to the AC line, then it is irrelevant.

> Once again, the question was whether it's bad to draw net DC **from the AC
> power line**.  How exactly do you imagine a transformer-coupled full wave
> rectifier has any bearing on this?

My example of a transformer with rectifier was to compare what happens to IT, with what happens to a power line transformer.
In the case of FWR, each HALF of the transformer winding sees only unipolar currents, so DC in a winding cannot be the issue.

The case of half wave rectification (ONE DIODE) results in current being drawn for only half a cycle, as would happen with the OP 50% duty cycle with power line heaters, so again, the transformer secondary only sees unipolar currents, as with HWR, and presumably the primary sees only half cycle currents too.

Am I to understand that this unipolar current can somehow be reflected back across to the primary, even thought there is no ADDITIONAL flux change created by it being unipolar, and DC fluxes don't couple. And that unipolar current draw is somehow a problem in a transformer secondary, be it power line or rectifier?

> To be clear (since you weren't I'm going to pick something), the AC line is
> driving the transformer primary.  The secondary is center tapped with the
> center tied to ground and each end of the secondary drives the positive
> supply thru a diode.  Please explain how that presents a net DC load on the
> AC line, or is even relevant to the discussion.  Invoking dead fish or phase
> of moon is not allowed.

I may be dense, but how does drawing current for only a half cycle result in DC in a transformer so as to shift the flux operating point to where is may saturate? I see it as being no different (flux wise) than running the transformer with current in both directions. The flux STILL gets to zero at twice the mains frequency. With half cycle use, it just never gets to see much reverse flux. So what?


Which goes back to my original question, why is 1/2 cycle power utilization a bad thing? How does it create problems in a transformer, given that it IS NOT steady state DC which would shift the flux operating point?

R


2011\05\13@023214 by KPL

picon face
Thanks,

But that circuit has the problem I mentioned - optocoupler's led is
powered all the time, except at sero crossings. It means, that 100K
resistor has to dissipate about 1W, if opto uses 5mA. Probably not
much, but I would like to avoid that.
>From the other side, any solution to that would require much more
components, which would make another problems.

On Fri, May 13, 2011 at 00:41, IVP <KILLspamjoecolquittKILLspamspamclear.net.nz> wrote:
>> By the way, can anybody direct me to a good optically isolated
>> zero-crossing detector circuit?
>
> http://home.clear.net.nz/pages/joecolquitt/txless.html
>
> Joe
>

2011\05\13@035518 by KPL

picon face
Wow, trying different search strings in google gave me exactly what I wanted:
http://www.edn-europe.com/improvedoptocouplercircuitsreducecurrentdrawresistledaging+article+2021+Europe.html

circuit: www.edn-europe.com/cmsimages/0208/46f2.jpg
It's basically same idea that I had imagined, but never got to try.


On Fri, May 13, 2011 at 00:41, IVP <RemoveMEjoecolquittTakeThisOuTspamclear.net.nz> wrote:
>> By the way, can anybody direct me to a good optically isolated
>> zero-crossing detector circuit?
>
> http://home.clear.net.nz/pages/joecolquitt/txless.html
>
> Joe
>

2011\05\13@081703 by RussellMc

face picon face
> But that circuit has the problem I mentioned - optocoupler's led is
> powered all the time, except at sero crossings. It means, that 100K
> resistor has to dissipate about 1W, if opto uses 5mA. Probably not
> much, but I would like to avoid that.

A "Black Regulator" \would probably give you a minimum parts count
relatively low cost discrete solution.

Another way would be a circuit that is input powered only when Vin is
near zero. Almost zero dissipation at high Vin.



Russell




> >From the other side, any solution to that would require much more
> components, which would make another problems.
>
> On Fri, May 13, 2011 at 00:41, IVP <spamBeGonejoecolquittspamBeGonespamclear.net.nz> wrote:
>>> By the way, can anybody direct me to a good optically isolated
>>> zero-crossing detector circuit?
>>
>> home.clear.net.nz/pages/joecolquitt/txless.html
>>
>> Joe
>> -

2011\05\13@173522 by Brent Brown

picon face
Interesting circuit, but capacitor Cf seems out of place at 150uF. Voltage not given, but that would be exceptionally large physically in something suitable for AC mains. Not mentioned in the circuit description, I would hazard a guess that something more like say 150nF was intended.

On 13 May 2011 at 10:55, KPL wrote:

> Wow, trying different search strings in google gave me exactly what I wanted:
> www.edn-europe.com/improvedoptocouplercircuitsreducecurrentdrawresistledaging+article+2021+Europe.html
>
> circuit: www.edn-europe.com/cmsimages/0208/46f2.jpg
> It's basically same idea that I had imagined, but never got to try.
> -- Brent Brown, Electronic Design Solutions
16 English Street, St Andrews,
Hamilton 3200, New Zealand
Ph: +64 7 849 0069
Fax: +64 7 849 0071
Cell: +64 27 433 4069
eMail:  TakeThisOuTbrent.brownEraseMEspamspam_OUTclear.net.nz

2011\05\13@184419 by cdb

flavicon
face


:: circuit: http://www.edn-europe.com/cmsimages/0208/46f2.jpg

Don't forget R1 - 6 in that circuit should be high voltage rated,

I think for safety sake I'd be inclined to split R1 and 2 into two 120K resistors in series.

Colin
--
cdb, RemoveMEcolinspamTakeThisOuTbtech-online.co.uk on 14/05/2011
Web presence: http://www.btech-online.co.uk   Hosted by:  http://www.justhost.com.au
 

2011\05\14@033407 by KPL

picon face
Yes, I thought the same about Cf, that together with R1&R2 could shift
the phase far enough that circuit will not work properly.

On Sat, May 14, 2011 at 00:35, Brent Brown <brent.brownEraseMEspam.....clear.net.nz> wrote:
{Quote hidden}

>

2011\05\15@163307 by Randy Abernathy

flavicon
face
I may have missed some of the earlier posts for this, however based upon what I
read here, I take it someone wants to create DC power for use in a project.

If you use a full wave bridge and proper filtering capacitors, there is no
reason for it to be "bad" to draw power from the line and convert it to DC.  I
have been doing this for many years in machine controls for industrial machine
tools with no problems.  Now, if you are looking at low voltage DC supply,
always use a transformer to step the AC down first then rectify it.  Using the
line voltage rectified and then regulating the voltage with say a Zener Diode is
very dangerous.  For starters more exposure to the higher line voltage, also if
you experience a short in you regulating circuit, you can get the full line
voltage put into your low voltage circuitry, I think we all know the result from
that.

Hope this is of some help.

Randy Abernathy
CNC and Industrial Machinery service, repair, installation and design

4626 Old Stilesboro Rd NW
Acworth, GA 30101
Fax: 770-974-5295
Phone: 678-982-0235
E-mail: RemoveMErandyabernathyEraseMEspamEraseMEbellsouth.net


{Original Message removed}

2011\05\15@165839 by Olin Lathrop

face picon face
Randy Abernathy wrote:
> If you use a full wave bridge and proper filtering capacitors, there
> is no reason for it to be "bad" to draw power from the line and
> convert it to DC.

But that has nothing to do with the discussion since it's still drawing AC
from the AC line.

Also, what you describe could be bad depending on the power level, since a
simple full wave bridge won't have a very good power factor.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000

2011\05\16@172330 by Joe Koberg

flavicon
face


On 5/15/2011 3:32 PM, Randy Abernathy wrote:
> I may have missed some of the earlier posts for this, however based upon what I
> read here, I take it someone wants to create DC power for use in a project.


I am switching a heater element. No transformers. No diodes. Just a TRIAC and a zero-crossing detector.

Pulling half-cycles carries the risk of pulling more of one polarity than the other, leading to a net DC load from the AC mains. The resulting bias on the mains wholly depends on the impedance of the utility supply transformer.

It doesn't matter to the heater.  The point is not to make sure my project is happy.  Rather, it is to be "hygienic" as possible to the AC line. When I hook up a multi-kW full size domestic oven and draw 30 Amps at 240 volts from only one polarity, we might actually see a DC offset  A device connected elsewhere big enough to have a primary of low resistance will see a continuous DC current across its primary winding, and potentially saturate its core from continuous DC magnetic flux.

Joe K

2011\05\18@091532 by RNGolding

picon face
Thanks to those who replied to my question as how to achieve 10 bit PWM  resolution at frequencies of
140HZ, 300Hz and 1kHz with the PIC 18 series chips.  I have now found a PIC that will do the job. It's the  PIC18F2431/4431 family. It offers up to 14 bit PWM resolution, easily  achieving 10 bit resolution at the frequencies I require.  It is specifically designed for motor control, offering dead-time control  and other useful motor control features. Thought I'd mention it as may  be of use to others.
RNG

2011\05\19@102733 by RussellMc

face picon face
Back in Autumn.
Temperatures in Kuala Lumpur were officially declared a "heat wave".
A fine time to visit ... :-)
(But I've been in Phoenix when it was almost 10 degrees C hotter again!)

>> You may explain it as valid technical comment, but the Bard's Queen
>> Gertrude would have something to say about that.

> I don't know what that means and I'm not going to look it up.  The point
> remains ...

Gertrude opines that continuing to dig deserves to be rewarded :-) *

> it was a dumb comment that was poorly worded enough to be confusing.

Most things can confuse some people.
I wouldn't have expected it to confuse you or, more importantly,
anyone who was following the general gist of what was said.
You then went on to effectively restate what he said, and I genuinely
found your version no clearer than his, and genuinely possibly less
so. But, both versions were clear enough, I thought. Yours covered
more of the subject than his so any comparison should arguably take
only the part of yours that was equivalent to his.

> It only has half a chance of making sense if you assume the author knows
> what he's talking about, which is not a good assumption given the apparent
> meaning of the comment.

His overall technical assumption was somewhat incorrect, as we have
both already noted. But the statement in isolation was both
technically essentially correct and understandable. He expressly noted
his lack of expertise in the area and expressly invited expert
comment. That seems a pretty commendable approach.

Moreover, I do not find your above statement wholly meaningful, as
parsed by my brain so far. If an author does not know what he's
talking about then it is uncertain whether anything said makes sense,
even if it seems to :-). Assuming that an author DOES know in general
terms what they are talking about is a near axiomatic assumption when
first pass reading anything general. Once things start to not make
sense one may revise the assumptions. But, his statement was entirely
sensible. Just not worded as you would have worded it, apparently.

> It isn't, or at least shouldn't be, your business to apologize for everyone
> making dumb statements.

I completely agree on both counts.
I certainly do not go out of my way to do either.
eg not all of your utterances are scintillating (although many are)
but I don't usually rush to your defence. And I've given up politely
pointing out your core of consistent typos as you specifically state
that you do not wish to use a spilling chicker, and as I haven't noted
you showing  any inclination to change them (although if you have in
fact done so it may be that there are now fewer  to notice :-) ).

BUT you here set up a straw man - and you have used the same fellow on
various other occasions. You regularly deem my interventions to
indicate that what I am addressing is dumb, when I more usually
believe that what I am addressing is an incorrect assessment of
dumbness on your part. If you consistently see me as defending
dumbness it frees you from needing to examine the point I am trying to
make, as now. [[Put another way - you seem to on occasion set up
artificial reasons for wading into people in a rude and aggressive
manner, as here. If your assessment seems technically questionable and
more liable to be an attempt to justify gratuitous argy bargy I may
comment, as here]].

It is hardly worth the effort I imagine, but it would be interesting
to take your statement and Robert's re the effect of diodes on DC
transformer currents in a centre tapped 2 diode full-wave rectifier,
feed them to a test audience and get comment on which, if either seems
"dumb". Could be dangerous. Gertrude thinks so, anyway.

> At best you're only confusing people who may be
> listening in and not sure what's right.

And, fwiw, that's about what I'd say about what you are saying.
You take a technically correct statement, say its dumb, and then make
a technically equivalent statement and say it's OK. Those who are less
than certain about the circuits will be more confused than if you had
not intervened.
ie I say that you are doing what you say I am doing. It's unlikely
that either you or I are wholly right or wholly wrong. It's liable to
be a perspective issue. But if you insist in the complete rightness of
your position you end up looking either vindicated or dumb. Gertrude
says ... .

Referring back:
Robert's comment was trimmed by you so I have trimmed yours to
somewhat more than the same tightness so that there is no risk of
quoting you out of context.
I'd have trimmed them both less tightly if starting such a comparison
from scratch.

As the text of Robert's shown  below is what you quoted it seems
logical  to assume that that's what you are taking issue with.
Maybe not.
__________

Robert Rolf wrote:
> Full wave rectifier transformers draw DC on
> each half of the secondary,
__________

Olin said:
> There is a diode at each end of the secondary, both pointing in
> the same direction with respect to the transformer.

> Only one half of the secondary conducts each half-cycle,

> but the primary conducts both half-cycles.
> The load to the power line is symmetric to the extent the two
> halves of the secondary are ballanced.
__________

The key comments under comparison are:

> Full wave rectifier transformers draw DC on each half of the secondary,

and

> Only one half of the secondary conducts each half-cycle,

If you still insist that Robert's statement is "dumb" and unclear and
confusing while yours adds clarification and is not-dumb and
not-confusing then I will not be in the slightest bit surprised :-).
Nor, I think, would Queen Gertrude be.


   Russell

* Hamlet, Act III, Scene II, 179.
Probably the only line, of the very few she speaks, that anyone quotes.
http://www.bartleby.com/70/4232.html

2011\05\19@103650 by Mark E. Skeels

flavicon
face
"AAAAHHHHHHH!!!!!!!!!!!!!!"
--Charley Brown

"Can't we all just get along?"
--Rodney King

"Resistance is futile."
--the Borg

"He's dead, Jim."
--McCoy





On 5/19/2011 9:26 AM, RussellMc wrote:
{Quote hidden}

2011\05\19@110500 by RussellMc

face picon face
> "AAAAHHHHHHH!!!!!!!!!!!!!!"
> --Charley Brown

Qua?

> "Can't we all just get along?"
> --Rodney King

I'm all for it, and it would be nice, but it's probably too dumb a
concept to be acceptable.
If "getting along" is idly watching while some people tear strips off
other people because they want to, for whatever reason, while couching
the 'reason' in technical justification, then we may need to get along
on someone else'e watch.

> "Resistance is futile."
> --the Borg

One can hope.

> "He's dead, Jim."
> --McCoy

....Not as we know it, not as we know
Life Jim, but not as we know it
Not as we know it, Jim!

Y' canna break the laws of physics, laws of physics, laws of physics.
Y' canna break the laws of physics, laws of physics, laws of physics.
Cap'n, beam me up [which breaks the laws of Physics].

"The lady doth protest too much, methinks".
 - Hamlet, Act III, Scene II, 179


2011\05\19@111842 by Mark E. Skeels

flavicon
face
Hamlet I don't know.

Star Trek I know.

I'm kind of a low brow.

I am truly glad you are back, Russell; no pun intended.

You are part of what makes the PICList what it is......which is a whole 'nuther subject.

OK, stopping now........back to my cave before admins swoop.

Mark

On 5/19/2011 10:04 AM, RussellMc wrote:
{Quote hidden}

>

2011\05\19@113015 by alan.b.pearce

face picon face
> Hamlet I don't know.

I guess Shakespeare doesn't get taught in US schools.

My favourite quote at the moment is attributed to Lyndon B. Johnson ...

" If one morning I walked on top of the water across the Potomac River,
the headline that afternoon would read "President Can't Swim."

(guess who has been filling in his APR ... )
-- Scanned by iCritical.

More... (looser matching)
- Last day of these posts
- In 2011 , 2012 only
- Today
- New search...