Shop OBEX P1 Docs P2 Docs Learn Events
Noob question: 3-phase Induction motor control using PWM — Parallax Forums

Noob question: 3-phase Induction motor control using PWM

Ali E.Ali E. Posts: 23
edited 2006-12-12 04:03 in General Discussion
Hi

I was impressed to find out that Javalin module can run (is it possibly just one?)PWM in background, but i'm still not sure how that exactly works yet. If i need to have 6 PWM signals (they will be two by two inverted for IGBT inverter control with some dead time delay in between), does Javalin have enough proccessing power to handle that?
If it's done in Java (on a PC) i can create 6 PWM objects and have them just do their things. But does this apply to Javalin stamp?

I also need to be commiunicating with PC updating status and listening to control commands from PC using serial connection. can all that be executed on Javalin at the same time (using interrupts)?

It's just that I still have trouble imagining how java will run on a simple chip... That's just weird!!! I just ordered one for me roll.gif (talk about impulse shopping) , but i really want to know if i can use it this way?

Thanks

Ali E.

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-11-28 23:55
    The javelin can run 6 Virtual Peripherals in the background.

    import stamp.core.*;

    public class pwm6_test {
    · static PWM pwm0 = new PWM(CPU.pin0,100,100);
    · static PWM pwm1 = new PWM(CPU.pin1,100,100);
    · static PWM pwm2 = new PWM(CPU.pin2,100,100);
    · static PWM pwm3 = new PWM(CPU.pin3,100,100);
    · static PWM pwm4 = new PWM(CPU.pin4,100,100);
    · static PWM pwm5 = new PWM(CPU.pin5,100,100);

    · static void main() {
    ··· while (true) ;
    · }

    }

    will generate·PWM signals on pins 0 to 5.
    If you also require serial communication, you can use the Uart object,
    but since this is a VP also, you cannot have 6 pwm objects running
    simultaneous with a uart.
    You can have serial communication via the javelin programming port,
    but that requires that your pc program implements the protocol
    that is used by the programming port. You would be able to run
    6 pwm objects though.

    regards peter
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-11-29 00:32
    Since I am not really experienced in motor control,
    I googled for 3phase motorcontrol using pwm
    and found this:
    http://www.atmel.com/dyn/resources/prod_documents/doc7545.pdf
    http://www.atmel.com/dyn/resources/prod_documents/doc7546.pdf
    accompanied code (c source):
    http://www.atmel.com/dyn/resources/prod_documents/avr494_avr495.zip
    Do the documents avr494 and avr495 discuss your application?

    regards peter
    ·
  • Ali E.Ali E. Posts: 23
    edited 2006-11-29 03:04
    Thank you for your·reply Peter.

    These documents explain the algorithms pretty well. The induction motor takes in a cosine input power, each 120 degrees apart. That means PWM parameter should be valiable and vary with cos function. In order for the stamp to perform it should process 6 variable PWMs in a loop changing the duty cycle of each output by·cosine-like values·and each pair is 120 degree apart from the other two (making 3-phase power).

    Javalin at the same time should report the current frequency through serial port periodically and wait for commands from the port (slow down, speed up, or stop).

    That com port has to be connected to a Linux machine so i could write kernel modules, and program so the system can be monitored and controlled. Evantually the entire control will be done over a network or internet with·some sort of·user interface.

    I have ordered the javalin development kit. Will i be able to use the com port along with the PWMs the way i described above?

    I'm thinking of programming the stamp in windows since the IDE applications work with windows only, and then·use the com port on a different computer running Linux and develop the software there.

    I have no expereince in dealing with virtual peripherals and i'm not sure if i understand it completely.

    is Uart·the·on-board serial·connection for the programmer or the com port? (sorry if this sounds like a dumb question) blush.gif

    I hope·javalin works for this project!!! if it doesn't work i have to leave javalin for my other robotic project and find something else and finding development kits with good support and help is·...mmm... "not easy".
  • BOBNAPATORBOBNAPATOR Posts: 6
    edited 2006-12-11 16:10
    If your motor in not too big , why don't You use a modelism motor controller, which you can drive from one bit exactly like a servo?
    Regards.
  • Ali E.Ali E. Posts: 23
    edited 2006-12-12 04:03
    What is Modelism?

    If you can find a 3-phase variable speed Induction motor controller with feedback that can work with Javalin it will be amazing!!!

    I am trying to use International Rectifier IR2233 Motor Drive and a 3phase IGBT from them to drive the motor. Anything that can make that easier to run will give me room for improvement to the actual user program. burger.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    GAME OF FUTURE INC.

    Unleas Your Imagination, See the Future

    www.gameoffuture.com

    Post Edited (Ali E.) : 12/12/2006 4:09:41 AM GMT
Sign In or Register to comment.