I'm running the Blocking sketch from the IDE and can't seem to make the Due move my motor.
I have been running an UNO to double check my connections and using the same Blocking sketch the motor moves as expected.
The driver is a Gecko g203V and states the signal input from the controller can be 2.5V, 3.3V, 5V logic outputs with 2.5mA minimum source drive current.
What am I missing here, the only difference in the setup is the controller (Due vs UNO). The UNO moves the motor and the Due doesn't. I only have the motor attached and nothing else( pins 12,13 and GND)
ribbonman:
I'm running the Blocking sketch from the IDE and can't seem to make the Due move my motor.
I have been running an UNO to double check my connections and using the same Blocking sketch the motor moves as expected.
The driver is a Gecko g203V and states the signal input from the controller can be 2.5V, 3.3V, 5V logic outputs with 2.5mA minimum source drive current.
What am I missing here, the only difference in the setup is the controller (Due vs UNO). The UNO moves the motor and the Due doesn't. I only have the motor attached and nothing else( pins 12,13 and GND)
// Blocking.pde
// -*- mode: C++ -*-
//
// Shows how to use the blocking call runToNewPosition
// Which sets a new target position and then waits until the stepper has
// achieved it.
//
// Copyright (C) 2009 Mike McCauley
// $Id: Blocking.pde,v 1.1 2011/01/05 01:51:01 mikem Exp mikem $
#include <AccelStepper.h>
// Define a stepper and the pins it will use
AccelStepper stepper(AccelStepper::DRIVER, 12, 13 );
void setup()
{
stepper.setMaxSpeed(200.0);
stepper.setAcceleration(100.0);
}
void loop()
{
stepper.runToNewPosition(0);
stepper.runToNewPosition(500);
stepper.runToNewPosition(100);
stepper.runToNewPosition(120);
}
What is your motor?
You are using a stepper motor driver, and your motor only has two connections! ! !
Is the GND and Common on the Gecko, internally connected?
A- and B- are conducting motor current I would assume and should be connected to the GND of the Gecko.
While I was checking current from connection to connection I also hit the reset pin on the Due and the motor started to move. If I power down the Due and then power up I have to hit the reset pin each time to get it to move, once the reset pin has been hit it will run continuously until I power down.
TomGeorge:
Hi,
Can you write a simple bit of code that puts HIGH on pins 12 and 13 on the DUE.
Measure their voltage, with and without the Gecko connected.
This will show if the DUE is able to supply the 2.5mA that the Gecko requires as minimum current.
Pin12 doesn't drop as far because its output is able to supply 15mA if needed.
Pin 13 can only supply 3mA.
If you look at the linked article, it may be worth a try changing your Pin 13 wire to another that is capable of 15mA.
Tom...
I saw that article and printed it off, very helpful, the only problem is that I have an LCD screen that is using pins 8,9,10 so I will have to find another LCD that opens more pins than the one I have.
The spec sheet for the Gecko states a minimum of 2.5mA for signal current, am I just too close on pin 13 for the minimum threshold in your opinion.
ribbonman:
I saw that article and printed it off, very helpful, the only problem is that I have an LCD screen that is using pins 8,9,10 so I will have to find another LCD that opens more pins than the one I have.
The spec sheet for the Gecko states a minimum of 2.5mA for signal current, am I just too close on pin 13 for the minimum threshold in your opinion.
Yes the 3mA is a bit close.
The LCD screen should need very little current, so don't go changing those pins until you try it.
I hope that even though you have got the code working on a UNO, you are writing separate bits of code to check each of your I/O, before combining it all for the DUE.
The DUE is a different animal compared to the UNO.
The LCD screen should need very little current, so don't go changing those pins until you try it.
I hope that even though you have got the code working on a UNO, you are writing separate bits of code to check each of your I/O, before combining it all for the DUE.
The DUE is a different animal compared to the UNO.
Tom...
The drive moves the motor but it seems slower then the UNO was moving it, I also seem to have a problem with having the motor stay put, the code has the motor move to a hall sensor and stop and after the stop and wait a few seconds and then take some extra steps.
I have been making 1 motor move at a time to get the movements right and then will tie them together with the Accelstepper library.
Is the opto-isolated input on the driver the cause of the voltage drop?