![]() |
Re: Labview help: How do you use a gyroscope to level something controlled by two mot
Okay, thanks. I'm actually going to robotics now and I will try and see if I can get it to work. I'll update you guys soon :)
|
Re: Labview help: How do you use a gyroscope to level something controlled by two mot
What some of the previous posts are pointing out is that you need some feedback element, and a gyro isn't your only choice. A pot, or potentiometer is basically like the knob on your stereo, or something that still has analog knobs. It relates a voltage to a position. There are a variety of them to choose from, but they are one approach and benefit from generally having an absolute value for each position of your mechanism.
Encoders count up and down as their shaft is turned CW or CCW. They generally don't have an absolute number for a given position, but have work great when something is turning many revolutions and you want to know how far it has turned. The gyro can be used to how much something has turned since it was inited, but they drift over time. Accelerometers can measure the force of gravity and can help level mechanisms as well, but they tend to lag and are subject to other forces such as bumps, uneven ground, and driving forces. All of these provide feedback to your code. In your code, you can implement any number of control approaches. Bang-bang is perhaps the simplest, but I'd think that a simply proportional control would be just fine for you. You will send a PWM value, say 0.5 to both motors, but a bit later you will measure each side to see if one is ahead of the other. You'll take that error amount and use it to slow one down and speed the other up by some proportional amount. Rinse/repeat. This will help to correct for binding and friction and other forces that make one side go slower than the other. You can make this yourself or use the PID VI with only P being nonzero. The biggest tip I can give is to plot your motor values and the feedback on your panel. Once you implement the control, also plot your error term. This will help to see whether problems are due to feedback noise, lag, or control values. It will also help you realize the type of binding or other issues that are forcing the motors to operate at different levels. The plotting is accomplished by bundling the values together into a cluster and wiring that to a stripchart on your panel. You can change the X scale to show more or less data, and you may want to turn off the Y autoscaling once you know the range of numbers you'll be plotting. You may want to stack the plots or make additional Y scales if the numbers are vastly different ranges. Greg McKaskle |
Re: Labview help: How do you use a gyroscope to level something controlled by two mot
Thanks for your tips. I will be sure to try everyones ideas but I have another problem. I tried today to control both motors from the same PWM output. I used a 3 pin spitter that normally comes with the kit. When I did this, only one of the victors was receiving code. The other one wasn't. I even tired switching the cable to see if it was at fault. I couldn't get the PWM signal to split.
Is this normal? Can you actually split a PWM signal? |
Re: Labview help: How do you use a gyroscope to level something controlled by two mot
Is there any way you can physically link the two sides of your lift, so you don't need to use software to coordinate the motors? That would be my preferred solution.
|
Re: Labview help: How do you use a gyroscope to level something controlled by two mot
Does the Digital breakout have 12V power connected to the PD? Are the LEDs bright?
Greg McKaskle |
Re: Labview help: How do you use a gyroscope to level something controlled by two mot
I tried today to control the two motors from one PWM signal. But when i used the splitter, only one victor was receiving code. The other was not and I even tried switching the cables and the victor with a new one. My Digital side car is plugged into the 6 volt connector on the power distributor.
My solenoid break out, and analog breakout has a direct 12 volt from the power distributor. So, why doesn't splitting the signal work? Am I doing something wrong? |
Re: Labview help: How do you use a gyroscope to level something controlled by two mot
Quote:
The Digital Sidecar must get its power from a regular battery connection on the Power Distribution Board, protected by a 20 A snap-action circuit breaker. |
Re: Labview help: How do you use a gyroscope to level something controlled by two mot
Quote:
|
Re: Labview help: How do you use a gyroscope to level something controlled by two mot
Quote:
You weren't giving the Digital Sidecar enough voltage for it to do its job. It was able to sip enough from the cRIO through the ribbon cable to barely control the speed controllers, but I would expect that they would stop working if you ran enough of them in reverse at the same time. |
Re: Labview help: How do you use a gyroscope to level something controlled by two mot
Yay. Okay great, one problem solved.
I'll know that for our girls robot. We have two teams unfortunately and the girls don't really help out on there own robot. So now lets say I still want to use the gyro, but just to get a read to tell the driver that the top is indeed level. How would I wire it? I believe I have the programming part of the gyro complete. |
Re: Labview help: How do you use a gyroscope to level something controlled by two mot
A gyro isn't going to tell you whether anything is level unless you have another method to make sure it's level at some point. But if you can do that, just wire it the normal way: connect the Rate pins to either Analog Input 1 or Analog Input 2.
A dual-axis accelerometer can measure the direction of gravity. It might be a better sensor, assuming you can ensure that the robot won't be bumping around much while you're trying to use it. |
Re: Labview help: How do you use a gyroscope to level something controlled by two mot
If the gyro is level and the platform that it is connected to is parallel to the gyro, that would give an accurate read right?
|
| All times are GMT -5. The time now is 18:33. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi