Show Posts
Pages: [1]
1  Using Arduino / Installation & Troubleshooting / Re: I/O pins state on powerup on: April 09, 2013, 12:14:51 am
I'm generating PWM signals and I have an inversion in my hardware so I need to counteract this through another inversion in my code however, when arduino resets these pin get low and due to the inversion the inversion I have the PWM signals become high which is undesired. Is there a way to do it in software?
2  Using Arduino / Installation & Troubleshooting / Re: I/O pins state on powerup on: April 08, 2013, 06:54:00 pm
Hi lefty,

Would it be possible to change the state of the I/0 pins at start up. I'm controlling the state of the pins to a high value inside my program however, when I switch ON my Arduino Mega 2560 R3, the I/0 pins are configured as inputs and thus the output (until my program starts running)  become low. Is it possible to change the state to High before my program loads?

Regards
Norbert
3  Topics / Robotics / Filtered PWM signals to Robot Wheels on: February 21, 2013, 02:48:21 am
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!!

Pages: [1]