Multirotor board - balancing robot

Started by saikat, November 30, 2014, 11:44:41 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

saikat

Can anyone suggest how to make a two wheel balancing robot using a multirotor board.

I can't write code so please consider that when replying.

sooraj.palakkad

Are you determined on using a Flight control board for a Segway like balancing robot ?
Otherwise you can make a special control board out of arduino and sensors.
RC Hobbyist and an Aerial Cinematographer..

saikat

yes i know about the uc/acc/hbridge method - i want to use a FC ,
as i have a couple lying around.

i was thinking of using multiwii in airplane mode and using two servos (modified for continuous
rotation) for the drive.

i can also attach a reciever a drive it around.


any drawbacks to the above ?

SK1701

Seems like a very interesting concept. I would love to see it in action. instructables.com has several self-balancing robots but from what I have seen, they use the Arduino/sensor method. Good luck sir.

sooraj.palakkad

@saikat ji, It should be working,

meanwhile, see this, http://www.instructables.com/id/2-Wheel-Self-Balancing-Robot-by-using-Arduino-and-/

you can even try tweaking the code there to run in multiwii h/w
RC Hobbyist and an Aerial Cinematographer..

sudhakar_yg

Hi Saikat,
Wow what a coincidence!!
Me too trying to do exactly the same thing. A self balancing robot using the MultiWii SE 2.0 board. I decided to use this board, as I see lot of similarity between the individual boards setup & this FC board.

I have found links giving info on this. Could be of use to you too,

https://communities.intel.com/message/249321
http://forum.arduino.cc/index.php/topic,7943.0.html
http://www.x-firm.com/?page_id=148
http://forum.arduino.cc/index.php?PHPSESSID=pgqgui4snvnrj9jl7mmhr9j4n2&topic=8871.0

One info I have found out is that servo's don't serve this purpose. You need a motor which has atleast 200RPM minimum for the faster corrections.
I doubt if servo's would give that RPM. I suggest using the DC motors with L293/L298 driver.

If you have already finished this project, please share the details. Else once I complete, will post the update here.

Cheers!
Sudhakar

saikat

Hi Sudhakar

yes .. unfortunately servos are not fast enough ... I realised that
only after hacking two perfectly good servos.

I tried fitting CDs as wheels ... reasoning that larger dia would result in faster travel
only worked partially . could balance on a bed (that too not very well) and not at all
on the floor.

next line of action will be to use two brushed motors (speed 300) size and drive
them using two brushless esc flashed to drive brush motor with reverse.
this will let them be driven off a servo pulse.(hopefully)

pls keep me updated on your progress.


sooraj.palakkad

why not  brushless motors ???
they give ultimate response.
RC Hobbyist and an Aerial Cinematographer..

sudhakar_yg

Hi Saikat,
What code did you use for your bot? Did you wrote your own code or used the MultiWii original one?

saikat

multiwii original - options changed to #airplane in config.h

does any one have any cheap atmega based brushless ecs (6-10amp) for  sale ?

I require two.
.

sudhakar_yg

How would air plane configuration support the balancing bot, air plane has only single motor & balancing bot has dual motors attached.
Can you please explain.
I was trying with Dual copter or BI config which has 2 motors in it. What is your though about it?

saikat

the airplane mode can use servos for each wing- I was using servos modified
for continuous rotation with wheels attached instead of normal motors.
dual copter will also work but you will either need motors attached to reversible
esc's or use servos.

for balancing (only) you need both motors to move in the same direction
so it is possible to drive both from a single signal pin using a y lead.

sooraj.palakkad

You can use two motor output of a quadcopter ???
RC Hobbyist and an Aerial Cinematographer..

saikat

you cannot

1. the motors will spin only with application of throttle
2. the motors have to be reversible. (the robot while balancing will move both forward and backward)

sooraj.palakkad

yeah I got it,
Why not use a custom firmware with multiwii h/w ?
RC Hobbyist and an Aerial Cinematographer..

saikat

aah ... the million dollar question.

My knowledge of C+ is very rudimentary - certainly not good
enough to write a program of this level.

Am learning though...


sooraj.palakkad

You don't have to be a master in C for Arduino programming.
You can use Arduino codes written by other peoples for this purpose, and tweak it for multywii board :) .
RC Hobbyist and an Aerial Cinematographer..

sudhakar_yg

I understood your point Saikat.
L293/L298 boards provide dual motor forward-reverse option for driving DC brushed motors.

sooraj.palakkad

L293 can drive 2 Brushed motors b/w or f/w - But this IC can't be interfaced with a multiwii firmware.
RC Hobbyist and an Aerial Cinematographer..

sudhakar_yg

You are right sooraj, But we need to design a custom firmware for this driver.

sooraj.palakkad

Use a code written for atmega 328  (Arduino UNO) and tweak it to run on multiwii sensor (MPU6050)
RC Hobbyist and an Aerial Cinematographer..

akhilzid

Quote from: sooraj.palakkad on December 09, 2014, 09:22:48 PM
Use a code written for atmega 328  (Arduino UNO) and tweak it to run on multiwii sensor (MPU6050)
look at your Reply #4 if you are using L298N, that code should work without modifications for the multiwii boards.


EDIT:  Arduino UNO + MPU6050 +HMC5883L + BMP085 - FTDI (redesigned with removed some regulators) = MultiWii SE 2.0

sooraj.palakkad

Yeah, I forgot I pasted that link here !.
In that instructables, H/w similar to multiwii board is used. So it's as easy as load and run , but if the configured o/p pins with that f/w is not any of the multiwii motor o/p pins, yo have to either hack the multiwii board or the code (Hi hi, that rhymes !) .
Sorry I am too lazy now to read the code used in that instructables and find which are the o/p pins, but if you couldn't make it out, I can do that :)
RC Hobbyist and an Aerial Cinematographer..

akhilzid

Pins in that configurations is D10, D11 (PWM) Pins, same pins available @ multiwii se  too (Look at the ESC Connection Pins). So no need to change code for that.

Still you need to change that just modify 4th and 5th line (#define PWM_L 10 #define PWM_R 11) to any of the pwm pins(3,9,10,11 are available) in multiwii se.

sudhakar_yg

Hi Akhilzid,
For the code given in http://www.instructables.com/id/2-Wheel-Self-Balancing-Robot-by-using-Arduino-and-/
Following are the changes I could see in the definitions as per the attached L293 & Multiwii circuit diagram.
Let me know if you think any thing else need to be changed.

MultiWii Board                     Peripheral Connection
-------------------------------------------------------------------------
#define LED 13                       LED
#define PWM_L 10                            L293-Pin1
#define PWM_R 11                            L293-Pin9
#define DIR_L1 6                            L293-Pin2
#define DIR_L2 12                            L293-Pin15
#define DIR_R1 8                            L293-Pin7
#define DIR_R2 9                            L293-Pin10
#define SPD_INT_L 3//1      
#define SPD_PUL_L 4
#define SPD_INT_R 4//7
#define SPD_PUL_R 5
#define MPU_INT 2//0
#define K_AGL_AD A0                    Change A0 to A4
#define K_AGL_DOT_AD A1            Change A1 to A5
#define K_POS_AD A2                    Change A2 to A4
#define K_POS_DOT_AD A3            Change A3 to A5
-------------------------------------------------------------------------