closed loop motor control circuit
i is him
Posts: 7
Hello.
Ive got to design a new closed loop motor control curcuit for my welder.
What i want to do is calculate motor speed from the frequency a beam of light is broken in order to generate a RPM figure.
Im new to stamp programming and im having trouble changing the input frequency to an rpm figure
Could anyone help me by just giving me some sudo code to work with.
Thanks
Dan
[noparse]/noparse][i]Subject Edited By Moderator[/i
Post Edited By Moderator (Chris Savage (Parallax)) : 3/19/2007 7:19:26 PM GMT
Ive got to design a new closed loop motor control curcuit for my welder.
What i want to do is calculate motor speed from the frequency a beam of light is broken in order to generate a RPM figure.
Im new to stamp programming and im having trouble changing the input frequency to an rpm figure
Could anyone help me by just giving me some sudo code to work with.
Thanks
Dan
[noparse]/noparse][i]Subject Edited By Moderator[/i
Post Edited By Moderator (Chris Savage (Parallax)) : 3/19/2007 7:19:26 PM GMT
Comments
Say you have 100 marks around a wheel and each mark causes an interruption. You've got a frequency of 100 per revolution. If
your frequency is given in interruptions per second, you need to multiply by 60 to get interruptions per minute. If you divide that
by 100 interruptions per revolution, you'd get a result in revolutions per minute. So you have a simple formula:
RPM = <frequency> * 60 / <pulses per revolution>
I understand the mathmatics behind calculating rpm etc.
My problem is from memory (ive only done one stamp project before and it was on a bs1 and it was over a year ago) that the bs2 has no sense of real time.
i.e. i dont think i can simply tell it to count the number of pulses in a second as it does not how long a second is (please correct me if im wrong).
Thanks
Dan
revolutions / minute = (pulses / second) * (seconds / minute) / (pulses / revolution)
The "seconds / minute" is 60. In your system, the "pulses / revolution" is 6. The formula becomes
revolutions / minute (RPM) = pulses / second (frequency) * 60 / 6, in other words: RPM = Frequency * 10
Jeff T.
otherwise there is no reference to real time.
Have a good day.