1、低成本陀螺低成本陀螺-加速度混合传感器作者:Earl W. Bollinger 文章来源: http:/www.dprg.org/projects/ 更新时间:2006年04月17日 打印此文 浏览数: 9053 Click for full-sized imageProject SummaryIn building a balancing robot you need a gyroscope unit and an accelerometer unit in order to get it to balance. But I also wanted it to be reasonably l
2、ow in cost with high performance and easily interfaced to a MCU. Some of the other solutions are prohibitively expensive, even if they may work well. Also the solution I had in mind had to be fairly small and use up little space and use up little power too. So when Analog Devices recently came out w
3、ith their ADXRS150 and ADXRS300 piezo-gyroscope integrated circuit, I now had a solution that had low cost and low power with high performance too. The gyro is very small at about 5mm square (about 0.3 inches square). You can see the small combo gyro PCB mounted vertically in the center section on t
4、he balancing robot photo below.Click for full-sized imageI also took advantage of the small size and combined an Analog Devices accelerometer integrated circuit on the same PCB to maximize performance. Plus there are no moving parts per se to complicate the issue. All the good stuff is contained ins
5、ide the chips. Using the two Analog Devices ADXRS150 and ADXL202 we can build a combo PCB for under $100.00 in parts. In this case at the Analog Devices web site, they are selling the gyro for about $39.90 in singles and the accelerometer for about $29.90 in singles. I know that the Express PCB serv
6、ice charges about $62 for three mini-boards, so one board costs about $20, then we have about $20 for all the other parts, since the PCB uses up only a small portion of the whole PCB blank, you can put in a few other needed layouts for other things on the same PCB and cut them out later as you need
7、them. I usually use a scroll saw to cut out the small PCBs. In some cases you could obtain samples of these chips, or as they start to fill in the vendor pipeline, youll be able to get them at better prices through the vendors and distributors.Traditional Gryo SolutionsYou can, off and on, get nice
8、Murata Piezo Gyros for $40 each from some vendors. But these tend to go to the manufacturers first, so sometimes it is difficult to get one. Gyration sells a micro gyro for $450. There is also a special academic version of the kit for $35. It has three gyros and supporting chips included in the kit.
9、 Microstrain sells a number of different gyro modules starting at $295 up to around $1495.The old classic approach is to obtain RC hobby model aircraft gyros and use them. These gyros run in cost from about $69.00 on up to several hundred dollars, depending on the model or type. A source to check ou
10、t is Tower Hobbies or maybe a RC specialty store like Helicopter World. Sometimes Servo City has RC model plane Gyros too.Then the most basic method is to use a potentiometer with a pole or pendulum attached to it. You feed the wiper output from the potentiometer to an ADC and then you can determine
11、 your position or tilt angle. This is the standard classic approach to balancing robots that balance a pole on top of them. But you could invert it as well. Usually you would still have to have some kind of a reference to the floor or tabletop for the robot to know where the floor is. But you could
12、trail a potentiometer with a small arm touching the floor behind the robot for this purpose as well.Although a RC hobby gyroscope is cost effective, it is a bit difficult to interface to a MCU. The gyro is designed for RC model airplane servos that work with a 1 to 2ms-width pulse train. Thus 1.5ms
13、is neutral, 1ms full one way and 2ms full the other way. Using a MCU you have to transmit the 1.5ms neutral signal to the gyro, then receive the pulses from the gyro and translate them into something more meaningful for you to use. The next problem is you basically have to have the MCU stop for up t
14、o 2ms to read a pulse width, before you can do something with it. Depending on the MCU you might have to have the MCU send the the 1.5ms pulse as well, eating up even more time. That 2ms may be very critical to other things going on. But if we use the gyro chip, we can use a ADC (analog digital conv
15、erter) to convert the analog voltage level to a numerical value much faster, plus you could, in some cases, start the ADC to get a value, and come back later for the result. We can now reduce the time to get a numerical value down to microseconds instead of milliseconds. Thus we get better accuracy,
16、 and faster performance. If you use a high performance DSP processor, you may be able to get this down to less than a microsecond to read a voltage level.The more expensive gyroscope systems, unfortunately, tend to be prohibitively expensive. So although they are really neat solutions, I didnt pursu
17、e them any further.ADXRS GryoscopeWithout going into all the engineering gobblygook, the basic way the ADXRS150 or 300 gyroscope ICs work, is they output a 2.5 volt level at rest. If the gyro is tilted one way or the other, then it will output up to a +/- voltage change from reference. This is an an
18、alog level that you need to feed into an analog digital converter (ADC) for a MCU to use. The ADXRS150 has about a 12.5mv per degree of sensitivity, for up to about 150 degrees per second of tilting. This can be adjusted some more as needed too. The voltage change is proportional to the speed or rat
19、e of the tilt angle. The faster the robot tilts the larger the change in voltage. The ADXRS300, as a higher performance device, gives about 300 degrees per second of tilting.The following sequence of photos illustrate the voltage change when the gryo is titled. (the photos are an exaggeration as I c
20、ouldnt tilt and snap the photo fast enough)Above: Gryo is at restAbove: Gryo titled forwardAbove: Gryo titled backwardsThis short MPEG video also shows the oscilliscope measurements of the gyro circuit at rest, tilted one way, and then tilted the other way.If you want more information about the chip
21、s, please go to the Analog Devices website and download the spec sheets and documentation on the chips. Also get the documentation on the accelerometer evaluation board as well. I expect Analog Devices to have an evaluation board for the gyroscope IC pretty soon as well.ADXL202 accelerometerThe ADXL
22、202 accelerometer is a really neat device in itself. It basically outputs a pulse string, and changes the duty cycle as the unit is tilted. Plus the change stays at the tilted angle until you change it to a different angle. Thus it makes for a really handy reference point type of device, such as whe
23、re is up versus where is down.Using a gyroscope by itself seems reasonable, but the gyro develops a slow creeping tilt error that continues to increase. An example of this is when you tilt the gyro youll see a change in the output voltage, but it quickly returns to its resting level, if the tilt doe
24、snt change. Thus if your robot was to tilt forward a few degrees and stay at that angle, the gyro will report that the robot is standing straight up after a second. So eventually the errors add up and the robot falls over. Using an accelerometer helps to solve this problem. The accelerometer outputs
25、 a steady duty cycle when the robot is standing straight up, and if the robot tilts one way or the other the duty cycle changes, and stays changed, until you have the robots computer correct for the tilt. Now on the surface it looks like you could use only the accelerometer, but the gyro reacts much
26、 faster to tilt changes than the accelerometer can. So the gyro gives you the fast response and the accelerometer helps to correct for the creeping gyro errors that will occur and tells you when your level or not, or where up and down is.I basically followed the designs as put forth by Analog Device
27、s, but I did add more filtering into the power line for the gyroscope chip. Without the additional filtering you run the risk of noise causing too many spurious readings, which would cause more problems. I also kept the two circuits somewhat separate in order to ensure that the noise generated by th
28、e accelerometer doesnt interfere with the gyroscope or vice versa. Plus the additional filtering is needs as the MCU or electric motors will generate additional power line noise as well.PC BoardExcept for mounting the gyroscope IC, building the PCB is fairly straightforward and simple. But do be ext
29、remely careful with the surface mount capacitors as they are not marked and they typically all look alike. I would suggest taking the capacitors from their package one at a time and soldering them down one at a time to ensure you dont mix any up. Also note that the two IC chips are complex and sensi
30、tive to static electricity so you need to be careful with them. I use a small X-Acto knife to help hold the little parts down as I am soldering them. Sometimes a bit of air gets trapped under the part and itll pop off from the heat as you solder it. When the part goes poof and pops off the PCB you c
31、ant find it on the desk or floor, so you have to go get another one.Mounting the gyroscope IC is a big problem as it is a BGA (Ball Grid Array package) that is about 1/4 square in size. The 32 little pins are .020 in diameter and are about .015 apart. In looking at the chip, it had me spooked for qu
32、ite a while. There may be other ways of doing it, but the three that I know of are: One) you can use a IR oven designed for soldering these parts onto PCBs; Two) you can use a hot air SMD rework station to heat up the parts and solder them; Three), you could heat up a toaster oven to 300 degrees or so and then stick the PCB with the gyro on it into the oven and cook it for a few minutes or so (I have not ever tried this method though). In the oven methods, Ive seen them use some kind of a PCB pre-heater to heat the PCB up to near 300 degrees, but just short of where the solder start
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1