Go Down

Topic: Due & Gecko drive (Read 954 times) previous topic - next topic

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)

Here's the Gecko manual if you need it.
http://www.geckodrive.com/g203v-rev-7

Robin2

I have heard on other Threads that the output current from a DUE's I/O pin may not be sufficient to operate the stepper driver.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

TomGeorge

#2
Jan 06, 2018, 10:47 am Last Edit: Jan 06, 2018, 10:50 am by TomGeorge
Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Can you post your code please?

Thanks.. Tom.. :)
Everything runs on smoke, let the smoke out, it stops running....

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)

Here's the Gecko manual if you need it.
http://www.geckodrive.com/g203v-rev-7
Blocking sketch from IDE
Code: [Select]

// 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);
}


sketch for wiring,

TomGeorge

#4
Jan 06, 2018, 05:02 pm Last Edit: Jan 06, 2018, 05:25 pm by TomGeorge
Hi,
Ops diagram.

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.

What IDE are you using to program the DUE?

Do you have a DMM?

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

ribbonman

Hi,
Ops diagram.

What is your motor?
You are using a stepper motor driver, and your motor only has two connections! ! !
What IDE are you using to program the DUE?

Do you have a DMM?

Tom... :)
Sorry Tom,
The A-/B- go back to the motor not the Due.

By DMM you mean a digital multimeter? If so I have a small cheap one that will check ohms, voltage and mA.

I have a few motors but have this currently hooked to a 425oz in Bipolar motor(23HS45-4204S).

ribbonman

I just got it to work sort of.

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.

Any thoughts on why I have to hit the reset pin?

ribbonman

I have heard on other Threads that the output current from a DUE's I/O pin may not be sufficient to operate the stepper driver.

...R
It does drive it provided the driver can accept 3.3v signal logic.

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.

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

ribbonman

#9
Jan 07, 2018, 04:25 am Last Edit: Jan 07, 2018, 04:32 am by ribbonman
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.

Tom... :)
Gecko Unconnected - both pins measure 3.31v

Gecko Connected - pin 12 = 2.96v
                               pin 13 = 2.84v

TomGeorge

Hi,
 This will help;

https://www.arduino.cc/en/Hacking/PinMappingSAM3X

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... :)
Everything runs on smoke, let the smoke out, it stops running....

ribbonman

Hi,
 This will help;

https://www.arduino.cc/en/Hacking/PinMappingSAM3X

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.

TomGeorge

#12
Jan 07, 2018, 10:11 pm Last Edit: Jan 07, 2018, 10:11 pm by TomGeorge
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.

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

ribbonman

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.

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?

Go Up