Roboclaw 2x7 airflow/fan control application

Questions about using encoders with the Roboclaw product line
Post Reply
mellis
Posts: 2
Joined: Thu Jul 26, 2018 7:13 am
Roboclaw 2x7 airflow/fan control application

Post by mellis »

I have inherited an unfinished project where the Roboclaw 2x7 controller is to be used to control airflow in a test fixture. I have attached the fan motor to the first channel of the controller and have used IonStudio to vary the speed of the fan using the controls on the PWM Settings screen. With open loop control everything seems to work as expected.

In my application I have an anemometer that measures the airflow created by the fan and that provides two outputs to indicate airflow direction and speed. The speed indicator is simply a square wave that varies frequency based on air speed. The direction pin is high for one direction and low for the other. The direction pin remains high or low for a given airflow direction.

When I connect the anemometer to the 2x7 I see the M1 Encoder count increase while the fan runs and remain steady when the fan is off. However, the M1 Speed indicator doesn't seem to work properly. When the fan is at rest the speed indicator settles to zero but when the fan runs the speed indicator constantly changes. The value changes so rapidly that it is impossible to detect a pattern. The numbers seem to range from 0 to ~60 or so - it's difficult to tell.

I know that this is a different application from the standard robot control projects but it seems like the PID controller should be able to do what I need. I would like to be able to set a target velocity (as measured by the anemometer) and have the controller vary the fan speed to achieve that target. I will only have airflow in one direction and I am not concerned with the encoder position - only the velocity.

Based on what I see I suspect that the problem is that the anemometer isn't truly a quadrature encoder since the direction pin remains either high or low for a given airflow. What are my chances that I can make the 2x7 work in this application?
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Roboclaw 2x7 airflow/fan control application

Post by Basicmicro Support »

The roboclaw only supports quadrature signals or analog signals. What you have is basically a step and direction signal(eg pulses to indicate speed and dir signal for direction). You may be able to find an over the counter chip that will convert the step/direction signal to quadrature though I did not find anything with a quick search.

In general there is no reason the PID controller in the Roboclaw cant control the speed of the fan. It just needs a feedback signal that it understands.
mellis
Posts: 2
Joined: Thu Jul 26, 2018 7:13 am
Re: Roboclaw 2x7 airflow/fan control application

Post by mellis »

Thanks for the reply. I suppose there's no chance for a firmware update to add support for this type of encoder?
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Roboclaw 2x7 airflow/fan control application

Post by Basicmicro Support »

I beleive it is already in our "feature" todo list but is a low priority addition. We only have some much room left in the firware for the Roboclaw product line. I cant say it will ever be able to be added.

Post Reply