6 Stepper Motors with 3 ATMega328 Chips- ??

Hi All-

I have recently gotten an artist friend addicted to the Arduino, and she is making a kinetic sculpture. The electronics end of this project is quite simple, with 6 stepper motors moving very slowly. It is ok for these motors to act together in pairs, as opposed to 6 separate movement routines.

Anyway, these are unipolar steppers with a single ULN2004 chip for each.
We have been able to hook up two of these stepper setups to one Arduino.

Now, I am going to be helping her break this out into a large circuit board that we are printing ourselves.

I designed a prototype that is a minimalist Arduino (Voltage regulator plus clock and LED) with the two ULN2004 chips and two steppers, and I was hoping to use that as a UNIT and daisy chain 3 together on one board.

The power supply to the ULN2004 chips is 12V.
I have put a 7805 regulator before each ATMega328, and each also has its own clock. Just picture 3 separate setups sharing the same 12V power and ground.

The question is, is this dangerous/stupid/naive?
Is there a fire hazard?
Should I use a fuse somewhere in the 12V line?

Keep in mind the steppers move slow, the application doesn't require very much torque, and they are never making full rotations.
Also, they don't have to be in-synch with each other.

Thanks for the advice.
Peter

I'd rather use a seperate power supply for the atmega 328

I hear you saying that it would be best to have a wall wart (12V) just for the motors, and separate wall wart (9V maybe) just for the ATMega Chips?

Is this what you mean?
And if so, would you use three 5V regulators, one for each chip, or just ONE total?

Thanks for weighing in on this!

I hear you saying that it would be best to have a wall wart (12V) just for the motors, and separate wall wart (9V maybe) just for the ATMega Chips?

YES
it is better to use a seperate power supply when dealing with MOTORS
manay of the werid problem's are caused by motor's creating noise and having the arduino to reset .

i forgot :wink:

And if so, would you use three 5V regulators, one for each chip, or just ONE total?

one Would be enough

Understood!
Is it acceptable for all three units of the circuit (ATMegas + Motor IC's) to share a ground, or should those be kept separate as well? I am talking about the grounds from the ULN2004 chips.

Thanks so much!

I would use one power supply, but separate regulators - 1 regulator each for the ATMegas, and one regulator each for each pair of steppers.

As long as you have the proper decoupling capacitors for the regulators and ATMegas, you should be fine regarding noise (you really only have to worry about severe noise issues with larger DC brushed motors, where commutator sparking can be an issue - in that case, power supply separation becomes more of an issue).

Since you aren't having a power supply issue right now with a single unit, you likely won't have one with three in parallel; just remember to size the wall-wart for the current draw expected (plus 10-20 percent).

:slight_smile:

It might be useful to experiment with both of your ideas, guys, as there is merit to both.

The question to cr0sh is, do I need a regulator for the motors?
The wall wart is already at 12V, which is what the motors require.

Thanks again.
This is so cool!

And how do I figure out how much current? Does that mean how much current the 6 motors will draw from the 12V wall wart, in addition to whatever the chips need?
This is wall wart output current?

Thanks

It might be useful to experiment with both of your ideas, guys, as there is merit to both.

Sure :smiley:
you rather follow cr0sh :slight_smile:
i have written out of my little experience with these stuff

And how do I figure out how much current?

i guess you have a nultimeter in your backpack :wink: just connect in series and measure the current
( in case you dont have the specs for the motor's you purchased)

As long as you have the proper decoupling capacitors for the regulators and ATMegas

coming to decoupling refer to De-coupling

We have been able to hook up two of these stepper setups to one Arduino.

Since the steppers are turning slowly, you could probably use just one Arduino, with shift registers to expand the number of pins.

You may want to use the ULN2803, rather than the 2004: you get 8 drivers per package, and they’re designed for use with 5V logic. The ULN2x04 is designed for higher input voltages, and may not work as well with an Arduino.

If your steppers are drawing more than about 300mA, you might not be able to drive two of them with a ULN2803, though: in addition to the limit per driver, there’s also a limit for the entire chip, because a DIP can only dissipate a modest amount of heat.

there's also a limit for the entire chip, because a DIP can only dissipate a modest amount of heat.

For a full discussion see:-

http://www.thebox.myzen.co.uk/Tutorial/Power_Examples.html

The question to cr0sh is, do I need a regulator for the motors?

My bad - for some reason I was thinking servos instead of steppers; so as long as the power supply is within the operating voltage of the steppers (and has the current capacity for them), that would be OK without regulators...

:smiley:

Well, she hooked up 3 motors with 3 ULN2004 chips to one arduino last night, and got it to work for a while. Then it just stopped working, but no smoke.
I found out that her 12V wall wart has an output of 100mA, so I upgraded her to one that is good for 1A.
Tonight I guess we will troubleshoot.
Thank so much for all of your help.
I am finalizing the PCB, and I elected to use a single 12V supply with voltage regulators for each of the ATMega328's.

Hopefully with a power supply that is capable of supplying more current, we can get this up and running again.

Does anybody have a guess as to why it stopped working with the 100mA supply? Just out of curiosity...
Thanks

Does anybody have a guess as to why it stopped working with the 100mA supply?

First off test the supply to see that it is the failed component.
Just because there is no smoke, it doesn't mean that the darlington driver chip is fine. A rating of 100mA is very small for a wall wart. With 3 motors and 2 coils on at any one time then then the is only 16mA per coil, not enough to move it. So you must have been hammering the power supply and you burned it out.

Good call Mike.
So, first check the wall wart.
Then test the darlingtons one at a time.

I am guessing it would be pretty hard to kill the 12V stepper motors?

I am guessing it would be pretty hard to kill the 12V stepper motors?

Well the only way is to put too much current down them and as your problem is lack of available current it is unlikely to say the least.

And a terrible fire that will destroy the slum we live in and barbeque my cats will happen because

A) the current coming from the wall wart is too high

or

B) the current coming from the wall wart is too low
?
Thanks

Hello!
This is my first time on the Arduino Forum and working with the Arduino ever, so I am still trying to understand/figure things out.

I am not sure what you guys know about unipolar stepper motors, but I was wondering if you knew if running the motors at certain speed had any sort of negative impact on the motors. I am using the stepper library with my hardware. For example, I was running just one stepper motor at setSpeeds of 15 and 5, and i noticed that the motors are starting to heat up. Is this damaging my motor? Is it going to catch on fire? And are there certain speeds that I should avoid using?

If anyone knows anything about this I would appreciate the help!
Thanks guys!
erin