Sonsivri

Electronics => Pic Basic Languages => Topic started by: Wragie on October 01, 2008, 10:15:12 10:15



Title: Motor control issues using basic
Post by: Wragie on October 01, 2008, 10:15:12 10:15
Has anyone experienced issues trying to run a pic as a motor controller having programed it in basic?
what I am wondering about if I should expect timing issues. Since these are compiled not interpreted
basics I would hope that the resulting asm is almost as fast or the same as a C originated asm.

I want to play with a 18F4331 and a 3 phase ac motor. I doubt there would be any issues at lower
rpms but could there be when running faster and the timing needs to be more accurate. If it helps
open loop acim is what this would be on. Motor controller on a diy scooter. I could do it dc but want
to play with a cheap ac before going broke. If it moves I'm happy, if I can pass cars its much gooder ;D

W


Title: Re: Motor control issues using basic
Post by: taos on October 02, 2008, 10:11:43 22:11
Hi!, I made a program with Mikroe, IRF3205 (MOSFET) and a brushless 24 V DC motor & pic16f887. No problem.   
I used a 1000uF Capacitor to make smooth start & end runs.


Title: Re: Motor control issues using basic
Post by: Wragie on October 03, 2008, 11:20:13 11:20
Funny I was just playing with Mikro and playing with some code. :)

I was looking at an appnote from Microchip and they just use an
offset table for the 3 phase so it might not be as cpu intensive as
I thought it would be.

I'm just trying to find a small 3 phase ac motor right now so I can play
with this and not be too upset when it blows. That and finding one small
enough volts and amps wise so that I don't have a huge string of
battery's to collect.

I see quite a few guys have read this so I'll ask anyone who does look
at this if they can think of a small appliance or something 3phase ac
that could be "borrowed" ie blender motor etc.
(or did I just answer my own question  ;D)

W

Posted on: October 03, 2008, 12:11:20 12:11 - Automerged

Just thought of another part of this to ask after replying.

There is another Microchip appnote that uses a dsp
instead of the 18Fxx31.

Has anyone used MikroBasicDSP to try this out?

I think the dsps outmip the 18f's but the18fxx31's
have some dedicated motor control functions built in.

Yet another choice ;)

W


Title: Re: Motor control issues using basic
Post by: revoltage on December 20, 2008, 03:49:57 03:49
Hey taos could you share your program please?


Title: Re: Motor control issues using basic
Post by: sherm on January 06, 2009, 12:03:33 00:03
I haven't done any work with AC motors, but I have played extensively with DC. For smaller projects like model rail control, I've built simple H-Bridges from transistors and used PWM from the PIC to control the motor speed with very good results. For the window motors on my hot house, I used the National Semiconductor LMD18200 in conjunction with a 16F877A, and also had outstanding results.

http://www.national.com/pf/LM/LMD18200.html

If you find that your AC path is proving to be too hard, check out the National samples program. I think they still supply the 18200 free of charge for experimenting. The advantage of the 18200 is that it reads the back EMF as well. This would give you much better motor control on slopes where you want to regulate the power to the motor (increased power under load.)

Good luck!


Title: Re: Motor control issues using basic
Post by: fernandodiaz on January 07, 2009, 03:35:36 03:35
USE THIS

MC3PH