Shop OBEX P1 Docs P2 Docs Learn Events
Can the Propeller do this??? — Parallax Forums

Can the Propeller do this???

krazyideaskrazyideas Posts: 119
edited 2007-12-27 04:51 in Propeller 1
I have been working with the BS2, Trying to run an eletric motor.

What the chip has to do is mesure a pulsein and then recreate that pulse as a pulseout 360 times everytime the motor makes one rotation.· Also it must count the pulses on a varuble so that I can turn on and off my coils depending on which of the 360 pulses (or degrees) the count is on. And it needs to be able to do this up to a minimum of 5000 RPM

SO before I get this new chip and all the stuff I wanted to know if it can do what I want it to
Any replys would be great.

ALso it has to be very very acurrate

Thanks

Comments

  • Dennis FerronDennis Ferron Posts: 480
    edited 2007-12-26 19:24
    It is more than fast enough to do this. Just to be clear, I assume that the pulsein occurs once per motor rotation, and that what you want to do is count how much time passes from one pulse to the next, and then divide that time period into 360 slices for degrees?
  • deSilvadeSilva Posts: 2,967
    edited 2007-12-26 20:19
    If we asume that your hardware delivers one pulse per degree, running at 6000 RPM = 100 RPS there is a pulse each 36 kHz = 60 µs.

    What can the propeller do in 60µs?
    Perform around 6 SPIN lines
    Perform 1200 machine instructions.

    But it can do it for 8 motors at the same time smile.gif Or you can spend 7/8 of its power for other activities...
    Though it shall be not excluded that you will be able to handle your application with SPIN and timer/counters alone, I rather suspect you need a small part machine code for it..

    But the Propeller is nearly overkill for such a tiny project smile.gif

    Post Edited (deSilva) : 12/26/2007 8:47:39 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-26 22:25
    One particularly nice thing about the Propeller is that you can devote 2 or 3 cogs to handling a keyboard and a display (either TV or VGA) for debugging and configuration purposes
  • krazyideaskrazyideas Posts: 119
    edited 2007-12-27 02:36
    Thanks for the info Guys

    one other question that I have is what are the maximum and minimim width for pulsein and pluse out on the propellor ??
  • deSilvadeSilva Posts: 2,967
    edited 2007-12-27 02:42
    12.5 ns to 25 s (or infinite)

    There is no pulsein or pulsout...Well, Martin has written some routines having this name...

    Post Edited (deSilva) : 12/27/2007 2:47:05 AM GMT
  • krazyideaskrazyideas Posts: 119
    edited 2007-12-27 04:51
    Thanks much
    Merry Christmas and Happy New Year
Sign In or Register to comment.