Pages: [1]   Go Down
Author Topic: Filtered PWM signals to Robot Wheels  (Read 717 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

As part of a project I'm currently doing I need to navigate two wheels on a differentially driven robot to be able to operate it with bluetooth.  I have bought a PS3 controller to send signals to a bluetooth dongle which turn is connected to a USB Host Shield and everything is mounted on an arduino. Now, currently I have a program which is communicating with the PS3 controller and producing two PWM signals and two direction signals (one for each wheel). Driving the motors using PWM creates a large inrush current since the back emf initially is zero at the initial stages. This could blow the LMD18200 H-bridge that I'm using.  So I, thought to using a filter whose transfer function is of this form:

                                                                                            Vo/Vin = 1/(s+a)
                                                                                            s*Vo + a*Vo = Vin
using the inverse laplace transform:
                                                                                            d(Vo)/dt + a*Vo = Vin
by Euler method:
                                                                                            (Vok - Vok-1)/T + a*Vok = Vink

where T is the time taken for Arduino to sample what the PS3 is sending.

Now, I already have the PWM signals operating at 20Khz through the use of interrupts.

My Questions are as follows:
1.  Is this the correct way to limit the current or is there any other way?
2.  Should the time T be smaller or larger than that of the PWM signal because I'm getting confused?
3.  Do I need to make all the existing code in a loop that operates under a specific time T using interrupts?

Thanks  for your help!!

Logged

Pages: [1]   Go Up
Jump to: