Talk:Robotics 101 Amazing Mazes

From Imperial College Robotics Society
Jump to: navigation, search

Can someone please check all of this to make sure it's all correct, particularly the explination. Aswissrole 14:20, 16 September 2011 (BST)'

The explaination looks ok. However, im not sure about the pullups being required (as specified in the code) as there seems to be pullups already according to the diagram. Madcowswe 14:29, 16 September 2011 (BST)
When we tried it out we needed to include them. It didn't seem to work without them. Aswissrole 08:30, 17 September 2011 (BST)
In the diagram, the encoder is represented by the dotted line box, with the pull-up resistors being peripheral circuitry. Enabling them in software is a way of providing the pull-up resistors and it works pretty well :) --Harry 16:45, 17 September 2011 (BST)

Encoder resolution and maze size

I assume the encoders are quadrature encoders. Given the rim size of the robot and the width of the wheel base, the spacial, and especially the angular, resolution will be rather... shit. However the solution of where we put the encoder is so elegant that I think we should keep it. Thus, we need to make sure that the maze is rather large, and that the size of the features is rather large as we.. I.e. a "low resolution" maze. Madcowswe 17:58, 20 September 2011 (BST)

For the record, the encoders have a resolution of 48 ticks per revolution. Quadrature refers to the phase of the two signals from the encoder; a format which allows direction of rotation to be measured as well as its magnitude. --Harry 10:18, 21 September 2011 (BST)

Encoder Library

TODO: Write tutorial sections on Quadrature encoding, debouncing and interrupts ( Harry Eakins, Oskar Weigl, Thomas Clayson )

Is this the library that Oskar suggests we make ourselves? Aswissrole 10:37, 21 September 2011 (BST)

Well I was talking about the library used in our SimplePIDBot code, called mRotaryEncoder, but actually it isn't entirely appropriate, because it's written specifically for a rotary encoder with a push-button feature. It requires 3 pins to be specified in its constructor; two for the quadrature encoder, and one for the push-button. We can either write our own library, or try to change the mRotaryEncoder library so that its third parameter is default NC (not connected) and tweak its code so that it can handle NC pins. See QEI.cpp line 162 for an example of this --Harry 10:59, 21 September 2011 (BST)
I would suggest the students make something to understand the pulses themselves. Quadrature encoding is a rather easy concept...Madcowswe 12:14, 21 September 2011 (BST)
Quadrature encoding, debouncing and interrupts - the 3 things I reckon are necessary for writing code to handle our encoders. --Harry 13:13, 21 September 2011 (BST)
Agreed, all of which are some neat basics to be taught -- Madcowswe 16:10, 21 September 2011 (BST)