www.colmac.ie
52
Finally, you may sometimes encounter strange things happening in your programs during either
Debug Live or Run Live such as outputs turning on/off for no apparent reason.
This can be caused by electrical interference generated by the motors during operation. This is a
common problem when motors are being controlled by microcontrollers and is minimised by
attaching a capacitor across the motor connection terminals. This is already done on the PCB with 2
x 100nF ceramic capacitors attached across terminals Q4/Q5 and Q6/Q7 as shown below.
In the event that you still experience these types of issues you can solder a further 100nF capacitor
directly across the terminals of the motor, at the actual motor – they have no polarity so it does not
matter which way around they are connected – an example on a different motor is shown below.
Notice that the cables are also glued to the body of the
motor – this is good practice in order to minimise the chance
of the motor cable connection being damaged through
excessive movement of the cables.