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 12th July 2008, 11:35 PM   (permalink)
Default

OMG it worked, I just add a call before it repeat it self here is the codes that works.
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
	call	Delay8ofsec
	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
I used this pattern the one u mentioned first
Quote:
Try:
00000101
00000110
00001010
00001001
Ya it worked the problem was as you said it was looping to fast.

Not all of it but the last code when it was repeating there was no delay it was like this

0.125second/step
0.125second/step
0.125second/step
1cycle/step

I add the delay and now it behave 0.125second/step everytimes i can go faster but i will stay like this for a while

I am so happy thanks to yngndrw and mikebit for helping me out i couldn't do it without you guys
__________________
Hesham Ismail Mohammed Sharif
Thank me if you want
uaefame is offline  
Old 12th July 2008, 11:48 PM   (permalink)
Default

Hello eveyone,

My stepper motor is working fine the problem is the LM7805 is getting warm so fast only 12second and it is heating up.

My bipolar motor stat is this 5V, 800mA, 7.5degree/phase. The motor is still not warm but the LM7805 is, anyone suggest me a way to drive the stepper motor without getting the LM7805 warm.

I am scared that LM7805 will burn out? But the spec say it can handle up to 1A? How long can i run the bipolar stepper motor and PIC 16F84a togather using same LM7805.

My plan was to run it for 4.5hours i don't think the battery can hold that long but i will soon replace the battery with 9V adapter. Therefore, how long you think the LM7805 will last?

Thanks in advance

Last edited by uaefame; 12th July 2008 at 11:48 PM. Reason: Grammer
uaefame is offline  
Old 13th July 2008, 12:43 AM   (permalink)
Default

I'm glad it works.

I think the 800mA is per coil - You have two coils. However as you're running the motor using it's voltage rating, chances are it isn't using the full 800mA per coil.

It would be best if you could measure the current. (Measure after the regulator.)

If I remember correctly, the 7805 can only supply 1A if it is attached to a heatsink, are you using one ?

Can you measure the temperature of the 7805 ?
yngndrw is offline  
Old 13th July 2008, 12:15 PM   (permalink)
Default

Feed the motor from the input side of the regulator, it's a bad idea feeding it from the output - and it will get extremely hot very quickly.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 13th July 2008, 02:23 PM   (permalink)
Default

Nigel Goodwin, I am not sure what you mean.

The output of the voltage regulator is 5V and the input is 9V. Bad idea feeding it from the output which is 5V??

I am trying to find a voltage regulator that can handle 2A if anyone find something let me know
__________________
Hesham Ismail Mohammed Sharif
Thank me if you want
uaefame is offline  
Old 13th July 2008, 03:30 PM   (permalink)
Default

Quote:
Originally Posted by uaefame View Post
Nigel Goodwin, I am not sure what you mean.

The output of the voltage regulator is 5V and the input is 9V. Bad idea feeding it from the output which is 5V??
Quite simple, feed the motor from the 9V before the regulator.

I't a bad idea feeding the motor from the regulator output.

Quote:

I am trying to find a voltage regulator that can handle 2A if anyone find something let me know
It will still run red hot, and require a massive heatsink - there's no need to have a regulated feed to the motor.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 13th July 2008, 04:48 PM   (permalink)
Default

I am still cofused the motor requires 5V why i should feed it with 9V??

Can you show me a diagram how will you connect it??

Connecting a 9V to 5V motor sound not fun right!
__________________
Hesham Ismail Mohammed Sharif
Thank me if you want
uaefame is offline  
Old 13th July 2008, 05:42 PM   (permalink)
Default

Nigel: He is using the regulator to feed the motor because there is no current limiting setup.

uaefame: It doesn't sound right, but if you limit the current instead, you have either a PWM or chopper based system. This is the next step as it provides more torque and hence a greater top speed. It also puts you in a position to do microstepping.

I have a large 2V stepper motor which I run from 10V. When I get a proper power supply setup, I will be running it from 24V. It is current limited to ensure that it doesn't overheat.

There is a limit to the max voltage, because of "iron losses" from the high switching speed of the current limiter.

The highest advisable supply voltage is 32 * sqrt( Inductance ), where Inductance is in mH. Another method (Less accurate) is to run the motor upto the rated voltage * 10.
yngndrw is offline  
Old 13th July 2008, 09:32 PM   (permalink)
Default

Wow current limiting seems an interesting topic. I can save alot of money if i know more about it.

If i want to connect directly from 9V battery to Vcc2, it strange right the motor only handle 5V so 4V extra should i include a resistor for that drop? because i think the motor need 800mA per coil and i have 2 coil therefore 1.6A. V=RI therefore R=4/1.6=2.5ohms and the wattage P=VI=1.6*4=6.4W which i can't find easily.

Is my calculation about current limiting true or is there something wrong I did.

Any good website about current limiting is appericated

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

Last edited by uaefame; 13th July 2008 at 09:34 PM. Reason: Grammer
uaefame is offline  
Old 13th July 2008, 10:00 PM   (permalink)
Default

You can do it that way, but you effectivly have the same thing as you are doing now (With the regulator.) - All of the extra energy gets turned to heat which is a waste. The 6.4Watts you are talking about are currently turned to heat inside the regulator which is why it's getting hot.

You need to be using PWM to control the current.

You wanted a site: http://www.cs.uiowa.edu/~jones/step/
It's a big site.
yngndrw is offline  
Old 14th July 2008, 12:29 PM   (permalink)
Default

Quote:
Originally Posted by uaefame View Post
Wow current limiting seems an interesting topic. I can save alot of money if i know more about it.

If i want to connect directly from 9V battery to Vcc2, it strange right the motor only handle 5V so 4V extra should i include a resistor for that drop? because i think the motor need 800mA per coil and i have 2 coil therefore 1.6A. V=RI therefore R=4/1.6=2.5ohms and the wattage P=VI=1.6*4=6.4W which i can't find easily.

Is my calculation about current limiting true or is there something wrong I did.
All you need for current limiting is some series resistors (PWM can be used, but makes life FAR more complicated for you).

But in your case I don't see as it's much of a concern, losses in the driver chip will probably only leave 5V or so for the motor.

Try it and see.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 14th July 2008, 06:50 PM   (permalink)
Default

I connect it directly to the 9V power supply battery amazing it work! I was suprised that it worked do you think sn754410 has anything to do with this?
__________________
Hesham Ismail Mohammed Sharif
Thank me if you want
uaefame is offline  
Old 14th July 2008, 07:25 PM   (permalink)
Default

Maybe, if you want it to last as long as you should, check the temperature of the motor against the maximum temperature in the datasheet. Also check the temperature of the driver chip.

For extra points you can check the current draw of each motor coil against the datasheet.

If you don't care about the life of the motor, you could probably just leave it. Just make sure it doesn't get too hot.
yngndrw is offline  
Old 14th July 2008, 11:17 PM   (permalink)
Default

Quote:
Originally Posted by uaefame View Post
I connect it directly to the 9V power supply battery amazing it work! I was suprised that it worked do you think sn754410 has anything to do with this?
Yes, because you lose so much voltage across it.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 17th July 2008, 11:11 PM   (permalink)
Default

Hello everyone,

I wanted to dervie a stepper motor from angle 22.5 degree till zero and then from zero back to 22.5 degree and do this again and again.

This codes i used for clockwise direction
Code:
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
	call	Delay8ofsec
	goto	main
Q1>What code i should add before 'goto main' to let it move counter clock wise.

What i understand from the cw code
1-00000101
2-00000110
3-00001010
4-00001001

first one nothing will happen or maybe I think a lost in angle or something will be notice
second one 7.5degree will be moved cw
third 15degree will be moved cw measured from orgin
fourh 22.5degree will be moved cw measured from orgin

Q2> How can i prevent the first type of error introduce in case one of clock wise if there is an error?

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

Last edited by uaefame; 17th July 2008 at 11:12 PM. Reason: Grammer
uaefame 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 07:23 AM.


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

eXTReMe Tracker