Advice needed - RoboClaw 2x30A Wiring with DC Motor, Encoder, Arduino and Voltage Clamping Circuit

General discussion of using Roboclaw motor controllers
Post Reply
citrusying
Posts: 4
Joined: Wed Jul 18, 2018 10:50 am
Advice needed - RoboClaw 2x30A Wiring with DC Motor, Encoder, Arduino and Voltage Clamping Circuit

Post by citrusying »

Hi

I know there are quite a number of posts related to hardware wiring of the RoboClaw 2 x30A already but I don't think there is one with a full wiring diagram that connects the RoboClaw with DC motors, encoders, Arduino and with a voltage clamping circuit. I am very new to electronic hardware and really don't want to blow up the controller or motors so any help would be very much appreciated!

I would be using RoboClaw 2x30A with these two gearmotors that comes equipped with encoders. Have checked that the stall current is within the current limits of RoboClaw.

1) https://www.servocity.com/23-rpm-hd-pre ... -w-encoder
2) https://www.servocity.com/84-rpm-hd-pre ... -w-encoder

I would be using a 12V PC power supply (with on/off switch) to power up RoboClaw, so would require a voltage clamping circuit. And RoboClaw would be hooked up to an Arduino Uno via an optocoupler. The wire circuit is as follows, and components are as per recommended in User Manual page 46. Only one motor connection is shown and I have colour-coded them as much as possible for easy reference.

1) FQP30N06L 60V 32A LOGIC N-Channel MOSFET
2) R2 = 15K
3) R3 = 50W, 4.7Ohms
Capture.JPG
Capture.JPG (135.45 KiB) Viewed 4974 times
Queries:
1) Is the wiring diagram correct? The wiring diagram in the User Manual is a little confusing to translate into an actual circuit, especially onto a stripboard.

2) Gate of MOSFET is connected to S5 I/O pin only or it has to be connected to all three I/O, PWR and GND pins?

3) The Arduino Uno is connected to RoboClaw as per the circuit in page 62. The TX and RX pins of Arduino Uno are connected to the S1 and S2 I/O pins only correct? There is no need to connect to the PWR and GND pins of S1 and S2.

4) If the Arduino needs to draw power from RoboClaw, where should the 5VDC and GROUND pins from Arduino Uno be connected to? The User Manual shows a 5VDC and GROUND of RoboClaw, but I am not sure which pins it is referring to.

Thanks!
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Advice needed - RoboClaw 2x30A Wiring with DC Motor, Encoder, Arduino and Voltage Clamping Circuit

Post by Basicmicro Support »

1. Yes, it looks correct. The 4.7ohm may be a little large. At 12v the 4.7ohm onl,y allows you to disiupate 12/4.7 amps = 2.5amps. That is probably fine but you will need to test and see if you get any voltage rise during regen beyond the set maximum voltage limit you set.

2. Gate to S5 I/O pin only. If you connected it to all three you'd short out the power and the I/O pin.

3. Arduino does need a ground connection to the Roboclaw and you should probably power the arduino 5v from the roboclaw 5v. That way you dont need to connect the arduino directly to the battery(eg nothing connected to the arduino DIN plug).

4. There are several 5v and GND pin on the Roboclaw pin header. All + labeled pins, except the LB+ pin are 5v. All - labeled pins are GND. COnnect the Arduino 5v to a Roboclaw +(5v) and Arduino GND to a Roboclaw - pin.
citrusying
Posts: 4
Joined: Wed Jul 18, 2018 10:50 am
Re: Advice needed - RoboClaw 2x30A Wiring with DC Motor, Encoder, Arduino and Voltage Clamping Circuit

Post by citrusying »

Hi

I have set up the voltage clamping circuit but still have some queries:
Capture.JPG
Capture.JPG (76.51 KiB) Viewed 4957 times
1) Does order of clamping circuit vs RoboClaw matter?
- Current set-up is such that power --> RoboClaw --> clamping circuit
- RoboClaw did not receive any power when the order is power --> clamping circuit --> RoboClaw

2) Confirmation of successful voltage clamping setup
- I connected to IonStudio and checked that the main battery voltage is 11.7V and logic battery voltage is 2.0V and made the following setting changes based on recommendations in related forum posts:
--> Min main battery voltage = 13.7V
--> Min main battery voltage = 10.0V
- In PWM settings, set main battery voltage as the blue line and ran the motors up and quickly reduced speed. Below is screenshot of the main battery voltage (blue line) after running motors to 100% and reducing to 0. The main battery voltage did not increase very much. Is this a positive sign that the voltage clamping circuit is working?
Capture.JPG
Capture.JPG (85.07 KiB) Viewed 4957 times
Thanks.
User avatar
Basicmicro Support
Posts: 1594
Joined: Thu Feb 26, 2015 9:45 pm
Re: Advice needed - RoboClaw 2x30A Wiring with DC Motor, Encoder, Arduino and Voltage Clamping Circuit

Post by Basicmicro Support »

1. Roboclaw main power should be directly connected to the battery. Then the clamp resistor should be connected to the + of the battery in parallel with the Roboclaw main + terminal. The mosfet ground connection should be parallel to the Roboclaw main - terminal. The clamp should not be preventing power from getting to the Roboclaw. What it does is provide a path to bleed off power when the motors are in regen.

2. This could be a positive sign the clamp is working OR it could be a sign your current motor setup doesnt need a clamp. Some motors setups(motors with low momentum) may not regen enough to cause a voltage spike. It doesnt look like you are seeing regen in my opinion. Run several more tests. If the voltage doesnt rise to the 13.7v limit the clamp isnt being used. You may need to test with your finall load installed on the motor before you can be sure.

Also only test one motor at a time. A second motor can disipate the regen if it is also running.
citrusying
Posts: 4
Joined: Wed Jul 18, 2018 10:50 am
Re: Advice needed - RoboClaw 2x30A Wiring with DC Motor, Encoder, Arduino and Voltage Clamping Circuit

Post by citrusying »

Hi

I made a silly mistake for the wiring by forgetting that the power rails do not run continuous down the entire breadboard! That explains why the motor controller cannot be powered when placed after the voltage clamping circuit!

But seeing that there is very little voltage increase even without the voltage clamping circuit connected, I guess it is a positive sign that there is insignificant regen. But noted the advice of having to test with final load installed on the motor and without 2nd motor running.

Thanks!

Post Reply