Reference and phase with the propeller
BeauHound
Posts: 6
I am new to the propeller. Can the propeller act as a frequency multiplier/divider? For example, I would like
to input a 60hz ac line reference pulse and ouput a frequency. For example, 60hz in and 60hz/ 30/hz/24hz out which coincides with the 60hz 6 times ps.
I would like to able to set phase delay, duty cycle. I know how to code this (I think) but is this a valid application for the propeller?
How precise can the timing be with low frequencies like these? Another application needed for multiplying to higher frequency would be stepper motor control(ie step and direction) referenced to a pilot tone 50hz, 60hz, etc. Any thoughts ?
Post Edited (BeauHound) : 5/29/2008 11:40:17 PM GMT
to input a 60hz ac line reference pulse and ouput a frequency. For example, 60hz in and 60hz/ 30/hz/24hz out which coincides with the 60hz 6 times ps.
I would like to able to set phase delay, duty cycle. I know how to code this (I think) but is this a valid application for the propeller?
How precise can the timing be with low frequencies like these? Another application needed for multiplying to higher frequency would be stepper motor control(ie step and direction) referenced to a pilot tone 50hz, 60hz, etc. Any thoughts ?
Post Edited (BeauHound) : 5/29/2008 11:40:17 PM GMT
Comments
My application is a printer (actually a 3D printer ) . Currently several propeller boards are being used for motor control and printhead drive.
The thing that I haven't figured out yet is the frequency multiplificaton that has to be done. A linear quadrature encoder tracks the position of the printhead carriage, but the resolution of the encoder is much too low ( +- 100 lines per inch). I need to upscale this several times while keeping track of position.
Suppose I want to multiply the frequency by factor 4. This means that for every encoder pulse I need to produce exactly 4 pulses. I can not just measure the encoder frequency and then set a frequency output, by using this I will probably loose the linear position as not exactly 4 pulses are produced for one encoder pulse.
How can I measure the period, produce the high frequency pulses and track global position at the same time?
Are you driving another device which expects 4 times the resolution and using the Propeller to do the translation? If that's the case, just send out four pulses every time you receive one. The timing of the four pulses would depend on the rate of pulses from the encoder. Keep track of the interval between incoming pulses, and on each received pulse send four pulses at 1/4 the previous interval. In the end, your effective resolution will still only be as good as your encoder.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Post Edited (Ken Peterson) : 7/3/2008 12:37:21 PM GMT
That is exactly what I want to do. Indeed, I need to drive a device that expects 4 times the resolution.
But what is the easiest way to do this, using system counter or just polling?
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Still some PropSTICK Kit bare PCBs left!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔