Hello,
I would greatly appreciate some helped as I have hit a block.
I am trying to include as many details as i can to give a full understanding of what i am trying to achieve. only the motors are set in stone, most of the rest of the system can be changed if there are better suited items. please feel free to make suggestions on replacing equipment.
My overall project requires me to run two large dc motors. The main motor runs at a relatively slow speed 50 - 100 rpm and is a geared DC motor on 130 VDC (see below for specs) the secondary motor needs to run in scale to the first. For example: if the setting is 4 to 1 the main motor is running at 60 rpm the follower is 240 rpm, if i then increase the main to 67 RPM the follower should automatically increase to 268 RPM.
The hardware:
Main motor (not changeable):
Bodine motor 24A2BEPM-D3
Volts: 130 VDC
A: 0.30
HP: 1/29
Ratio: 6:1
RPM: 417
Torque: 3.3 in*lb
Follower motor (not changeable):
Bodine motor 42A5BEPM
Volts: 130 VDC
A: 1.8
HP: 1/4
RPM: 2500
Each motor has a feedback device to make sure the RPM is where it should be. The main motor has a 2000 pulse per revolution optical encoder and the follower has a 32 pulse per revolution magnetic pickup. both of the feedback devices are working properly, although not pertinent to issue I am having)
The issue comes from driving the two motors. Typically i have used this to drive the motors:Minarik DC Motor Driver RG60U
Click HERE for data sheet
This driver works great if you want to control the motors by hand and drive them with a 10 KΩ pot. The driver uses a 10 VDC voltage from S2 pin to control the motors. If you supply S2 to S0 it stops, S2 to S1 it rotates one direction and S2 to S3 spins the other direction.
My first though was to control the S2 to S1 using a mosfet controlled by a Arduino UNO. The issue i found was that what is not sent to the motion pin (S1 or S3) needs to be sent to the S0 pin.
My next thought was to use a digital potentiometer chip to control the driver. I used a MCP4131-103 (10 KΩ) SPI chip. DataSheet HERE
The chip is wired with S2 on the greed wire, S0 on the Brown wire, and S1 on the purple wire (See attachment)
I used a simple code writing the SPI to 128 bytes for a half second and then wrote the SPI to 0 bytes for a half second and then looping.
#include <SPI.h>
byte address = 0x00;
int CS= 10;
void setup()
{
pinMode (CS, OUTPUT);
SPI.begin();
Serial.begin(9600);
}
void loop()
{
digitalPotWrite(0x00);
Serial.println(0);
delay(5000);
digitalPotWrite(128);
Serial.println(128);
delay(5000);
}
int digitalPotWrite(int value)
{
digitalWrite(CS, LOW);
SPI.transfer(address);
SPI.transfer(value);
digitalWrite(CS, HIGH);
}
The motor moves however it never comes to a complete stop and the maximum RPM is about half what it is through a 10 kΩ pot. I measure the resistance across the digit pot and i'm getting about 6 KΩ at max and 0.5 kΩ on the minimum.
Is there something i am wiring wrong? or is this in the nature of the electronic pot?
Also just to point out there is a provision for controlling the driver with a 10 VDC on page 16 of the RG60U driver manual. I applied a 10 VDC to the S2 and RB1 line and did not get any response from the motors. if anyone has any ideas i would greatly appreciate the feedback.
Regards,