PWM help needed

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
camino75080
Posts: 35
Joined: Mon Aug 02, 2004 1:01 am
Location: Richardson, Tx
Contact:

PWM help needed

Post by camino75080 » Sun Feb 20, 2005 8:09 pm

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>

User avatar
Chris Smith
Posts: 4325
Joined: Tue Dec 04, 2001 1:01 am
Location: Bieber Ca.

Re: PWM help needed

Post by Chris Smith » Sun Feb 20, 2005 9:33 pm

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].

User avatar
dr_when
Posts: 208
Joined: Thu Oct 28, 2004 1:01 am
Location: Milwaukee
Contact:

Re: PWM help needed

Post by dr_when » Mon Feb 21, 2005 5:10 am

"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
"Who is John Galt?"

User avatar
Chris Smith
Posts: 4325
Joined: Tue Dec 04, 2001 1:01 am
Location: Bieber Ca.

Re: PWM help needed

Post by Chris Smith » Mon Feb 21, 2005 10:03 am

"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.

User avatar
dr_when
Posts: 208
Joined: Thu Oct 28, 2004 1:01 am
Location: Milwaukee
Contact:

Re: PWM help needed

Post by dr_when » Mon Feb 21, 2005 10:43 am

"This is not a teaching institute"<p>I didn't know this was an institute. How long have you been institutionalized?
"Who is John Galt?"

User avatar
Chris Smith
Posts: 4325
Joined: Tue Dec 04, 2001 1:01 am
Location: Bieber Ca.

Re: PWM help needed

Post by Chris Smith » Mon Feb 21, 2005 12:48 pm

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.

camino75080
Posts: 35
Joined: Mon Aug 02, 2004 1:01 am
Location: Richardson, Tx
Contact:

Re: PWM help needed

Post by camino75080 » Mon Feb 21, 2005 4:09 pm

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>

User avatar
Chris Smith
Posts: 4325
Joined: Tue Dec 04, 2001 1:01 am
Location: Bieber Ca.

Re: PWM help needed

Post by Chris Smith » Mon Feb 21, 2005 5:01 pm

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.

camino75080
Posts: 35
Joined: Mon Aug 02, 2004 1:01 am
Location: Richardson, Tx
Contact:

Re: PWM help needed

Post by camino75080 » Mon Feb 21, 2005 5:52 pm

The system is a Futaba system. If the your idea with amplifing the signal could work, please explain it to me.

Mike6158
Posts: 409
Joined: Fri Nov 12, 2004 1:01 am
Location: Weimar, Texas
Contact:

Re: PWM help needed

Post by Mike6158 » Mon Feb 21, 2005 8:03 pm

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...
"If the nucleus of a sodium atom were the size of a golf ball, the outermost electrons would lie 2 miles away. Atoms, like galaxies, are cathedrals of cavernous space. Matter is energy."

User avatar
Chris Smith
Posts: 4325
Joined: Tue Dec 04, 2001 1:01 am
Location: Bieber Ca.

Re: PWM help needed

Post by Chris Smith » Mon Feb 21, 2005 8:20 pm

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.

camino75080
Posts: 35
Joined: Mon Aug 02, 2004 1:01 am
Location: Richardson, Tx
Contact:

Re: PWM help needed

Post by camino75080 » Mon Feb 21, 2005 10:05 pm

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.

User avatar
Chris Smith
Posts: 4325
Joined: Tue Dec 04, 2001 1:01 am
Location: Bieber Ca.

Re: PWM help needed

Post by Chris Smith » Mon Feb 21, 2005 11:12 pm

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.


User avatar
dr_when
Posts: 208
Joined: Thu Oct 28, 2004 1:01 am
Location: Milwaukee
Contact:

Re: PWM help needed

Post by dr_when » Tue Feb 22, 2005 4:38 am

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
"Who is John Galt?"

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests