Don't ad-block us - support your favorite websites. We have safe, unobstrusive, robotics related ads that you actually want to see - see here for more.
0 Members and 1 Guest are viewing this topic.
1) If you have a current sensor on the motors, you would know something is wrong.2) The count would slow down to zero before the wheels went backwards. again you would know something is wrong.
You do not loose counts. You write the program to only go backwards once the motors have stop. You know the robot has stop when it doesn't count anymore pulses from the encoder. Now the program tells the motors to go backwards. Now the program knows the count is for backwards. There is nothing hard about it.
Quote from: ALZ on May 28, 2008, 12:21:30 AMYou do not loose counts. You write the program to only go backwards once the motors have stop. You know the robot has stop when it doesn't count anymore pulses from the encoder. Now the program tells the motors to go backwards. Now the program knows the count is for backwards. There is nothing hard about it.No one said it was hard, but I think you are neglecting that one is often trying to optimize many different facets of a robot. It is not always an option to make your robot so slow as to wait for it to fully stop before accelerating in another direction. If speed and responsiveness is an important characteristic, or if accuracy of your counts is paramount, then quadrature encoding is the preferential way to go. If you don't care so much about accurate position/orientation tracking or if you can afford to go at a slow, leisurely pace, you can get by just fine without quadrature. From your posts it seems as if you want to universally write off the usefulness of quadrature, and, if so, that's what I'm objecting to. Quadrature definitely has its place in robotics.- Ben
Quadrature encoders will tell you what direction you are going in but they will not give you anymore accuracy over rough terrain than a plain encoder wheel.
Most pics have more than 1 interrupt port. This is the way I would implement a quadrature encoder. The only problem is that the faster your robot goes, the more frequent your interrupts get and therefore less time is spent in the actual programming. It might be a case where you want to dedicate an mcu for reading the encoders (dont worry it can be used for other things too such as controlling the motors). This is a good way of doing it - have a dedicated motor mcu where you can send commands through i2c to move and also receive speed data back through i2c. It means that it frees your main processor from having to do pwm to motors + be interrupted by encoders letting it get on with what really matters.
Lets face it, if youre going to go to the effort of adding encoders. Then you might aswell put in the extra work and add quadrature encoders.I guarantee that a couple of weeks after adding encoders youll think, only f i put in the extra effort....... Theres so much more my robot could do........
I already read your topic in the misc forum, it's already in my bookmarks
Quote from: Rebelgium on June 05, 2008, 02:25:07 PMI already read your topic in the misc forum, it's already in my bookmarks Rebelgium, if you like the program, there's one favor I'd like to ask of you.I'm an electronic experimenter and, as I mentioned above, am not great withmechanical design and assembly. So, for me, amateur robotics would be a frustrating pursuit. As a result, I have no contacts within the roboticexperimenter fraternity.If you like the program, could you please spread the word to your friendsand to the robotics sites you frequent? I'd appreciate it. I have nothing to gain by wide distribution of my program. Since I don't haveany ads on my web site, I don't even gain from page hits. When I wanted to build my own encoder, I looked for a program like mine. Ithought lots of folks would have invented ways of printing codewheels. I wasvery surprised to find nothing that I could use. I figured that being able to generate good codewheels for free would giveall types of electronic hobbyists new capabilities. They could include optical encoders in projects now, when doing so before would have cost too much.I'd like to spread the word, and give all experimenters this capability.So, I would appreciate it very much if you could let folks know that this program exists.Thanks very much!Tom Lackamp
There's not much I can do really...All I can do is tell someone about your program when someone asks, I think your topic is a good start (people that search the forum for encoders will stumble upon it).The best thing you can do is contact Admin and ask him to put a link to your site on his wheel encoder tutorial (or the most relevant tutorial).That would be ideal.
QuoteQuadrature encoders will tell you what direction you are going in but they will not give you anymore accuracy over rough terrain than a plain encoder wheel.By going to quadrature, you can increase accuracy by 2x. And if you are clever with the algorithms, in theory up to 3x to 4x.