Continue to Site

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.

  • 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.

Balancing Bot

Status
Not open for further replies.

MrMikey83

New Member
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
 
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 ?
 
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
 
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.
 
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.
**broken link removed**

**broken link removed**

**broken link removed**

**broken link removed**
 
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?
 
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
 
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.
 
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
 
I found this gyroscope from analog.com
https://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?
 
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
 
MrMikey83 said:
I found this gyroscope from analog.com
https://www.analog.com/en/prod/0,2877,ADXRS401,00.html
It costs $40 at Digikey.

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.
 
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
 
MrMikey83 said:
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.

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.
 
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
 
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
 
Update:
I have ordered the Gyro and Accellorometer Eval Boards from analog.com and the motors and other parts from digikey totalling $300

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
 
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
 
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.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top