2 g-shields from 1 arduino?

Home Forums gShield grblShield Support 2 g-shields from 1 arduino?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9268
    dsteury
    Member

    I am looking at upgrading my diy CNC and was interested in putting 2 g-shields in so that six motors could be controlled. (I realize that only 3 control signals can be sent at any given time) My primary interest is in having a dual y-axis, and being able to have a switch for my rotary axis that would allow all motors to always be connected and a simple flip of a switch would allow you to switch from the x-axis to the rotary axis. I attempted to jump all of the wires from one g-shield to another but cannot get the second one to spin. (Obviously all of the wires should not be needed) If I connect 5v and ground from the first g-shield neither of them move. What am I missing? Is there not enough power available on the 5V line to run both g-shields?

    I also was curious if a signal could be sent to the g-shield from a small circuit in order to allow a potentiometer to control speed and the motor to spin indefinitely (like a lathe).

    • This topic was modified 8 years, 10 months ago by dsteury.
    #9272
    dsteury
    Member

    After I posted this question I kept fiddling and found the required connections. I will post the solution here so that if anyone else is looking to do something similar they won’t have to repeat the testing.

    A brief overview of my setup:
    1 x Arduino Uno running GRBL 0.9i
    2 x Synthetos G-Shields
    1 x Homemade CNC with dual Y-axis (2 motors driving the gantry)

    My problem:
    I did not want to buy a tinyg because of the following reasons
    1. I already had the Arduino/G-shield setup
    2. The price of a tinyg is 3x the price of G-shield
    3. I did not want the possibility 4 separate motor signals, just a duplicate of one
    4. I did not want to simply wire the motors in parallel because of the reduced power available and the extra strain on one driver

    My solution:
    Because the G-shield is just 3 DRV8811 being given directions by an Arduino Uno (ATmega328p) it seems that it should be possible to send the same signal from the Arduino to two G-shields and therefore power 2 motors with the same signal using a separate driver for each. (1 on each board)

    The next step was simply to find what pins to connect from the original G-shield to the new one. I had a “dead” Arduino Uno so I removed the ATmega328p from the board and simply used this board to hold the second G-shield. I did not plug any power (USB/DC) into this second board. I simply jumped the 24V from the first board over to the second. I found that if you connect the following pins it is very straight-forward to achieve this.

    1. IOREF
    2. GND
    3. Stepper Enable/Disable (D8)
    4. Direction for axis (D5-D7 : X-Z)
    5. Step Pulse for axis (D2-D4 : X-Z)
    6. +/- 24V-30V Supply

    The direction/step pulse pins only need to be connected for the axis desired.

    As for the second question of my original post; I put on oscilloscope on the step pulse pin for the axis being used and measured the frequency as well as the voltage of the pulse train. I found that a brief 5V signal is sent at a frequency defined in the user settings.

    Theoretical Frequency
    Rate:500mm/min
    Steps/mm:321.5
    500mm/min*321.5steps/mm=160,750steps/min*1min/60sec=2679.17 steps/sec or Hz

    Measured Frequency
    2.677KHz

    As you can see the frequency is able to be calculated. I plan to design a small circuit that will use a potentiometer to vary the frequency of the pulses, thereby circumventing the Arduino altogether and allowing the axis of your choice (the rotary axis in my case) to be rotated indefinitely with no commands or even communication from the computer. I will try to post the schematic here when I design the pulse circuit.

    If you have read this far I hope you find this useful.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.