Go Down

Topic: Problems Powering a Low Voltage Bipolar Stepper with UNO R3 (Read 197 times) previous topic - next topic

talbright

Hello Everyone,

This is my first time on the forums, so if you have any tips on ways I could more effectively communicate my issues/questions please let me know! Fair warning: If my descriptions seem vague or unclear it is probably due to the fact that my understanding of those components/functions is also unclear.  Hopefully I can stumble my way through this, so here we go..

I wanted to build an automatic food dispenser like the cheap plastic ones you see at Petsmart.  My idea was to build a hopper that funnels food into an auger driven by an electric motor.  After doing some research, I read that BIPOLAR stepper motors generally provide more torque.  So I purchased this motor:

https://www.amazon.com/gp/product/B00PNEQ79Q/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1

I purchased this motor because I thought its voltage rating would be close enough to the 3.3V port on the UNO R3 to function properly (first rookie mistake). The other components I used in my project were the LCD1602 provided in my starter kit, 3 pushbuttons, an H-Bridge (L293D), and the other supplemental components required to operate the first three devices. I created a schematic using Fritzing and attached a screenshot to this post.  This was my first time using Fritzing so I apologize for how disgusting it probably looks to you all. I also attached the code I wrote to control the system.  I realized after typing out the ungodly if statements that I should have used switch case, but it works so I am cool with it.

To power the system, I purchased a DC adapter that operates at 9V and 1.0 A. I am powering the L293D logic with the 5V port and also powering the LCD with the same 5V port.  I have the 3.3 V output port powering the Motor Voltage Input on the L293D.

So the issue that I am having is with the stepper.  The stepper only rotates at set speeds of 80 - 110 rpm.  Any lower than 80: It just vibrates.  Any higher than 110: It just vibrates. In that range however, it rotates fine SOMETIMES. However, other times it does some odd things:

1. If I apply resistance to the rotation, it will REVERSE direction
2. Sometimes it gets "stuck"
3. After it gets "stuck", the next time it tries to rotate it goes in the REVERSE direction

Now after looking deeper into the hardware, I realized a couple things:

1. The L293D "likes" motor input voltages over 4.5V
2. The current supplied by the 3.3V output of the arduino is like 50 mA
3. I really don't know as much as I thought about electronics...

So what I am thinking is that the H-Bridge is not outputting enough amperage to the bipolar windings.  I tried measuring this across the windings, but the measurement was bouncing around.  The upper value of the range was only like 1 mA though, so I think this is the problem.

A potential solution I am exploring is to change my Motor Voltage Input from the 3.3V port directly to the DC ADAPTER by connecting to the bottom of the Arduino power input port.  This would give my H-Bridge a higher voltage to work with (which is well within its operating range that it likes), and a larger/steadier current supply.  Since the motor will only be operating once every 7 hours for less than 5 seconds, I don't think the motor will overheat but once again I am probably making a rookie mistake.

Does anyone have any suggestions? If you would like to see the Fritzing file shoot me a message.

Thank you for your time!!

PaulS

Quote
Does anyone have any suggestions?
You bet. Get a real stepper motor driver, and donate the L293D to a museum.
The art of getting good answers lies in asking good questions.

MarkT

I wanted to build an automatic food dispenser like the cheap plastic ones you see at Petsmart.  My idea was to build a hopper that funnels food into an auger driven by an electric motor.  After doing some research, I read that BIPOLAR stepper motors generally provide more torque.  So I purchased this motor:

https://www.amazon.com/gp/product/B00PNEQ79Q/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1

I purchased this motor because I thought its voltage rating would be close enough to the 3.3V port on the UNO R3 to function properly (first rookie mistake). The other components I used in my project were the LCD1602 provided in my starter kit, 3 pushbuttons, an H-Bridge (L293D), and the other supplemental components required to operate the first three devices. I created a schematic using Fritzing and attached a screenshot to this post.  This was my first time using Fritzing so I apologize for how disgusting it probably looks to you all. I also attached the code I wrote to control the system.  I realized after typing out the ungodly if statements that I should have used switch case, but it works so I am cool with it.

To power the system, I purchased a DC adapter that operates at 9V and 1.0 A. I am powering the L293D logic with the 5V port and also powering the LCD with the same 5V port.  I have the 3.3 V output port powering the Motor Voltage Input on the L293D.
1) Stepper motors don't have a voltage, just a current rating.
2) The 3.3V output is rated for small currents only, a few 100mA or so probably.
3) Get a stepper driver to drive a stepper, not a DC motor driver.  The DRV8825 modules are cheap
and powerful enough for 1A motors.  The L293D is inappropriate.
4) That supply will probably work, you'll get more speed with a higher voltage supply.  The current into
a stepper driver is typically less than it supplies to the motor.
5) Use AccelStepper library in the first instance, its easy to driver stepper driver chips with it.
6) Stepper motors are always-on.  They cannot hold position powered down.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

talbright

Thank you for your help!  I didn't understand that the L293D was meant for DC applications.  I guess that makes sense for the ease of reversing polarity.  I ordered a stepper driver, I will rewrite my code using the AccelStepper library, and I will see what happens.

For the future: Do you think it would be wiser to use a DC motor for this application?  I am a little concerned that with the LCD and stepper constantly running, I will be consuming quite a bit of power.  I have considered adding a "sleep" function to my LCD, but being a newb it would take me a while lol.

But anyways,  thanks a bunch for the help!!

 

PaulS

Quote
For the future: Do you think it would be wiser to use a DC motor for this application?
Yes. I do not see the need for accurate positioning of the auger.
The art of getting good answers lies in asking good questions.

Go Up