• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Stepper motor 35BYJ412

Q&A Forum › Stepper motor 35BYJ412
0 Vote Up Vote Down
Philip Borg asked 7 months ago

Hi,

I am trying to run the 12V stepper motor 35BYJ412 but with no success. I am using the driver board ULN2003 supplied with 12V. The program I am using is the one shown below.

The motor vibrates, indicating that it is receiving a signal, but the shaft does not move.

Can you please help?

 

import stepper, time
from time import sleep
# Initialize the stepper motors
stepper_motor1 = stepper.HalfStepMotor.frompins(4, 5, 6, 7)

stepper_motor1.step_until_angle(30)
sleep(0.5)

stepper_motor1.step_until_angle(335)
sleep(0.5)

stepper_motor1.step_until_angle(0)

 

Philip

10 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 7 months ago

Hi.
Are you using a specific example as a reference?
What board are you using?
 
Regards,
Sara

0 Vote Up Vote Down
Philip Borg answered 6 months ago

Hi Sara,
Thank you very much for your prompt reply.
I am using the driver board that comes with the stepper motor 28BYJ-48 (shown on page 306 of your book “Raspberry Pi Pico/Pico W with MicroPython”).
When I connect this stepper motor (changing the supply voltage to 5V) the stepper motor works fine. However when I change the motor to the 35BYJ412 and change the supply voltage to the driver board to 12V the motor just vibrates without moving the shaft.
 
Regards,
Philip

0 Vote Up Vote Down
Sara Santos Staff answered 6 months ago

What kind of external power supply are you using?
Are you connecting the GNDs together (the Pico GND with the power supply GND)?
Regards,
Sara 

0 Vote Up Vote Down
Philip Borg answered 6 months ago

HI,
I have a 240V ac to 5V dc step down power supply feeding the Pico and a  5v dc to 12v dc step up converter, which is feeding the stepper motor driver board.
In order to make sure that there is a positive connection between the ground of the power supply (step up converter) and the ground of the Pico I made a link between the -ve terminal of the 12V side of the converter to the ground point on the Pico.
However this made no change. The motor still vibrates when it should be turning.
 
Regards,
 

-1 Vote Up Vote Down
Sara Santos Staff answered 6 months ago

Hi again.
It’s hard to tell what might be wrong without looking at the circuit.
The most probable scenario is that there is something wrong with the circuit when powering the motor driver.
If you can send me a picture of the circuit that would be better. To send a picture, upload it to Google Drive or Dropbox, or Imgur and then share a link to the file.
 
Regards,
Sara

0 Vote Up Vote Down
Walton Ussery answered 6 months ago

Just a thought but it sounds like the stepper motor and driver may be overloading the 5V to 12V boost converter.
Thanks,
Walton

0 Vote Up Vote Down
Philip Borg answered 6 months ago

Hi Walton,
Thank you for your suggestion, however the voltage booster is rated at 5A. So I do not think that this is the problem.
Hi Sara,
This is the link to the circuit diagram:  https://drive.google.com/file/d/1atGs6nC0gdr7vao2d6xPkKrP8ru3yb6U/view?usp=drive_link
 
Regards,
 

0 Vote Up Vote Down
Philip Borg answered 6 months ago

Hi Sara,
I forgot to add that I changed the program as below to include two types of stepper motors.The 5v motor runs fine while the 12v motor just vibrates.
import stepper, time
from time import sleep
# Initialize the stepper motors
stepper_motor1 = stepper.HalfStepMotor.frompins(2, 3, 4, 5)
stepper_motor2 = stepper.HalfStepMotor.frompins(6, 7, 8, 9)

for i in range (4):
stepper_motor1.step_until_angle(30)
sleep(0.5)

stepper_motor1.step_until_angle(335)
sleep(0.5)

stepper_motor1.step_until_angle(0)
sleep (0.5)

stepper_motor2.step_until_angle(30)
sleep(0.5)

stepper_motor2.step_until_angle(335)
sleep(0.5)

stepper_motor2.step_until_angle(0)
sleep (0.5)
 
 
Regards,
 
 

0 Vote Up Vote Down
Philip Borg answered 6 months ago

Hi Sara,
I solved the problem.
From the way the stepper motor was behaving I suspected that the motor was getting a fluctuating magnetic field rather than a rotating one. I therefore compared the sequence of the wiring of the 12V motor with the sequence of the wiring of the 5V motor and found that they are not in the same sequence. I therefore made an adapter cable between the plug of the motor and the socket on the driver, taking care to arrange the sequence of the wires so that it matches the sequence on the 5V motor when it connects to the socket on the driver board.
The result was that the motor now turns smoothly.
Thank you for assisting me with this problem.
Regards,
Philip

0 Vote Up Vote Down
Sara Santos Staff answered 6 months ago

Great!
I’m glad you solved the issue.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] Learn Raspberry Pi Pico/Pico W with MicroPython eBook – Version 1.2 May 26, 2025
  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.