1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Balancing Bot

Discussion in 'Robotics & Mechatronics' started by MrMikey83, Dec 27, 2004.

  1. MrMikey83

    MrMikey83 New Member

    Joined:
    Jul 17, 2003
    Messages:
    300
    Likes:
    0
    Location:
    Carbondale, IL
    I am gathering information to build my own balancing robot. With two wheels side by side like a Segway, not front to back like a bicycle.
    This requires sensors to let the processor know how off ballance the robot is and to provide data for the processor to calculate how much and how fast to move the wheels.
    Most site I've found use both an Accelorometer and a Gyroscope. The Accelorometer tells the robot where down is, that way it can ballance on an incline, and the gyroscope provides tilt information.
    I have already received sample accelorometers from analog.com
    I have single axis analog, dual axis analog, and dual axis digital...two of each.

    Since Gyroscopes seem to be quite expensive for a small project like this, I was thinking about it and was wondering if it would be possible to just use two accelorometers to do the job. One could provide a reference for ground so then, would it be possible to have the other one provide tilt by subtracting the gravity reference from its own measurement?

    Thanks!
    ~Mike Steinbach
     
  2. williB

    williB New Member

    Joined:
    Aug 30, 2004
    Messages:
    2,217
    Likes:
    3
    Location:
    New Jersey
    I was thinking that if you could add another axis to a toy gyro , and some better bearings , that might work..
    how long do those toy gyros spin ?
     
  3. MrMikey83

    MrMikey83 New Member

    Joined:
    Jul 17, 2003
    Messages:
    300
    Likes:
    0
    Location:
    Carbondale, IL
    Well, if I can't get two accelorometers to work, I will try a mechanical gyro connected to a potentiometer
    I would make one conneted to a motor so length of spin is not a problem. I actually have a guage from an airplane that has a large mechanical gyroscope in it. Maybe if I can get that to work, I'll use it.
    ~Mike
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. crust

    crust New Member

    Joined:
    Sep 30, 2003
    Messages:
    728
    Likes:
    3

    The accelerometers provide tilt information when the robot is not moving and it is always referenced to a point in space. During acceleration of the object though, the accelerometer will provide incorrect tilt information. The gyroscope can provide information about tilt when the object is in motion, but drift is a problem. So you really need both together to build an inertial unit to create a balancing robot.
     
  6. MrMikey83

    MrMikey83 New Member

    Joined:
    Jul 17, 2003
    Messages:
    300
    Likes:
    0
    Location:
    Carbondale, IL
    OK well, I guess I will use the gyroscope I have from an airplane 'turn coordinator'
    I will post pictures of it when I find a place to host the images.
    The Gyroscope wont power up so I am going to rebuild the circuit board from parts. The motor has five wires coming from it. One wire to ground and the other four to FETs (i think).
    There are two parts that I dont know what they are. Pictures to come later.
    ~Mike Steinbach

    Of course, the biggest problem of using a mechanical gyroscope is power issues. Anyway, if I do use this, The Orange part and the large black part are not familiar to me.
    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]
     
  7. williB

    williB New Member

    Joined:
    Aug 30, 2004
    Messages:
    2,217
    Likes:
    3
    Location:
    New Jersey
    the orange part looks like a tantalum capacitor..
    large black part ,also a cap..
     
  8. williB

    williB New Member

    Joined:
    Aug 30, 2004
    Messages:
    2,217
    Likes:
    3
    Location:
    New Jersey
    personally i would try to find out what is wrong with the circuit first , before tearing the origional out..
    any indication of the voltage used on it?
     
  9. MrMikey83

    MrMikey83 New Member

    Joined:
    Jul 17, 2003
    Messages:
    300
    Likes:
    0
    Location:
    Carbondale, IL
    The case say 10-30 volts DC. I've tried powering it up.
    I got it when I was in junior high school and got it working once, but I fear that in my youth, I screwed it up somehow.
    I wish I had never opened it as a kid. I remember the only thing being wrong with it is that it was tirned too far and the pin for the small white plane came off the flexible metal pins of the gyroscope.
    ~Mike Steinbach
     
  10. TheOne

    TheOne New Member

    Joined:
    Oct 30, 2004
    Messages:
    464
    Likes:
    0
    Location:
    USA
    I would guess the black part is a choke. See how the upper side appears to come from the +ve input near the reverse-input-protection diode and ends with the orange electrolytic cap on a track that appears to go to the +ve of the cap, as the track coming from the negative can be faintly seen lower down in line with the black marking on the cap. This +ve also feed from the cap through a 100 Ohms (decoupling) resistor to pin 16(+ve) of a CD4017 counter chip.
     
  11. MrMikey83

    MrMikey83 New Member

    Joined:
    Jul 17, 2003
    Messages:
    300
    Likes:
    0
    Location:
    Carbondale, IL
    I'll try to make a schematic after work.

    What kind of motor is this? Does the circuit feed it power to one lead at a time or evey other lead to get it spinning?
    ~Mike Steinbach
     
  12. MrMikey83

    MrMikey83 New Member

    Joined:
    Jul 17, 2003
    Messages:
    300
    Likes:
    0
    Location:
    Carbondale, IL
    I found this gyroscope from analog.com
    http://www.analog.com/en/prod/0,2877,ADXRS401,00.html
    It costs $40 at Digikey.

    So far, I have added to the order:
    2 of the above gyros
    2 accelorometers
    20 1.2 volt NIMH batteries
    CRA203-ND 12VDC 30RPM geared DC motor
    ZHB6790CT-ND H-Bridge


    Will that H-Bridge work for what I need? If so, do I need anything in between the 5 volts out from the ATMEGA32 to the H-Bridge?
     
  13. MrMikey83

    MrMikey83 New Member

    Joined:
    Jul 17, 2003
    Messages:
    300
    Likes:
    0
    Location:
    Carbondale, IL
    OK, again...will the above setup work for what I need or will I need any more parts? Please let me know because I want to order the parts asap.
    ~Mike Steinbach
     
  14. crust

    crust New Member

    Joined:
    Sep 30, 2003
    Messages:
    728
    Likes:
    3
    I would highly suggest that you get the ADXRS401EB rather than the
    discrete part. The part you mention is a BGA package and is very
    difficult to use without a PCB and a way to mount it. Also, might as
    well get two motors so you can turn. You will also need a way to
    measure the motor speed and its derivative. You can do it closed
    loop with an encoder, or open loop and use steppers.
     
  15. MrMikey83

    MrMikey83 New Member

    Joined:
    Jul 17, 2003
    Messages:
    300
    Likes:
    0
    Location:
    Carbondale, IL
    OK, I see what you mean. Looks like it just has some half-sphere contacts on the bottom. I dont thin Digikey sells the eval board though. I went to analog.com and they show the datasheet for the eval board, but I dont see where I can purchase it.

    ALso...I'm guessing the lack of response on the rest of the parts means I'm good to go with what I have on the list.
    ~Mike
     
  16. crust

    crust New Member

    Joined:
    Sep 30, 2003
    Messages:
    728
    Likes:
    3
    Analog sells it directly, I believe it is $50US, for that matter, you can
    also buy the gyro from them as well, for less than digikey. As for the
    rest of your parts, I am not sure why you need two gyros an two
    accels for your bot. I would have thought you need only one gyro and
    one accelerometer.

    The motor at 30 RPM might have high torque, but its response might
    not be good enough, though it depends on the size of the robot. I
    would go with a faster motor and use belts/pulleys to attach them to
    your wheels.
     
  17. MrMikey83

    MrMikey83 New Member

    Joined:
    Jul 17, 2003
    Messages:
    300
    Likes:
    0
    Location:
    Carbondale, IL
    Its not going to be really big, probably about 1 or 2 feet tall with 5 to 8 inch wheels, depends on what I can find. All the weight needs to go on top so the batteries will be on an elevated platform. Most people seem to start out with an inverted pendulum (ball attached to stick, stick mounted to robot). If I make it too big, I can make it smaller.

    I was getting second Accel and gyroscopes just for experimentation purposes or even a second robot. I will only be using one of each for this bot.

    After I get it balancing, I am going to want to connect a remote control to be able to drive it around myself. After that, I may try to get it autonomous with IR or Ultrasonic sensors.


    Edit: There doesn't seem to be an Eval Board available to purchase for the 401, but the 300 series has one and you are right, the chips are much cheaper straight from analog.com
     
  18. MrMikey83

    MrMikey83 New Member

    Joined:
    Jul 17, 2003
    Messages:
    300
    Likes:
    0
    Location:
    Carbondale, IL
    Update:

    I have ordered the Gyro and Accellorometer Eval Boards from analog.com and the motors and other parts from digikey totalling $300
    I ordered a JR XF421 5 channel radio. Its normally $270 but is on sale for $180.
    THis hobby is expensive... :shock:
    ~Mike
     
  19. slurp

    slurp New Member

    Joined:
    Dec 20, 2004
    Messages:
    14
    Likes:
    0
    Location:
    York, UK
    Maybe I'm a bit late for suggestions but have you seen the ballancing 'bots that avoid the use of gyros & accellorometers?

    Again working with parallel wheels making the fall front to back only, distance transducers had been mounted on the front & rear of the 'bot. So on flat surfaces you "only" need to match the distance readings.

    regards,
    colin
     
  20. MrMikey83

    MrMikey83 New Member

    Joined:
    Jul 17, 2003
    Messages:
    300
    Likes:
    0
    Location:
    Carbondale, IL
    Yes, I've seen them, but theres a problem with them in that they can only be used on a flat surface. If it were to go up an incline, it would try to keep equal distance between the sensors and tip over trying to remain perpendicular to the ground slope.
    With the Gyro and accelorometer, the accelorometer senses where gravity is and the gyro senses tilt taking gravity into acount, making it able to move up and down slopes.
    ~Mike
     
  21. sjponder

    sjponder New Member

    Joined:
    Jan 5, 2005
    Messages:
    3
    Likes:
    0
    Another Idea for this.

    why use a gyro? If your bot has two parallel wheels, then you're only interested in a single plane of motion. You can then devise a tilt sensor instead, and eliminate the mechanical parts of a gyro. Also, gyros require time to stabilize.

    found a link to an analog devices 2-axis accelerometer you might check-out.

    http://www.androidworld.com/ADXL202E_a.pdfhttp://www.analog.com/en/prod/0,2877,ADXL202,00.html

    By comparing the output of two accelerometers, say above and below the wheel axis, you could control the pitch of your bot.
     

Share This Page