Go Down

Topic: Due , Gecko drive, large stepper causing EMF? (Read 933 times) previous topic - next topic

ribbonman

I just bought a Due for a stepper program so I could make the stepper run faster and have a problem with getting all the code to work together.

I posted my problem in the programming thread because I thought my problem was code related but upon further investigation I find it isn't a code problem but a hardware problem.

Each part of my code runs exactly as written if I run just 1 thing at a time but when I incorporate them together things go wrong. I have a hall sensor and the aforementioned Gecko drive(203V) and a 960oz in stepper motor(7A 1.55V) that I'm trying to turn 4 times and then stop. The hall counter works as coded when it is connected to the Due but when I connect the Gecko and stepper the hall counter begins to count even though the magnet doesn't pass over it(I watched the count go with the serial window open). The problem didn't occur when I was using a UNO, or at least I didn't think it did but never watched it with a serial window on with everything connected.

I didn't want to start another thread but I thought I would ask if anyone had a similar problem with the Due on the Due thread because it seems to be more of a Due problem than a programming problem.

Here is the other thread and sorry for starting multiple threads.
http://forum.arduino.cc/index.php?topic=518445.15

ard_newbie

#1
Jan 18, 2018, 03:48 pm Last Edit: Jan 18, 2018, 03:52 pm by ard_newbie

A few thoughts:

Why did you choose A0 for staplerSensor since you use it as a digital pin, I guess you have lots of free digital pins ?

Lots of your variables are boolean, IMO your code would be more readable if you declared theme as boolean.

ribbonman

A few thoughts:

Why did you choose A0 for staplerSensor since you use it as a digital pin, I guess you have lots of free digital pins ?

Lots of your variables are boolean, IMO your code would be more readable if you declared theme as boolean.

The original code was written for an UNO and I ran out of digital pins and read where I could use A0 as a digital pin for the digital hall sensor, I have changed to a digital pin with the DUE.

I'm pretty new to coding and the examples I based my code on didn't use boolean, do you mean more readable for you or more readable for the controller?

ard_newbie


More readable for me  :)

How do you power your Geko drive and stepper motor ?

ribbonman

More readable for me  :)

How do you power your Geko drive and stepper motor ?
I looked for useful tutorials on using boolean but haven't seen one yet, I will keep looking.

I have a 40V 10A regulated PSU from Meanwell, everything turns properly when using it without the hall sensor.

The GND's for Dir & Step are all tied together with the GND from the controller, not sure if that is causing problems?

Go Up