My team is looking to build a tricycle with the rear 2 as drive wheels and the front as a steering wheel (no forward power, only turn). The other programmer and I cannot figure out what sensor to use to determine the angle the front wheel is at to make it return to center when the joystick centers. If this makes any sense please help. If it doesn’t, please let me know and I’ll try to reword it. Thanks in advance.
Depending on the way that your steering is set up, you may be able to attatch a potentiometer to the steering axel, I guess it would be. Then it would be a simple matter of plugging into an analog port and getting the feeback.
Other than that I don’t know of any other sensors you might be able to use like that.
Actually that makes perfect sense. we had not thought of that. Thanks
Warning! Our team made a trike before. We used a potentiometer for wheel position and 2 limit switches for calibration and safety. It worked but, the 3 points of contact make for a less stable robot than 4 points of contact. Also, that year each wheel was driven by worm gears. You need to do a little math to set the wheel speed for each wheel in tight turns. I would think twice about trikes.
If you can hook the potentiometer up to the shaft of the steering that would be your best bet. There are different type of potentiometer including Limitless and just single rotation. Both of these can be hooked up to your Analog input to tell your angle.
You could also do it with an encoder also. You have your starting position call it zero. You count the pulses if you go left or right on the sensor. Then when you want to return you just do the opposite back to zero again.
The easier would be the first option with a potentiometer on the shaft. If you need additional help with programming or something feel free to contact me on IM.
I may need some help. Thanks for the offer