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.

DIY Quadrature Decoder/Counter Interface

Status
Not open for further replies.
Well it's an old Parallax app note, see the section on reading rotary encoders with schematic & source code.
Parallaxes manuals are usually excellent.
 

Attachments

  • Parallax PIC applications.pdf
    251.9 KB · Views: 841
Hi Hank,
I agree. Knowing what the motors do is not the same as knowing where the robot is. But it is the basis for knowing it. Slow start and stop as well as the effect of a heavy robot make odometry data more reliable. The biggest contribution to errors will be the fact that the terrain is rather rough. It’s the lawn in my garden.
I bought a Devantech Compass. I hope it will be useful as a key component for adjusting direction drift. David P. Anderson describe method pros and cons on this page:

Then I bought four Devantech SRF05 ultrasonic rangers. With those I might be able to use the ultrasonic fingerprint for landmark identification. I know this is a complex challenge. So before anything else the rangers are of course for collision avoidance.

I have been reading about using PS/2 mouse signals. The first references I read did not look so promising. But I since found that it surely is a possibility. But then – I already got all the logic circuits to implement my idea. I redesigned my project a bit. It's now a regular PID controller. And I find it challenging to implement it. Specs are: 2 x 12 bit encoder readings (mouse is 2 x 8 + 1 bit) The PID loop is 50Hz. The controller is initialized serial by values for Kp, Ki and Kd. When running it receives 7 or 8 bit speed signal and 1 bit direction signal for each wheel. It sends 7 bit signal for the each PWM generator and again one bit for direction.

Hi Bill,
Yes it's an excellent manual. The loop described in the code has to be constantly running or there is a risk for missing counts. But if the PIC should do noting much else, it's an excellent solution. As you can see of the answer above, my mind is pretty much set for trying to build the circuit I have in mind.
 
GPS could be very interesting. It could be very expensive to. GPS modules cost around US$300. I would love to play with those modules. The positional accuracy is 1 to 5 metres. I can get a RFID receiver for around US$60. By placing tags in the lawn – as landmarks, the robot can get a very high precision for a fraction of the monies.
 
OK That's very exciting. Then we only need better accuracy. It could be a useful method for getting a good approximation for where the robot is. Then the search for landmarks can be restricted to a small subset for all possible landmarks. The area the robot has to operate in is well-known. There is 5000 square metres of garden with beds, borders, trees, scrubs and other obstacles. But the robot can be provided with a map to navigate from. When the robot is moving it starts at its base station where batteries are charged. By odometry and landmarks it will be able to know better than by 5 metres accuracy where it is. GPS could of cause be useful if the robot where rebooted at an unknown place.
 
The way to get really good accuracy with a GPS is two GPS units, one stationary on a PC and the mobile one. You subtract the difference as they will both be off by the same error. Use an XBee radio $20 to keep them syncronised. I think the method is called differential GPS.
 
Hi Bill,
After I read your posting, I have been studying differential GPS. It's very interesting. And it's on the list for future consideration in this project. I just started building the robot two weeks ago. I got two good motors and the base of the robot is almost finished. There are a lot of steps to go through in such a project. When the robot is ready for the first run, I must be mastering odometry before considering navigational methods.
 
Aren't there a large number of articles going around in the media about the failings of the GPS system and how during a solar maximum GPS is going to be anything but reliable?
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top