Help with project

Hi,
im trying to design a circuit that uses 3 stepper motors and a electromagnet. im a student and ive not done electronics in a while. if anyone has any circuit suggestions or what components to buy that would be great.

from what ive found out so far is that the 20m2 will make a good control chip and ULN2003A for the motor controller. the inputs will be 6 switches as 4 of them will be used to make a joystick. the last two will be used as just a basic button.

if anyone is able to create the circuit you'll be my absolute saviour.

ive been using yenka to try and create the circuit and attached is how far ive gotten with trying to remember how to work circuits.
23140
light in top right is the electromagnet

also im unsure with what values i should really be using.

thank you to anyone who helps even in the smallest amount

kind regards,
Thomas
 
Last edited:
if i have to do a payment for peoples help if you do alot of circuit work its fine as i understand what im asking for help with is alot
 

Technoman

Senior Member
The steppers could be 12V or 5V models. Anyway, it is recommanded to supply separately the microcontroller chip and the steppers.
 
thank you so much and i dont know yet the reason for it being 12v was because of the motor you can get from picaxe is 12v so would i use a relay or something for the stepper motors. but how would i be able to control the stepper motors with the motor controller if they are powered separately
 

hippy

Technical Support
Staff member
how would i be able to control the stepper motors with the motor controller if they are powered separately
You would just remove the 5V to motor wire, replace that with a 12V to motor wire. Everything else would remain the same.
 
The Coursework requires you to make a old claw arcade machine, 4 of the buttons for a joystick and the other 2 one is for the claw button and the other is a cheat button that will cause for the magnet to always be on

it will work sorta like a 3d printer for movement in the x and y
 
Last edited:

depeet

New Member
how would i be able to control the stepper motors with the motor controller if they are powered separately
You dont' have to worry about the voltages. The ULN2003 takes care of that. It "translates" a 5 volt input to whatever voltage (up to 50VDC) a connected load on the output of the ULN2003 needs.

I just drew a little schema how it could look like. The PIC16F1829 is in fact the PICAXE20M2, but without the picaxe software on it. I didn't have time to construct a picaxe with the right pin-labels in Kicad.

I just realize that you want to control 3 stepper motors. I guess a half/full H-bridge like a L293 would be better suited for the job

23145
 
Last edited:
You dont' have to worry about the voltages. The ULN2003 takes care of that. It "translates" a 5 volt input to whatever voltage (up to 50VDC) a connected load on the output of the ULN2003 needs.

I just drew a little schema how it could look like. The PIC16F1829 is in fact the PICAXE20M2, but without the picaxe software on it. I didn't have time to construct a picaxe with the right pin-labels in Kicad.

I just realize that you want to control 3 stepper motors. I guess a half/full H-bridge like a L293 would be better suited for the job

View attachment 23145
yer it needs to be 3 for the xyz axis as well as some how i need to figure out how to connect an electromagnet as well. but a lot of stuff online said just use a transistor
 

hippy

Technical Support
Staff member
I am puzzled by this mention : "Do not use a power supply with the create system - use a 4.5V battery pack instead. " in the voltage regulator section
I believe what that is intending to say is - Don't use a voltage regulator and external PSU with the Create System; use a battery pack instead.

I would guess this is intended to steer those using the Create System away from designing in voltage regulators then needing that external PSU as there can be compliance issues with having any kind of mains connection in self-designed circuits within schools and colleges.
 

Technoman

Senior Member
@hippy "
... compliance issues ...
It's why, at school, for some training boards, we are using AC adapter. The above mentioned circuit diagram in circuit creator could use one, although there is no evidence someone (beginners) could use one.
 

Technoman

Senior Member
Having to drive 3 steppers (3 x 4 = 12 outputs), an electromagnet and 6 buttons to read (6 inputs), the total number of I/O is exceeding the 20M2 capability.

Below few solutions, but depending upon the type of steppers being used.
See the difference between unipolar and bipolar steppers : https://techexplorations.com/blog_the-difference-between-unipolar-and-bipolar-stepper-motors/
 
ok, thank you everyone for all your help i pretty much have the whole circuit planned out now and once ive finished ill post it to get critiqued.

a final check will i require 2 or 3 ULN2003 to drive 3 motors as from what is on the component information its 1 per motor. correct me if im wrong.

i will be using the unipolar stepper motors
23156
 

depeet

New Member
If you use an ULN2803, you can hook up 2 steppermotors. This IC has 8 channels. In case the motors need more then 500mA, you coul tie together 2 neighbouring outputs together and tie together the 2 corresponding input pins. If you do it this way, you will need 3 ULN2803 like shown in the lower right of the schematic that I found on the internet 23157
 
Last edited:
ill most likely use the motor on the picaxe store here: as its easier then for me to buy

12V Unipolar stepper motor. 1.8 step angle.
Mounting holes at 50mm spacing.
Holding torque - 50 gm/cm
Pull-in rate - 320 steps per sec
Coil resistance - 75 ohms
Current per coil - 160mA
 

Technoman

Senior Member
It's OK for the ULN2003 (7 outputs) or ULN2803 (8 outputs) : 1 output is connected to 1 coil. Current per coil is under 500mA.

About the electromagnet, have you more details on it? The choice would depend upon the maximum weight of the objects your arcade claw is supposed to grab.
 

depeet

New Member
160mA per coil. In that case you will be alright with 2 ULN 2803 for 3 steppermotors. You will have 4 outputs spare to activate up to 4 electromagnets.
 
yes i have and ive factored that into the new design i just drew up ( the new switches brings to total input to now 9), it was going to be a way for knowing when it had returned to home to know when to drop the prize. the electromagnet was going to be this https://docs-emea.rs-online.com/webdocs/1581/0900766b81581b3e.pdf

Typical holding force 150N
εD rating 100%
IP Rating 54
Standard operating voltage 12VDC (7393286)
24VDC (7393277)
Current 12V - 180mA
24V - 90mA
Power consumption 2.16W
Ambient working temperature 35ºC

if ive chosen wrong please tell me as im unsure if its going to take all of the power stopping the motors from working.

the project only asked for 100g lift but i want at least 1 or 2 kg due to the hold not being flush on the magnet due to how the claw works.
 
Last edited:
160mA per coil. In that case you will be alright with 2 ULN 2803 for 3 steppermotors. You will have 4 outputs spare to activate up to 4 electromagnets.
im unsure how i would control 3 motors with 2 controllers as the guide material doesn't make it obvious how that would work or how i would programme that
 
final question for the power regulator do i use a 5v regulator ( may seem stupid but not sure if im right in thinking that or do i need a 12v regulator)
 

Technoman

Senior Member
... knowing when it had returned to home ...
Home may be at coordinates X=0 Y=0. State change of end stop limit switches would give that information. That's the way CNC router (computer numerical control ) are commonly working ; first initialized at home position, the number of steps from home are counted to move at the right place.

.. to take all of the power stopping the motors from working.
That won't happen if the battery capacity (in mAh) is large enough to supply that energy for the needed time. See https://www.phonescoop.com/glossary/term.php?gid=194

... 2 controllers ...
Do you really mean two chips? If so, that would be more complicated to program. Can't you use a bigger chip?

... do i use a 5v regulator
Definitely yes, the microcontroller is rated for 5V max and your battery is rated at 12V. As your steppers are rated for 12V they will be connected as in posts #5 or #11.
 

depeet

New Member
This is what I meant with 3 stepper motors and 2 ULN2803. I drew a relay but you have to imagine that this is your electromagnet. As you can see, you will have a few pins too short on your picaxe 20m2 to connect 6 switches. At the bottom you see your voltage regulator with 12V input and 5V output.


23160
 

depeet

New Member
Just to note that the other end of that relay / electromagnet coil should go to +12V ( or other supply rail ) rather than to 0V / GND.
You're right, I'm only human 😊 It was just to show how to connect the ULN's, the motors and the MCU together. I was wondering if a few shiftregisters like 74HC595 and a SPI communication wouldn't be better to reduce the pincount on the Picaxe. I searched for IC's that drive multiple stepper motors, but only found them in TSSOP-footprints
 

techElder

Well-known member
So its a constant loop into the ULN rather than to 0?
Your ULN2803 is pulling the "top" of the relay / electromagnet to 0V / GND. You need the "bottom" to be at a higher potential than 0V / GND so current will flow in the relay / electromagnet when the ULN2803 pulls it LOW.
 
connect 6 switches
its not 6 anymore its 9 as i forgot to add 3 more as a way to set the motors home
see #27 "yes i have and ive factored that into the new design i just drew up ( the new switches brings to total input to now 9"

which is now why im going to use the 28x2
23161
although i think it doesnt have enough when counting the outputs&inputs
9 for inputs
13 for outputs
total
22 pins needed
22/21 pins available ( dont know if serial out will count as an output)

so i might have to use the 40x2
23162
31 pins available

( i dont mind spending more on a chip as long as it works in the end(im not paying for it)) as it needs to be to a high quality finish
 
Last edited:
The GND-symbol of the relay has to be +12V-symbol
this may seem stupid but by connecting to the 12 power rail will not cause a reverse signal into the chip or when the chip sends a signal does it sorta work like a transistor that will turn on the magnet or will it just get confused with 12v going in 2 directions.


or is is just magic that it will work if you do it
 

Technoman

Senior Member
... only found them in TSSOP-footprints.
An old unipolar stepper driver available in DIP package : UCN5804.
As It's hard to find ic (DIP) or breakout board for unipolar steppers why not using bipolar steppers?

Some steppers are able to run as unipolar or bipolar. I don't know if the one you choose is doing that.
 
Top