MultiWii based balancing robot (Segway)

MultiWii based balancing robot (Segway)

Postby mahowik » Mon Mar 10, 2014 12:06 am

Hi guys!

http://www.youtube.com/watch?v=U8bBna9iWCU

This is the demo/draft version of balancing robot based on modified/extended MultiWii 2.3 firmware.

Hardware:
- arduino nano (atmega328p)
- mpu6050 gyro-accelerometer (GY_521)
- any RC receiver with CPPM (ppmsum) output
- A4988 motor drivers
- nema 17 stepper motors
- 1/8 Buggy Wheels

p.s. Will be shared on github soon ;)
mahowik
 
Posts: 331
Joined: Sun Apr 10, 2011 6:26 pm

Re: MultiWii based balancing robot (Segway)

Postby shikra » Thu Mar 13, 2014 4:40 pm

damned cool
User avatar
shikra
 
Posts: 783
Joined: Wed Mar 30, 2011 7:58 pm

Re: MultiWii based balancing robot (Segway)

Postby Crashpilot1000 » Thu Mar 13, 2014 9:40 pm

Nice little faceplanter. I wonder if segways are absolute faceplant proof...
User avatar
Crashpilot1000
 
Posts: 631
Joined: Tue Apr 03, 2012 7:38 pm

Re: MultiWii based balancing robot (Segway)

Postby o_lampe » Wed Mar 26, 2014 1:53 pm

Amazing!
Could this also be done with a brushless gimbal controller and brushless motors?
My bet is, they run smoother and faster too?!
o_lampe
 
Posts: 117
Joined: Sat Nov 02, 2013 5:09 pm

Re: MultiWii based balancing robot (Segway)

Postby mahowik » Tue May 20, 2014 3:00 am

mahowik
 
Posts: 331
Joined: Sun Apr 10, 2011 6:26 pm

Re: MultiWii based balancing robot (Segway)

Postby kukizz » Wed Jun 04, 2014 6:30 pm

Hi.
Is it possible to launch The robot without RC? How to do it?
kukizz
 
Posts: 3
Joined: Wed Jun 04, 2014 9:03 am

Re: MultiWii based balancing robot (Segway)

Postby mahowik » Thu Jun 19, 2014 2:22 pm

yes, it's possible with ez-gui android tool. see experimental features there...
mahowik
 
Posts: 331
Joined: Sun Apr 10, 2011 6:26 pm

Re: MultiWii based balancing robot (Segway)

Postby ezio » Wed Jul 16, 2014 9:36 pm

mahowik wrote:yes, it's possible with ez-gui android tool. see experimental features there...

I will add later today better possibility of control. It will be released as beta as it is not finish yet and very experimental.
User avatar
ezio
 
Posts: 827
Joined: Sun Apr 01, 2012 11:03 pm
Location: Paris

Re: MultiWii based Segway -> on real RC 1/18 circuit

Postby mabaka » Tue Sep 30, 2014 8:37 am

http://youtube.com/watch?v=s30CMZcGZ_8

On a real 1/18 circuit, driven by Barbie Harley-Davidson, 1080p.

Not too fast: HTML5 slow motion mode not recommended (better use 2x).
Attachments
Balwii_Barbie.jpg
Balancing Wii driven by Barbie Harley-Davidson
mabaka
 
Posts: 21
Joined: Thu Oct 17, 2013 12:03 pm

Re: MultiWii based balancing robot (Segway)

Postby mahowik » Mon Nov 24, 2014 3:36 am

Autumn... More time to keep soldering iron and do something cool! So let's continue! :)
Now it's stable 1.0 release of balancing robot.

New features:
- Fall down?! New auto rise (stand up) function! (can be activated via box in GUI).
Now it's also possible to stand up manually when it's fall down.
- Position hold (can be activated via box in GUI).
Try to play, how it returns when you are pushing/kicking the robot.
- Possibility to control/steer from Android device by MultiWii EZ-GUI tool (go to Config -> Advanced -> Model control New)
- More stability and speed accordingly (see in video!)
- Predefined PIDs
- Simple mode for newcomers
- Set of code refactorings and cleaning.

New video:
http://youtu.be/038e2j9nE3M

GitHub:
https://github.com/mahowik/BalancingWii

Blogs:
http://forum.rcdesign.ru/blogs/83206/blog19661.html

Enjoy! ;)
Last edited by mahowik on Mon Nov 24, 2014 4:09 am, edited 1 time in total.
mahowik
 
Posts: 331
Joined: Sun Apr 10, 2011 6:26 pm

Re: MultiWii based balancing robot (Segway)

Postby copterrichie » Mon Nov 24, 2014 3:53 am

Kudos, job well done.
copterrichie
 
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: MultiWii based balancing robot (Segway)

Postby mahowik » Mon Nov 24, 2014 4:04 am

Thanks! :)
mahowik
 
Posts: 331
Joined: Sun Apr 10, 2011 6:26 pm

Re: MultiWii based balancing robot (Segway)

Postby copterrichie » Mon Nov 24, 2014 4:10 am

Believe it or not, I have a power wheelchair that I am going to try this on. Will keep you posted. :)
copterrichie
 
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: MultiWii based balancing robot (Segway)

Postby mahowik » Mon Nov 24, 2014 5:11 am

No no no! Please don't do it! :)
Seriously it too dangerous to trust life to the toys like this!
mahowik
 
Posts: 331
Joined: Sun Apr 10, 2011 6:26 pm

Re: MultiWii based balancing robot (Segway)

Postby copterrichie » Mon Nov 24, 2014 1:10 pm

No one will ride on the thing, it will be a robot.

LOL, as a point of reference, this is a toy also. ;)

hot_rod-t2.jpg
copterrichie
 
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: MultiWii based balancing robot (Segway)

Postby copterrichie » Mon Nov 24, 2014 3:15 pm

You may find this instructable interesting.

http://www.instructables.com/id/Raleigh ... g-scooter/
copterrichie
 
Posts: 2261
Joined: Sat Feb 19, 2011 8:30 pm

Re: MultiWii based balancing robot (Segway)

Postby dialfonzo » Tue Nov 25, 2014 10:01 pm

That's a very nicely done project.
I will have to try it myself.. ;)

Thanks a lot for the hard work.

Eric Nantel - DiaLFonZo
User avatar
dialfonzo
 
Posts: 62
Joined: Sun Nov 20, 2011 3:18 pm
Location: Quebec, Canada

Re: MultiWii based balancing robot (Segway)

Postby mabaka » Tue Jan 20, 2015 12:26 pm

mahowik wrote:...
New features:
- Fall down?! New auto rise (stand up) function! (can be activated via box in GUI).
Now it's also possible to stand up manually when it's fall down.
- Position hold (can be activated via box in GUI).
...


Excuse me; I can't see any difference in the GUI from the 2.3 distribution configuration. I can't find above boxes.
Moreover, 'fc' shows that your GUI files don't differ from those in the 2.3 distribution.
Maybe I'm losing something.

Question: I have steppers with 5:1 reduction. How can I adapt the software for using them?
mabaka
 
Posts: 21
Joined: Thu Oct 17, 2013 12:03 pm

Re: MultiWii based balancing robot (Segway)

Postby kukizz » Sun Feb 01, 2015 9:36 pm

Hi

I did everythink as you described but only mpu and beeper working, HC-06 and motors are not :( .
Sorry my eng.

regards
kukizz
 
Posts: 3
Joined: Wed Jun 04, 2014 9:03 am

Re: MultiWii based balancing robot (Segway)

Postby mabaka » Wed Feb 04, 2015 3:57 pm

kukizz wrote:Hi

I did everythink as you described but only mpu and beeper working, HC-06 and motors are not :( .
Sorry my eng.

regards


Try first the steppers alone.
Code: Select all
//simple A4988 connection
//jumper reset and sleep together
//connect  VDD to Arduino 3.3v or 5v
//connect  GND to Arduino GND (GND near VDD)
//connect  1A and 1B to stepper coil 1
//connect 2A and 2B to stepper coil 2
//connect VMOT to power source (9v battery + term)
//connect GRD to power source (9v battery - term)
/*
Motor driver pins:
- D5 - STEP1 (PORTD 5)
- D6 - STEP2 (PORTD 6)
- D7 - DIR1 (PORTD 7)
- D8 - DIR2 (PORTB 0)
- D4 - ENABLE (for both)
*/

#define LED 13
#define STEP1 5
#define STEP2 6
#define DIR1 7
#define DIR2 8
#define ENABLE 4
#define DELAY 100
#define STEPO 16   // 1, 2, 4, 8, 16
#define STEPS 400*STEPO
#define STEPS2 200*STEPO
int a1, a2;   // separate if used simultaneously

//#define ESPERA delay(DELAY)
#define ESPERA delayMicroseconds(DELAY)

void setup()
{
   pinMode(LED, OUTPUT);
   pinMode(STEP1, OUTPUT);
   pinMode(STEP2, OUTPUT);
   pinMode(DIR1, OUTPUT);
   pinMode(DIR2, OUTPUT);
   pinMode(ENABLE, OUTPUT);
   digitalWrite(LED, LOW);
   digitalWrite(STEP1, LOW);
   digitalWrite(STEP2, LOW);
   digitalWrite(DIR1, LOW);
   digitalWrite(DIR2, LOW);
   digitalWrite(ENABLE, LOW);
}

void stepa1(void)
{
   digitalWrite(STEP1, HIGH);
   ESPERA;
   digitalWrite(STEP1, LOW);
   ESPERA;
}

void stepa2(void)
{
   digitalWrite(STEP2, HIGH);
   ESPERA;
   digitalWrite(STEP2, LOW);
   ESPERA;
}

void loop()
{
   a1 = 0;
   while(a1<STEPS)
   {
      if (a1==0)
      {
           digitalWrite(LED, LOW);
           digitalWrite(DIR1, LOW);
      }
      else
      {
         if(a1==STEPS2)
         {
              digitalWrite(LED, HIGH);
              digitalWrite(DIR1, HIGH);
         }
      }
      stepa1();
        a1++;
   }

   a2 = 0;
   while(a2<STEPS)
   {
      if (a2==0)
      {
           digitalWrite(LED, LOW);
           digitalWrite(DIR2, LOW);
      }
      else
      {
         if(a2==STEPS2)
         {
              digitalWrite(LED, HIGH);
              digitalWrite(DIR2, HIGH);
         }
      }
      stepa2();
      a2++;
   }
}
mabaka
 
Posts: 21
Joined: Thu Oct 17, 2013 12:03 pm

Re: MultiWii based balancing robot (Segway)

Postby kukizz » Thu Feb 05, 2015 5:41 pm

Thanks mabaka for your answer.

Your example works perfect.
Additionally i connected HIGH to MS1 and MS2, you didn't write this, without this it is not working.
But I still don't know why The whole of mahowik's finaly product does not work for me.

sorry my eng.

regards
kukizz
 
Posts: 3
Joined: Wed Jun 04, 2014 9:03 am

Re: MultiWii based balancing robot (Segway)

Postby mabaka » Mon Feb 09, 2015 4:46 pm

kukizz wrote:Thanks mabaka for your answer.

Your example works perfect.
Additionally i connected HIGH to MS1 and MS2, you didn't write this, without this it is not working.
But I still don't know why The whole of mahowik's finaly product does not work for me.

sorry my eng.

regards


Note requirement:
A4988 motor drivers with 1/8 microstepping configuration (see http://www.pololu.com/product/1182/ for details)

Above example is only a wiring test. You can modify MS1, MS2 and MS3 connections and lines:
#define STEPO 16 // 1, 2, 4, 8, 16
#define STEPS 400*STEPO
#define STEPS2 200*STEPO
and check influence in total motors rotation each time.

For the real thing, first check if feedback is correct. If the thing falls at the front, motors should move it forward to compensate. If they move it backwards it will fall immediately (invert motors connection or exchange connections).

Then check if the thing follows transmitter sticks. Play with transmitter inverters or connections.

Finally, calibrate accelerometers and stabilize it (level PID). This depends heavily on weights and wheels diameter. In general:
P -> stability.
I -> precision.
D -> speed.
mabaka
 
Posts: 21
Joined: Thu Oct 17, 2013 12:03 pm

MultiWii based balancing robot (Segway)

Postby argotera » Mon Feb 09, 2015 5:57 pm

I d like to build a smaller version. Would I have to change anything In order to use smaller nema motors? I mean besides re tuning pids.

P.s. Thanks Mahowik. Really nice project.
argotera
 
Posts: 17
Joined: Sun Oct 20, 2013 1:40 pm
Location: Athens, Greece

Re: MultiWii based balancing robot (Segway)

Postby lokesh » Sat Feb 16, 2019 5:30 am

Hello,

It is a cool project. I am trying to recreate the entire thing but connections between Bluetooth module (HC05) and arduino nano are unclear, I am confused where to connect the TX and RX pins from HC05 to nano. Please provide some clarity on this.
lokesh
 
Posts: 1
Joined: Sat Feb 16, 2019 5:25 am


Return to Ideas

Who is online

Users browsing this forum: No registered users and 15 guests