Hi ! This is a really difficult challenge ! A stepper motor seemingly with no Datasheet - bought from a "real" shop ; these steppers have 6 wires (actually 5. 2 of them are soldered together on a mini-board on the side of the stepper) But no sign that which is which .
All the data I have :
on a sticker on it is written : CP-062 950601 110 Ohms SANYO
some mini words written on top of each wire in the mini-board : X O H O
some nonesense ( XD) on the wires : 60 C 20 AWG WONDERFUL CSA TYPE T1 FT1 AWM 80C 300V LL43774
5 wires , one of them is white . rest are black .
I will be using an "L298N" driver for test , they said it supports bipolar .
But for normal I'd like to fabricate a pcb and use a ULN2003APG IC on a fabricated pcb / breadboard - Is that possible ?
And I'd be really grateful if someone would give a hint on how to decide which wire (of the stepper) is what , and how am I supposed to connect it .
And by the way , Do you think this little stepper can be used for a mini pocket ultra small 12x8 cm CNC (laser - I'll be using the ones in DVD writers) ?
If there are 6 wires coming out of the motor the two that are connected need to be separated (to make 6 wires) and then ignored. The remaining 4 wires should be for the two coils. Measure the resistance and you should easily find the correct pairs.
I have no idea what sort of CNC you have in mind so it's impossible to say whether the motor would be suitable.
How much torque do you need?
How many steps per revolution do you need?
How many steps per second do you need?
What is the maximum current the motor can sustain without overheating - bearing in mind that stepper motors are often too hot to touch?
Generally speaking stepper motors work best when driven with a high voltage through a proper stepper motor driver board (such as a Sparkfun Easydriver or a BigEasydriver or a Pololu A4988. Those boards can limit the current so the high voltage does not fry the motor coils.
The L298N (H bridge) would be used for bipolar motors. The ULN2003 would be used with unipolar motors.
Your motor has six solder connections on the motor itself but that is brought out to just five wires. In whatever device you removed it from it was assuredly driven as a unipolar motor -- and that's typical and probably advisable for small stepper motors -- but if you really wanted to you could drive it as a bipolar motor by identifying the common wire and leaving it unconnected.
If you google "28BYJ-48 wiring" (an extremely common, small, unipolar motor) you'll have the details you need to wire up your motor. Looking at your pictures and the soldered connection on the side of the motor it appears that the middle wire is the common wire.
Thanks everyone ! So I guess I'll have to check .
Well , CNC is just the name - the "CNC" I'm planning to build is relatively small (workspace is something like 8 x 12 cm) mostly because I'm a beginner and I know little to nothing about these stuff so I'd just start with something small , mostly because of gaining experience for further projects . I have 2x ULN2003APG ICs that I'll use for this project ... And it uses a salvaged DVD writer laser , body parts are going to be salvaged (workspace is the dvd writer body) and so on .
My main problem is that :
1- I don't want it to be binary - I prefer some sort of app that uses CAD/CAM files
2- I'm a newbie at programming arduino so I want a ready app : I've seen ready apps that use "EasyDriver" and Duemilanove but I suppose using ULN2003 and UNO has different codes , so I should make something that uses same codes . I wonder if there is something like this .
3- I was wondering how should I assemble these ?? Would you recommend workspace would move 1 axis and "laser" in the other or should the workspace move in both axis ? (I do not fancy making a model that laser would move - pretty hard , and , This is such a small thing that would not need all those efforts )
Thanks for helping again !!
Arman5592:
2- I'm a newbie at programming arduino so I want a ready app : I've seen ready apps that use "EasyDriver" and Duemilanove but I suppose using ULN2003 and UNO has different codes , so I should make something that uses same codes . I wonder if there is something like this .
The Stepper library and the AccelStepper library can easily deal with a ULN2003 driver but the problem is that they are not designed to coordinate the moves of multiple motors - for example move motorA through 79 steps in the exact same time it takes motorB to move 193 steps. The alternative is to write your own function to move a motor through a single step and call that as needed - it's not difficult, just a bit tedious.
You will have to provide a great deal more information about the project you are trying to build if you want any useful advice about it. Perhaps a drawing would help.
Well I'm not sure how I'm going to build this - my first idea was that the workspace would move in X and Z , no Y movement , but then I saw that usually one movement (let's say X) is with the workspace - it moves forward / reverse on X , and the laser moves on Y - I was wondering which one would be better ?
I got my idea from "Pocket laser engraver" on Instructables ; he used a driver board called "EasyDriver" , but I've heard codes are different for different drivers , so I need a code for ULN2003 (I don't even have a ULN2003 driver board - just an IC :.) . I don't know if there is any ready code ?
And about drawing , I want to make something similar to "Pocket laser engraver" on INstructables (sorry for not putting links -it's under maintenance at the moment) . I remember he used a ready app , nothing special . I'd be happy if something like this exists for ULN2003 .
By the way , Are UNO and DUEMILANOVE codes different ?
Thanks !!
The Stepper library and the AccelStepper library can easily deal with a ULN2003 driver but the problem is that they are not designed to coordinate the moves of multiple motors - for example move motorA through 79 steps in the exact same time it takes motorB to move 193 steps. The alternative is to write your own function to move a motor through a single step and call that as needed - it's not difficult, just a bit tedious.
So what if I used 2x ULN2003 (I know that each ULN2003 is only for a single stepper) ? Can I do something like that to use "AccelStepper" and "Stepper" library ?
And I guess it's possible to move motors one at a time but still this works : for example it wants to go 5 steps forward and the other motor would go 10 steps forward . First motor A moves into expected X location then it stops . Motor B starts and gets to the desired Z location and the laser beam turns on .
And , Is there any sort of "speed controlling" in these apps ? (without editing the code , everything would just slow down - for example , the laser burns cardboard in 1s so it would just move faster , but when it's burning wood , it would move 3 times slower so it can burn the wood)
Chagrin:
The L298N (H bridge) would be used for bipolar motors. The ULN2003 would be used with unipolar motors.
Your motor has six solder connections on the motor itself but that is brought out to just five wires. In whatever device you removed it from it was assuredly driven as a unipolar motor -- and that's typical and probably advisable for small stepper motors -- but if you really wanted to you could drive it as a bipolar motor by identifying the common wire and leaving it unconnected.
If you google "28BYJ-48 wiring" (an extremely common, small, unipolar motor) you'll have the details you need to wire up your motor. Looking at your pictures and the soldered connection on the side of the motor it appears that the middle wire is the common wire.
Well if I ignore the common wire , then how would I wire it ? I don't understand so just + and - like bipolars are wired up ?
Arman5592:
for example it wants to go 5 steps forward and the other motor would go 10 steps forward . First motor A moves into expected X location then it stops . Motor B starts and gets to the desired Z location and the laser beam turns on .
And , Is there any sort of "speed controlling" in these apps ? (without editing the code , everything would just slow down - for example , the laser burns cardboard in 1s so it would just move faster , but when it's burning wood , it would move 3 times slower so it can burn the wood)
These two paragraphs are seem to contradict each other.
In the first one you seem to be describing a process where the X and Y axes move to their new position with the laser off - and that is certainly quite feasible with the Stepper and AccelStepper libraries.
The second paragraph seems to imply that the laser is burning while the axes are moving. If that is what you want to do then those libraries will not be suitable because every diagonal move will take the shape of an L rather than a \
Well if I ignore the common wire , then how would I wire it ? I don't understand so just + and - like bipolars are wired up ?
Yes, use the 4 wires as a bipolar motor - but there must be two separate common wires and both are ignored.
Well , the laser is supposed to cut lines , so lets say we want to cut a line : The laser is on and the axis is moving . If it wants to cut a dot then the laser is off and axis moves into desired position , then laser turns on , cuts the dot , then turns off . So it should be able to do both . And it would be preferred if it had some sort of "speed control" like real cnc machines , like , when it's "printing" a shape (e.g a square on a piece of wood - it isn't cutting , just engraving so it is sort of printing with laser) it would move fast and wouldn't focus the beam for long . But when it's cutting through something (e.g cardboard) it should concentrate it's beam for something like 2 seconds , so it needs speed control . Although even if it wouldn't have , it wont be a problem , I'd just repeat it .
P.S : I measured the Resistance between stepper motor wires , This is a diagram ;
"A" and "C" is 110 Ohms .
"B" and "C" is 110 Ohms .
"C" and "D" is 110 Ohms .
"E" has no Resistance with any other wire . (Common ?)
So I was wondering how should I wire this ? Does + and - really matter with these motors ? Like lets say A goes + , B goes + , C goes - and D is - (E is ignored to be used as bipolar , with L298N) Is this possible ???
E makes no resistance (perhaps no connection) with the others . C is the one that is 2 (2 wires connected together forming one)
And all I need to know is how am I supposed to wire it , and , if I use ULN2003 (as unipolar) or L298N (as bipolar) , will there be any difference in the codes ?
PS can I use 2 different types of drivers (use motor 1 as bipolar with L298N and motor 2 as unipolar with ULN2003) and give 1 code that works with both ??
PSS Is there any ready app / code for ULN2003 CNC Milling machine ? (2 axis - laser)
Arman5592:
C is the one that is 2 (2 wires connected together forming one)
You need to separate those two wires from each other - then check the resistances again.
And all I need to know is how am I supposed to wire it , and , if I use ULN2003 (as unipolar) or L298N (as bipolar) , will there be any difference in the codes ?
PS can I use 2 different types of drivers (use motor 1 as bipolar with L298N and motor 2 as unipolar with ULN2003) and give 1 code that works with both ??
You need different code to make a bipolar and a unipolar motor make steps. The coils have to be energized in a particular order - and in a different order for the opposite direction. Once you have written a function to cause a step to happen the rest of the code in your project can completely ignore the details and just call the step() function that you have created.
You could certainly use different drivers for the two motors provided you have suitable code for each.
PSS Is there any ready app / code for ULN2003 CNC Milling machine ? (2 axis - laser)
I don't know but my guess is that there is not.
Referring back to the use of AccelStepper - it does not allow you to drive the motors in the synchronized way that is necessary to "draw" curves or diagonals. However once you have figured out the code needed for the function to make the motor move one step you have replaced a large part of the useful capability of AcceStepper. You can probably copy some of the step code from the library - or at least learn from it.
Make sure you are thoroughly familar with the use of millis() and micros(0 for timing using the technique in the Blink Without Delay example sketch.
Start by writing a short sketch just to learn how to make the motors move.
The problem is that by choosing to avoid the "normal" way people make CNC systems you are bringing a lot of extra work on yourself at a time when you seem to be short of the experience needed to handle that extra work.
Well If the coding wouldn't be hard (and wouldn't involve binary) I would put time on it - by the way , how other CNC made by others would be different ?
What are the resistances AB, AD, BD?
AB has no resistance , AD , no resistance and BD no resistance .
I would make it any way others suggests , mostly because I know little to nothing about a CNC . And I haven't done anything yet because of the stepper issue , so I can change my design - how can I make it easier (not very expensive - a miniature CNC (2 axis) with laser) ?
Arman5592:
Well If the coding wouldn't be hard (and wouldn't involve binary) I would put time on it - by the way , how other CNC made by others would be different ?
I would make it any way others suggests , mostly because I know little to nothing about a CNC . And I haven't done anything yet because of the stepper issue , so I can change my design - how can I make it easier (not very expensive - a miniature CNC (2 axis) with laser) ?
This is all a bit like "how long is a piece of string" - especially if you are prepared to consider other motors and driver boards.
I can't think how to give you any practical advice without writing a book about CNC - which I am not competent to write.
I think you need to read more about CNC - perhaps on some of the CNC forums and on the RepRap forum which is about 3D printing but has a lot in common with CNC and may have more in common with your philosophy than the pure CNC forums. Some of the Arduino sotware used for RepRap projects could probably also work for you. There is also a program called GRBL that is used for CNC.
When you have more background knowledge you should find it easier to figure out what would suit your budget and your programming competence.
I came up with a new idea ! I bet it really helps me LEARN through the experience way , And I'd also have a working laser machine (hopefully) without the need of extraordinary parts : a MANNED cutting machine !! I'd use some push buttons and make a laser cutter that needs no app - just cuts on command .