go_away

Author Topic: Self balancing 2 wheel robot  (Read 7138 times)

0 Members and 1 Guest are viewing this topic.

Offline newInRoboticsTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Self balancing 2 wheel robot
« on: September 24, 2010, 09:18:09 AM »
OK, I hope this is the right place to seek for help after hour and hours of not so successfull research.

Not a good start, but i have to come clean, i am an AI and Robotics student in final year, however, never had any practise in building a robot. My aim is to build a two wheel robot that uses gyro and accelerometer readings to balance itself.

I need some info about parts that would suite the purpose:
 1. What brand microcontroller would You guys recommend that is:
     a) not too expensive
     b) has native C support
     c) have PWM
     d) have ADC
     e) is fairly fast

 2. How many bits ADC should I use? I know that 8-bit is not enough to get good precision, therefore, good balance. Also,
    I've read that it is fairly difficult to get (and to work with) microcontrollers that have integrated 16-bit ADCs.

 3. If external ADC is required, could someone please share a link to a tutorial on how to interface ADC with a microcontroller (and how to use and wire ADC in general). I've spent ages working on this one with a simulation program (Multisim) and simply could not get it working; all the tutorials i found were too complicated to understand (that's my own lack of knowledge). I have attached an img of what I got working, however, when it comes to "real" ADCs i do not understand where to connect what  :-\

If someone could point me to the right direction with this one (or provide real world simple application tutorial with diagram), I would say big THANK YOU  ;D


 4. Returning to microcontroller question, I've read that it is simple to make PIC programmer; is it easy to make one for PICs only or other brands as well? I ask this this, because I assume, that i would need to integrate programmer to my robot, therefore, buying expensive programmer and leaving it on a robot is not a very good solution. Is it the right way I go? Or have I missunderstood something?

Thank You guys for help in advance.
Best regards.
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: Self balancing 2 wheel robot
« Reply #1 on: September 24, 2010, 11:32:40 AM »
I have seen some info on university balancing Bots. Maybe some different search terms would help.

For a PIC it is highly recommended to buy a PICKit2 or PICKit3 programmer. These are fully integrated into the MPLAB IDE for programming and debugging. There are many problems with DIY programmers for PICs and the PICKits are $35 or $45 direct from Microchip.
These don't need to be installed on the Bot. Just install a 5 or 6 pin header on the processor board in which the programmer plugs into for programming and debugging.

Other processors can be bought with a nice board are the AXON and Arduinio. Both of these and the PICs development tools have free C compilers (a micro-controller does not run C code but runs machine language code that is produced by the assembler and compiler).

PWM and 10 bit ADCs are common.
Fast is relative and can be negated by bad coding.

Many accelerometers and gryos have a digital interface and do the ADC internally to good resolution. Check out SparkFun for devices on break-out boards. Also look on SparkFun's web site in their news for articles and links to what others have done.
« Last Edit: September 24, 2010, 02:28:32 PM by waltr »

Offline msprague

  • Jr. Member
  • **
  • Posts: 35
  • Helpful? 1
Re: Self balancing 2 wheel robot
« Reply #2 on: September 24, 2010, 11:52:58 AM »
You may just want to go with something like this that has all the interfacing between the sensors and the controller taken care of for you:
http://www.sparkfun.com/commerce/product_info.php?products_id=9956

You just need to make sure it has the I/O available to drive your motors, etc. whatever else you need to do.  However, since this does have more sensors than you need for balancing, you might want to put the pieces together yourself.

Offline Ro-Bot-X

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,431
  • Helpful? 25
  • Store: RoBotXDesigns.ca
Re: Self balancing 2 wheel robot
« Reply #3 on: September 24, 2010, 04:56:30 PM »
Read this new tutorial on Arduino forum:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1284738418
This is making mine come through pretty soon.
Check out the uBotino robot controller!

Offline newInRoboticsTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Self balancing 2 wheel robot
« Reply #4 on: September 25, 2010, 04:36:50 PM »
Thanks for responces given.

I decided to go with ATxmega, because they:
*have 12 - bit DACs and ADCs (that should be precise enough)
*have fast clock
*have plenty of ports for further development
*AVRs are originally created to be used with C compilers

Now, I do not quite understand few things in the table in the bottom of the following page:
http://www.atmel.com/products/AVR/default_xmega.asp

1. "Flash" section is basically how mush code can be fitted in uC, am I right?
2. "SRAM" is temporary memory (same like RAM in a laptop), is it correct?
3. Now, under "12-bit ADC" it says "2x8" and "1x12"; what does that mean and what is the difference?

As I try to keep budget reasonably low, I would still like to go with a DIY programmer.
As far as I understand this DIY programmer is fully compatible with ATxmega.
http://electronics-diy.com/avr_programmer.php
Is it a good enough option, or should I still consider buying one from Atmel?

Thank You guys in advance.
« Last Edit: September 25, 2010, 04:48:03 PM by newInRobotics »
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline billhowl

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 32
  • Your success is in your hands.
Re: Self balancing 2 wheel robot
« Reply #5 on: September 25, 2010, 11:23:37 PM »
Now, I do not quite understand few things in the table in the bottom of the following page:
http://www.atmel.com/products/AVR/default_xmega.asp

1. "Flash" section is basically how mush code can be fitted in uC, am I right?
Yes, you are right. is in kilobytes
Quote
2. "SRAM" is temporary memory (same like RAM in a laptop), is it correct?
correct.
Quote
3. Now, under "12-bit ADC" it says "2x8" and "1x12"; what does that mean and what is the difference?

"2x8" = Two ADCs with 12-bit resolution with 8 single ended inputs for each ADC
"1x12" = One ADC with 12-bit resolution with 12 single ended inputs
Two ADCs convert faster then one ADC if you used all the inputs.

Quote
As I try to keep budget reasonably low, I would still like to go with a DIY programmer.
As far as I understand this DIY programmer is fully compatible with ATxmega.
http://electronics-diy.com/avr_programmer.php
Is it a good enough option, or should I still consider buying one from Atmel?

For the XMEGA line of AVRs. it used the Program and Debug Interface (PDI) the new programming interface based on the debugWire protocol. The DIY programmer you mention doesn't support PDI protocol that is required for XMEGA OCD operation.
Please read the Tutorials [TUT] [HARD] AVR Programming Methods from avrfreaks
the Supported Programmers for XMEGA: STK600, AVRONE, JTAG MKII, Dragon, AVRISP MKII

Are you making your own MCU board?

Offline newInRoboticsTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Self balancing 2 wheel robot
« Reply #6 on: September 26, 2010, 09:10:29 AM »
Quote
Are you making your own MCU board?

Yes, I would like to make my own MCU board; it is for two reasons:
*to keep development price reasonably low
*to understand better how it works

Why do You ask? By any chance You have any tips or anything like that?
Myself, i think to use "$50 Robot" tutorial as a rough reference on how to make MCU. As far as I imagine, board for my project should not be more complicated than than the one made for "$50 Robot", however, I need to collect more information on how to drive 2x12V motors (for my current knowledge, second "higher voltage" battery, H - bridge and 2xPWM pins should suffice to achieve my aim).
Thanks to: http://www.societyofrobots.com/schematics_h-bridgedes.shtml


Now, another noob question  ???
I do understand how GND works for AC circuits, basically, somewhere is a wire buried to the ground that is an actual GND.
My question is, what is GND in battery fed circuits. Is it the negative pin of the battery? If so, does it mean that i must connect GND pin of uC to the negative battery pin?
I do not know why, but it sounds a wrong thing to do  :-\

Again, thanks for any help provided  :)
« Last Edit: September 27, 2010, 05:00:04 PM by newInRobotics »
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline rbtying

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Re: Self balancing 2 wheel robot
« Reply #7 on: September 26, 2010, 10:14:22 AM »
You probably know that voltage is the difference in potential between the positive (Vcc) and negative leads (Vss), and varies based on the battery chemistry.  Since you can't practically attach a robot (or any mobile device for that matter) to true ground, ie, the Earth, you use a reference from the battery to get the correct voltage.  So, yes, the negative lead of the battery (all of the batteries that you're using) needs to connect to the uC GND pin to maintain a stable and consistent voltage reference across your circuit. 

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: Self balancing 2 wheel robot
« Reply #8 on: September 26, 2010, 12:50:47 PM »
"Ground" is really a poor term to use in circuit that are not "Earthed". I like the term Common as in: all voltage measurements within the circuit are referenced to the common. This allows voltages in a circuit to be negative as well as positive.

Offline newInRoboticsTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Self balancing 2 wheel robot
« Reply #9 on: September 26, 2010, 02:23:38 PM »
« Last Edit: September 27, 2010, 06:53:30 AM by newInRobotics »
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline cyberfish

  • Robot Overlord
  • ****
  • Posts: 163
  • Helpful? 3
Re: Self balancing 2 wheel robot
« Reply #10 on: September 26, 2010, 03:25:10 PM »
Quote
Yes, I would like to make my own MCU board; it is for two reasons:
*to keep development price reasonably low
*to understand better how it works
To understand how it works is a very worthy goal (if that's your main goal), but it will most certainly won't be cheaper. You can get a decent MCU board for $20-$30. If you don't make any mistake in your DIY board, and it works the first time, you can probably save a few bucks. That just won't happen, though, especially if it's your first MCU board. It will almost certainly end up costing more.

Offline newInRoboticsTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Self balancing 2 wheel robot
« Reply #11 on: October 08, 2010, 06:49:52 PM »
Ok, I do not understand one thing. If negative wire of the battery is GND how come that simulation programs cannot simulate electric circles without an actual GND connected.

To make it more clear have a look at my diagram: http://www.societyofrobots.com/robotforum/index.php?action=dlattach;topic=12207.0;attach=4975;image

This is H - bridge; when GND is connected - everything works, when it is removed - simulation freezes. I use Yenka simulation engine.

Can anyone explain?
« Last Edit: October 08, 2010, 06:52:53 PM by newInRobotics »
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline cyberfish

  • Robot Overlord
  • ****
  • Posts: 163
  • Helpful? 3
Re: Self balancing 2 wheel robot
« Reply #12 on: October 08, 2010, 06:53:24 PM »
There's no "actual GND". Adding the GND symbol just tells the simulation program that you want to define that point as ground.

If you don't define a point as ground, it won't be able to tell you what voltage any point is at.

You can call the positive terminal of the battery ground if you want. Then all voltages will be negative.

But you have to define a point as ground.

Offline newInRoboticsTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Self balancing 2 wheel robot
« Reply #13 on: October 09, 2010, 06:03:15 AM »
So, if I wire such circle in reality it would work, is that correct?
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline newInRoboticsTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Self balancing 2 wheel robot
« Reply #14 on: October 09, 2010, 01:03:22 PM »
OK, as I am "Simulation addict" I do all my stuff for now in "safe" environment. Same goes for the model of robot itself :D

Now, a question about H-bridge:
What is the difference between using all 4 N-channel Mosfets and using pMosfets for top and nMosfets for bottom ones?

Simulation works good both ways.

Another question is, why sim does not work when nMosfets go to the top and nMosfets go to the bottom?
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline cyberfish

  • Robot Overlord
  • ****
  • Posts: 163
  • Helpful? 3
Re: Self balancing 2 wheel robot
« Reply #15 on: October 09, 2010, 10:07:50 PM »
Using all NMOS gives you higher performance, because N-channel MOSFETs typically have better specs than similarly sized/priced PMOS (technical limitation).

The problem with NMOS is the gate voltage needs to be higher than Vdd.

Which usually means you need some kind of voltage booster to generate higher voltage to drive the gates on the top NMOS, making the circuit more complicated.

You really need to learn about how MOSFETs work and not just try random things and see if they "seem" to work or not.

Otherwise something will blow up sooner or later, figuratively or literally.

Offline newInRoboticsTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Self balancing 2 wheel robot
« Reply #16 on: November 28, 2010, 02:46:40 PM »
OK. Here's the part of the model. Initially I was planning to use DC Motors linking them to wheel drive shafts via timing pulleys. Recently I've decided to use servos (because they are easier to control and are (for some reason) cheaper than dc motors).

Should I stick to pulley system and place servos instead of motors, or should I place servos without pulley system to drive wheels directly?
« Last Edit: November 28, 2010, 03:07:44 PM by newInRobotics »
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: Self balancing 2 wheel robot
« Reply #17 on: November 28, 2010, 02:56:30 PM »
OK, as I am "Simulation addict" I do all my stuff for now in "safe" environment. Same goes for the model of robot itself :D

Now, a question about H-bridge:
What is the difference between using all 4 N-channel Mosfets and using pMosfets for top and nMosfets for bottom ones?

Simulation works good both ways.

Another question is, why sim does not work when nMosfets go to the top and nMosfets go to the bottom?

What are the Gate voltages required to turn the MOSFETs fully on?
What is the Source voltage when the top N-ch MOSFET is on compared to the Drain voltage?
Are voltages reported in the simulation realistic?

Offline newInRoboticsTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Self balancing 2 wheel robot
« Reply #18 on: December 01, 2010, 04:44:42 PM »
Ok, finally figured out torque and speed of a motor required for my robot.

Here are calculations that I've done:

Velocity required = 0.6m/s

it has to be responsive, hence

Acceleration required = 0.6m/s^2


Mass of the robot = 4.5kg
Wheel radius = 0.08m

Torque needed = Acceleration * Mass * WheelRadius = 0.216Kg.m =2.119N.m

Wheel circumference = 3.14(pi) * 2 * WheelRadius = 0.5024m
Motor rotational speed required = RequiredVelocity / WheelCircumference = 0.6 / 0.5024 = 1.19Revolutions/Second = 71.66rpm

The motor itself that I want to buy is here:
12v/dc 1:18 high perf. gearbox motor
Data Sheet

According to technical data:
Speed = 326rpm
Torque = 2.25Nm

With timing pulley drive (2.14:1) to reduce backslash, motor is more than capable to keep robot in balance.

Now, under Technical Data it says that Max. load current = 0.7A,
however in Data Sheet it states that under Max. Torque current = 9.6A
Could someone explain this to me?

And also, could someone please have a look at my calculations and motor; check if there are any mistakes, or if there is something I do not unerstand, therefore have wrong impression of how stuff works?


Another question; on the same website I've found another motor that is 6V rather than 12V, however have same specs; how is that possible?
HIGH PERFORMANCE MOTOR 6V/DC 1:18
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline waltr

  • Supreme Robot
  • *****
  • Posts: 1,944
  • Helpful? 98
Re: Self balancing 2 wheel robot
« Reply #19 on: December 01, 2010, 05:18:38 PM »
Quote
Now, under Technical Data it says that Max. load current = 0.7A,
however in Data Sheet it states that under Max. Torque current = 9.6A
Could someone explain this to me?


I don't see that stated in the linked data sheet. I do see the Stall Current as 9.6A which is the current at the max torque. Look at the graph to see this, hint: RPM = 0.

I do see those numbers in the tech specs on the seller's web site. I don't really believe them completely.If fact those specs are lies: look at the data sheet and you will see that the max torque is at Stall when the current draw is 9.6Amps.
 The graph in the real data sheet tell the more truthful specs and is the best information for motor selection.

Quote
I've found another motor that is 6V rather than 12V, however have same specs; how is that possible?

The specs call for twice that current at half the voltage so the power is close to the same. This is done with a different number of turns in the motor windings.

Here is a fairly good motor calculation tutorial:
http://www.micromo.com/n390432/n.html
They have some other articles that are good reading.

Offline newInRoboticsTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Self balancing 2 wheel robot
« Reply #20 on: December 01, 2010, 05:53:59 PM »
Quote
I don't see that stated in the linked data sheet. I do see the Stall Current as 9.6A which is the current at the max torque. Look at the graph to see this, hint: RPM = 0.

Yes, that did confuse me, because Data Sheet states one and web page states another. When you think of it, it isn't realistic to have motor drawing 0.7A while under full load.


Quote
The specs call for twice that current at half the voltage so the power is close to the same.

So basically, if I choose 6V motor I would save same space by putting less number of batteries, however batteries would last just half the time than 12V configuration. Is that correct? Are any more pros and cons for using 6V/12V motor?
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline newInRoboticsTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Self balancing 2 wheel robot
« Reply #21 on: December 03, 2010, 06:09:00 PM »
And again... need some guidance please  ???

As I have already decided on the motors that I should use, now I need a driver for them.
Building and H-bridge is the solution, however all about MOSFETS/transistors is so complicated and somewhat difficult to understand.

What MOSFETS am I looking at if DC Motor is 12V with its peak current of 9.6A and controller with logic voltage of 3.3V?
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline Metal Slug 2

  • Supreme Robot
  • *****
  • Posts: 333
  • Helpful? 11
Re: Self balancing 2 wheel robot
« Reply #22 on: December 03, 2010, 08:36:32 PM »
This motor driver should suit your needs quite nicely.

Offline newInRoboticsTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Self balancing 2 wheel robot
« Reply #23 on: December 05, 2010, 05:44:43 PM »
This motor driver should suit your needs quite nicely.


Thanks, this is something I will use if my effort to build driver myself goes to waste for any possible reason (and there are many of such very possible reasons (funny and sad at the same time))...
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline newInRoboticsTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Self balancing 2 wheel robot
« Reply #24 on: December 09, 2010, 06:06:19 PM »
Time to start building... I have purchased:
2x Motors


Motor driver


MCU


MCU programmer



All I need now to start is 12V battery pack. The problem is: how can I estimate mAh needed?

When I use Energy Calculator how can I determine Travel Distance (per Trip) and number of Trips if robot is balancing only and is not actually doing a Trip?

If I finally get Required Battery mAh I would use it in Battery Calculator; however, there is another problem. As robot balances, motors should be switching on and off all the time and going from stall to idle constantly.

How can I determine Expected Current Draw and Time % Motors Used?
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline beautifulsmall

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 2
Re: Self balancing 2 wheel robot
« Reply #25 on: December 09, 2010, 07:26:13 PM »
Hello, Ive used the DsPic33Fj128MC804 for my 2-wheel balancer, Im not a SW engineer but the programming environment has been great, all done in C , free compiler, it just works. SPI , dual pwm, multi ADC, I2C, floating point , 16 bit, the SW engineers crindge at my free use of Floating point but the Dspic eats it up.

Earwig balancing robot

Earwig robot moves by changing body angle


for bus usage the spi looks the winner, ive just used some ADNS-7550 sensors for wheel velocity encoding and had very good results, far cheaper than slotted disk and more accurate than reflective quad.


Offline newInRoboticsTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Self balancing 2 wheel robot
« Reply #26 on: December 09, 2010, 07:49:42 PM »
beautifulsmall, thanks for sharing info, however, it does not answer my questions about battery specifications needed.
« Last Edit: December 09, 2010, 07:51:58 PM by newInRobotics »
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline rbtying

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Re: Self balancing 2 wheel robot
« Reply #27 on: December 09, 2010, 11:03:16 PM »
Runtime = Battery-capacity (in mAh) / current draw (in mA).

Measure the average continuous current draw of your robot, multiply by runtime in hours, and you will get mAh.  I would guess, though, that a 2200mAh to 6000mAh lithium battery would be plenty for your usage.  Three cells of lithium will be 11.1v, close enough to twelve.  A lithium battery is also much lighter than a lead-acid battery, so it should be easier to balance with.

Offline newInRoboticsTopic starter

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Self balancing 2 wheel robot
« Reply #28 on: December 10, 2010, 04:23:26 AM »
Measure the average continuous current draw of your robot, multiply by runtime in hours, and you will get mAh.

I can't measure the average continuous draw if don't have fully functioning robot, and in order to have it I need a suitable battery to drive it. Catch 22!


I would guess, though, that a 2200mAh to 6000mAh lithium battery would be plenty for your usage.

No offence, but I don't like guessing. I prefer mathematical calculations  ;D

What I've figured out over night is:
I have 2x motors (12V each) with stall current of 9.6A. I understand balancing process (from motor perspective) as going from stall to idle continuously, therefore, average draw = ~9.6A (4.8A for each motor), hence, if I want to keep my robot going for 1 hour I need 10Ah cell pack .

Have a look at this one:
TrustFire Protected 18650 Lithium Battery (2500mAh 2-Pack Blue)

If I get 12 cells, I could make 12.6V - 11.1V Li-Ion pack with awesome 10Ah capacity.
Any thoughts guys?
« Last Edit: December 10, 2010, 04:34:59 AM by newInRobotics »
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline beautifulsmall

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 2
Re: Self balancing 2 wheel robot
« Reply #29 on: December 10, 2010, 03:36:50 PM »
The stall current may be 9.6A BUT when changing direcion from full reverse to full forward this can double! but don't panic.
 when balancing the goal is to stand still ,, ie 0 amps, and at a few degrees off you will only be using very low PWM % to correct . I have used NiMH 2.5 AH AA which give me hours (weeks) of development time per charge, they wont give 9.6A but are you sure you need it for initial tuning ? the motors burn the Amps mostly when they try to run off the table and you have to catch it !, have fun.

 


Get Your Ad Here