2X15A powered by USB, LB-IN and Main Battery

Questions about using encoders with the Roboclaw product line
Post Reply
BrassEm
Posts: 5
Joined: Tue Apr 23, 2019 7:37 pm
2X15A powered by USB, LB-IN and Main Battery

Post by BrassEm »

G'day,

I have a 2X15A with a 24V Switched mode power supply as Main Battery. I have no LB-IN connected and a USB cable connected running basicmicro motion control software.

The 2X15A is configured for analogue position control. The motor feedback 10K pot has a few op amps limiting the feedback down to 0-2vdc with the op amp vcc at 5vdc powered from the 2X15A +- pin outs.

When using just resistors to drop to 0-2vdc feedback, the feedback level was reasonably stable with a 4 deadzone. Now that I am using the op amps the feedback level appears to be floating and would need a 200 deadzone out of 1800 FSD.

Can I introduce 5vdc@0.25A USB power from a Teensy 3.6 to LB-IN while still having the USB with basicmicro motion control software and main battery to the 2X15A? I am hoping that this will stabilise the floating feedback.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: 2X15A powered by USB, LB-IN and Main Battery

Post by Basicmicro Support »

LB in requires 5.5v minimum and main battery will provide logic power unless it drops below the LB+- voltage anyway.

Im not sure what you are thinking in regards to using LB in. Do you think power is a problem to your opamp? It is very unlikely since the 5v rail of the Roboclaw can source up to 3amps to connected devices.

My guess is there is something wrong with the opamp circuit. They can be tricky. Please post your circuit diagram and I'll see if there is anything I can point out.

Note 1: USB never powers the Roboclaw. There is a small amount of parasitic power(milliamps) but it will not power the logic of the Roboclaw.

Note 2: If you are using a power supply for main power you need to deal with motor regeneration. What are you doing to handle this?
BrassEm
Posts: 5
Joined: Tue Apr 23, 2019 7:37 pm
Re: 2X15A powered by USB, LB-IN and Main Battery

Post by BrassEm »

5.5v minimum in on LB-IN rules out the Teensy power.

Wow! 3 amps at 5V out from the RoboClaw is definitely not the issue.

The op-amp circuit is designed to take a 270°feedback pot output and uses the zero and fsd to reduce the active voltage swing to around 30° where the remainder is at rail voltages. It should limit the coupled motor from 270° to 30° stroke. The output op amp just reduces the 0-5 volts down to 0-2 volts for the RoboClaw position feedback.

The circuits are using 10K values and cable lengths are reasonably short and shielded.

Image

I have not connected up any regen protection just yet as per the recommendations other than D1. Autotune does not trip out the Roboclaw/Supply. I did get the FQ30N06L mosfets but read the forums and got some BUK954R8-60E's. This was before I saw the new mosfet boards now available which are a much better proposition yet again. I have 3 RoboClaws to drive 5 off 200W motors.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: 2X15A powered by USB, LB-IN and Main Battery

Post by Basicmicro Support »

That helps a little. You should be able to test the opamp output before you start tuning the motors. Just manually move the motor(or use the PWM Settings screen) to slowly move the motor through the range of motion you want to use. If your output from the opamp isnt 0 to 2v adjust the trim pots until it is. Use a multimeter to check the output from the opamps.

Once you have a good 0 to 2v switch through the 30 degrees of motion you want to use, go into Motion Studio and make sure you have set the encoder modes to absolute in General Settings.

At that point manually moving the motor through there range of motioni should show a near 0 to near 2047 position in the Motor Encoder value at the top of the screen.

Assuming all of the above is true, you are now ready to try autotuning.

In the Position Settings screen set the min and max position settings to a little above the lowest value you got in the previous test and a little below the highest value you got.

Set the autotuner mode to PD. Then click the autotune button for the appropriate motor.

Let me know the results or if you get stuck somewhere earlier.
BrassEm
Posts: 5
Joined: Tue Apr 23, 2019 7:37 pm
Re: 2X15A powered by USB, LB-IN and Main Battery

Post by BrassEm »

All working good now thank you!

The output op amp gain was reconfigured for unity gain and PD tuning was sufficient for stable position commands under no load testing at this stage. A deadzone of 2 got rid of any chattering. Two motors working fine now, three to go.

Image

I have configured S5 for Voltage clamping for the RoboClaw driving the two motors but have not seen any switching voltage at the MOSFET gate with a DMM on motor direction change?
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: 2X15A powered by USB, LB-IN and Main Battery

Post by Basicmicro Support »

Good. Anything you need help with at this point?

If you want to go back to a higher gain on the opamps you may need to add some pre-filtering. You can do this by either putting a RC filter before the opamp input or you can do a trick and add a cap across the feedback resistor on the opamps. Functionally has the same effect.

Post Reply