Author Topic: No balancing  (Read 6602 times)

Polleke

  • Newbie
  • *
  • Posts: 4
    • View Profile
No balancing
« on: March 29, 2014, 01:19:52 PM »
I can start the motors with the calibration.
I can see the movement I make with the robot on the android application.
But when  I start up the balanduino there is no reaction.


Polleke

Lauszus

  • Administrator
  • Full Member
  • *****
  • Posts: 131
    • View Profile
Re: No balancing
« Reply #1 on: March 29, 2014, 01:38:48 PM »
Can you post a video of it? Then it might be easier for me to see what is going on.

Regards
Lauszus

Polleke

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: No balancing
« Reply #2 on: March 30, 2014, 10:39:04 AM »
Hi lauszus,

Attaching video takes way to much space.
So I toke a picture on the sensor reactions and filter.
On the other hand in the serial monitor I coulds calibrate the motors, after I type MC; thge motors start to spin.
This will say that the drivers and the motors are OK.

But when I start up the Balanduino there is no respons  of the motors. No balancing at all!!!
Polleke
« Last Edit: March 30, 2014, 01:11:20 PM by Polleke »

Sarawuth

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: No balancing
« Reply #3 on: March 30, 2014, 04:37:23 PM »
Can you try "Restore Defaults"?

Lauszus

  • Administrator
  • Full Member
  • *****
  • Posts: 131
    • View Profile
Re: No balancing
« Reply #4 on: March 30, 2014, 05:54:56 PM »
You could just upload a video to Youtube and then post it here :)

Yes please try to restore the default values as suggested by Sarawuth.

Regards
Lauszus

Polleke

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: No balancing
« Reply #5 on: March 31, 2014, 10:13:12 AM »
Hi all,

Reprogrammed the board and evetything works fine.


 :D

Lauszus

  • Administrator
  • Full Member
  • *****
  • Posts: 131
    • View Profile
Re: No balancing
« Reply #6 on: March 31, 2014, 10:22:58 AM »
Okay awesome! :)

Regards
Lauszus

Jimmy

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: No balancing
« Reply #7 on: July 12, 2014, 06:25:09 AM »
Just finished put this together and loaded with the latest firmware, ran the AC; but still not balancing, it stand still for a couple seconds and started to drift... need help!!!

Lauszus

  • Administrator
  • Full Member
  • *****
  • Posts: 131
    • View Profile
Re: No balancing
« Reply #8 on: July 12, 2014, 12:01:16 PM »
Did you connect the encoders as well? Can you post a video of it?

Please try to run:
Code: [Select]
moveMotor(left, forward, 50);
moveMotor(right, forward, 50);
while (1) {
   Serial.print(readLeftEncoder());
   Serial.print('\t');
   Serial.print(readRightEncoder());
   delay(100);
}

And confirm that the encoder values decreases.

Regards
Lauszus

Jimmy

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: No balancing
« Reply #9 on: July 12, 2014, 06:02:44 PM »
Lauszus,
The encoders are part of the motors, the code you posted do I put that in Balanduino.ino source in the loop section or just run it like that? I am a newbie on this.

Thanks,

Jimmy

Lauszus

  • Administrator
  • Full Member
  • *****
  • Posts: 131
    • View Profile
Re: No balancing
« Reply #10 on: July 13, 2014, 03:58:22 PM »
@Jimmy
Simple put it anywhere in loop.

Regards
Lauszus

Jimmy

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: No balancing
« Reply #11 on: July 13, 2014, 06:32:31 PM »
Ran the test code and I see the number is increasing... will make a video as soon as I can.

Thanks,

Jimmy
« Last Edit: July 13, 2014, 06:47:41 PM by Jimmy »

Lauszus

  • Administrator
  • Full Member
  • *****
  • Posts: 131
    • View Profile
Re: No balancing
« Reply #12 on: July 13, 2014, 07:02:29 PM »
Okay. Then please replace:
Code: [Select]
leftCounter += enc_states[ old_AB & 0x0F ];
With:
Code: [Select]
leftCounter -= enc_states[ old_AB & 0x0F ];

And replace:
Code: [Select]
rightCounter -= enc_states[ old_AB & 0x0F ];
Code: [Select]
rightCounter += enc_states[ old_AB & 0x0F ];

Both are located in: https://github.com/TKJElectronics/Balanduino/blob/master/Firmware/Balanduino/Motor.ino.

Regards
Lauszus

Jimmy

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: No balancing
« Reply #13 on: July 13, 2014, 07:24:08 PM »
Lauszus,

It worked!!!! you are a genius! now start working on a PS3 controller.

Thank You!

Jimmy

Lauszus

  • Administrator
  • Full Member
  • *****
  • Posts: 131
    • View Profile
Re: No balancing
« Reply #14 on: July 13, 2014, 07:27:28 PM »
Okay great! :)
You are welcome.

Regards
Lauszus