On 4/29/06, cunningfellow <
andrewm1973@...> wrote:
> I don't think I need the XOR gate or the HC393
> (they are only there for the proto boards in test)
> but I think the PLL is pretty necessary. The
> opto encoder on the back of the servo motor does
> not have anywhere near the resolution needed to
> do 1000 dpi - hence the multiplication by the
> PLL.
I guess what I would do is run the processor from a crystal
oscillator, and try to sync the cylinder rotation with the processor
clock.
12 inches circumference, 2000dpi, 10rev per sec = about 250000 pixels/second
about 64 clock cycles per pixel, 1600 clock cycles per encoder pulse,
25 pixels per encoder pulse.
I wonder how much jitter there is, pulse to pulse, and from one
revolution to the next?
Note that the only feedback you have about the cylinder speed is the
encoder pulse edges, which come one every 100 uS. The PLL isn't
psychic... it uses those same encoder pulse edges, sees whether they
arrive early or later than expected, and ramps the oscillator speed up
or down as needed to stay in sync. The processor can watch those
pulses just as well as the PLL can, and control the motor speed with
PWM.
> From my math the pixel clock for a 2000 dpi plot
> of the kinda size and speed we are talking is
> 200Khz. Thats about 80 CPU clocks per pixel.
> If you are going to do the pixel clock in SW
> you wont be able to use a shift register. (the
> spi port). So you have to do two control loops,
Just one, I think: the motor speed, and that loop is s-l-o-w.
> decode group 3 fax and a SW shift register with
> hopefully uS accuracy in 80 clock cycles.
I don't know what's involved with group 3 fax, but 80 instructions is
way more than needed for a sw shift register. I would do the shifting
in an interrupt routine triggered by a timer.
> > You don't need the motor control chip either.
> > Take a PWM output and run it into an RC (low
> > pass filter), so with 50% duty cycle you get
> > 2.5V with say .1V sawtooth ripple. Compare
> > that with the voltage across the motor,
> > lowpass filtered. Use the comparator output to
> > drive a high-side switch (PFET) to drive the
> > motor.
>
> HUH - who said motor control chip.
Oops, I didn't check to see what a "tiny2313" was. :-)
> The PWM
> straight from an Atmel into a FET on the low
> side. The Atmel counts the pulses from a
> single channel of the encoder to do speed feed-
> back.
Sounds like you're depending on the internal clock being pretty stable.
> Cheaper and less chips than a high side
> switch and whats all the complexity of going
> into the analog domain about :S
I was trying to compensate for any 120 Hz ripple in the 12V supply. 2
RC filters and a comparator. I see a bunch of Rs and Cs near the
PLL... :-)
>
> Digital pulses in - Digital pulses out. I spend
> so much of my life avoiding analog circuits.
> There is no way I am going to invite them in
> the front door for no good reason.
If the 12V is well regulated then yes, just PWM the motor from a processor port.
>
> <SNIP>
>
> Also - I am not trying to be nasty about any feed-
> back about my circuit. I welcome all feedback
> especially if I am doing something stupid and
> obviously wrong. But please can we limit "I
> ∗think∗ it would be better if you did this" kinda
> feed back till I have something working. Even if
> you think I am going about it the hard way. (rather
> than the wrong way)
Sorry... I just enjoy simplifying circuits to the bone... I don't see
anything there that would make your circuit definitely NOT work.
In order to get 2000dpi accurately, so the dots line up from one
revolution to the next, there can't be too much random jitter in the
decoder pulses, the processor clock needs to be stable, the 12V needs
to be stable or else compensated for...
Cheers,
- Jan