Page 1 of 2

PWM help needed

Posted: Sun Feb 20, 2005 8:09 pm
by camino75080
Hello all, I am in the process of designing a speed controller for a RC hobby car. I need to drive the motor with at least a 20 KHz PWM signal but have no idea how to start. The signal from the radio is the same signal used to drive a servo (1ms for full brake, 1.5ms for neutral, 2ms for full power). The circut needs to be as small as possible. Here is what I came up with: First a PIC reads the signal from the radio, it then converts the signal to a duty cycle value, then uses the PWM command to drive the motor thru a transistor. Here are the problems, first I dont have the money to buy the Pbasic complier and programmer and second I dont understand or even know how to find the frequency the PWM would run at. Any ideas wpuld be a great help and sorry for the long post. Thanks in advance.<p>[ February 20, 2005: Message edited by: camino75080 ]</p>

Re: PWM help needed

Posted: Sun Feb 20, 2005 9:33 pm
by Chris Smith
Most PWMs start with a 555 for the frequency. That and PWM sequencer chip [if using a stepper motor] is about all you need, plus the fet transistor driver[s].

Re: PWM help needed

Posted: Mon Feb 21, 2005 5:10 am
by dr_when
"Most PWMs start with a 555 for the frequency."<p>That would be a sweeping generalization. You could do it with a $0.99 PIC and better to do it in Assembly (it's free too).<p>Bob

Re: PWM help needed

Posted: Mon Feb 21, 2005 10:03 am
by Chris Smith
"You could do it with a $0.99 PIC and better to do it in Assembly (it's free too)."<p>
Nothing is free with a PIC, not even the head ache or the programmer and 555s start at a dime.<p>“General”, was the Idea. This is not a teaching institute, it’s a learning one.

Re: PWM help needed

Posted: Mon Feb 21, 2005 10:43 am
by dr_when
"This is not a teaching institute"<p>I didn't know this was an institute. How long have you been institutionalized?

Re: PWM help needed

Posted: Mon Feb 21, 2005 12:48 pm
by Chris Smith
Institute:
To set up,
To erect,
To establish,
To place,
To introduce,<p>Institution:
....A organization having social, educational ........purpose.<p>This forum meets all these standards.

Re: PWM help needed

Posted: Mon Feb 21, 2005 4:09 pm
by camino75080
Well guys, I thank you all for the help so far and have some questions:<p>1: Dr. When, you spoke of a free language for programming PICs, where can I get it and how hard is it?<p>2: Yall spoke of using a 555, I could try that, since it wouldn't cost too much, but how would I convert the signal from the receiver?<p>Thanks again!<p>[ February 21, 2005: Message edited by: camino75080 ]</p>

Re: PWM help needed

Posted: Mon Feb 21, 2005 5:01 pm
by Chris Smith
For that you will need a matching [tuned] receiver. <p>The out put will have to be tapped and redirected, and possibly amplified depending on its design. Is this like a Futaba RC system? <p>The primary 555 is merely the timing cycle, and you will need to expand on the signal using one or two more 555s to get the “width” part of the PMW. <p>Almost any Article on basic PMW covers the 555 and PWMs.

Re: PWM help needed

Posted: Mon Feb 21, 2005 5:52 pm
by camino75080
The system is a Futaba system. If the your idea with amplifing the signal could work, please explain it to me.

Re: PWM help needed

Posted: Mon Feb 21, 2005 8:03 pm
by Mike6158
I'm not at home right now so I can't send it to you but I have a PIC program, written in PBasic, that takes three signals from an RC receiver and send three outputs to three servo's. The PIC does this very well and very simply...<p>Not trying to get into a PICing contest :eek: just trying to help the man out...

Re: PWM help needed

Posted: Mon Feb 21, 2005 8:20 pm
by Chris Smith
From memory, when dinosaurs roamed the earth, the Futaba receiver receives a signal and directly drives the motor or servo from these signals. All the necessary parts are build into each servo. Try using a servo complete to make your commands? That or remove the motor and board and use a smaller servo motor to do this task?<p>However the signal can be sent to either servos, FETS to boost up a signal, or even 567 tone decoders that will be set for your timer phase [MS] signals, and three 567s can detect three different pulse widths to switch on/off any other signal.

Re: PWM help needed

Posted: Mon Feb 21, 2005 10:05 pm
by camino75080
Okay it seems that you guys need more info, I' not trying to drive a servo. What I am trying to drive is a DC motor, when the signal from the radio is 1 ms, I need full brake, at 1.5 ms neutral and at 2 ms full power. Here is why I need PWM, the motor can pull 30 amps when running and over 400 amps when starting. I want to us a PIC if possible because they are very small (surface mount), to kepp the wieght as low as possible and it would be a good learning project, I just dont know for sure if that is the way to go or not. All yalls' help is great thanks again.

Re: PWM help needed

Posted: Mon Feb 21, 2005 11:12 pm
by Chris Smith
I almost wrote that answer, but couldnt figure out if your were going up or down in motor size.<p> When you say “Brake and Neutral” it doesn’t tell me what you mean. <p>Brake= how, with what, short out, reverse? <p>Neutral= Idle, off, coast? <p>If your sending from a futaba sender to a futaba receiver, then tap off the signal that runs the servo, and use it to pulse the FET gate system that drives the large motor. <p>But it may not be the correct signal, [width X time] in which you would have to recreate a proper driver which is driven by the original signal. Each motor is different. <p>However, there is no variable this way?<p>If you only have one on position you could use the other two to cut in different PWM variables/speeds/power settings. <p>The Brake and Neutral will need more explaining.

Re: PWM help needed

Posted: Tue Feb 22, 2005 2:48 am
by cato

Re: PWM help needed

Posted: Tue Feb 22, 2005 4:38 am
by dr_when
Camino...<p>You can get Microchip's MPLab for free (at least older versions AFAIK). You will find asm source code for what you want to do easy enough (google).<p>Actually, PWM in assembly is fun and not so difficult. Any you could even do it with one of the "fly-speck" 6-pin surface mount packages. Of course the xistors you need for such a big load will occupy most of your free space.<p>Bob