[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 492: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/ext/cleantalk/antispam/model/main_model.php on line 218: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5133: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5133: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 5133: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3843)
Quadrature Encoder Positon Powerup value - BasicMicro

Quadrature Encoder Positon Powerup value

Questions about using encoders with the Roboclaw product line
posplayr
Posts: 4
Joined: Mon Oct 10, 2016 10:04 pm

Quadrature Encoder Positon Powerup value

Postby posplayr » Tue Oct 11, 2016 12:33 am

Last edited by posplayr on Wed Oct 12, 2016 11:46 am, edited 1 time in total.

User avatar
Basicmicro Support
Posts: 870
Joined: Thu Feb 26, 2015 9:45 pm

Re: Quadrature Encoder Positon Powerup value

Postby Basicmicro Support » Tue Oct 11, 2016 9:46 am

Yes, that is one way of doing it. Also you can setup the S4 and S5 pins(for channels 1 and 2 respecively) as Home signal imputs. Then the home signals trigger(eg get pulled low) the respecitive encoder count will be reset to 0. The Home signals will also stop the motors when the motors are moving in the reverse direction(eg toward the home switch).

posplayr
Posts: 4
Joined: Mon Oct 10, 2016 10:04 pm

Re: Quadrature Encoder Positon Powerup value

Postby posplayr » Tue Oct 11, 2016 10:37 am

Last edited by posplayr on Wed Oct 12, 2016 11:47 am, edited 1 time in total.

User avatar
Basicmicro Support
Posts: 870
Joined: Thu Feb 26, 2015 9:45 pm

Re: Quadrature Encoder Positon Powerup value

Postby Basicmicro Support » Wed Oct 12, 2016 9:09 am

1. No, the Roboclaw does not keep track of the quadrature count between power cycles. In order for a quadrature encoder to be used as an absolute position sensor you will need to keep the system powered at all times if there is any possibility of external forces moving the encoder. Note the roboclaw have a minimum draw between 20ma and 40ma plus whatever the encoders will draw so this is usually not an option with battery powered systems.

However, If you are using something that cant be back driven(like a linear actuator or high ratio worm drive) then the problem is less difficult. You just need to save the last encoder value in non-volatile memory on your controller before shutting down and then reload the value after powering back up. We dont do this because most systems will backdrive when powered down and you end up losing the position anyway so you will have to implement the save/load in your controller.

2. Yes. Set the encoder position, then send a command to "move" to that position.

3. See 1.

posplayr
Posts: 4
Joined: Mon Oct 10, 2016 10:04 pm

Re: Quadrature Encoder Positon Powerup value

Postby posplayr » Wed Oct 12, 2016 10:29 am


User avatar
Basicmicro Support
Posts: 870
Joined: Thu Feb 26, 2015 9:45 pm

Re: Quadrature Encoder Positon Powerup value

Postby Basicmicro Support » Thu Oct 13, 2016 9:24 am

Roboclaw counts each edge of each quadrature pulse on each signal line so 4 counts per period.

QPPS is the maximum speed of the encoder/motor in counts per second.

posplayr
Posts: 4
Joined: Mon Oct 10, 2016 10:04 pm

Re: Quadrature Encoder Positon Powerup value

Postby posplayr » Thu Oct 13, 2016 9:50 am


User avatar
Basicmicro Support
Posts: 870
Joined: Thu Feb 26, 2015 9:45 pm

Re: Quadrature Encoder Positon Powerup value

Postby Basicmicro Support » Fri Oct 14, 2016 9:09 am

Correct. QPPS is a hold over from a long time ago. I prefer to think of it as counts of the edges of the quadrature pulses.

jorchard
Posts: 6
Joined: Fri Mar 10, 2017 7:51 am

Re: Quadrature Encoder Positon Powerup value

Postby jorchard » Mon Mar 13, 2017 1:06 pm


User avatar
Basicmicro Support
Posts: 870
Joined: Thu Feb 26, 2015 9:45 pm

Re: Quadrature Encoder Positon Powerup value

Postby Basicmicro Support » Tue Mar 14, 2017 10:07 am

The simplest option is to turn the output shaft one rotation while the motor is off and read the total counts. Then divide the counts by 360 to get counts per degree.

You cant read the encoder counts while using RC control mode. If you are using an arduino you should use packet serial instead so you can control the motor and read back the encoder positions.


Return to “Velocity and Position Control”

Who is online

Users browsing this forum: No registered users and 1 guest