Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: rrobotics on January 07, 2012, 09:42:29 AM

Title: Brushless with PWM
Post by: rrobotics on January 07, 2012, 09:42:29 AM
Hi,
I would like to let a Brushless motor work with an Axon microcontroller.
I tried to use the PWM but it doesnt work!!!
What can I do?
 Please give me the code
Thank you
Rrobotics
Title: Re: Brushless with PWM
Post by: Soeren on January 07, 2012, 09:11:07 PM
Hi,

I would like to let a Brushless motor work with an Axon microcontroller.
I tried to use the PWM but it doesnt work!!!
What can I do?
Stuff a brushless driver between controller and motor.
Title: Re: Brushless with PWM
Post by: rrobotics on January 13, 2012, 01:36:05 PM
i'm using a roxxy 9100-12 motor controller but it's still not working. i'm trying to use the following code, but i actually didn't get how pwm works.

         PWM_Init_timer4_H3(10);
         PWM_timer4_On_H3();
         PWM_timer4_Set_H3(200);
         delay_ms(10);//control pulse speed

I saw that it outputs a square wave but the motor isn't turning on.
thanks for precious help!

have a nice day.
Title: Re: Brushless with PWM
Post by: billhowl on January 13, 2012, 05:46:44 PM
the roxxy 9100-12 motor controller had to use a servo signal to controll them. you can do servo control using webbotlib.
http://webbot.org.uk/WebbotLibDocs/34745.html (http://webbot.org.uk/WebbotLibDocs/34745.html)
The controller will not work with PWM.
Title: Re: Brushless with PWM
Post by: Soeren on January 13, 2012, 06:38:41 PM
Hi,

i'm using a roxxy 9100-12 motor controller but it's still not working.
Link to datasheet on this controller?
Link to motor used?


I saw that it outputs a square wave but the motor isn't turning on.
Then it's either defect or you use it incorrectly. The datasheet will probably reveal which.
Title: Re: Brushless with PWM
Post by: rrobotics on January 23, 2012, 01:45:48 PM
I have to search for them,
anyway in the meantime the seller told me that to control the motor I need to output a PWM pulse of

1,5ms pulse to stop,
0.7ms pulse to move the motor reverse,
2.3ms pulse to move the motor forward

Is it possible to have an example code of this? because maybe I'm programming the Axon in a wrong way.
Sorry for the late reply but I've been very busy in those days.

Thanks for the help
bye bye
Title: Re: Brushless with PWM
Post by: Billy on January 23, 2012, 02:23:26 PM
I need to output a PWM pulse of

1,5ms pulse to stop,
0.7ms pulse to move the motor reverse,
2.3ms pulse to move the motor forward


FYI - That is not PWM (pulse width modulation). What you describe is the protocol used to control Radio Control (RC) servos...I don't have any code for you but I'm sure someone will be along shortly that does.
Title: Re: Brushless with PWM
Post by: Soeren on January 23, 2012, 04:13:29 PM
Hi,

anyway in the meantime the seller told me that to control the motor I need to output a PWM pulse of

1,5ms pulse to stop,
0.7ms pulse to move the motor reverse,
2.3ms pulse to move the motor forward

Is it possible to have an example code of this? because maybe I'm programming the Axon in a wrong way.
That's standard servo signalling and I'm sure you have some examples of this already (gotten with the Axon), if not, I believe there's code for it to download somewhere on this site.
Servo signals are PDM (Pulse Duration Modulation), but unfortunately a lot of people call it PWM.

If the controller is supposed to give variable speed, the requirement should rather be described as (slow to fast) 1.5ms to 2.3ms forward and 1.5ms to 0.7 ms reverse.

The proper servo signal is defined as 1.0ms to 2.0ms with 1.5ms being neutral/stop, but sadly most manufacturers sabotage the standard.
In many applications, servos are reprogrammed to have the stop value at perhaps 1.2ms or whatever as it's usually not necessary to go reverse as fast (and electric planes need no reverse at all).
Title: Re: Brushless with PWM
Post by: billhowl on January 23, 2012, 05:03:47 PM
example code for servo in WebbotLib
http://webbot.org.uk/WebbotLibDocs/27190.html (http://webbot.org.uk/WebbotLibDocs/27190.html)