Quadcopter board for balancing robot - motor control assistance/ideas needed

I'm planning on using the Micro MWC Flight Control Board DSM2 ESC's X4 Brushed Integrated (uses Atmega328P) as a mainboard for a two-wheeled balancing robot.


I was originally going to superglue an Arduino pro mini, dual-motor driver, MPU 6050 gyro, usb host shield + bluetooth dongle (to use PS3 controller to control robot) into a lightweight PCB chunk. But this Micro MWC board seems to have all of those features in one small package. I might have to use something other than a PS3 controller with the board but that's ok.

I can see from some posted videos, that after flashing this board with SimonK firmware, a user can use their RC transmitter to reverse the direction of their quadcopter motors.  But the question is...can this be done using Arduino code alone?

The board would need to send forward and reverse signals to the ESC so that the motors can keep the robot balanced.

Another theory that I have is that if the ESC can't be software reversed, can I just use 2 ESC outputs on each motor? So what would happen is that i'd connect one ESC to the motor normally, and then the next ESC to the same motor in reverse.  Then when the robot is doing its PID balancing act, the board would constantly be switching back and forth between powering each ESC to drive the single motor back and forth.  Does anyone know if this theory would work?

I'm in the finishing stages of building a junk-parts balancing robot using an Arduino uno and MPU 6050 gyro/accelerometer (no wireless control, balancing only), just so I can get familiar with the arduino coding.  But I'm just planning ahead to a more fully funcitonal balancing robot.

Thanks in advance for your input and ideas!

Please do not write HELP! in

Please do not write HELP! in your headlines. As pr the rules (top menu) thank you :slight_smile:

I do not think the rules say what you think they do.
There are two rules that talk about asking for help.

The first one says not to ask for help in the shout box.

The second one says not to start the subject line with the word “help”.

If the rules should be changed, then change them, but please, don’t expect our newer members to obey rules that aren’t there.

And yes, I think that the rules need to be changed a bit, for this situation.

I think that what you want
I think that what you want to do can be done through software, but I don’t know.

Perhaps you could include a link to the URLs you were talking about (to the board, to the new firmware, and to the videos).

Frankly I suspect that your first idea would have been better. Basically for a balancing robot you need an accelerometer and gyroscope (the 6050 is good for that), a controller (an Arduino works there), a pair of motors with encoders (well, you can put the encoders on the wheels if you want), and a base.

You really don’t have to build it very high, but for me it’s a challenge, so I’m building my Mini-Groucho 1 meter tall, not counting the motors/wheels.

I would suggest looking at http://robocv.blogspot.com/2013/03/making-two-wheeled-self-balancing-robot.html because it explains how to create the PID loop for the balancing part. And I think that it’s the best article out there that explains PID in simple terms (I’m mostly a programmer, but control theory isn’t my specialty).

Good building!

I may not have been clear
I may not have been clear before. I don’t know enough about the board you’re talking about to know what it can do. Also, I have a gut feeling (in other words, I feel it’s different but I can’t prove it) that the muti copter balancing problem is different from the inverted pendulum balancing problem (a two wheeled balancing bot).

If you find a way to use a muti copter balancing solution for a two-wheeled balancing bot and post about it here, then I’ll know more than I do today.

Thanks for your input

Thanks for your input Dangerous!  The link you provided with information about creating the PID loop was very helpful, as that’s the stage that i’m pretty much at now. 

Hers a link for the board (I couldn’t find Hextronik’s company page).

http://www.hobbyking.com/hobbyking/store/__42255__micro_mwc_flight_control_board_dsm2_esc_39_s_x4_brushed_integrated.html

 

A link to the firmware

https://github.com/c---/MultiWii3D/

 

A link to someone showing the firmware in use

https://www.youtube.com/watch?v=a_SXHoisieQ

 

And finally a link of someone showing how to flash the board (you can really see how small the board is from this video, and also an in-depth GUI which allows tuning of all of the PID values)

https://www.youtube.com/watch?v=uLj2FGMq4Kw

I’ll continue to do some research before making a leap in purchasing and trying to figure this board out.  A more safer solution is the Mini MWC

http://www.hobbyking.com/hobbyking/store/__42250__MINI_MWC_Flight_Control_Board_and_DSM2_Receiver_ACC_GYRO_BARO_MAG.html

This board does not have any motor controller on it, but is a compact Arduino with a receiver, gyro, and accelerometer.  I can just attached a small dual motor driver to the mix and have it controlled by the copter board.

http://www.pololu.com/product/713

0J4617.200.jpg

The appeal of the first option is that the Micro MWC is only 1.8 grams!  the Mini MWC is 7.8 grams, plus another gram for the motor driver, so 8.8 grams total.

I agree that Quadcopter balancing boards are probably going to be different than what is required for a balancing robot.  Some of these boards have stabilization modes that a user can choose, and it would be interesting if those could be adapted for a balancing two-wheeler.

 I'll post as soon as I come up with any new advancements!

Interesting
And also fairly inexpensive.

If the system can be totally reprogrammed, it might make a good balance controller for an inverted pendulum bot. They cost a lot less than I thought they did. I’m assuming they can be reprogrammed because of the person who did it. If it could be reprogrammed, it might be possible to use the I2C connection to feed it high-level commands and otherwise let the controller handle the bot’s position.

And yes, I love the stamp-sized one. I have plenty of room on mini-Groucho, but not all my bots have this luxury. I will follow this build.