Reply by whit3rd February 1, 20222022-02-01
On Monday, January 31, 2022 at 5:24:01 PM UTC-8, John Larkin wrote:

> Yes, telecom links assume balanced data, NRZ or 8b10b or something. > That makes it hard to send DC!
Seismometers are too low frequency for direct tape recording, so they're always frequency-converted for field tape-recorder stations. The tape drives have a multiplicity of tracks, so one of 'em gets a timing reference, the others record data. It's done without a bias frequency, which saves precious battery power.
Reply by piglet February 1, 20222022-02-01
On 01/02/2022 12:40 am, John Larkin wrote:
> > I'm thinking about PWM at a "carrier" pulse clock rate of, say, 1 GHz. > 30% duty cycle is a 0, 70% is a 1. The logic level to be sent is not > synchronized to the PWM clock. > > It will certainly work, but what's the jitter like? Can it be less > than the 1 ns PWM pulse period? I'm thinking it can. > > It's just a thought experiment, with a bit of Spicing, right now. >
Does the link preserve polarity - after an arbitrary number of inversions 30% and 70% duty cycle may be indistinguisable. How about 50% as one state and 30/70 as the other? piglet
Reply by Jan Panteltje February 1, 20222022-02-01
On a sunny day (Mon, 31 Jan 2022 16:40:14 -0800) it happened John Larkin
<jlarkin@highland_atwork_technology.com> wrote in
<kmugvgldukcs48h7v2sf3ae378nqfvokj2@4ax.com>:

>The abstract problem is to send a DC-coupled logic level over an >AC-coupled telecom-type link. Imagine the link has AGC or logic >repeaters so we can't send different amplitudes to code things.
In video (that has a DC conponent reference) we used FM modulation for example to record to tape. Used it over phone line too for slow scan TV. That was before all went digital.
Reply by Anthony William Sloman January 31, 20222022-01-31
On Tuesday, February 1, 2022 at 2:18:38 AM UTC+11, jla...@highlandsniptechnology.com wrote:
> On Mon, 31 Jan 2022 11:53:59 +0100, Klaus Vestergaard Kragelund <klau...@hotmail.com> wrote: > >On 31/01/2022 02.33, jla...@highlandsniptechnology.com wrote: > >> On Mon, 31 Jan 2022 01:52:20 +0100, Klaus Vestergaard Kragelund <klau...@hotmail.com> wrote: > >>> On 27/12/2021 00.44, jla...@highlandsniptechnology.com wrote: > >>>> On Sun, 26 Dec 2021 23:38:44 +0100, Klaus Kragelund <klau...@hotmail.com> wrote:
<snip>
> >In some cases the voltage PWM is better than current mode controlled. > >For example, around the zero crossing where current feedback has distortion > Not to change the subject (never!) I've been experimenting with the > jitter implications of PWM, namely how precise in time can a PWM > system be? Better than the PWM period? How much better? > > It's an interesting perversion of the Shannon/Nyquist sampling > theorem. Maybe I'll post some sims.
You might think about the use of quadrature coding to send a 10kbit/sec data stream over a telephone line. Those modems were quite popular when telephone pairs were our only way of getting our home computer hooked up to the internet. -- Bill Sloman, Sydney
Reply by John Larkin January 31, 20222022-01-31
On Mon, 31 Jan 2022 16:52:18 -0800 (PST), Lasse Langwadt Christensen
<langwadt@fonz.dk> wrote:

>tirsdag den 1. februar 2022 kl. 01.40.26 UTC+1 skrev John Larkin: >> On Tue, 1 Feb 2022 01:09:16 +0100, Klaus Vestergaard Kragelund >> <klau...@hotmail.com> wrote: >> >> >On 31/01/2022 16.18, jla...@highlandsniptechnology.com wrote: >> >> On Mon, 31 Jan 2022 11:53:59 +0100, Klaus Vestergaard Kragelund >> >> <klau...@hotmail.com> wrote: >> >> >> >>> On 31/01/2022 02.33, jla...@highlandsniptechnology.com wrote: >> >>>> On Mon, 31 Jan 2022 01:52:20 +0100, Klaus Vestergaard Kragelund >> >>>> <klau...@hotmail.com> wrote: >> >>>> >> >>>>> On 27/12/2021 00.44, jla...@highlandsniptechnology.com wrote: >> >>>>>> On Sun, 26 Dec 2021 23:38:44 +0100, Klaus Kragelund >> >>>>>> <klau...@hotmail.com> wrote: >> >>>>>> >> >>>>>>> Hi >> >>>>>>> >> >>>>>>> >> >>>>>>> I am working on a stepping motor driver >> >>>>>>> >> >>>>>>> >> >>>>>>> To reduce cost I will be making a discrete driver stage driven from a microcontroller that has all the control features that would normally be included in a micrstepping driver like the A4988 >> >>>>>>> >> >>>>>>> https://www.allegromicro.com/en/products/motor-drivers/brush-dc-motor-drivers/a4988 >> >>>>>>> >> >>>>>>> >> >>>>>>> For easy calculation let's say the power stage is driven from 10V and the stepping motor has an inductance of 10mH and the peak current is 100mA >> >>>>>>> >> >>>>>>> >> >>>>>>> In fast decay mode the rising and falling didt is thus 1A/ms >> >>>>>>> >> >>>>>>> >> >>>>>>> For micro stepping the current in the 2 phases are set to place the armature in between a full step. So for a position 50% between two steps the currents in the windings are the same to have a resulting vector at that point >> >>>>>>> >> >>>>>>> >> >>>>>>> If the on time is 5us, the ripple current is 5mApp. So, the current ripple is 5% of the nominal peak current. For lower excitation, at 10mA peak drive, the ripple is 50% >> >>>>>>> >> >>>>>>> >> >>>>>>> So the magnetic field will cause quite a bit of torque ripple. >> >>>>>>> >> >>>>>>> >> >>>>>>> Will this have any impact on the drive of the motor, or is the inertia so big that it is insignificant? >> >>>>>>> >> >>>>>>> Also, at other positions than 50%, the ripple with not cancel out between the phases and generate even more torque ripple >> >>>>>>> >> >>>>>>> I don't see any mention of this, so it is probably insignificant... >> >>>>>>> >> >>>>>>> Regards >> >>>>>>> >> >>>>>>> >> >>>>>>> Klaus >> >>>>>> >> >>>>>> I did a microstepper once, for tuning superconductive microwave >> >>>>>> cavities in an accelerator. It used a uP and a pair of integrated >> >>>>>> h-bridge drivers. >> >>>>>> >> >>>>>> It was basically a DDS synthesizer, a phase accumulator (representing >> >>>>>> angular position) mapping into a sin-cos lookup table, which fetched >> >>>>>> the duty cycle values to go into the pair of full h-bridges which >> >>>>>> drove the motor coils. If the switching frequency is reasonably high, >> >>>>>> there won't be noticable ripple torque. >> >>>>>> >> >>>>>> My basically constant-voltage drive caused torque to drop off at high >> >>>>>> step rates, which wasn't a problem in that application. >> >>>>>> >> >>>>>> Most motors are imperfect in that you won't get smooth angular >> >>>>>> position as a function of sin-cos coil currents; they basically have >> >>>>>> distortion. That can be fudged in the trig lookup table if you really >> >>>>>> need to. >> >>>>>> >> >>>>> So, now I am getting closer to having first prototype ready >> >>>>> >> >>>>> I was doing the chopping control, peak current setting of the current in >> >>>>> the coils, a loop in the microcontroller that would control this peak >> >>>>> current with a DAC >> >>>>> >> >>>>> Thinking about it, seems like it is all to no good. Just using the PWM >> >>>>> sine/cosine lookup table, with no feedback seems to work fine, provided >> >>>>> the speed of the motor is significantly below the max specified speed. >> >>>>> In that case BEMF has little effect, and really the winding resistance >> >>>>> sets the current according to applied voltage >> >>>>> >> >>>>> Doing the open loop control would remove need for precise current >> >>>>> sensing and DACs (all though they could just be PWM outputs). Also >> >>>>> reduces the CPU resources needed for the control of the motor >> >>>>> >> >>>>> I will keep the comparator to check for shorted halfbridge, at least for now >> >>>>> >> >>>>> Cheers >> >>>>> >> >>>>> Klaus >> >>>>> >> >>>>> >> >>>> >> >>>> Constant-voltage PWM will result in torque rolloff at high step rates, >> >>>> and eventually stalling. More voltage with current feedback helps >> >>>> stuff current into the winding inductance. >> >>>> >> >>> >> >>> Yes, that's why I wrote that my application has: "the speed of the motor >> >>> is significantly below the max specified speed" >> >>> >> >>> >> >>>> Some sort of pre-emphasis without feedback should work too. >> >>>> >> >>> >> >>> In some cases the voltage PWM is better than current mode controlled. >> >>> For example, around the zero crossing where current feedback has distortion >> >> >> >> Not to change the subject (never!) I've been experimenting with the >> >> jitter implications of PWM, namely how precise in time can a PWM >> >> system be? Better than the PWM period? How much better? >> >> >> > >> >Can you elaborate on that? >> > >> >The PWM of a microcontroller is a combination of the clock jitter and >> >the jitter of the PWM counter/compare capture unit, plus noise on the >> >supply I guess >> The abstract problem is to send a DC-coupled logic level over an >> AC-coupled telecom-type link. Imagine the link has AGC or logic >> repeaters so we can't send different amplitudes to code things. >> >> One could lowpass filter the logic input, sample and digitize, send >> the sample values in serial packets, deserialize and DAC and filter >> and compare at the receiver. Pure Shannon Sampling Theorem with some >> ADC quantization. Slow and painful. >> >> FSK would work but would be very slow and maybe jitterey. OOK would be >> really ugly over a telecom type link. PWM might work. >> >> I'm thinking about PWM at a "carrier" pulse clock rate of, say, 1 GHz. >> 30% duty cycle is a 0, 70% is a 1. The logic level to be sent is not >> synchronized to the PWM clock. >> >> It will certainly work, but what's the jitter like? Can it be less >> than the 1 ns PWM pulse period? I'm thinking it can. >> >> It's just a thought experiment, with a bit of Spicing, right now. > >will your duty cycle survive the AC coupling on the link? >isn't such things normally DC balanced with bit stuffing or similar? > > >
Yes, telecom links assume balanced data, NRZ or 8b10b or something. That makes it hard to send DC! I've tested the proposed link and it can propagate duty cycles, numbers like 30% and 70%; maybe 35 and 65 to be conservative. Just now I can't think of a better modulation scheme, at least one that's practical to actually build. The edges of a PWM pulse can be positioned with arbitrarily small time resolution, so sub-clock timing is possible. -- If a man will begin with certainties, he shall end with doubts, but if he will be content to begin with doubts he shall end in certainties. Francis Bacon
Reply by Lasse Langwadt Christensen January 31, 20222022-01-31
tirsdag den 1. februar 2022 kl. 01.40.26 UTC+1 skrev John Larkin:
> On Tue, 1 Feb 2022 01:09:16 +0100, Klaus Vestergaard Kragelund > <klau...@hotmail.com> wrote: > > >On 31/01/2022 16.18, jla...@highlandsniptechnology.com wrote: > >> On Mon, 31 Jan 2022 11:53:59 +0100, Klaus Vestergaard Kragelund > >> <klau...@hotmail.com> wrote: > >> > >>> On 31/01/2022 02.33, jla...@highlandsniptechnology.com wrote: > >>>> On Mon, 31 Jan 2022 01:52:20 +0100, Klaus Vestergaard Kragelund > >>>> <klau...@hotmail.com> wrote: > >>>> > >>>>> On 27/12/2021 00.44, jla...@highlandsniptechnology.com wrote: > >>>>>> On Sun, 26 Dec 2021 23:38:44 +0100, Klaus Kragelund > >>>>>> <klau...@hotmail.com> wrote: > >>>>>> > >>>>>>> Hi > >>>>>>> > >>>>>>> > >>>>>>> I am working on a stepping motor driver > >>>>>>> > >>>>>>> > >>>>>>> To reduce cost I will be making a discrete driver stage driven from a microcontroller that has all the control features that would normally be included in a micrstepping driver like the A4988 > >>>>>>> > >>>>>>> https://www.allegromicro.com/en/products/motor-drivers/brush-dc-motor-drivers/a4988 > >>>>>>> > >>>>>>> > >>>>>>> For easy calculation let's say the power stage is driven from 10V and the stepping motor has an inductance of 10mH and the peak current is 100mA > >>>>>>> > >>>>>>> > >>>>>>> In fast decay mode the rising and falling didt is thus 1A/ms > >>>>>>> > >>>>>>> > >>>>>>> For micro stepping the current in the 2 phases are set to place the armature in between a full step. So for a position 50% between two steps the currents in the windings are the same to have a resulting vector at that point > >>>>>>> > >>>>>>> > >>>>>>> If the on time is 5us, the ripple current is 5mApp. So, the current ripple is 5% of the nominal peak current. For lower excitation, at 10mA peak drive, the ripple is 50% > >>>>>>> > >>>>>>> > >>>>>>> So the magnetic field will cause quite a bit of torque ripple. > >>>>>>> > >>>>>>> > >>>>>>> Will this have any impact on the drive of the motor, or is the inertia so big that it is insignificant? > >>>>>>> > >>>>>>> Also, at other positions than 50%, the ripple with not cancel out between the phases and generate even more torque ripple > >>>>>>> > >>>>>>> I don't see any mention of this, so it is probably insignificant... > >>>>>>> > >>>>>>> Regards > >>>>>>> > >>>>>>> > >>>>>>> Klaus > >>>>>> > >>>>>> I did a microstepper once, for tuning superconductive microwave > >>>>>> cavities in an accelerator. It used a uP and a pair of integrated > >>>>>> h-bridge drivers. > >>>>>> > >>>>>> It was basically a DDS synthesizer, a phase accumulator (representing > >>>>>> angular position) mapping into a sin-cos lookup table, which fetched > >>>>>> the duty cycle values to go into the pair of full h-bridges which > >>>>>> drove the motor coils. If the switching frequency is reasonably high, > >>>>>> there won't be noticable ripple torque. > >>>>>> > >>>>>> My basically constant-voltage drive caused torque to drop off at high > >>>>>> step rates, which wasn't a problem in that application. > >>>>>> > >>>>>> Most motors are imperfect in that you won't get smooth angular > >>>>>> position as a function of sin-cos coil currents; they basically have > >>>>>> distortion. That can be fudged in the trig lookup table if you really > >>>>>> need to. > >>>>>> > >>>>> So, now I am getting closer to having first prototype ready > >>>>> > >>>>> I was doing the chopping control, peak current setting of the current in > >>>>> the coils, a loop in the microcontroller that would control this peak > >>>>> current with a DAC > >>>>> > >>>>> Thinking about it, seems like it is all to no good. Just using the PWM > >>>>> sine/cosine lookup table, with no feedback seems to work fine, provided > >>>>> the speed of the motor is significantly below the max specified speed. > >>>>> In that case BEMF has little effect, and really the winding resistance > >>>>> sets the current according to applied voltage > >>>>> > >>>>> Doing the open loop control would remove need for precise current > >>>>> sensing and DACs (all though they could just be PWM outputs). Also > >>>>> reduces the CPU resources needed for the control of the motor > >>>>> > >>>>> I will keep the comparator to check for shorted halfbridge, at least for now > >>>>> > >>>>> Cheers > >>>>> > >>>>> Klaus > >>>>> > >>>>> > >>>> > >>>> Constant-voltage PWM will result in torque rolloff at high step rates, > >>>> and eventually stalling. More voltage with current feedback helps > >>>> stuff current into the winding inductance. > >>>> > >>> > >>> Yes, that's why I wrote that my application has: "the speed of the motor > >>> is significantly below the max specified speed" > >>> > >>> > >>>> Some sort of pre-emphasis without feedback should work too. > >>>> > >>> > >>> In some cases the voltage PWM is better than current mode controlled. > >>> For example, around the zero crossing where current feedback has distortion > >> > >> Not to change the subject (never!) I've been experimenting with the > >> jitter implications of PWM, namely how precise in time can a PWM > >> system be? Better than the PWM period? How much better? > >> > > > >Can you elaborate on that? > > > >The PWM of a microcontroller is a combination of the clock jitter and > >the jitter of the PWM counter/compare capture unit, plus noise on the > >supply I guess > The abstract problem is to send a DC-coupled logic level over an > AC-coupled telecom-type link. Imagine the link has AGC or logic > repeaters so we can't send different amplitudes to code things. > > One could lowpass filter the logic input, sample and digitize, send > the sample values in serial packets, deserialize and DAC and filter > and compare at the receiver. Pure Shannon Sampling Theorem with some > ADC quantization. Slow and painful. > > FSK would work but would be very slow and maybe jitterey. OOK would be > really ugly over a telecom type link. PWM might work. > > I'm thinking about PWM at a "carrier" pulse clock rate of, say, 1 GHz. > 30% duty cycle is a 0, 70% is a 1. The logic level to be sent is not > synchronized to the PWM clock. > > It will certainly work, but what's the jitter like? Can it be less > than the 1 ns PWM pulse period? I'm thinking it can. > > It's just a thought experiment, with a bit of Spicing, right now.
will your duty cycle survive the AC coupling on the link? isn't such things normally DC balanced with bit stuffing or similar?
Reply by John Larkin January 31, 20222022-01-31
On Tue, 1 Feb 2022 01:09:16 +0100, Klaus Vestergaard Kragelund
<klauskvik@hotmail.com> wrote:

>On 31/01/2022 16.18, jlarkin@highlandsniptechnology.com wrote: >> On Mon, 31 Jan 2022 11:53:59 +0100, Klaus Vestergaard Kragelund >> <klauskvik@hotmail.com> wrote: >> >>> On 31/01/2022 02.33, jlarkin@highlandsniptechnology.com wrote: >>>> On Mon, 31 Jan 2022 01:52:20 +0100, Klaus Vestergaard Kragelund >>>> <klauskvik@hotmail.com> wrote: >>>> >>>>> On 27/12/2021 00.44, jlarkin@highlandsniptechnology.com wrote: >>>>>> On Sun, 26 Dec 2021 23:38:44 +0100, Klaus Kragelund >>>>>> <klauskvik@hotmail.com> wrote: >>>>>> >>>>>>> Hi >>>>>>> >>>>>>> >>>>>>> I am working on a stepping motor driver >>>>>>> >>>>>>> >>>>>>> To reduce cost I will be making a discrete driver stage driven from a microcontroller that has all the control features that would normally be included in a micrstepping driver like the A4988 >>>>>>> >>>>>>> https://www.allegromicro.com/en/products/motor-drivers/brush-dc-motor-drivers/a4988 >>>>>>> >>>>>>> >>>>>>> For easy calculation let's say the power stage is driven from 10V and the stepping motor has an inductance of 10mH and the peak current is 100mA >>>>>>> >>>>>>> >>>>>>> In fast decay mode the rising and falling didt is thus 1A/ms >>>>>>> >>>>>>> >>>>>>> For micro stepping the current in the 2 phases are set to place the armature in between a full step. So for a position 50% between two steps the currents in the windings are the same to have a resulting vector at that point >>>>>>> >>>>>>> >>>>>>> If the on time is 5us, the ripple current is 5mApp. So, the current ripple is 5% of the nominal peak current. For lower excitation, at 10mA peak drive, the ripple is 50% >>>>>>> >>>>>>> >>>>>>> So the magnetic field will cause quite a bit of torque ripple. >>>>>>> >>>>>>> >>>>>>> Will this have any impact on the drive of the motor, or is the inertia so big that it is insignificant? >>>>>>> >>>>>>> Also, at other positions than 50%, the ripple with not cancel out between the phases and generate even more torque ripple >>>>>>> >>>>>>> I don't see any mention of this, so it is probably insignificant... >>>>>>> >>>>>>> Regards >>>>>>> >>>>>>> >>>>>>> Klaus >>>>>> >>>>>> I did a microstepper once, for tuning superconductive microwave >>>>>> cavities in an accelerator. It used a uP and a pair of integrated >>>>>> h-bridge drivers. >>>>>> >>>>>> It was basically a DDS synthesizer, a phase accumulator (representing >>>>>> angular position) mapping into a sin-cos lookup table, which fetched >>>>>> the duty cycle values to go into the pair of full h-bridges which >>>>>> drove the motor coils. If the switching frequency is reasonably high, >>>>>> there won't be noticable ripple torque. >>>>>> >>>>>> My basically constant-voltage drive caused torque to drop off at high >>>>>> step rates, which wasn't a problem in that application. >>>>>> >>>>>> Most motors are imperfect in that you won't get smooth angular >>>>>> position as a function of sin-cos coil currents; they basically have >>>>>> distortion. That can be fudged in the trig lookup table if you really >>>>>> need to. >>>>>> >>>>> So, now I am getting closer to having first prototype ready >>>>> >>>>> I was doing the chopping control, peak current setting of the current in >>>>> the coils, a loop in the microcontroller that would control this peak >>>>> current with a DAC >>>>> >>>>> Thinking about it, seems like it is all to no good. Just using the PWM >>>>> sine/cosine lookup table, with no feedback seems to work fine, provided >>>>> the speed of the motor is significantly below the max specified speed. >>>>> In that case BEMF has little effect, and really the winding resistance >>>>> sets the current according to applied voltage >>>>> >>>>> Doing the open loop control would remove need for precise current >>>>> sensing and DACs (all though they could just be PWM outputs). Also >>>>> reduces the CPU resources needed for the control of the motor >>>>> >>>>> I will keep the comparator to check for shorted halfbridge, at least for now >>>>> >>>>> Cheers >>>>> >>>>> Klaus >>>>> >>>>> >>>> >>>> Constant-voltage PWM will result in torque rolloff at high step rates, >>>> and eventually stalling. More voltage with current feedback helps >>>> stuff current into the winding inductance. >>>> >>> >>> Yes, that's why I wrote that my application has: "the speed of the motor >>> is significantly below the max specified speed" >>> >>> >>>> Some sort of pre-emphasis without feedback should work too. >>>> >>> >>> In some cases the voltage PWM is better than current mode controlled. >>> For example, around the zero crossing where current feedback has distortion >> >> Not to change the subject (never!) I've been experimenting with the >> jitter implications of PWM, namely how precise in time can a PWM >> system be? Better than the PWM period? How much better? >> > >Can you elaborate on that? > >The PWM of a microcontroller is a combination of the clock jitter and >the jitter of the PWM counter/compare capture unit, plus noise on the >supply I guess
The abstract problem is to send a DC-coupled logic level over an AC-coupled telecom-type link. Imagine the link has AGC or logic repeaters so we can't send different amplitudes to code things. One could lowpass filter the logic input, sample and digitize, send the sample values in serial packets, deserialize and DAC and filter and compare at the receiver. Pure Shannon Sampling Theorem with some ADC quantization. Slow and painful. FSK would work but would be very slow and maybe jitterey. OOK would be really ugly over a telecom type link. PWM might work. I'm thinking about PWM at a "carrier" pulse clock rate of, say, 1 GHz. 30% duty cycle is a 0, 70% is a 1. The logic level to be sent is not synchronized to the PWM clock. It will certainly work, but what's the jitter like? Can it be less than the 1 ns PWM pulse period? I'm thinking it can. It's just a thought experiment, with a bit of Spicing, right now. -- If a man will begin with certainties, he shall end with doubts, but if he will be content to begin with doubts he shall end in certainties. Francis Bacon
Reply by Klaus Vestergaard Kragelund January 31, 20222022-01-31
On 31/01/2022 16.18, jlarkin@highlandsniptechnology.com wrote:
> On Mon, 31 Jan 2022 11:53:59 +0100, Klaus Vestergaard Kragelund > <klauskvik@hotmail.com> wrote: > >> On 31/01/2022 02.33, jlarkin@highlandsniptechnology.com wrote: >>> On Mon, 31 Jan 2022 01:52:20 +0100, Klaus Vestergaard Kragelund >>> <klauskvik@hotmail.com> wrote: >>> >>>> On 27/12/2021 00.44, jlarkin@highlandsniptechnology.com wrote: >>>>> On Sun, 26 Dec 2021 23:38:44 +0100, Klaus Kragelund >>>>> <klauskvik@hotmail.com> wrote: >>>>> >>>>>> Hi >>>>>> >>>>>> >>>>>> I am working on a stepping motor driver >>>>>> >>>>>> >>>>>> To reduce cost I will be making a discrete driver stage driven from a microcontroller that has all the control features that would normally be included in a micrstepping driver like the A4988 >>>>>> >>>>>> https://www.allegromicro.com/en/products/motor-drivers/brush-dc-motor-drivers/a4988 >>>>>> >>>>>> >>>>>> For easy calculation let's say the power stage is driven from 10V and the stepping motor has an inductance of 10mH and the peak current is 100mA >>>>>> >>>>>> >>>>>> In fast decay mode the rising and falling didt is thus 1A/ms >>>>>> >>>>>> >>>>>> For micro stepping the current in the 2 phases are set to place the armature in between a full step. So for a position 50% between two steps the currents in the windings are the same to have a resulting vector at that point >>>>>> >>>>>> >>>>>> If the on time is 5us, the ripple current is 5mApp. So, the current ripple is 5% of the nominal peak current. For lower excitation, at 10mA peak drive, the ripple is 50% >>>>>> >>>>>> >>>>>> So the magnetic field will cause quite a bit of torque ripple. >>>>>> >>>>>> >>>>>> Will this have any impact on the drive of the motor, or is the inertia so big that it is insignificant? >>>>>> >>>>>> Also, at other positions than 50%, the ripple with not cancel out between the phases and generate even more torque ripple >>>>>> >>>>>> I don't see any mention of this, so it is probably insignificant... >>>>>> >>>>>> Regards >>>>>> >>>>>> >>>>>> Klaus >>>>> >>>>> I did a microstepper once, for tuning superconductive microwave >>>>> cavities in an accelerator. It used a uP and a pair of integrated >>>>> h-bridge drivers. >>>>> >>>>> It was basically a DDS synthesizer, a phase accumulator (representing >>>>> angular position) mapping into a sin-cos lookup table, which fetched >>>>> the duty cycle values to go into the pair of full h-bridges which >>>>> drove the motor coils. If the switching frequency is reasonably high, >>>>> there won't be noticable ripple torque. >>>>> >>>>> My basically constant-voltage drive caused torque to drop off at high >>>>> step rates, which wasn't a problem in that application. >>>>> >>>>> Most motors are imperfect in that you won't get smooth angular >>>>> position as a function of sin-cos coil currents; they basically have >>>>> distortion. That can be fudged in the trig lookup table if you really >>>>> need to. >>>>> >>>> So, now I am getting closer to having first prototype ready >>>> >>>> I was doing the chopping control, peak current setting of the current in >>>> the coils, a loop in the microcontroller that would control this peak >>>> current with a DAC >>>> >>>> Thinking about it, seems like it is all to no good. Just using the PWM >>>> sine/cosine lookup table, with no feedback seems to work fine, provided >>>> the speed of the motor is significantly below the max specified speed. >>>> In that case BEMF has little effect, and really the winding resistance >>>> sets the current according to applied voltage >>>> >>>> Doing the open loop control would remove need for precise current >>>> sensing and DACs (all though they could just be PWM outputs). Also >>>> reduces the CPU resources needed for the control of the motor >>>> >>>> I will keep the comparator to check for shorted halfbridge, at least for now >>>> >>>> Cheers >>>> >>>> Klaus >>>> >>>> >>> >>> Constant-voltage PWM will result in torque rolloff at high step rates, >>> and eventually stalling. More voltage with current feedback helps >>> stuff current into the winding inductance. >>> >> >> Yes, that's why I wrote that my application has: "the speed of the motor >> is significantly below the max specified speed" >> >> >>> Some sort of pre-emphasis without feedback should work too. >>> >> >> In some cases the voltage PWM is better than current mode controlled. >> For example, around the zero crossing where current feedback has distortion > > Not to change the subject (never!) I've been experimenting with the > jitter implications of PWM, namely how precise in time can a PWM > system be? Better than the PWM period? How much better? >
Can you elaborate on that? The PWM of a microcontroller is a combination of the clock jitter and the jitter of the PWM counter/compare capture unit, plus noise on the supply I guess
Reply by whit3rd January 31, 20222022-01-31
On Monday, January 31, 2022 at 7:18:38 AM UTC-8, jla...@highlandsniptechnology.com wrote:

>... I've been experimenting with the > jitter implications of PWM, namely how precise in time can a PWM > system be? Better than the PWM period? How much better?
PWM is waveform generation; you can synchronize a feature of that waveform with good precision, and the PWM period only determines the (at steady-state) repetition interval, not the features within that interval. Useful examples of PWM usually alter the features according to some criterion other than timing, i.e. output voltage under load. What specific time precision is under consideration? Old IBM game controllers got pinged at a crystal-clock-synchronized interval, and gave 8-bit resolution.
Reply by January 31, 20222022-01-31
On Mon, 31 Jan 2022 11:53:59 +0100, Klaus Vestergaard Kragelund
<klauskvik@hotmail.com> wrote:

>On 31/01/2022 02.33, jlarkin@highlandsniptechnology.com wrote: >> On Mon, 31 Jan 2022 01:52:20 +0100, Klaus Vestergaard Kragelund >> <klauskvik@hotmail.com> wrote: >> >>> On 27/12/2021 00.44, jlarkin@highlandsniptechnology.com wrote: >>>> On Sun, 26 Dec 2021 23:38:44 +0100, Klaus Kragelund >>>> <klauskvik@hotmail.com> wrote: >>>> >>>>> Hi >>>>> >>>>> >>>>> I am working on a stepping motor driver >>>>> >>>>> >>>>> To reduce cost I will be making a discrete driver stage driven from a microcontroller that has all the control features that would normally be included in a micrstepping driver like the A4988 >>>>> >>>>> https://www.allegromicro.com/en/products/motor-drivers/brush-dc-motor-drivers/a4988 >>>>> >>>>> >>>>> For easy calculation let's say the power stage is driven from 10V and the stepping motor has an inductance of 10mH and the peak current is 100mA >>>>> >>>>> >>>>> In fast decay mode the rising and falling didt is thus 1A/ms >>>>> >>>>> >>>>> For micro stepping the current in the 2 phases are set to place the armature in between a full step. So for a position 50% between two steps the currents in the windings are the same to have a resulting vector at that point >>>>> >>>>> >>>>> If the on time is 5us, the ripple current is 5mApp. So, the current ripple is 5% of the nominal peak current. For lower excitation, at 10mA peak drive, the ripple is 50% >>>>> >>>>> >>>>> So the magnetic field will cause quite a bit of torque ripple. >>>>> >>>>> >>>>> Will this have any impact on the drive of the motor, or is the inertia so big that it is insignificant? >>>>> >>>>> Also, at other positions than 50%, the ripple with not cancel out between the phases and generate even more torque ripple >>>>> >>>>> I don't see any mention of this, so it is probably insignificant... >>>>> >>>>> Regards >>>>> >>>>> >>>>> Klaus >>>> >>>> I did a microstepper once, for tuning superconductive microwave >>>> cavities in an accelerator. It used a uP and a pair of integrated >>>> h-bridge drivers. >>>> >>>> It was basically a DDS synthesizer, a phase accumulator (representing >>>> angular position) mapping into a sin-cos lookup table, which fetched >>>> the duty cycle values to go into the pair of full h-bridges which >>>> drove the motor coils. If the switching frequency is reasonably high, >>>> there won't be noticable ripple torque. >>>> >>>> My basically constant-voltage drive caused torque to drop off at high >>>> step rates, which wasn't a problem in that application. >>>> >>>> Most motors are imperfect in that you won't get smooth angular >>>> position as a function of sin-cos coil currents; they basically have >>>> distortion. That can be fudged in the trig lookup table if you really >>>> need to. >>>> >>> So, now I am getting closer to having first prototype ready >>> >>> I was doing the chopping control, peak current setting of the current in >>> the coils, a loop in the microcontroller that would control this peak >>> current with a DAC >>> >>> Thinking about it, seems like it is all to no good. Just using the PWM >>> sine/cosine lookup table, with no feedback seems to work fine, provided >>> the speed of the motor is significantly below the max specified speed. >>> In that case BEMF has little effect, and really the winding resistance >>> sets the current according to applied voltage >>> >>> Doing the open loop control would remove need for precise current >>> sensing and DACs (all though they could just be PWM outputs). Also >>> reduces the CPU resources needed for the control of the motor >>> >>> I will keep the comparator to check for shorted halfbridge, at least for now >>> >>> Cheers >>> >>> Klaus >>> >>> >> >> Constant-voltage PWM will result in torque rolloff at high step rates, >> and eventually stalling. More voltage with current feedback helps >> stuff current into the winding inductance. >> > >Yes, that's why I wrote that my application has: "the speed of the motor >is significantly below the max specified speed" > > >> Some sort of pre-emphasis without feedback should work too. >> > >In some cases the voltage PWM is better than current mode controlled. >For example, around the zero crossing where current feedback has distortion
Not to change the subject (never!) I've been experimenting with the jitter implications of PWM, namely how precise in time can a PWM system be? Better than the PWM period? How much better? It's an interesting perversion of the Shannon/Nyquist sampling theorem. Maybe I'll post some sims. -- I yam what I yam - Popeye