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.

Need help working with ULN2003A

Status
Not open for further replies.

siti noorzazlina

Newbie level 4
Joined
Aug 28, 2010
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,335
Hi, I would like to know how do you built a code that have three input, let say Input 1, Input 1, Input 3, and Input 4 which correspond to 110, 101, 011 and 111 respectively. Note that 1 indicates 5V and 0 indicates 0V (ground). When the code read 110 (input 1), for example it will output the LED as what the programmer want, in this case 0x03, and also drive the stepper motor one step further. I already built a code but it is not working successfully, I don’t know which one is wrong, either my coding, or connection from PIC to ULN2003A. Can anyone tell me what is wrong? I’m new to ULN2003A. I have not used it before. I just connected it based on this website. Electronics EveryWhere: Stepper Motor Programming

Input 1: PORTB == 0b11000000 will give output 0x03 (LED) and stepper motor will move one step.
Input 2: PORTB == 0b10100000 will give output 0x06 (LED) and stepper motor will move another step.
Input 3: PORTB == 0b01100000 will give output 0x09 (LED) and stepper motor will move another two steps.
Input 4: PORTB == 0b11100000 will give output 0x0C (LED) and stepper motor will move another three steps.

Attached is the code that I am working on.
 

Sorry forget to attach the file.
 

Attachments

  • motor.txt
    761 bytes · Views: 89

You should provide the schematic and the motor type (unipolar or bipolar)
If you have a unipolar motor then it can work with ULN2003 (assuming proper current range).
For bipolar you need two H bridges

Stepper Motor interfacing with Microcontrollers tutorial: Connecting Stepper Motor : 8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes
DC Motor interfacing with Microcontrollers tutorial : 8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes

Alex
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top