Cleaning Things Up: Noisy Signals and Proper Practice

By Robin Mitchell

 

Despite their professional appearance and claims, many modules and circuits distributed by Chinese manufacturers contain issues with noisy signals, improper design, and datasheet violations.

In this DIY Hacking article, we will look at a typical TB6560 CNC driver board to see where manufacturers make mistakes, how to spot these, and how to fix them.

 

CNC Axis Controller Case Study

For a circuit to function, it must be designed and manufactured correctly. A high-speed digital logic circuit may work in simulation but when built in real life, it may not work at all.

One classic example is decoupling capacitors found near IC power supply pins that prevent spikes on the power lines from interfering with the function of the circuit. Famous tech companies (Samsung, Phillips, Apple), will almost always produce products that are heavily tested, contain all the required parts, and of the up most quality.

However, products made from more shady companies (unbranded Chinese eBay sellers), will not necessarily have such high standards or even designers who fully understand the product they have designed. This problem of poor practice is found in almost every unbranded TB6560 CNC Axis controller so let us look at this circuit, understand the faults, and apply the needed fixes.

A generic TB6560 CNC axis stepper. Image courtesy of Amazon

 

I have owned several CNC controllers (all unbranded Chinese models) that are all powered by TB6560 stepper controller ICs. Despite having checked the CNC machine, itself, and the computer the CNC would miss enough steps to result in PCB traces being too thin. Not only did all the controllers miss steps, they would eventually break down and either go off with a bang or just not work at all.

After owning the third controller, it was obvious that the problem had to be with the controllers, themselves. After inspecting the controllers (yes, I kept them all despite all being broken), and doing some research online, it became apparent that whoever designed the controllers was either incompetent or was intentionally being cheap (more on this later).

 

Opto-Isolators and Long Rise/Fall Times

When looking at digital signals, it is important that they conform to timing requirements by the receiver (the device receiving the digital signal), and contain as little noise as possible. The TB6560 controllers all used opto-isolators to isolate the parallel port from the CNC controller so that the parallel port would not be damaged by voltage spikes and accidents.

However, the opt-isolators had a very long fall time which violated the maximum rise/fall time for the step input. This results in the TB6560 missing steps as it cannot fully recognize the step pulses and so this needs to be changed.

 

 

The solution involves connecting the output of the opto-isolators to Schmitt-triggered buffers (such as the 74HC14 or 40106) as this will produce sharp transitions when the output of the opto-isolator crosses the voltage thresholds of the Schmitt trigger.

But there existed an even bigger problem with the opto-isolators: they where not even isolating!

The role of an isolator is to electrically isolate two circuits from each other. However, the designers made the ground on the controller common to the ground on the parallel port by connecting the grounds on both side of the isolator together. This means that the parallel port is still susceptible to noise spikes and large EMFs that can potentially be generated by the controller.

Fixing this issue is next to impossible as all of the electronics are integrated onto a single PCB; therefore, the best solution is to just bypass the opto-isolators entirely or design a custom parallel port isolator that sits in-between the controller and PC.

 

Grounding and Noise

Sometimes, ICs have large ground and/or heat removal pads on their underside which need to be connected. The TB6560 is no different as it has a very large heat dissipation pad on its backside but this heatsink pad should also be grounded as to prevent damage to the IC. However, none of the TB6560 Axis controllers ground this pad and thus, when one of the TB6560 ICs fails, it causes the other TB6560 ICs to fail (if it is a multi-axis board). The solution to this is to take a piece of wire (preferably with a ring) and connect it to the screw or bolt that keeps the TB6560 in contact with the heatsink. The other end of this wire should be connected to a ground point on the main PCB and this prevents voltage spikes being present on the heatsink which can transfer to other TB6560 ICs connected to the same heatsink.

The solution to this is to take a piece of wire (preferably with a ring) and connect it to the screw or bolt that keeps the TB6560 in contact with the heatsink. The other end of this wire should be connected to a ground point on the main PCB and this prevents voltage spikes being present on the heatsink which can transfer to other TB6560 ICs connected to the same heatsink.

 

The TB6560 ICs on this PCB need to have their heatsink grounded as they are all common. Image courtesy of SainSmart

 

But the issues with noise and grounding do not stop here. Even the power lines and ground planes contain either too few or no decoupling capacitors at all!

When circuits switch on and off (such as those found in digital systems), there are brief drops in the supply voltage and these dips can result in unexpected behavior in either the switching circuit itself or other components in the circuit that use the same supply. This is why it is essential to use decoupling capacitors near every IC that can handle the switching noise generate by said IC.

The TB6560 datasheet specifies that the motor power pins should have a fuse, a 47uF capacitor, and a 1uF capacitor. It also specifies decoupling capacitors on the VDD pin as well but many Chinese modules have insufficient decoupling. On top of that, the controllers also combine the power ground PGND (used for the motors) and the signal ground GND (used for internal logic) which should not be done.

Solving this one is difficult but the best thing to do is to put in extra capacitors to ensure that noise is removed as much as possible.

 

Power On/Off Sequence

Many components use a single rail supply (such as the 4000 series) but there are some that have multiple supply rails. The TB6560 has two separate power supply pins; one is for the internal logic and control, while the other is for the stepper motors. The Chinese controllers will typically have a single input voltage supply ranged between 12V and 48V which is then regulated down to 5V. This 5V is used to power the TB6560’s internal logic while the 12-48V input is connected to the TB6560’s motor power supply. However, this is dangerous and every time the circuit is powered there is a chance that the TB6560 will break. This is because the TB6560 has a specific power on sequence that requires the logic power rail (5V) to be present and stable before the motor power is enabled. Luckily, this is very easy to solve using a previous DIY Hacking project; the power on sequencer. Firstly, the voltage input to the controller is completely bypassed with the motor supply and 5V rail being identified. These supplies are then connected to the corresponding relay on the power sequencer so that when the circuit is turned on, the 5V rail is enabled first and then the motor supply is enabled afterwards.

 

The Power Sequence DIY project is great for the TB6560

 

Incorrect External Parts

Many ICs require external parts such as resistors and capacitors to help with internal circuitry. Some common examples of external parts include the control voltage pin on the 555 (which needs a capacitor), reset pins on microcontrollers (that usually require a pull-up resistor), and even Wi-Fi modules that need external crystals or capacitors (to help set oscillating frequencies).

The TB6560 is no different and does have special pins that require specific parts (whose value depends on the configuration). The first pin of interest is the OSC pin which controls the internal PWM frequency that controls the motor circuitry. Many Chinese producers use a 1000pF capacitor but this gives an oscillating frequency of 44kHz.

This, however, leads to several problems with stepper motors including hissing and overheating. By changing the OSC capacitor to 100pF the performance of the controller board is not only improved but faster speeds are attainable and the loss of steps is significantly reduced.

 

Missing Parts

If you pick commercial circuits at random, you are bound to find PCBs that are not entirely populated. This is usually due to redundant parts (i.e., those that are not needed) and components that aided during the prototyping stage.

Unbranded manufacturers, manufacturers, have been known to remove as many components as possible to reduce the cost and these components include decoupling capacitors and protection parts. Therefore, it is imperative that you check for missing components and find out if they are needed.

Many TB6560 based CNC controllers require extra components that are missing on the PCB and so these may need to be included (refer to the datasheet to see if they are required).

 

This PCB is missing quite a few surface mount parts. But is this OK for the design? Image courtesy of 

 

Read More

 

Summary

Buying unbranded cheap parts and circuits is not something to be discouraged because, if they are faulty, it will only take a little engineering to get them working again.

While it may cost you a little of your time, you will find that you save a lot more money and gain valuable experience in diagnosis and repair. However, be careful with higher voltage and current equipment as faults on such circuitry can result in harm and/or death.

Recommended Posts

Leave a Comment

76 − 75 =

Start typing and press Enter to search