Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to control stepper motor rotation using voltage

Status
Not open for further replies.

drmius

Newbie level 6
Joined
Jan 8, 2018
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
134
Hello all,

I have designed a voltmeter circuit to measure 0 to 5V. I want to display the output on analog display that is, using dial display. For this I plan to use stepper motor to move pointer to correct position. The setup looks as shown in image: x25 motor.jpg. I have written a program to rotate the motor depending on the voltage measured. It doesn't show any error in compilation but when I try to execute the pointer does not move as it should. I have checked voltmeter circuit and it is fine.

The code snippet is attached hereView attachment program.pdfView attachment program.pdfx25 motor.jpg.

Regards
Srinidhi
 

The stepper pulse pattern doesn't seem to match the hardware configuration (motor connected by 3 wires). Show your circuit schematic and motor datasheet.
 

Indeed, the software seems to output 4 unipolar signals which would require 5 connections to the motor (4 + supply) so how do you have it wired with only 3?

Brian.
 

The stepper pulse pattern doesn't seem to match the hardware configuration (motor connected by 3 wires). Show your circuit schematic and motor datasheet.

Below attached is the circuit schematic. Output of voltage divider is given to an ADC pin of Atmega16. stepper motor is connected to micro-controller via L293D motor driver.Voltmeter 2.jpg
 

Hi,

Your circuit:

GND symbols aren't expensive. Use them to avoid lengthy GND wiring...this makes the whole circuit more easy to read.

Klaus
 

Let me put it this way: The circuit schematic (controlling 3 of 4 L293 outputs with connected bipolar stepper motor) neither fits the code (controlling 4 outputs PB1 - PB4) nor the stepper motor photo.

What did you actually test?
 

Stepper motors have more than three wires: your photo shows only three wires.

I do not know how L293 is being used as a stepper motor driver.

Is your motor BLDC type? Then you will need motors with Hall sensors or encoders...
 

I referred to the following webpage for interfacing stepper motor, l293d and amicro-controller: **broken link removed**
Not exactly. There's one phase missing in your schematic and the code is accessing the wrong port bits, PB1 - PB4 instead of PB0 - PB3. Also the 3 wire stepper motor photo seems confusing. Is it actually a 3-phase motor (very unusual, but possible)?
 

The motor puzzles me too. Note that the shaft is off center, that usually means there is a gearing mechanism inside it. It certainly doesn't look like a stepper motor and if it is a 3-phase AC motor I've never seen one so small and I can't think of a practical application for one that size.

Drmius, can you show us more information about the motor or at least upload a picture of the other side showing any markings on the connections.

Brian.
 

The motor puzzles me too. Note that the shaft is off center, that usually means there is a gearing mechanism inside it. It certainly doesn't look like a stepper motor and if it is a 3-phase AC motor I've never seen one so small and I can't think of a practical application for one that size.

Drmius, can you show us more information about the motor or at least upload a picture of the other side showing any markings on the connections.

Brian.

Below attached is the datasheet on X-25 motor. Basically these are stepper motors used by GM for instrument Clusters.
 

Attachments

  • junken 27.pdf
    1,021.4 KB · Views: 133

That explains what it is but not why you only have three connections to it when it needs four.

Beware of visiting Junken's web site, it pops up a "Windows Defender" virus alert and warns me not to shut my computer down and to call a support phone number immediately. The funny thing is - I use Linux!

Brian.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top