Studio of Bill Ooms Computerized Ornamental Lathe

30,346

Circuit Image

Currently, a Gecko G540 drive module is employed to control stepper motors. This module can drive up to four stepper motors, with connections labeled as XYZA. The C-axis stepper will be connected to the A output, while the Y output will remain unconnected. Gecko offers extensive technical information regarding stepper motors in general and their products specifically. It is advisable to download this information, review it, and gain a comprehensive understanding. The driver features the capability of providing 10 micro-steps for each full step of the motor, enhancing the smoothness of operation by a factor of ten. Additionally, it includes an adjustment to smooth motor motion at slow speeds, which is particularly beneficial since the motors are often utilized in this slow range where smooth operation is crucial. According to the specifications, the inputs for connecting limit switches are stated to be 5-volt (TTL) compatible; however, this is inaccurate. The G540 attempts to pull the inputs to 12 volts from an internal supply. Therefore, if limit switches are not open circuit or open collector and cannot withstand higher voltage, additional interface circuitry will be necessary. The G540 also enters a power-saving mode, reducing motor current by 70% after two seconds of idleness. While this feature helps keep motors cool, it may cause a slight "twitch" in the motor when transitioning to a lower holding current, potentially leaving marks in the workpiece. This situation can occur when the cutter is moved into position (e.g., Z-axis) and then begins cutting a pattern, as the Z-axis may remain stationary for some time, prompting the G540 to reduce current to the Z motor. This option cannot be disabled. It is recommended to install a large emergency stop (ESTOP) switch wired to the driver to quickly cut power to the motors in case of an emergency. A collision with the workpiece can not only damage the work but also lead to costly repairs to the XZ stage; a previous incident resulted in approximately $200 in damages due to delayed action on the switch. The four limit switches should be connected to the four inputs of the G540. Mechanical limit switches, optical slot sensors, or open collector sensors can be safely wired to the G540 inputs, provided they can tolerate 12 volts in an open circuit condition. It is advisable to configure the sensors such that a cable break results in a limit error, favoring "normally closed" limit switches that open during a limit situation. For active sensors, a "normally low" output is preferred, which should be open during limit events. If power is needed for active sensors, a 5-volt wall adapter can be sourced. Caution is advised to ensure it functions correctly and delivers the appropriate voltage and polarity. In this case, active sensors not configured as "open collector" were pulled to 5 volts when high. To create an interface with the G540, a circuit was designed to provide a 12-volt tolerant open-collector signal, easily accomplished with a single 74F06 hex inverter. A 5-volt supply was also necessary for the sensors and logic circuit, with components sourced from DigiKey.

The Gecko G540 drive module is a versatile and powerful solution for controlling stepper motors in various applications. Its ability to manage up to four stepper motors allows for complex multi-axis systems, making it suitable for CNC machines and robotics. The labeling of outputs as XYZA simplifies the connection process, enabling straightforward setup for users.

The micro-stepping feature is particularly noteworthy, as it significantly enhances the precision of motor movements. By providing 10 micro-steps for each full step, the G540 ensures smoother transitions and finer control, which is essential in applications requiring high accuracy. This capability is complemented by the adjustable motion smoothing feature, which is critical when operating in slow speed ranges. The ability to maintain smooth operation is vital for achieving high-quality results in tasks such as milling or engraving.

The G540's input specifications indicate 5-volt compatibility for limit switches; however, the actual operation involves a 12-volt pull-up from the internal supply. This discrepancy necessitates careful consideration when selecting limit switches. Users must ensure that the devices employed can withstand the 12-volt input without damage. The recommendation to utilize open collector configurations helps mitigate risks associated with cable breaks, ensuring that the system responds appropriately to limit conditions.

The power-saving feature of the G540, while advantageous for thermal management, introduces potential challenges in maintaining consistent motor performance. The "twitch" experienced during transitions to lower holding currents can affect the quality of work, particularly in stationary operations where precision is paramount. Users must be aware of this characteristic and consider strategies, such as the installation of an emergency stop switch, to safeguard against potential mishaps.

In summary, the Gecko G540 drive module is a robust component for stepper motor control, offering advanced features that enhance performance while requiring careful integration and consideration of system components to ensure optimal operation. Proper wiring of limit switches, understanding of voltage specifications, and implementation of safety measures are critical for maximizing the effectiveness of this drive module in practical applications.I`m currently using a Gecko G540 drive module to drive the stepper motors. This module has the ability to drive up to 4 stepper motors. They label the connections as XYZA - we`ll connect the C-axis stepper to the A output and leave the Y output unconnected. Gecko provides a wealth of technical information about stepper motors in general and their products in particular. Take the time to download their information, read it, and understand it. There are some nice things about this driver. It has the ability to provide 10 micro-steps for every full step of the motor, thus increasing the smoothness of cuts by 10X. It also has an adjustment to smooth the motion of the motor at slow speeds. This works particularly well because we tend to use the motors in this slow range where smoothness is important.

Their spec sheet says the inputs (for connection to the limit switches) are 5-volt (TTL) compatible. This is incorrect! The G540 tries to pull the inputs up to 12 volts from an internal supply. If your limit switches are not open circuit (or open collector able to withstand a higher voltage) then you will need some additional interface circuitry (see below). The G540 automatically goes into a power-saving mode where it reduces the motor current by 70% whenever the motor is idle more than 2 seconds.

On the one hand, this is nice to keep your motors cool. However, there is a slight "twitch" in the motor when it is suddenly switched to a lower holding current. This can leave a line in your cut work. It can easily happen when you move the cutter into the work (Z-axis, for example) and then start cutting a rosette pattern.

The Z-axis won`t move for a while and the G540 "helps" you by reducing the current to the Z motor. You can`t turn off this option. Get yourself a big red ESTOP switch (I found them on eBay) and wire it to the driver. This shuts down power to the motors in a hurry when something goes wrong. Crashing into your work will not only damage the work, but can easily cause expensive damage to the XZ stage. My last "crash" caused about $200 worth of damage (I didn`t hit the switch fast enough). Wire the 4 limit switches to the 4 inputs of the G540. If you have mechanical limit switches, optical slot sensors, or open collector sensors you can wire them safely to the G540 inputs (provided they can tolerate 12 volts on open circuit).

Traditional wisdom is to have the polarity of your sensors so that a broken cable will give you a limit error. Thus, you would want a "normally closed" limit switch that is "open" in the event of a limit situation.

With an active sensor, a "normally low" output is desired and "open" in the limit event. If you need power for your active sensors, look for a 5 volt "wall wart" on eBay. Caution - check that it actually works and gives the correct voltage and polarity! In my case, I had active sensors that were not "open collector" but were pulled to 5 volts when high. The only way I could make an interface to the G540 is with a circuit that presented a 12 volt tolerant open-collector signal to the G540.

This was easily made with a single 74F06 hex inverter (open collector). I also needed a 5 volt supply (black wall wart) for the sensors and logic circuit. The parts were bought from DigiKey. 🔗 External reference