Where the power is coming from? Is this possible that it's just because your power supply is not "strong" enough? AND or the step motor ask more current than the poor L293D can provide?
Where the power is coming from? Is this possible that it's just because your power supply is not "strong" enough? AND or the step motor ask more current than the poor L293D can provide?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Mister-e, thanks for the prompt reply!
The original commercial controller for this stepper uses an Amtel micro, driving an array of 8 transistors. It runs well off a 6v battery, and is pre-programmed for a set speed.
I needed a controller with a slightly different speed, and when I saw the circuit I referred to earlier, I thought that would be ideal. It is meant to be a circuit intended to drive a telescope stepper motor of the kind I have.
I am just using the same motor and the same battery supply the commercial controller used, but substituting this PIC16F627 / L293D circuit to drive the motor. So I know there is adequate power available. The L293D is meant to provide up to 600ma continuous according to the datasheet, but I can only measure a max of 40ma when I put an ammeter on one of the coils. If the motor was overloading the L293D I would expect a greater current?
So, am I using the L293D incorrectly? Is the PIC code (provided on the circuit I referred to earlier) incorrect? It just sends a 6 bit signal to the L293D to excite a pair of coils, pauses for a measured time, then sends another signal for the next pair of coils. Surely that ought to work?
Well, i'm really not a Motor Driver pro... so i would suggest you to increase the pulse length and see if it does anything better.
40mA measurement is not revealant, it's pulse measurement, it give an average of the whole thing, not the peak.. unless you're using something else fancier than a regular DVM.
6 Volts to a regular LM7805 input may cause stability problem, if my memory serves me well, Min Vin should be 'round 9 Volts.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
i find that 293D needs a minimum of 7V for Vs or Vss. this should be sorted out by him first. there should be no issue to supply 8 or 9V and be happy with 7805.
If he can go for low consumption, some Low drop out regulator like LM2931-5 can be used and then 6V might work, but the current demand should be within the regulator spec
Last edited by mvs_sarma; - 25th March 2008 at 20:06.
Regards,
Sarma
TI's datasheet's says that the supply range should be between 4.5 to 36V. If that chip is connected at the regulator output, and the voltage regulator is unstable (wich i don't doubt), there will have a problem indeed. So something to try in meantime, even if i'm not a fan of it... replace the voltage regulator by a diode or two in serie.
Before i would prefer to monitor the voltage regulator output with a scope to see how bad it is...
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
So many comments! Thanks, guys!
The original web-site indicates that this circuit works with the same motors I've got, so I was assuming the components were all reasonably balanced. The regulator (7805) can put out at least 1A, more if it has a decent heatsink. Of course, at the moment nothing gets hot at all!
The lead-acid battery feed is 6.3v, and the regulator drops this to 4.7v. These voltages do not vary under load. So although they are low, they do not seem to be unstable. I am not sure how to raise the voltage feed - given that I have a battery putting out 6.3v, would it be OK to connect it directly to the input without going through a regulator?
As Mister-e suspects, the impression I get from listening to the motor is that I am sending short pulses to it, when I really ought to be feeding each coil power continuously (except when they are meant to be turned off!). Power is sent to the motor by the PIC program, which does this:
...
HSTEP1 EQU B'00110110'
HSTEP2 EQU B'00101000'
....
MOVLW HSTEP1
MOVWF PORTB
CALL RA_DELAY ; variable loop to time pulses
MOVLW HSTEP2
MOVWF PORTB
CALL RA_DELAY ; variable loop to time pulses
...
Then the PORTB outputs from the PIC are attached to the inputs on the L293D, and the outputs from the L293D are attached to the stepper coils. Does this code mean the PORTB outputs remain high during the delay loop, thus keeping the L293D feeding the stepper coil? Or do the PORTB outputs reset to zero immediately after they have passed the data?
You can see why I'm not sure about where the problem might be!
I suspect I should be microstepping anyway, so another line of attack might be to abandon the L293Ds and go for something else which allows many steps. Is there such a thing?
try to increase the delay routine or paste it 2-3 times again to see how better worst it will be.
Something easy like
MOVLW HSTEP1
MOVWF PORTB
CALL RA_DELAY ; variable loop to time pulses
CALL RA_DELAY ; variable loop to time pulses
CALL RA_DELAY ; variable loop to time pulses
MOVLW HSTEP2
MOVWF PORTB
CALL RA_DELAY ; variable loop to time pulses
CALL RA_DELAY ; variable loop to time pulses
CALL RA_DELAY ; variable loop to time pulses
cost nothing to try huh?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks