Supplying Stepper and Arduino with the same power supply

Hello everyone... I'm new on Arduino world and electronics, so I'm sorry if my question is silly..
I'm currently working on stepper motors and I have a problem about powering my project. I'm trying to power the MCU and Stepper with the same supply. But I do not see any movement on the stepper when I power the project. Only some sound comes from the stepper, but it does not rotate. Probably problem occured because I tried to power the whole project from the same supply. But I don't want to use more than 1 power supply. What is the exact problem and the fix? Thank you all in advance... Here is my wiring; (22pF capacitors, 16mhz crystal, 10k resistor, 28BYJ-48 stepper, 5xAA batteries are tried but not enough power)

What are the specifications of the power supply (volts, amps)? Have you connected an LED to pin 13 and ran the blink example to insure that the processor is running? Are you running the mega328 at 16MHz?

Yes, important info that I forgot to give. Power supply is the usb cable that is connected to my computer in this case. 5V. Yes I'm sure that the processor is running. And the crystal is 16 mhz.

Musabaybek:
Power supply is the usb cable that is connected to my computer in this case. 5V.

That is completely unsuitable for powering any motor. You risk overloading and damaging the USB power on your PC.

What sort of stepper motor are you using? If it is one of the small 28BYJ-48 motors then you can power it and the Arduino from a separate 5v power supply with at least a 1 amp capability.

...R

PS ... Please display your image in your post so we can see it without downloading it. See this Simple Image Posting Guide

Thank you for your warning, I won't use the usb of my computer anymore.
Yes, the stepper is 28BYJ-48. My aim is to avoid using more than 1 power supply. It will be awesome if I can use only 1 power supply and power the whole project. And even better if I can use some battery cells that can be found on the market easily, like 9V batteries (rectangular prism shaped battery).

The PP3 style 9v batteries that are used in smoke alarms are completely useless - they cannot provide enough current.

If you want to do some tests with batteries then a pack of 3 x AA alkaline cells (4.5v) should work fine. Connect them to the Arduino GND and 5v pin and connect them also to the GND and 5v connection on the ULN2003 stepper driver.

Please note that the stepper motor in the image in your Original Post is not a 28BYJ-48 and it just confuses the matter.

...R

3xAA alkaline batteries didn't work too, and even 5 of them (7,5V). Maybe the problem is about my wiring?or maybe there is an electronic component is missing?

Musabaybek:
3xAA alkaline batteries didn't work too, and even 5 of them (7,5V).

If you connected up 5 of them to your Arduino you may have damaged it. I specifically said 3.

Maybe the problem is about my wiring?or maybe there is an electronic component is missing?

I can't comment as you have not posted a diagram showing how you have everything connected. Make a simple pencil drawing (NOT FRITZING) and post a photo of the drawing. See this Simple Image Posting Guide

...R

I checked the atmega328, thanks God it is not damaged.
Okay here is the drawing;

Thanks for the drawing. Unfortunately it is missing the labels for the pins the wires are connected to so I can't tell whether the connections are correct.

...R

Sorry, labels are written too.

That seems to me very unhelpful response to my request for a drawing with pin labels. For example my ULN2003 board has names printed on it like IN1, IN2 etc. Doesn't yours?

And my Uno has names like 5v and GND for the power connections - doesn't yours?

Help us to help you.

...R

All integrated circuits have labels starting from 1 up to its maximum pin number, isn't it? I found different labeled pinout documents for the IC's that are used in my project. I thought it is the best way to use these numbers to make the draw obviously understandable. But it's okay here is another drawing. Thank you for your help.

Musabaybek:
All integrated circuits have labels starting from 1 up to its maximum pin number, isn't it? I found different labeled pinout documents for the IC's that are used in my project

Do you mean that you are using the bare ICs for the ULN2003 and the Atmega 328?

If so, why haven't you told us? And there will need to be a lot more stuff connected to the Atmega328 that should also be included in your diagram. The diagram should show everything that is connected and everything clearly labelled. And rather than simply "battery" you need to describe what type of battery.

Are you sure you have the wires between the ULN2003 and the motor in the correct order?

Normally photos of the actual hardware are pretty useless but in this case a photo may help.

...R

Isn't it obvious that I was using bare ICs :cry: What did you want from me is to draw a diagram of whole project, but the Fritzing diagram that I posted at the first time was what you want. I've already drawn bare ICs, the correct order of wires and there is no need to label anything, the pins that are connected to other electronic equipments are visible on the Fritzing picture. There was some missing info but I provided them later.
And yes I'm sure the wires between ULN2003 and the stepper are in correct order.
I didn't want to specify a battery type. It can be any type of battery according to the solution of my problem, what I only want about the type of the battery is to be being easily available on the market.

Musabaybek:
Isn't it obvious that I was using bare ICs

No.

Your first words were "I'm new on Arduino world and electronics". Using bare ICs is not the usual thing for complete beginners. And the word "Arduino" conjures up the image of an Arduino board.

...R

It would be awesome if you didn't look at only my first words. There is also Fritzing photo shows the ICs, wire connections and etc.
Actually it will be better for me to wait someone else for help, thank you for your effort.

Musabaybek:
There is also Fritzing photo shows the ICs, wire connections and etc.

There have been a lot of Fritzing diagrams on this Forum that bore no relationship to what the person was actually doing - especially from people who are "new on Arduino world and electronics". The fact that it showed the wrong sort of stepper motor was another point against its usefulness.

And as stated in your Reply #6 your use 5 x AA cells (7.5v) for a device with a max of 5v seemed to confirm your novice status.

Don't get me wrong, there is nothing wrong with being a novice - we all had to start and we would like to help you succeed. But follow the advice, and provide full information - don't leave us to guess.

I said, in Reply #3 that both the Arduino and 28BYJ-48 can be powered from the same 5v power supply and in Reply #5 I suggested the use of a pack of 3 x AA alkaline cells. I know they work because I have built a project with an Atmega 328 and ULN2003 module and 28BYJ motor.

Then you said that the 3 x AA cells did not work or you - which does not provide any useful information with which to help you.

If we (and not just me) are to help you then you must provide as much information as you can about your project. Problems are usually in the place where you don't think they are. Start with a full schematic diagram showing all the connections.

...R