roboclaw with power supply wiring help

General discussion of using Roboclaw motor controllers
Post Reply
dudlee
Posts: 5
Joined: Wed May 24, 2017 3:37 am
roboclaw with power supply wiring help

Post by dudlee »

Hello,

I know that there are some topic in this area but this is my first time to use roboclaw and basically any dc motor controller so I want to be sure not to screw anything.
I am new to roboclaw and i would need some help to get started. basically i want to control 2 dc motor (with potmeter feedback) which will drive a robot arm. I have a Meanwell hrp-300-12 12VDC poer supply and dc motors (12vdc , stall current=5A)bought from pololu, and a roboclaw 2x7A controller.
Also I have an IRL530N MOSFET.is it enough for these dc motors? they can be run with 100VDC so I think they are ok, and 17A max. is there any quick method to choose the right FET for a given dc motor?
question 1: can i use the power supply to logic and motors as well or should i insert some other protection (see the picture attached)?
question 2: should i copy the clamp circuit for the second motor connected to the S4 pin?in the user manual there is no mention about that but i think I would need...
question3: Should i add any more protection elements into the red boxes (see picture again), between the motors connection and between the PS connections?

Another thing is if I understood well the active clamp circuit basically puts the R3 resistor pralell to the PS + and - connection when S5 activates it. How does roboclaw control that signal? Can I and if yes how to use a Multimeter to check if the regenerated voltage from the motors are dissipated well?
I have 10 watts resistors in stock...will they be enough?

Any suggestion is appreciated.

Thanks a lot.

ps: sorry for my english , i am not native.
roboclaw with dc motors and PS
roboclaw with dc motors and PS
ROBOCLAW2X7A_WITH_2DCMOTOR_AND_PS.jpg (112 KiB) Viewed 7453 times
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: roboclaw with power supply wiring help

Post by Basicmicro Support »

The IRL530N may work. I would prefer one with a lower turn on voltage. Look at the gate charge vs Gate-Source Voltage table in the mosfet datasheet. The voltage at the plateau in that chart is for all intents the voltage when the mosfet is fully turned on. You want this to be at or lower than 3.3v. The mosfet will still work if it is higher than this as long as the gate threshold voltage is lower(its 1 to 2v on this mosfet) but the mosfet wont turn on fully which reduces efficiency in the mosfet(eg causes extra heating) and reduces how well the power resistor will dissipate an overvoltage. You may end up needing a lower resistance power resistor to compensate.

The roboclaw needs to have one of its extra pins setup to control the mosfet. S3 S4 or S5 can be setup this way. When one of these pins is setup for voltage clamping they will activate when the main voltage goes over the user specified maximum voltage by 1v and will dissable when the voltage drops back down to the user specified maximum voltage.

One warning. If you have enabled the voltage clamp function on a pin make sure you have setup the actual circuit. The roboclaw will no longer brake the motors on an over voltage when setup for voltage clamping so if the clamp circuit is not installed and your motors start to regen nothing will try to disipate this energy. By defulat when not setup for voltage clamping the ROboclaw would put the motors into braking to disipate the energy in the motor itself.

As for adding protection:
1. On our larger controllers we already have TVS Diodes. On the smaller controllers its not usually necessary. Note that TVS diodes will not protect against regen caused over voltages.
2. On the power rail its always a good idea to add a fuse in series with the switch.
3. Your voltage clamp circuit layout looks correct.
dudlee
Posts: 5
Joined: Wed May 24, 2017 3:37 am
Re: roboclaw with power supply wiring help

Post by dudlee »

Hello,

Thanks for your answers.
Just a quick qestion still. So one V-clamp circuit (connected to S3.4.or5) is enough for two motors as well?

Thanks a lot.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: roboclaw with power supply wiring help

Post by Basicmicro Support »

Yes. One v-clamp may be enough for multiple roboclaws(eg one roboclaw controls the vclamp if all the controllers are on the same power supply). You just need to make sure your power resistor is in the correct ballpark for your system(in genereal between 10 and 1 ohms). Also heat disipation in the power resistor must be dealt with(mounting them to metal chassis is best).
dudlee
Posts: 5
Joined: Wed May 24, 2017 3:37 am
Re: roboclaw with power supply wiring help

Post by dudlee »

Hello,

Thanks for the answers. Now I am testing the voltage clamp circuit but I have some problems.
I tried to measure the voltage spike with an Digital scope (Voltcraft DSO 2020 USB) and I connected the probes as you can see in the picture.I use a simple c++ program based on what is posted in one of the posts here.
I move the motor with no load (with packet serial command 0= Drive M1 forward)at a speed of 20,30,40...and so on. 127 is the maximum I think. It works fine until I reach about 85. When I use this speed the power supply click (like a relay activates so I think it happens due to some overvoltage) once when the motor stops. I tried to measure any voltage spike but I did not see any overvoltage on the line.
I tried to catch the S5 output signal but I could not see any signal.
I measured the controllers motor output signal and it seems okay.(12Vpp PWM signal.)
In the Ionmotion app. everything is OK.S5 is set to voltage clamp mode. Do I need to set any other parameter?

Question1: Do I use the right places for the probes to measure the signal?

Question2: Should I connect the LB to power supply too?

Question3: How can I be sure that this clicking sound from Power Supply is related to overvoltage?
I do not dare to run the motor faster because I dont wanna damage anything.
Attachments
ROBOCLAW2X7A_WITH_2DCMOTOR_AND_PS_withscope.jpg
ROBOCLAW2X7A_WITH_2DCMOTOR_AND_PS_withscope.jpg (115.22 KiB) Viewed 7316 times
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: roboclaw with power supply wiring help

Post by Basicmicro Support »

You need to set the maximum main battery voltage to just above the power supply voltage(1 to 2 volts). This is the point the clamp will be activated.

You can test if the vclamp is tripping by first disconnecting the resistor from the main battery and then setting the max main battery voltage to less than the power supply voltage. The vclamp pin will then be activated until you change the voltage back above the power supply voltage. Remember to change back the voltage and reconnect the resistor after you test this.

Probe positions to measure power supply voltage look ok.

No, LB+- is not needed. You should instead set the Minimum Main Battery voltage setting to 1 to 2v below the power supply voltage. The Roboclaw will automatically reduce motor power if the power supply voltage starts to droop too much(eg if you are pulling too much current from the supply).

I agree the click you hear is probably the supply cutting its self out to protect itself from the over voltage. I recommend using Ion Studio. Open it and connect to the board. Then go to PWM Settings and set one of the Chart colors to Main Battery Voltage. Then run the motor up to some speed and slow down. The faster you slow down the higher the Main Battery voltage will rise(except if you hit stop all which puts the motor into braking mode which doesnt feed power back to the supply). Just be carefull how fast you slow down. You should see the voltage rise in the Chart window.

Post Reply