Go Down

Topic: Astronomy with Arduino (Read 3733 times) previous topic - next topic

Ronzi83

Hello guys,

i am new to arduino and stepper motors. I bought from eBay arduino compatible and unipolar motor. My plan is to control it via PC and install motor on focuser of telescope, so i can focus my telescope with stepper motor. I also install Arduino 1.0 for windows (programing), but i have no idea what to do. Plan is to control stepper with speed 1,2 and 3 and backward-forward. Can someone help me on this please ?


Regards

Greg

robtillaart


Hi Greg,

Welcome to the wonderfull world of Arduino. As you are new I would advice spent a evening or two in the tutorial section and work through the samples. You will learn a lot there what is possible and what not.

Furthermore go through the discussions in this subsection and see if there are some that sounds familiar.

Finally the playground may contain interesting articles you can learn from e.g. - http://arduino.cc/playground/Learning/SingleServoExample -

HOpe this helps to get you started, in the meanwhile if there are questions just ask!  Astronomy related items are discussed here too e.g. - http://arduino.cc/forum/index.php?topic=101459.0 -


Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Ronzi83

Hello,

i managed to connect arduino to pc. I got some random code's to try how it work, but than i wanted to stop that code of working so i upload this code that i got on net :

#include <avr/io.h>
#include <avr/wdt.h>

#define Reset_AVR() wdt_enable(WDTO_30MS); while(1) {}

int main(void)
{
Reset_AVR();
}

now my arduino is not responding. Any idea how can i repair this ?


Regards

Greg

robtillaart

SOunds like your arduino is constantly resetting itself,

IIRC you must upload a new sketch and while compiling keep the reset button pressed and let it go when upload starts. You might need to try a few times.

use a minimal sketch like:

Code: [Select]
void setup(){}
void loop(){}


which does nothing forever.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Ronzi83

Thank you, i managed to install another one, just as soon as i plug in usb.

I was thinking something like this : http://www.youtube.com/watch?v=3SzWp0vVAzI

But i am not sure bout code here : http://code.google.com/p/stepperserialcontrol/downloads/list    v2 code.txt, there is also program.

My arduino is connected on right port, but it want move my stepper somehow. When i press sent to motor it blink once asap as i click on that button in program, but motor is still.

My connection is like this :

Let me know if is wrong.

Regards

Greg


Sajuuk

Hello

I would advise looking at this page:
http://arduino.cc/en/Reference/StepperUnipolarCircuit
Specially, the Four pin configuration.
I don't know the pin configuration for the ULN2003 module you are using.
Do you have a schematic for your ULN2003 module ?

A.

Ronzi83

#7
May 10, 2012, 08:52 pm Last Edit: May 10, 2012, 10:49 pm by Ronzi83 Reason: 1
Hey, Sajuuk.

I have 5 wire motor unipolar. I wrote 4 wires by mistake, but is 5.

Here is code, but is only for pin 3 and 12, how can change to pin 8,9,10,11 ?
http://code.google.com/p/stepperserialcontrol/downloads/detail?name=V2%20CODE.txt&can=2&q=

Regards


MarkT

Its probably best not to power the motor from the Arduino's 5V supply, that is a recipe for problems - you're best with a power supply suitable for your motor that goes just to the motor and ULN2003 board.  Common the grounds between Arduino and ULN2003 board.

What are the specs/datasheet of your particular motor?  Particularly the current and winding resistance (or motor voltage).
[ I won't respond to messages, use the forum please ]

Ronzi83

#9
May 10, 2012, 10:57 pm Last Edit: May 10, 2012, 10:59 pm by Ronzi83 Reason: 1
It is 35byj412b LEILI
gear Stepper motor:
Voltage: 12V
Diameter: 28mm
Step angle: 5.625 x 1 / 64
Reduction ratio: 1 / 64
5 Line 4 phase

Stepper motor driver board with ULN2003
A, B, C, D four-phase LED indicates the status of the stepper motor work
Stepper motor with a standard interface, when used directly pluggable.




Sajuuk

Hi Ronzi,
From what I could gather, the "stepperserial" is used to connect the sparkfun easy driver v3, which is for bipolar steppers (4 wire connection).
I don't think this code will work that well(if at all) with your unipolar stepper...

Have you managed to test the stepper ? Make it turn in one way and then the other way ?

If not, I suggest you try to make the connections just like in the unipolar stepper schematic
http://arduino.cc/en/Reference/StepperUnipolarCircuit
and then use the stepper_oneRevolution example from the Arduino IDE to see if it runs.

More informations on steppers you can find here:
http://www.tigoe.net/pcomp/code/circuits/motors/stepper-motors/

Go Up