Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
LinkBack Thread Tools Display Modes
Old 11th July 2008, 09:46 PM   (permalink)
Wink Stepper motor

This is my schematic that i am using to drive a bipolar stepper motor. The thing is i want to know what wrong with it?

Here is the connection:Electronic Circuits Projects Diagrams Free - uaefame's Album: Circuits - Picture

Q1> Do i need to connect a 10k resistor between the 16F84a and sn754410 pins 2,7,9 and 15 or leave it as it is?

Q2> I am using same power source for Vcc1 and Vcc2 does it matter because the pic need 5V and the stepper need 5V same volt why get a new power source?

Q3> The motor behavior is strange going back and forth, its strange if you spot any mistake in the schematic let me know?

Thanks in advance
__________________
Hesham Ismail Mohammed Sharif
Thank me if you want
uaefame is offline  
Old 11th July 2008, 10:08 PM   (permalink)
Default

Try adding more DC filtering around VCC2.
Mikebits is offline  
Old 11th July 2008, 10:22 PM   (permalink)
Default

What does that suppose to do dc filtering?

Do you mean i add capacitor or something?
__________________
Hesham Ismail Mohammed Sharif
Thank me if you want
uaefame is offline  
Old 11th July 2008, 10:34 PM   (permalink)
Default

Yeah, caps. I would add a 10uf cap right at the reg output. I would also put a .01 cap near the PIC power pin. And caps around the VCC1 and 2 pins. DC supply noise causes erratic behavior. It is just good practice to use good DC filtering.
Mikebits is offline  
Old 11th July 2008, 10:37 PM   (permalink)
Default

This link looks useful.
Interface to a motor controller
Mikebits is offline  
Old 12th July 2008, 05:54 PM   (permalink)
Default

Do you mean i connect between VCC2 and ground a capacitor of 10 or 0.01uF. Same goes to the VCC1 and ground another 0.01 or `10 uF.

Q1> Is this the proper way to connect them?

At the output of the voltage regulator and pic power supply there are alreay capacitor there.

I already did this but nothing work still same problem? Did i understand dc filtering wrong?

Thanks in advance
__________________
Hesham Ismail Mohammed Sharif
Thank me if you want

Last edited by uaefame; 12th July 2008 at 05:59 PM.
uaefame is offline  
Old 12th July 2008, 08:05 PM   (permalink)
Default

I just noticed something, why are you not connecting the enable pins. They should not be floating.
Mikebits is offline  
Old 12th July 2008, 08:33 PM   (permalink)
Default

Yes, enable pins need to be tied to VCC1 via a 10k resistor.

You also don't seem to be implementing any current limiting - If you use a higher voltage than the motor's rated voltage (About 10x higher max !) and limit the current to the rated current for the motor you will get much more torque.

The only reason my stepper motors oscillate around the same point are because I've reached the torque limit. Remember that as speed goes up, torque goes down for a stepper motor.

You might also want to think about adding some protection diodes to the outputs, depending on the size of your motor. (The driver already has some.)

Last edited by yngndrw; 12th July 2008 at 08:34 PM.
yngndrw is offline  
Old 12th July 2008, 09:21 PM   (permalink)
Default

Here is my additions to the previous circuit after taking into consideration yngdrw and mikebits suggestions. Still the motor osicilates in the same place. The only thing i didn't add until now is diodes as mentioined yngdrw and in sn754410 there are internal diodes but adding more diodes will not hurt for the time being i will stick without diode.

Here is my Electronic Circuits Projects Diagrams Free - uaefame's Album: Circuits - Picture

Sorry for my poor knowledge in electrical but with ur helps, I can one day help as may as i can maybe to you guys as well because i have strong (solid) knowlege in other fields.

Any suggestion is welcomed and will be looked into it.

Thanks in advance
__________________
Hesham Ismail Mohammed Sharif
Thank me if you want

Last edited by uaefame; 12th July 2008 at 09:22 PM. Reason: Grammer
uaefame is offline  
Old 12th July 2008, 09:32 PM   (permalink)
Default

You only need one resisotr for the enable pins. Tie both enable pins together then use a single 10k resistor to VCC1.

Double check that the motor coils are connected as you expect them to be.

Post the code that you're using on your PIC, maybe that is wrong ?

Do you have any load on the motor ?
yngndrw is offline  
Old 12th July 2008, 10:03 PM   (permalink)
Default

Perhaps your stepper needs more current than your regulator can supply. Have you measured your supply voltages? Maybe as a test, you can run VCC2 from seperate supply.
Mikebits is offline  
Old 12th July 2008, 10:04 PM   (permalink)
Default

Thanks yngndrw,

1) I removed the extra resistor 10K and i connected it as you told me hereElectronic Circuits Projects Diagrams Free - uaefame's Album: Circuits - Picture

2)The motor coil is fine i double check it again and again

3)The codes are here
Code:
LIST	P=PIC16F84A
	#INCLUDE "P16F84A.INC"
	__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC
	errorlevel -302

	cblock	0x0c
	d1,d2,d3
	endc

	org	0
init
	banksel	TRISA		;bank 1
	clrf	TRISA
	clrf	TRISB
	banksel	PORTB		;bank 0
	clrf	PORTB
main	movlw	b'00000001'
	movwf	PORTB
	call	Delay8ofsec
	movlw	b'00000100'
	movwf	PORTB
	call	Delay8ofsec
	movlw	b'00000010'
	movwf	PORTB
	call	Delay8ofsec
	movlw	b'00001000'
	movwf	PORTB
	goto	main

Delay8ofsec
			;124993 cycles
	movlw	0xA6
	movwf	d1
	movlw	0x62
	movwf	d2
Delay8ofsec_0
	decfsz	d1, f
	goto	$+2
	decfsz	d2, f
	goto	Delay8ofsec_0

			;3 cycles
	goto	$+1
	nop

			;4 cycles (including call)
	return



	end
4) Nothing is connected to the stepper motor in term of loads

I wish these information can help you figure what wrong

Thanks in advance
__________________
Hesham Ismail Mohammed Sharif
Thank me if you want
uaefame is offline  
Old 12th July 2008, 10:33 PM   (permalink)
Default

Ah, you only have one coil energised at a time. Because of the driver IC and that fact that the enable pins are not used, this means that the second coil acts as a break.

Try:
00000101
00000110
00001010
00001001

I think that's the reason anyway.

Last edited by yngndrw; 12th July 2008 at 10:33 PM.
yngndrw is offline  
Old 12th July 2008, 10:44 PM   (permalink)
Default

Hello yngndrw,

I did as you said but the problem still the same moving back and forth

Here are the updated codes
Code:
LIST	P=PIC16F84A
	#INCLUDE "P16F84A.INC"
	__CONFIG _CP_OFF & _WDT_OFF & _PWRTE_ON & _XT_OSC
	errorlevel -302

	cblock	0x0c
	d1,d2,d3
	endc

	org	0
init
	banksel	TRISA		;bank 1
	clrf	TRISA
	clrf	TRISB
	banksel	PORTB		;bank 0
	clrf	PORTB
main	movlw	b'00000101'
	movwf	PORTB
	call	Delay8ofsec
	movlw	b'00000110'
	movwf	PORTB
	call	Delay8ofsec
	movlw	b'00001010'
	movwf	PORTB
	call	Delay8ofsec
	movlw	b'00001001'
	movwf	PORTB
	goto	main

Delay8ofsec
			;124993 cycles
	movlw	0xA6
	movwf	d1
	movlw	0x62
	movwf	d2
Delay8ofsec_0
	decfsz	d1, f
	goto	$+2
	decfsz	d2, f
	goto	Delay8ofsec_0

			;3 cycles
	goto	$+1
	nop

			;4 cycles (including call)
	return



	end
Thanks in advance for any suggestion
__________________
Hesham Ismail Mohammed Sharif
Thank me if you want
uaefame is offline  
Old 12th July 2008, 11:00 PM   (permalink)
Default

Maybe I got the order wrong, try:
00000101
00000110
00001001
00001010
(Swapped the last two lines.)

How long is the delay ? (I'm not an asm person...) Try using a very slow delay if you're using a fast one - It may be too fast. (0.5 seconds, etc.) You could also make it only step on when a button is pressed - Then you can check all of the outputs with a multimeter.

Last edited by yngndrw; 12th July 2008 at 11:01 PM.
yngndrw is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
stepper motor or Torque motor yagtoby Electronic Projects Design/Ideas/Reviews 1 14th June 2008 05:29 PM
Stepper Motor Vs DC Motor for wheels AceOfHearts Robotics Chat 5 25th May 2008 04:16 PM
stepper motor mayassn Electronic Projects Design/Ideas/Reviews 2 9th April 2008 09:21 PM
Stepper Motor watzmann Robotics Chat 20 9th April 2005 08:49 AM
stepper motor jim bro Electronic Projects Design/Ideas/Reviews 0 26th May 2003 09:54 PM



All times are GMT. The time now is 06:18 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

eXTReMe Tracker