Shop OBEX P1 Docs P2 Docs Learn Events
Fumbling Around With The Parallax Stepper Motor — Parallax Forums

Fumbling Around With The Parallax Stepper Motor

microcontrollerusermicrocontrolleruser Posts: 1,194
edited 2018-11-29 14:25 in BASIC Stamp

Up next is the Parallax Stepper Motor.

Have the ULN2803 IC on the workbench. Ready to go here.

Comments

  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-11-29 14:27

    Do I use power supply voltage to connect to the ULN2803A?

    Using a Stamp Professional board for this experiment.
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-11-29 07:01
    Here's how to run a stepper motor on the Stamp PDP:You use the driver circuit peripheral.
    Q. What is the VIN terminal, and how do I use it?
    A. The VIN terminal is the input voltage to the PDB (usually 12 volts). This can be used to provide a
    high-voltage common for devices like stepper motors that are controlled via the L293D push-pull
    driver.
    CAUTION: Do not connect any VIN terminal directly to any pin of the BASIC Stamp, Javelin
    Stamp, or SX28AC/DP module; doing so will cause damage to or destroy the module. And do
    not connect VIN to any of the VDD or VSS terminals as this may damage the voltage
    regulator of the PDB.
    The purpose of the VIN terminal is to provide +12 volts (the typical input voltage to the PDB)
    to external devices like relays, incandescent lamps, and stepper motors that are control via
    the L293D push-pull driver.

    If I use the the 7.5 volt I will just use the LN2803A on the PDB breadboard like you would with a Homework board or BOE.

    Edit. Motor says 7.5 DEGREES not volts. Has part number will look it up. Maybe it is Parallax 12 volt stepper motor.

    Found Stampworks manual. All lessons in it are for PDB. Has stepper motor lesson with code. Perfect!

  • It's a Parallax stepper motor.

    It has no Parallax label on it with a part number.

    Label says 'Stepping Motor' with this part number PM4222-09

    When you google it you find this.

    http://www.alhekma4u.com/Products/Motors/PM4222/index.htm

    Must have been the supplier to Parallax because he has Parallax diagrams on his website for this stepper motor.

    I had found that out before and just forgot it.
  • GenetixGenetix Posts: 1,754
    edited 2018-11-30 12:38
    microcontrolleruser,

    It's a 12V Stepper Motor so you apply 12V to the +Vmotor pin (#8) of the L293D which is already on the PDB.
    This chip is needed if you use a bipolar stepper motor because you can control the current in both direction across each coil.

    Pin 1 Enables channels 1 and 2, when High.
    Pin 8 provides power to the 4 channels.
    Pin 9 Enables channels 3 and 4, when High.
    Pin 16 powers all the 5V logic in the L293D.
    The D version also has built-in "kickback" diodes since motors are inductive loads.
    Inductive loads can produce voltage spikes that may fry transistors since an inductor does not like to see a changing voltage.
    StampWorks
    ----------
                          ________ ________
              Vdd ---> 1 |EN1     ^      +V| 16 <--- Vdd
               P7 ---> 2 |IN1           IN4| 15 <--- P5
    Phase 4 (YEL) <--- 3 |OUT1    L    OUT4| 14 ---> Phase 2 (ORN)
              Vss ---> 4 |0V      2      0v| 13 <--- Vss
              Vss ---> 5 |0V      9      0v| 12 <--- Vss
    Phase 3 (BRN) <--- 6 |OUT2    3    OUT3| 11 ---> Phase 1 (BLK)
               P6 ---> 7 |IN2     D     IN3| 10 <--- P4
        Vin =+12V ---> 8 |+Vmotor       EN2| 9 <--- Vdd
                         |_________________|
                    Vss ---> Stepper(Common = Red)
    
             X8
             --  ___
     P4 ---> 0  |   |  +V <--- Vin = +12V      _
    Vdd ---> En | P |   0 ---> Phase 1 (Black)  |
     P5 ---> 1  | D |   1 ---> Phase 2 (Orange) |
     P6 ---> 2  | B |   2 ---> Phase 3 (Brown)  |- Stepper Motor (12V Unipolar)
    Vdd ---> En |   |   3 ---> Phase 4 (Yellow) |
     P7 ---> 3  |___| GND ---> Common (Red)    _|
    

    The stepper motor that you have is a unipolar type so the current only goes in one direction and is either flowing or not flowing.
    That is why you can also run this motor with the ULN2803 by putting 12V on the COM pin.
    ULN2803A (8-channel Darlington array) to Stepper Motor                      +12V
                ____ ____                           _                             ^
    P4 ----> 1 |1B  ^  1C| 18 ---> Phase 1 (Black)   |                            |
    P5 ----> 2 |2B  U  2C| 17 ---> Phase 2 (Orange)  |_ Stepper(Common = Red) <---+
    P6 ----> 3 |3B  L  3C| 16 ---> Phase 3 (Brown)   |                            |
    P7 ----> 4 |4B  N  4C| 15 ---> Phase 4 (Yellow) _|                            |
             5 |5B  2  5C| 14                                                     |
             6 |6B  8  6C| 13                                                     |
             7 |7B  0  7C| 12                                                     |
             8 |8B  3  8C| 11                                                     |
    Vss ---> 9 |E   A COM| 10 <---------------------------------------------------+
               |_________|
    
  • I have a PM4222-09. It is a five-wire unipolar stepper. On my stepper the 'red' wire is common which is the wire that you connect to the voltage source. If your wire is not the red one you can find the common wire by measuring resistance. On the PM4222-09 the resistance between the common wire and any other wire will be about 100Ω. The resistance between any other two wires will be about 200Ω or twice the resistance because you're measuring two coils.
    You can find the step sequence with a 9 volt battery. Connect the common wire to +9 volts and then pulse each wire until you find the proper order to make the motor move in the same direction.
    Connecting it to the ULN2803 is the next step. 7.5° means one complete rotation requires 48 steps.

  • Thank you Genetix and Lardom

    Great info. That cleared things up.

    Will put parts together tonight.

    Be a big improvement using PDP with 830 hole breadboard.

    I never use 170 hole ones like on BOE and Homework boards. 400 is as low as I go.


  • microcontrolleruser,

    Those tiny great breadboards are great for a simple circuit but when you start expanding you quickly run out of space.

    Long ago Parallax had another tiny breadboard that plugged into the "AppMod" header near the BS2 on the BOE.

    The bottom of page 154 and the first half of page 155 in StampWorks explain how to determine the correct wiring sequence of an unknown stepper motor.
    The wiring table is on the bottom of page 153 and while Parallax used to provide a Mitsumi stepper motor, the wiring sequence is still the same for that other one.
    I also have that same model of stepper motor as you do and it came with my StampWorks kit.
  • microcontrollerusermicrocontrolleruser Posts: 1,194
    edited 2018-12-01 06:25
    Genetix

    Appmod's are handy.

    Never got a Stampworks or the set of Stamps in a plastic case.

    Will get PDB out and survey the situation.

    Tomorrow will have a Stamp 2 to keep on the PDB all the time. Peeling it off a duplicate BOE.

    That reminds me. Have to get that HVW/Solarbotics Stamp Stack BS2p24 board running.

    That is a cool little board!

  • Okay. The Stamp Stack works fine.

    Connected it to Windows 7 system with Asus motherboard with hardware serial and parallel ports.

    The Stack does not play well with Parallax Serial to USB and the USB drivers at Solarbotics for it son't work.

    Will work on stepper motor a little tonight and tomorrow morning.
  • GenetixGenetix Posts: 1,754
    edited 2018-12-01 06:51
    microcontrolleruser,

    The Stamp Stack appears to be a BS2 OEM in a different layout.

    I have a BS2 OEM that an old boss gave me.

    I would suggest that you check all the solder connections because the OEM uses the same serial circuit as the BASIC Stamp serial boards.
    I have used my Serial HomeWork board dozens of times with a USB to Serial adapter without an issue.

    Do you have a real Parallel USB to Serial adapter or a clone and does it work on other serial boards?
    Be sure that you have the latest drivers installed.

  • Genetix

    Will try it again.

    Yes. It is a Parallax adapter and it works fine with every other Parallax board we have including Stamp PDB.

    It may show same on schematic but there may be other factors at work like component substitution and peripherals on board.

    Working on one system is fine for the amount of use it gets but will try Parallax and Startech serial adapters again.

    I loaded a BS2p program in Editor this time. I might not have been doing it before.

    I would just connect it up and run identify.Maybe that is the difference?

  • microcontrolleruser,

    The fact that it works with a serial port but not a USB adapter makes me think that there is a bad connection in the Serial circuit.

    Try checking all the solder joints, check the PCB for cracks, and check for missing components.
  • Genetix wrote: »
    microcontrolleruser,

    The fact that it works with a serial port but not a USB adapter makes me think that there is a bad connection in the Serial circuit.

    Try checking all the solder joints, check the PCB for cracks, and check for missing components.

    We covered this in another thread:
    https://forums.parallax.com/discussion/165854/stamp-stack-2p-experimenters-board/p1

    Could not get the USB drivers to work. We have standard serial connectors, so they work fine. At least mine still does.
  • Publison,

    The earlier versions of the Stamp Stack that came up in Yahoo were BS2 OEM-based and they still sell that version.

    I see that the USB is obsolete and there must have been changes to the driver or its configuration files.

    Have you tried using a USB to Serial converter with it?
  • Genetix wrote: »
    Publison,

    The earlier versions of the Stamp Stack that came up in Yahoo were BS2 OEM-based and they still sell that version.

    I see that the USB is obsolete and there must have been changes to the driver or its configuration files.

    Have you tried using a USB to Serial converter with it?

    USB drivers were from Windows 2000. Could not find anything newer. Have not tried USB to Serial converter since I have native serial ports, but may be good to try for giggles.

  • "Have you tried using a USB to Serial converter with it?"

    Yes. Editor not recognizing BS2p24.

    My one big thought is to try HVW USB driver on Windows XP.

    They are referred to in manual for the board.

    This project will have to wait it's turn though.

    Have to wrap up keypad and start stepper motor ones first.



  • microcontrolleruser,

    I think you should avoid using the Stamp Stack for until you are more familiar with the BS2.
    The BS2p is a more advanced version of the BS2 so code that wasn't written for it may need to be modified.
    The BS2p is faster than the BS2 so many of the time dependent commands will have to have their values adjusted.

    If you happen to contact Solarbotics again, ask for a schematic.

  • Thank you Genetix

    Good advice!

    Will see if I can get the Stamp 2 module from the spare BOE on the PDB tonight.

    Also start connecting up the stepper motor.

Sign In or Register to comment.