MultiWii based balancing robot (Segway)
MultiWii based balancing robot (Segway)
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
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
Re: MultiWii based balancing robot (Segway)
damned cool
- Crashpilot1000
- Posts: 631
- Joined: Tue Apr 03, 2012 7:38 pm
Re: MultiWii based balancing robot (Segway)
Nice little faceplanter. I wonder if segways are absolute faceplant proof...
Re: MultiWii based balancing robot (Segway)
Amazing!
Could this also be done with a brushless gimbal controller and brushless motors?
My bet is, they run smoother and faster too?!
Could this also be done with a brushless gimbal controller and brushless motors?
My bet is, they run smoother and faster too?!
Re: MultiWii based balancing robot (Segway)
Hi.
Is it possible to launch The robot without RC? How to do it?
Is it possible to launch The robot without RC? How to do it?
Re: MultiWii based balancing robot (Segway)
yes, it's possible with ez-gui android tool. see experimental features there...
Re: MultiWii based balancing robot (Segway)
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.
Re: MultiWii based Segway -> on real RC 1/18 circuit
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).
On a real 1/18 circuit, driven by Barbie Harley-Davidson, 1080p.
Not too fast: HTML5 slow motion mode not recommended (better use 2x).
Re: MultiWii based balancing robot (Segway)
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!
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.
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: MultiWii based balancing robot (Segway)
Kudos, job well done.
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: MultiWii based balancing robot (Segway)
Believe it or not, I have a power wheelchair that I am going to try this on. Will keep you posted.
Re: MultiWii based balancing robot (Segway)
No no no! Please don't do it!
Seriously it too dangerous to trust life to the toys like this!
Seriously it too dangerous to trust life to the toys like this!
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: MultiWii based balancing robot (Segway)
No one will ride on the thing, it will be a robot.
LOL, as a point of reference, this is a toy also.
LOL, as a point of reference, this is a toy also.
-
- Posts: 2261
- Joined: Sat Feb 19, 2011 8:30 pm
Re: MultiWii based balancing robot (Segway)
That's a very nicely done project.
I will have to try it myself..
Thanks a lot for the hard work.
Eric Nantel - DiaLFonZo
I will have to try it myself..
Thanks a lot for the hard work.
Eric Nantel - DiaLFonZo
Re: MultiWii based balancing robot (Segway)
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?
Re: MultiWii based balancing robot (Segway)
Hi
I did everythink as you described but only mpu and beeper working, HC-06 and motors are not .
Sorry my eng.
regards
I did everythink as you described but only mpu and beeper working, HC-06 and motors are not .
Sorry my eng.
regards
Re: MultiWii based balancing robot (Segway)
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++;
}
}
Re: MultiWii based balancing robot (Segway)
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
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
Re: MultiWii based balancing robot (Segway)
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.
MultiWii based balancing robot (Segway)
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.
P.s. Thanks Mahowik. Really nice project.
Re: MultiWii based balancing robot (Segway)
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.
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.
-
- Posts: 2
- Joined: Wed Dec 25, 2019 9:13 pm
Re: MultiWii based balancing robot (Segway)
Здравствуйте. Кто может помочь с прошивкой ?
-
- Posts: 2
- Joined: Wed Dec 25, 2019 9:13 pm
Re: MultiWii based balancing robot (Segway)
Здравствуйте. Помогите пожалуйста разобраться. Перерыл все форумы и не могу найти ответ на свой вопрос.
Я залил в ARDUIO NANO прошивку BalancingWii не чего не меняя. Работает всё кроме шаговиков. "Смотрел" осциллографом на пинах 5,6,7,8 нет сигнала, На пине 4 (Eneble) есть. Драйвера шаговиков проверял проверочным скетчем, Все крутиться как нужно. В приложении EZ-GUI сделал все по инструкции(установил OUTы как на скрине, откалибровал акселерометр, зашел в управление, подергал джойстик и на пине 4 появился сигнал Eneble, а на 5,6,7,8 нечего(( Подскажите куда копать.
Спасибо.
Я залил в ARDUIO NANO прошивку BalancingWii не чего не меняя. Работает всё кроме шаговиков. "Смотрел" осциллографом на пинах 5,6,7,8 нет сигнала, На пине 4 (Eneble) есть. Драйвера шаговиков проверял проверочным скетчем, Все крутиться как нужно. В приложении EZ-GUI сделал все по инструкции(установил OUTы как на скрине, откалибровал акселерометр, зашел в управление, подергал джойстик и на пине 4 появился сигнал Eneble, а на 5,6,7,8 нечего(( Подскажите куда копать.
Спасибо.
Re: MultiWii based balancing robot (Segway)
Hi, I'm trying to find where the HC-05 bluetooth is used in the code. Can some point me in the right direction?
Re: MultiWii based balancing robot (Segway)
The Bluetooth is just used for connecting it to Gui normally.
Re: MultiWii based balancing robot (Segway)
Yes, where can I change it? The android app does not seem to be supported so I wanted to change it to Dabble. However I cannot seem to find it in the source code.
Re: MultiWii based balancing robot (Segway)
It's done in the serial communication.
And it's based on MSP protocol.
And it's based on MSP protocol.
Re: MultiWii based balancing robot (Segway)
Извините, редко захожу сюда.Veteranton wrote: ↑Sat Dec 28, 2019 12:40 pmЗдравствуйте. Помогите пожалуйста разобраться. Перерыл все форумы и не могу найти ответ на свой вопрос.
Я залил в ARDUIO NANO прошивку BalancingWii не чего не меняя. Работает всё кроме шаговиков. "Смотрел" осциллографом на пинах 5,6,7,8 нет сигнала, На пине 4 (Eneble) есть. Драйвера шаговиков проверял проверочным скетчем, Все крутиться как нужно. В приложении EZ-GUI сделал все по инструкции(установил OUTы как на скрине, откалибровал акселерометр, зашел в управление, подергал джойстик и на пине 4 появился сигнал Eneble, а на 5,6,7,8 нечего(( Подскажите куда копать.
Спасибо.
Вы скорее всего не сделали арм, т.е. не запустили его.
-
- Posts: 1
- Joined: Fri Jan 29, 2021 4:05 pm
Re: MultiWii based balancing robot (Segway)
Hello all,
I have strange problem. After i upload the the code successfully it is able to connect to bluetooth trough the app. BUT when I try to control it all I do is hearing this loud beeeeeping sound. The motors are not moving at all. Also when I turn it on there is no action from the motors.
In order to complete the project I have used the custom PCB provided here: https://secureservercdn.net/198.71.233. ... 9/HGHG.jpg
The PCB was designed according to this diagram:
https://secureservercdn.net/198.71.233. ... 24x759.jpg
Here are the used parts:
--- Stepper motor:
NEMA 17 - (https://www.benselectronics.nl/stappenm ... ma-17.html)
Electrical Specification:
Motor Type: Bipolar Stepper
Step Angle: 1.8 deg.
Holding Torque: 40N.cm (56oz.in)
Rated Current/phase: 1.7A
Phase Resistance: 1.5Ohm±10%
Insulation Resistance: 100MΩ¸ Min, 500VDC
Insulation Strength: 500VAC for one minute
--- Controller:
A4988 Stepper Motor Driver Carrier
(https://opencircuit.shop/Product/A4988- ... er-Carrier)
--- Battery:
TATTU FUNFLY 1800MAH 11.1V 100C 3S LIPO ACCU
(https://droneshop.nl/catalog/product/vi ... o-battery/)
Please let me know if you have experienced that
Regards,
dsgeorgiev
I have strange problem. After i upload the the code successfully it is able to connect to bluetooth trough the app. BUT when I try to control it all I do is hearing this loud beeeeeping sound. The motors are not moving at all. Also when I turn it on there is no action from the motors.
In order to complete the project I have used the custom PCB provided here: https://secureservercdn.net/198.71.233. ... 9/HGHG.jpg
The PCB was designed according to this diagram:
https://secureservercdn.net/198.71.233. ... 24x759.jpg
Here are the used parts:
--- Stepper motor:
NEMA 17 - (https://www.benselectronics.nl/stappenm ... ma-17.html)
Electrical Specification:
Motor Type: Bipolar Stepper
Step Angle: 1.8 deg.
Holding Torque: 40N.cm (56oz.in)
Rated Current/phase: 1.7A
Phase Resistance: 1.5Ohm±10%
Insulation Resistance: 100MΩ¸ Min, 500VDC
Insulation Strength: 500VAC for one minute
--- Controller:
A4988 Stepper Motor Driver Carrier
(https://opencircuit.shop/Product/A4988- ... er-Carrier)
--- Battery:
TATTU FUNFLY 1800MAH 11.1V 100C 3S LIPO ACCU
(https://droneshop.nl/catalog/product/vi ... o-battery/)
Please let me know if you have experienced that
Regards,
dsgeorgiev
Re: MultiWii based balancing robot (Segway)
Hey dsgeorgiev90, I have the exact same problem you described! It's driving me crazy!
Were you able to figure it out?
Were you able to figure it out?
Re: MultiWii based balancing robot (Segway)
Hi,
Witch firmware are you using?
Original MultiWii don't support the stepper motors!.
You need to use BalancingWii branch.
https://github.com/mahowik/BalancingWii
Witch firmware are you using?
Original MultiWii don't support the stepper motors!.
You need to use BalancingWii branch.
https://github.com/mahowik/BalancingWii
Re: MultiWii based balancing robot (Segway)
Just finish building the balancing robot using PCB by Alper Kayar. I have SPEKTRUM DX6i using Satellite to control robot.
Cannot arm the robot. I have set the Spectrum to go from HIGH to LOW with AUX1 (flaps).
Tried BT with HC-05 and Samsung app EZ-GUI, connects but no controls or ARM??
Cannot arm the robot. I have set the Spectrum to go from HIGH to LOW with AUX1 (flaps).
Tried BT with HC-05 and Samsung app EZ-GUI, connects but no controls or ARM??
Re: MultiWii based balancing robot (Segway)
Hello!
I am very late to the party but am also attempting this project Unfortunately, since EZ GUI groundbase isn't maintained anymore, it no longer seems to work (It is not receiving data from the robot), so I cannot set the AUX pins. I've tried loads of other apps but have not figured it out! Has anyone managed to fix EZ GUI or found another app that works? What is the solution? Thank you all!
FYI I am loosely following Mr Innovative's tutorial (same as dsgeorgiev90 above)
I am very late to the party but am also attempting this project Unfortunately, since EZ GUI groundbase isn't maintained anymore, it no longer seems to work (It is not receiving data from the robot), so I cannot set the AUX pins. I've tried loads of other apps but have not figured it out! Has anyone managed to fix EZ GUI or found another app that works? What is the solution? Thank you all!
FYI I am loosely following Mr Innovative's tutorial (same as dsgeorgiev90 above)