Wild Thumper 6W - Problem with motors or T-Rex controller (PWM signal)

    Dear Sirs,

    I need your help again because I don't know what is happening with the wild thumper motors or T'rex controller. I explain.

    I have a wild thumper chassis controlled with the T'rex controller and Arduino mega which are communicated through I2C bus. 

    Before summer the robot works correctly but doing test I broke the USB connector of T'rex controller (the USB cable tangle with the tires and pull up the USB female connector of T'rex controller). I tried to repair but I couldn’t. I bought another T'rex controller (I know that is expensive but I don't have any more solution) and I transfer the same program that works correctly in the broke T'rex controller.

    Link motor working correctly in the old T’rex controller:

    https://youtu.be/ydgLUvIH--g

    The problem is in the new T'rex controller the response of the motors is not correct!! As you can see in the video (below there’s the link), when the motors are starting the rotation of this is not continuous.

    https://youtu.be/2HhZrP-bU0U

    Initially I thought that the problems was coming from the LiPo batteries (2S / 5000mAh) because it seem that the motors need more current to start, but I purchased a new butteries and the problem is not solved.

    As you can see in the video when one channel of motors is working the robot works better but when are working the two motors, the starting of the motors is not correct.

    The worst problem is when I put the motor in the floor and doesn’t runs correctly and when I try to turn in any direction. The robot is not be able to rotate the motors. The test of the video was made using one LiPo battery (2S 5000mAh full charged). I checked the values of the speed when the robot doesn't works correctly and are +/- 255 in each channel.

    I tried to connect two LiPo batteries in parallel and works equally.

    Actually the frequency of the PWM signal is 122 Hz (recommended for Dagu in the instructions manual) and I tried to change this PWM frequency, if I increment the value of the PWM frequency the motors work better but the problem appears equally.

    I think that the T'rex controller is damaged but I want a second opinion to be ensure.

    In the below link you have the code for Arduino controller and T’rex Controller if you want to check it.

    http://codeshare.io/hTG49 --> T’Rex controller

    http://codeshare.io/rard9 --> Arduino

    Thanks for your time and sorry for my English.

Make a field variable

Make a field variable boolean debug and enclose all serial prints in a if(debug) . If set true it writes all details, if false it run faster:-)

Thanks a lot!!!

Dear Sirs!!!

First of all, thanks for all the replies!!!

I have changed the baud rate of Serial and now, the communucations works properly!!! Thanks a lot.

Then I have changed all the code, because the statemenrs for Serial Print were to control the I2C communication through the monitor serial window and now I erased all the Serial.Print statements.

I didn’t thing about the Baud rate for Serial, was a begginer mistake!!!

Now the communication works perfectly!!!

PD; Duane Degn: Regarding the vide, you are right, I used the same video which I sent to my teacher. I will take into account your advices for the next video ;-)!!!

Thanks for all!!!

I need your help again!!!

Dear Sirs.

I’m blocked again!!! I changed the philosphy for the TCP communication between the Arduino and the Visual Studio (PC), and now I can’t read the values sent it from Visual Studio to Arduino. I explain.

I send the values of speed for each motor (group of three), this values are read from the Joystick trough Visual Studio. As you know the speed can be negative or positive. I don’t sent the negative value, I only sent a positive value with a little difference to distingish them. Viewing the below example will be more easy to understand my explanation:

00000XXX --> for positive values

10000XXX --> for negative values

The values of XXX comprise values from 0 to 100. I send using 8 bytes for each motor (right and left), this means that finally I have a string of 16 bytes. Y0000XXXY000XXX

The problem is that when I receive this string of bytes in the Arduino, bytes shift to left (one or two positions, don’t follow any pattern) every time that one values of speed (right motor or left motor) changes.

In the below link you can see a piece of the Arduino code (I think will be enough). I think that the problem resides in the statment 

if (client.available() > x)

http://codeviewer.org/view/code:525e

I understand that this function don’t allow to go into the “if” statment if the number of bytes is greather than the value x, but I’m not sure (I read the Arduino hlep, but in my opinion doesn’t explain so much).

If this function works as I think, if I put the statement if (client.available() == 16 ) the code will function correclty, but isn’t it.

I tried to change the values using >15 , >0 and ome more, but the value received oin the Arduino shift the bytes equally.

I discard the the idea that Visual Studio is shifting the value, because I cheked a lot of time and all seems ok.

Any help will be aprecciate and sorry for my english.

Thanks in advance.

Best regards!!!

Problem with motors or T-Rex controller (PWM signal)

Dear Sirs,

I need your help again because I don’t know what is happening with the wild thumper motors or T’rex controller. I explain.

I have a wild thumper chassis controlled with the T’rex controller and Arduino mega which are communicated through I2C bus. 

Before summer the robot works correctly but doing test I broke the USB connector of T’rex controller (the USB cable tangle with the tires and pull up the USB female connector of T’rex controller). I tried to repair but I couldn’t. I bought another T’rex controller (I know that is expensive but I don’t have any more solution) and I transfer the same program that works correctly in the broke T’rex controller.

Link motor working correctly in the old T’rex controller:

https://youtu.be/ydgLUvIH–g

The problem is in the new T’rex controller the response of the motors is not correct!! As you can see in the video (below there’s the link), when the motors are starting the rotation of this is not continuous.

https://youtu.be/2HhZrP-bU0U

Initially I thought that the problems was coming from the LiPo batteries (2S / 5000mAh) because it seem that the motors need more current to start, but I purchased a new butteries and the problem is not solved.

As you can see in the video when one channel of motors is working the robot works better but when are working the two motors, the starting of the motors is not correct.

The worst problem is when I put the motor in the floor and doesn’t runs correctly and when I try to turn in any direction. The robot is not be able to rotate the motors. The test of the video was made using one LiPo battery (2S 5000mAh full charged). I checked the values of the speed when the robot doesn’t works correctly and are +/- 255 in each channel.

I tried to connect two LiPo batteries in parallel and works equally.

Actually the frequency of the PWM signal is 122 Hz (recommended for Dagu in the instructions manual) and I tried to change this PWM frequency, if I increment the value of the PWM frequency the motors work better but the problem appears equally.

I think that the T’rex controller is damaged but I want a second opinion to be ensure.

In the below link you have the code for Arduino controller and T’rex Controller if you want to check it.

http://codeshare.io/hTG49 --> T’Rex controller

http://codeshare.io/rard9 --> Arduino

Thanks for your time and sorry for my English.