Telescope drive motors that don't...


Closed Thread
Results 1 to 40 of 69

Hybrid View

  1. #1
    Join Date
    Mar 2008
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    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?

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    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.

  3. #3
    Join Date
    Mar 2008
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    Well, I tried!

    In fact I don't have to double up the delay - it's 130x125, so I just alter the values.

    Making the delay shorter (5x5) results in no movement from the motor at all - but I expected that would be too fast...

    Making the delay longer (250x250) results in slower movement, but with the same low torque. It's just as if the L293D is only sending one pulse to the coil, rather than holding the coil on until the next change occurs. Surely if you:

    MOVLW HSTEP1 ;(hstep1 is FF, for example)
    MOVWF PORTB

    this should leave all PORTB pins high until PORTB is changed? Or perhaps the L293D only sends one pulse to the motor, and I need to increase the current or duration on this in some way?

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Silly question. Do you have the VS pin (pin 10) of the L293D parts connected directly to the battery? Or is it connected to the 5V supply? That pin supplies the voltage that actually drives the motors and should not be going through the regulator.
    Tim Barr

  5. #5
    Join Date
    Mar 2008
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    No, very sensible question!

    The circuit I have assembled is precisely as advertised here: http://telescope.marford.me.uk/Proje...controller.htm .

    You will see that I am using a 16 pin L293D, where VS is pin 8, and this is what is connected directly to the battery positive. So there should be lots of power available to the L293D.

    I think it is unlikely to be a failed L293D either, since the circuit actually contains two PICs driving two seperate L293Ds (with slightly different programming), and both of them display the same problem. This circuit is advertised as a working stepper motor driver, but I am coming to the conclusion that maybe it is not!

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Another silly suggestion. Try turning BOD off. Maybe your regulator isn't rock solid enough and BOD is resetting the PIC. The PIC will run at lower voltages than the BOD is set for. Upper level for BOD is 4.4V. According to the code, portB should be static and not pulsed. If this fixes your problem, maybe you could look for a LVDO regulator only a 400mV drop like a STMicro LD29150.
    Last edited by falingtrea; - 27th March 2008 at 20:51.
    Tim Barr

  7. #7
    Join Date
    Mar 2008
    Posts
    17


    Did you find this post helpful? Yes | No

    Default

    Umm...What's BOD? Are you talking about the regulator? Are you suggesting that I just feed the +5v regulated line from the battery directly, at 6.3V?

    The difference seems to be minimal, and I suspect it will cause no damage, but is that what you mean?

    Incidentally, I have been looking for any possible difference between what I am doing and the published circuit. The only thing I can see is that the regulator is flanked with a couple of 100nf bead capacitors, and I am using 100nf polyester. Interestingly, the data sheet for the 7805 regulator suggests 30mf capacitors, but I am following the published design. Perhaps there is a problem there...?

Similar Threads

  1. MPASM Path & File Name Length Limtation
    By Brian J Walsh in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 14th June 2008, 16:48
  2. Differential Drive Programming
    By shaiqbashir in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 30th December 2006, 15:03
  3. motors browning out PIC
    By mbw123 in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 17th November 2006, 03:50
  4. CD ROM Motors.
    By Dwayne in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th April 2006, 18:59
  5. problems with Servo Motors...
    By saturnX in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2006, 02:43

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts