How do I drive the Cytron SmartDrive40 in PWM mode?

Autonomous Robot, Manual Robot, DC Motor Driver, Stepper Motor Driver, Servo, Multi PWM chip.....

How do I drive the Cytron SmartDrive40 in PWM mode?

Postby Metalmind » Thu Apr 19, 2018 9:34 pm

Hello, I am just trying to get the Cytron SmartDrive 40 to work in PWM mode with a standard Arduino Mega.

I have the DIP switches set to the following positions:
1:1
2:0
3:0
4:0
5:0
6:1
7:0
8:0

I have the inputs connected to an Arduino Mega like this:

Input 1 connected to Pin 2
Input 2 connected to Pin 26
Ground on the smartdrive connected to ground on the Mega.
The 5 volt pin on the smartdrive not connected with anything.

I then tried to run the following code on the Mega:

void setup()
{
pinMode (2,OUTPUT);
pinMode (26,OUTPUT);
}

void loop()
{
analogWrite (2,0); //set PWM pin to low
digitalWrite(26,0);
delay (5000);
analogWrite (2,255); //set PWM pin to high
}

When I connected the arduino with this code, I can observe that I do not get the Input Error (I do not see the LED flash 2 times) however, when the PWM goes to high, the motor does not spin.

I tried more experiments, and I saw that when I uploaded code to the arduino while it was connected to the SmartDrive the motor would spin, and then it would stop after the code had finished uploading. I am also capable of driving the motor using the push buttons on the SmartDrive.

Any help or assistance would be greatly appreciated. I used the Cytron 10Amp DC Motor Driver in the past and I was very happy with it.
Metalmind
Fledgling
 
Posts: 1
Joined: Thu Apr 19, 2018 9:19 pm

Re: How do I drive the Cytron SmartDrive40 in PWM mode?

Postby ober » Tue Apr 24, 2018 6:46 am

I don think is the problem of the SmartDrive40 since it can work with the manual/test button and there is no input error.

You can try replacing the SmartDrive40 with MD10C, see if it works?
Ober Choo
Cytron Technologies Sdn Bhd
www.cytron.com.my
User avatar
ober
Moderator
 
Posts: 1397
Joined: Wed Apr 15, 2009 1:03 pm


Return to Robot Controller

Who is online

Users browsing this forum: No registered users and 6 guests

cron