Silicon Chip180-230V DC Motor Speed Controller - July 2024 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Jamieson 'Jim' Rowe is retiring
  4. Feature: Repairable Electronics by Dr David Maddison, VK3DSM
  5. Project: Automatic LQ Meter by Charles Kosina
  6. Review: The Raspberry Pi 5 by Tim Blythman
  7. Project: 180-230V DC Motor Speed Controller by John Clarke
  8. Project: New use for Mains Sequencer by John Clarke
  9. Feature: Adding solar charging to a van by Roderick Boswell
  10. Project: Lava Lamp Display by Tim Blythman
  11. Project: Digital Compass by Tim Blythman
  12. Project: Workman 1kW Loudspeaker by Allan Linton-Smith
  13. Vintage Radio: One-valve superhet radio by Fred Lever
  14. Serviceman's Log: Computer abuse by Dave Thompson
  15. Subscriptions
  16. PartShop
  17. Market Centre
  18. Advertising Index
  19. Notes & Errata: DC Supply Protectors, June 2024; Fan Speed Controller Mk2, May 2024; Touchscreen Appliance Energy Meter, August-October 2016
  20. Outer Back Cover

This is only a preview of the July 2024 issue of Silicon Chip.

You can view 42 of the 104 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Items relevant to "Automatic LQ Meter":
  • Automatic LQ Meter main PCB (CSE240203A) (AUD $5.00)
  • 16x2 Alphanumeric module with blue backlight (Component, AUD $10.00)
  • Pulse-type rotary encoder with pushbutton and 18t spline shaft (Component, AUD $3.00)
  • Automatic LQ Meter short-form kit (Component, AUD $100.00)
  • Automatic LQ Meter front panel (CSE240204A) (PCB, AUD $5.00)
  • Firmware for the Automatic LQ Meter (Software, Free)
  • Automatic LQ Meter drilling diagram (Panel Artwork, Free)
Items relevant to "180-230V DC Motor Speed Controller":
  • 180-230V DC Motor Speed Controller PCB [11104241] (AUD $15.00)
  • 180-230V DC Motor Speed Controller PCB pattern (PDF download) [11104241] (Free)
  • 180-230V DC Motor Speed Controller lid panel artwork and drilling templates (Free)
Articles in this series:
  • 180-230V DC Motor Speed Controller (July 2024)
  • 180-230V DC Motor Speed Controller Part 2 (August 2024)
Items relevant to "New use for Mains Sequencer":
  • Mains Power-Up Sequencer PCB [10108231] (AUD $15.00)
  • Firmware (ASM and HEX) files for the Mains Power-Up Sequencer (Software, Free)
  • Mains Power-Up Sequencer PCB pattern (PDF download) [10108231] (Free)
  • Panel labels and cutting diagrams for the Mains Power-Up Sequencer (Panel Artwork, Free)
  • Mains Power-Up Sequencer PCB [10108231] (AUD $15.00)
  • PIC16F1459-I/P programmed for the Repurposed Mains Power-Up Sequencer (1010823M.HEX) (Programmed Microcontroller, AUD $10.00)
  • Firmware (ASM and HEX) files for the Mains Power-Up Sequencer (Software, Free)
Articles in this series:
  • Mains Power-Up Sequencer, Pt1 (February 2024)
  • Mains Power-Up Sequencer, Pt2 (March 2024)
  • New use for Mains Sequencer (July 2024)
  • Mains Power-Up Sequencer, part one (February 2025)
  • Mains Power-Up Sequencer, part two (March 2025)
Items relevant to "Lava Lamp Display":
  • Arduino firmware for JMP002 - Lava Lamp Display (Software, Free)
Articles in this series:
  • Symbol USB Keyboard (May 2024)
  • Thermal Fan Controller (May 2024)
  • Wired Infrared Remote Extender (May 2024)
  • Self Toggling Relay (June 2024)
  • Arduino Clap Light (June 2024)
  • Digital Compass (July 2024)
  • Lava Lamp Display (July 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • No-IC Colour Shifter (September 2024)
  • IR Helper (September 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • BIG LED clock (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • Wireless flashing LEDs (February 2025)
  • Transistor tester (February 2025)
  • RF Remote Receiver (March 2025)
  • Continuity Tester (March 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
Items relevant to "Digital Compass":
  • Firmware for JMP008 - Digital Compass (Software, Free)
Articles in this series:
  • Symbol USB Keyboard (May 2024)
  • Thermal Fan Controller (May 2024)
  • Wired Infrared Remote Extender (May 2024)
  • Self Toggling Relay (June 2024)
  • Arduino Clap Light (June 2024)
  • Digital Compass (July 2024)
  • Lava Lamp Display (July 2024)
  • JMP007 - Ultrasonic Garage Door Notifier (August 2024)
  • JMP009 - Stroboscope and Tachometer (August 2024)
  • No-IC Colour Shifter (September 2024)
  • IR Helper (September 2024)
  • JMP015 - Analog Servo Gauge (October 2024)
  • JMP012 - WiFi Relay Remote Control (October 2024)
  • JMP013 - Digital spirit level (November 2024)
  • JMP014 - Analog pace clock & stopwatch (November 2024)
  • WiFi weather logger (December 2024)
  • Automatic night light (December 2024)
  • BIG LED clock (January 2025)
  • Gesture-controlled USB lamp (January 2025)
  • Wireless flashing LEDs (February 2025)
  • Transistor tester (February 2025)
  • RF Remote Receiver (March 2025)
  • Continuity Tester (March 2025)
  • Discrete 555 timer (April 2025)
  • Weather monitor (April 2025)
Items relevant to "Workman 1kW Loudspeaker":
  • 2-Way Passive Crossover PCB [01205141] (AUD $20.00)
  • 2-Way Passive Loudspeaker Crossover PCB pattern (PDF download) [01205141] (Free)

Purchase a printed copy of this issue for $12.50.

180-230V DC Moto Controls 180-230V DC motors rated from 1A to 10A (¼HP to 2.5HP) Controlled by four common op amp ICs with one opto-coupler and three linear regulators Zero to full speed control Safe startup procedure Emergency cut-out switch facility Automatic over-current switch-off Optional reversing switch capability PWM, Live and Power indicator LEDs Rugged diecast aluminium enclosure Current and back-EMF monitoring for speed regulation under load Initial setup adjustments can be done with a low-voltage supply DC motors from 180-230V DC power various pieces of equipment; they are particularly common in treadmills. Often, these motors are removed from the treadmill, possibly because the speed controller has failed. Such motors can be reused for other purposes, such as adding computer control to a lathe. Many of these motors are sold via the internet on sites such as eBay, often inexpensively. The type of DC motor we are referring to here typically has permanent magnets in the stator and field coils for the rotor. The electrical connection to the field coils is made via a commutator and brushes. These motors can be powered from the mains using a full-wave bridge rectifier to convert the 230 AC voltage from the mains to a pulsating DC voltage, where the voltage rises and falls in a sinewave shape over each half of the mains waveform. The resulting average voltage is close to 230V DC. Warning: Mains Voltage This Speed Controller operates directly from the 230V AC mains supply; contact with any live component is potentially lethal. Do not build it unless you are experienced working with mains voltages. 44 Silicon Chip Scope 1 shows the resulting ‘DC’ waveform that is applied to the motor for it to run at full speed. If you want to slow the motor down, you need a speed controller. Our DC Motor Speed Controller provides the same 100Hz pulsating DC mains rectified voltage as a full-wave rectifier, but it adds speed control by switching this waveform on and off more rapidly, at around 900Hz. The averaged DC voltage is thus multiplied by the proportion of time it is switched on. This type of drive is called pulsewidth modulation (PWM), where voltage is applied to the load in a series of pulses with a duty cycle (0-100%) that can be adjusted to control the average voltage applied to the motor. With the duty cycle set at 100%, the motor is driven with the full 100Hz full-wave rectified mains voltage. As the duty cycle reduces, so does the average voltage applied to the motor. A 50% duty cycle reduces the average voltage by one-half. Scope 2 shows the PWM-chopped full-wave rectified mains with it on about 60% of the time (a 60% duty cycle). The resulting averaged voltage should be about 60% of the full waveform shown in Scope 1. The mean measured value of 113V is 58% of the 195V reading from Scope 1. Australia's electronics magazine We published a 230V/10A Speed Controller for Universal Motors (February & March 2014; siliconchip.au/ Series/195) that could be used to drive a 180V DC motor. However, as that controller was intended for use with universal motors, it lacks some desirable features for use with DC motors. Our new design By designing a controller purely for DC motors, we can provide the best control of this type of motor. For example, the Universal Motor Controller mentioned earlier has feedback to maintain motor speed under load, but it only monitors the motor current. That type of feedback control does not monitor motor speed and relies on the motor current being indicative of motor speed and load. One problem with that is that, under load, the motor speed drops and it draws more current. This extra current causes the controller to increase the PWM duty cycle to increase the motor speed. That increases the current further, so the controller increases the duty cycle further. The process can quickly become unstable, possibly producing bursts of voltage to the motor. That is especially likely to happen if too much motor speed correction is applied. siliconchip.com.au or Speed Controller High-voltage DC motors are commonly used in lathes, consumer-grade treadmills, industrial conveyor belts and similar equipment. This Speed Controller can control such a motor over a wide range of speeds, from very slow to full speed. A constant speed is maintained even with a varying load due to motor-generator voltage (back-EMF) sensing and current feedback circuitry. Part 1 by John Clarke In this new design, we also monitor the motor speed using back-EMF (electromotive force). The motor generates this back-EMF from its rotation and it directly indicates the motor speed – see Scope 3. The generated voltage will drop when the motor is loaded, since it will slow down. Increasing the duty cycle of voltage applied to the motor can compensate for this reduction in motor speed. This is a negative feedback control, so it is far more stable than feedback based purely on motor current. Compare Scope 3, with the motor driven by switched PWM, to Scope 2. You can see that in Scope 3, the motor load also generates a voltage (backEMF) during the PWM off-times. This is seen as the spikes below the baseline indicated by the small arrow and “1” on the left. The motor is generating spikes of around -85V. Applying a combination of both current and back-EMF feedback control, with a measured amount of each, provides excellent speed control without the risk of speed instability. Incidentally, we don’t use backEMF speed control for a universal motor controller because that voltage is essentially non-existent. The generated voltage relies on having a magnetised core. Since the universal motor has windings for both the armature and stator, there is little remnant magnetism when the windings are not powered. Hence, little to no voltage is produced. However, with a DC motor, the stator can comprise permanent magnets or powered windings, so a voltage is induced in the rotor as it spins. Scope 1: this is the pulsating ‘DC’ waveform that is applied to the motor for it to run at full speed, created by rectifying the 230V AC mains. Note that the mean (average) voltage is lower than the RMS. This waveform (like the others) was captured using an isolated differential probe. Scope 2: the full-wave rectified mains being switched on and off with a duty cycle of about 60% (60% on, 40% off). As expected, the resulting average voltage is about 60% of the full waveform in Scope 1. Scope 3: the motor voltage when driven by the switched PWM version of the full-wave rectified mains waveform. You can see how the motor load generates negative voltage spikes of about -85V (back-EMF) during the PWM off periods while the motor is not being driven. siliconchip.com.au Australia's electronics magazine Design inspiration We based our new controller on the features of a small lathe controller (the Sieg C1 micro lathe) that was July 2024  45 extensively documented by our frequent contributor, Dr Hugo Holden. Hugo provides considerable detail on the operation of that circuit, as well as a description of how it uses op amps, in a PDF on his website at siliconchip. au/link/abmn While the Sieg controller is for small motors rated up to 1A, we have designed ours to handle any high-­ voltage DC motor from 1A to 10A. The Sieg motor controller includes several safety features we also incorporated into our new design. One such feature is the facility for a safety/emergency stop switch, where the motor does not start when the switch is open and will shut off if it opens during operation. This feature does not need to be used; it can be bypassed with a wire loop if not required. However, it’s a great idea to include such a switch for a lathe or any other piece of industrial equipment. A lathe can be set up so it will not run unless a safety shield is in place to protect against flying debris. In other cases, the safety switch can be a large, red emergency stop button (eg, Jaycar SP0786). You could even have both simply by wiring them in series. Whenever one opens, the motor will stop. There are other conditions under which the motor won’t run for safety. For example, when the controller is initially powered up or if the motor becomes overloaded during operation. The motor cannot start or be restarted unless the speed control is brought back to the full anti-clockwise position before being advanced to start the motor running. That assumes the safety switch is closed and there is no motor overload. The Sieg controller does this with a switch incorporated within the speed potentiometer. That is not terribly unusual as many vintage radios and some music instrument amplifiers have a power switch within the volume potentiometer, where rotating the potentiometer fully anti-clockwise opens the switch to disconnect power. However, in the Sieg controller and our design, the switch must be closed when the potentiometer is fully anti-clockwise and open when it is advanced clockwise. That is the reverse of a radio/amplifier potentiometer, making it a rather unique and difficult part to obtain. Even if we decided to use that style of potentiometer, with (say) a relay to reverse the switching sense, it still would not be ideal. That’s because volume control potentiometers have a logarithmic resistance change over their rotation, while we need a linear response. Therefore, we use a standard potentiometer that does not have a switch incorporated and instead provide the switching feature using a comparator and relay. That avoids having to source a special type of potentiometer. The comparator monitors the potentiometer’s wiper voltage and switches a relay according to the potentiometer position. How it works The basic block diagram is shown in Fig.1. The circuitry is based around a full-wave bridge rectifier that provides the 100Hz half-sinewave ‘DC’ voltage from the mains. The IGBT that switches power on and off to the motor is connected in series with the motor, between the DC terminals of the bridge rectifier. The IGBT’s gate is driven by PWM circuitry that controls the motor speed. The duty cycle of the PWM signal depends on the position of the speed potentiometer (VR1), the motor current (detected by sense resistors) and the motor with both back-EMF from its negative terminal. The PWM signal is generated by comparing voltage Vo (derived from the speed potentiometer voltage and the current and voltage feedback) to a sawtooth waveform. Vo comes from the output of op amp IC2c, while the Fig.1: the voltage from speed control pot VR1 (at left) is buffered and mixed with the motor current and speed feedback signals, then fed to comparator IC4a. Comparing that DC voltage to a sawtooth waveform produces a PWM output with a duty cycle proportional to the control voltage. That goes to the IGBT, which switches voltage to the motor. The other components are associated with the over-current shutdown, safety switch and power-up inhibit functions. 46 Silicon Chip Australia's electronics magazine siliconchip.com.au sawtooth waveform is from the oscillator based on IC4b. IC4a compares the sawtooth waveform to Vo and generates the variable duty-cycle PWM output. The manual speed control voltage from potentiometer VR1 is buffered via IC2a, which applies a DC voltage to the N1 node, at the input to IC2b. Voltages from the feedback loop outputs, from IC3b and IC2d, are also applied to N1. These provide the speed (Vs) and torque (Vt) signals, which are derived from the motor back-EMF and the motor current, respectively. For torque feedback, the motor current is determined by the voltage across the current sense resistance in series with the motor’s positive terminal. The resulting voltage is amplified by IC1b, which has its gain set by trimpot VR2. The gain is adjusted according to the motor current rating; more gain is used for low-current motors and less for higher-current motors. The resulting voltage is applied to op amp IC2d, with an offset voltage set via trimpot VR3. The motor’s back-EMF voltage is amplified by IC3c and is offset using trimpot VR7 before being applied to op amp IC3b. IC3c provides a low-pass filter with a roll-off point of 1.6Hz to remove the 100Hz ripple. The torque voltage from IC2d (Vt) and the speed signal from IC3b (Vs) are summed with the speed control signal at N1, while a separate torque signal is applied to the N2 junction of the main servo amplifiers, IC2b and IC2c, via VR4. This provides feedback adjustment, allowing for the best speed control as the motor is loaded. For current overload detection, the motor current is amplified by op amp IC3d and compared against a threshold by comparator IC3a (it’s actually an op amp but used in open-loop mode, so it acts as a comparator). If the current limit is exceeded, the motor is switched off by the shutdown relay, RLY2, which switches off RLY3. That disconnects power from the motor. These relays return to their normal positions when the overload is cleared and the speed control is rotated fully anti-clockwise. IC1a detects when the speed control pot is set at zero. It compares the buffered speed control voltage from IC2a against a 119mV reference. The Relay (RLY1) is powered, opening the connected contacts, when the voltage siliconchip.com.au This is the motor we used for testing, You can find lots of similar second-hand and new motors on eBay. from the speed control is higher than 119mV. The open relay contacts prevent the motor from starting, although it will continue to run if it is already running. Other relays are connected in series with the coil of the one that powers the motor, so if any of them open, that will stop the motor from spinning. That includes if an overload is detected or the emergency/safety switch is open. For the motor to run, the speed potentiometer must be set almost fully anti-clockwise (switching RLY1 off), then rotated more clockwise to start the motor. The circuit has three main supply rails: a ±12V split supply and a +15V supply. The +12V supply connects to the positive output of the full-wave bridge rectifier, so the whole circuit operates at mains potential. Level shifting between IC4a’s output and the gate of IGBT Q1 is via an opto-coupled Mosfet/IGBT gate driver (IC5). Circuit details The full circuit is shown in Fig.2. It comprises five ICs, an IGBT, several diodes, two transistors, three relays plus numerous capacitors and resistors. A significant component for PWM drive generation is op amp IC4b, wired as a sawtooth oscillator (near the bottom of the diagram). This is the second amplifier in dual LM833 op amp IC4. It is powered from the ±12V supply. A bias voltage is generated using two 100kW resistors connected in series across the ±12V supply. The centre connection of this voltage divider is Australia's electronics magazine connected to the non-inverting input, pin 5 of IC4b. The voltage at pin 5 would be 0V, except for the fact that there is also a 47kW resistor between pin 5 and the op amp output, pin 7. To calculate the voltage at pin 5, the two 100kW resistors connected across the ±12V supply can be considered a 50kW resistor between pin 5 and 0V. That leaves a 47kW/50kW voltage divider, with the voltage at the end of the 47kW resistor shifting between about 10.9V when pin 7 is high and -10.9V when it is low. So when the op amp output is high, the 47kW resistor pulls pin 5 to around 5.6V, and when the op amp output is low, it is around -5.6V. The output oscillates between the high and low states due to the 10nF capacitor at the inverting input (pin 6) and the charge and discharge resistances between pins 6 and 7. When power is first applied, the 10nF capacitor is discharged, so pin 6 is near -10.9V. Pin 5 is at a higher voltage than that, so pin 7 goes high. Pin 5 then sits at around 5.6V. The 10nF capacitor charges via the 1kW resistor and diode D4. As soon as the capacitor at pin 6 charges just beyond the pin 5 voltage, pin 7 goes low, to -10.9V, since the inverting input voltage is above the non-inverting input. Pin 5 is then at -5.6V, and the capacitor discharges via the 91kW resistor. Diode D4 is reverse-biased and does not take part in the discharge cycle. Once the capacitor voltage exceeds -5.6V, the pin 7 output goes high again, and the process repeats. So the 10nF capacitor is charged quickly via the 1kW resistor and July 2024  47 diode D4, then discharged much more slowly via the 91kW resistor. The resulting waveform is described as a sawtooth shape, rising quickly and falling more slowly. The waveform ranges from about +5.6V to -5.6V at about 900Hz. 48 Silicon Chip The sawtooth waveform at pin 6 of IC4b goes to the inverting (pin 2) input of IC4a, which compares it against the Vo voltage from IC2c (at its non-inverting pin 3 input). The output of IC4a goes high (to around 10.9V) when the voltage from the IC4a oscillator is Australia's electronics magazine lower than the feedback voltage; its output is low (-10.9V) otherwise. IC4a’s output is therefore a rectangular waveform with a higher duty cycle (higher for longer) when the Vo voltage is higher. IC4a’s output drives optically-coupled Mosfet/IGBT driver siliconchip.com.au Fig.2: virtually all the op amp based control circuitry is on the left half of the diagram; 12 op amp stages are used, inside four ICs, two of which operate as comparators. The IGBT and its driving circuitry are at lower middle, with the current measurement shunts and relays that switch power to the motor above that. The linear power supply is at upper right. IC5. It level-shifts IC4a’s square-wave output to a voltage suitable for driving the gate of Q1. Scopes 4 & 5 show the sawtooth waveform and Q1’s PWM gate-drive signal at duty cycles of about 10% and 90%. The top trace (yellow) is the PWM signal, while the lower cyan trace is the sawtooth waveform, which oscillates between ±5.6V. The yellow horizontal dotted line (representing Vo) shows how the PWM output is high when the sawtooth waveform is below that level. Scope 6 shows the PWM drive to Q1’s gate. The rise and fall times of the waveform are 1.37μs and 1.2μs, respectively, with the gate voltage siliconchip.com.au reaching 14.8V. We want the switching time to be short to minimise heating in Q1 during partial conduction periods, and the gate drive needs to be within its ±25V rating while being high enough to fully switch it on, which occurs at around 15V. The 15V supply for driving the gate comes from the positive output of the bridge rectifier via diode D2 and four series/parallel 22kW 1W resistors. This provides an average of 5mA to IC5 and the 15V zener diode (ZD2). That supply is smoothed to a DC voltage by a 100μF capacitor with parallel 1μF and 100nF ceramic capacitors so that IC5 can receive bursts of current for driving Q1’s gate when needed. Australia's electronics magazine LED1 is also driven by this 15V supply, so it indicates when power is being fed to the circuit from the positive side of the bridge rectifier. When lit, the entire circuit is at mains potential. IC5 has an internal LED between pins 1 and 3, and its output goes high when that LED is powered via the 620W resistor from the output of IC4a and diode D3. That diode prevents a negative voltage from being applied to IC5’s internal LED when IC4a’s output goes negative. The 620W series resistor limits the LED current to around 10mA. Q1’s gate is driven via a 75W rate-limiting gate resistor. July 2024  49 The IGBT is protected from overvoltage at switch-off by transient voltage suppressor TVS1, which conducts if Q1’s collector goes above 400V, causing the gate to be pulled high. That switches on Q1 to shunt the excess voltage. The 10W series resistor limits the current into protective 15V zener diode ZD1, which prevents the gate voltage from going beyond Q1’s maximum limits. Apart from TVS1, any high voltage spikes are also coupled via diode D1 into the 47nF capacitor connected across the + and – terminals of BR1. The capacitor absorbs some voltage transients. A snubber between the IGBT’s collector and emitter terminals prevents switch-off oscillations. It comprises a 47nF capacitor and two paralleled 470W 5W resistors. Inductor L1, in series with the motor, limits the current rise rate when the motor is switched on to protect the IGBT from excessive surge current. It also helps to filter the 900Hz switching drive for the motor, reducing electromagnetic interference (EMI). The motor current is monitored via a set of 0.022W shunt resistors. The four 0.022W 3W resistors are connected in series/parallel, yielding a 0.022W 12W resistance. They connect between the bridge rectifier positive terminal and L1. This shunt produces a voltage at the lower end that is below the +12V supply, in proportion to the current flow. The motor voltage is monitored via a 220W 1W resistor from the motor’s negative terminal. This voltage is also negative with respect to the +12V supply and becomes more negative with increased back-EMF voltage. The circuitry for monitoring these feedback voltages will be described separately. Current feedback IC1b amplifies the voltage across the current measurement shunt resistors. Its gain can be adjusted between 1.5 times (with trimpot VR2 at minimum resistance) and 13.1 times, when the resistance between pins 6 and 7 of IC1b is 5.22kW. This allows the circuit to work with motors rated between 1A and 10A with the correct overload threshold. Note how IC1 has a 15V positive supply rather than 12V. This means the positive supply for IC1 is 3V above the 12V that the shunt resistor is referenced to. That way, the op amp output can reach 12V when there is no voltage across the shunt. Even though the op amp is a rail-torail type, where the input and output voltages can be up to the supply rails, there will be some differences due to the input offset voltage of the op amp and the fact that the output can only reach within a few millivolts of its supply rails. So, with IC1’s positive supply above 12V, the op amp has the headroom to handle 12V signals. The output voltage from IC1b is amplified and inverted by op amp IC2d, which has a gain of -6.8, determined by the 10kW input resistor and the 68kW feedback resistor. This amplifier also acts as an integrator, filtering out the PWM signal and the pulsating DC due to the 220nF capacitor connected across the 68kW resistor. The resulting low-pass filter has a roll-off point at about 10.6Hz, well below the 100Hz of the rectified mains and the 900Hz PWM signal. IC2d’s output is applied to the N1 node via a 33kW resistor. Scope 4 & 5: these captures show the sawtooth waveform and the Q1’s PWM gate drive signal for duty cycles of about 10% and 90%. The top trace (yellow) is the PWM voltage, while the lower cyan trace is the sawtooth waveform with a range of ±5.6V. The dotted yellow horizontal line represents Vo; when the sawtooth waveform is below it, the PWM output is high. 50 Silicon Chip Australia's electronics magazine By the way, all inverting amplifiers in the motor controller circuit include a resistor from the non-inverting input of the op amp to the 0V rail. These are to equalise the two input impedances so that any input currents will balance out. This minimises offset voltages due to the parasitic input currents. Note how op amp IC2d also connects to the -12V supply via an 8.2kW resistor and trimpot VR3. This preset trimpot adjusts the voltage offset at the Vt test point (IC2d’s output). It is adjusted to provide the correct operation of the PWM by keeping voltage within range of the voltage swing from the sawtooth oscillator, IC4b. The output voltage of IC1b is also applied to the current overload circuitry that comprises IC3d and IC3a; more on that later. Motor speed feedback The motor back-EMF voltage is monitored via a 220kW 1W resistor from the motor’s negative terminal. This voltage is attenuated and offset toward the +12V rail by the connected 8.2kW resistor. The resulting voltage is applied to an inverting and integrating buffer, IC3c, via a 100kW resistor to its inverting input, pin 9. Speed trimpot VR7, in series with a 100kW resistor, provides level-shifting of the voltage from IC3c. As mentioned earlier, IC3c provides low-pass filtering with a corner frequency of around 16Hz due to the 1μF capacitor in parallel with the 100kW feedback resistor. IC3b provides voltage inversion with a gain of -2 before applying the speed feedback voltage to the N1 node via a 10kW resistor. Motor speed adjustment VR1 is used to adjust the motor Scope 6: a zoomed-in view of the PWM drive waveform at Q1’s gate. The rise and fall times are 1.37µs and 1.2µs, respectively, with the gate voltage ranging from 0V when the IGBT is off to 14.8V when on. siliconchip.com.au speed manually. It is connected in series with a 620W resistor across the 12V supply. The 620W resistor is included so that the voltage from the potentiometer’s wiper ranges from 0V to 10.6V. That provides a suitable range to feed to op amp IC2a, which is not a rail-to-rail type. The potentiometer wiper charges and discharges a 100μF capacitor via one of two separate paths. When rotated clockwise to increase the voltage, the capacitor is charged via the 10kW resistor, so it takes about one second for the capacitor to fully charge and signal full motor speed. When the potentiometer is wound anti-clockwise to reduce the speed, the voltage is more quickly decreased by discharging the capacitor via diode D5 and its series 100W resistor. This allows the motor to be stopped quickly if necessary. IC2a’s output feeds the N1 node via a 6.8kW resistor. The current and voltage feedback signals, plus the speed control potentiometer signals, are all summed at the N1 node. This results in a summed output from the IC2b mixer of the three sets of voltages for the current and voltage feedback signals, plus the speed control potentiometer. A second node (N2) mixes the IC2b output (via a 10kW resistor) and the torque from the IC2d output (via trimpot VR4 and its series 10kW resistor). The final summation is performed by IC2c, producing the Vo output signal that’s applied to the PWM comparator, IC4a. The IC4a comparator has a small amount of hysteresis so it does not oscillate when the non-inverting input voltage is close to the sawtooth oscillator waveform voltage. The 100W and 1MW resistors at pin 3 cause the pin 3 voltage to shift slightly when IC4a’s output state changes, preventing the two voltages at pins 2 and 3 from remaining at the same level for long. A voltage clamp comprising zener diode ZD3 and diode D10 at the pin 3 input to IC4a limits the voltage to one diode drop below -8.2V. This clamping prevents the input from going below the op amp’s input voltage range. Without the clamp, if the voltage went below -9V, the op amp output would swing high instead of staying low due to a phase reversal internal to the op amp. siliconchip.com.au The Speed Controller fits neatly into an aluminium enclosure. The black ‘wires’ are actually fibre-optic light pipes for the LEDs. The full adjustment range of VR1 suits 230V DC motors. For motors rated to a lower voltage, like 180V, you can simply operate VR1 over the lower 80% of its range. If you need to prevent more than an average of 180V from being applied to the motor, you can increase the 620W resistor in series with VR1 to 1.6kW. Current overload detection The motor-current-derived voltage from IC1b is applied to the current overload circuitry comprising op amp IC3d and comparator IC3a (another op amp used as a comparator). IC3d amplifies the voltage from IC1b with a gain of -4.68 times (220kW/47kW), with its output voltage level-shifted by trimpot VR5 that’s connected to the -12V supply by way of a 24kW resistor. Australia's electronics magazine IC3a compares the output voltage from IC3d against a reference voltage set by VR6. VR6 is connected as an adjustable divider across the ±12V rails with a 12kW padder resistor and sets the current overload trip level. If the motor current is high enough to produce a voltage from IC3d’s output above the overload level, the comparator output will go high, switching on transistor Q3 and consequently, relay RLY2. A 100μF capacitor holds this pin 2 input at -12V for a few seconds at power-up. The initial low voltage ensures the comparator output at pin 1 of IC3a is high at power up, so RLY2 switches on and opens its NC contact. That ensures RLY3 is not on during power-up, so the motor cannot run immediately. July 2024  51 When transistor Q3 is switched on, we ensure it’s on long enough to activate RLY2 due to the 100μF capacitor that’s initially charged via diode D9 from IC3a’s output. When there is an overcurrent condition and RLY2 is powered, it disconnects power to RLY3’s coil. RLY3 is the high-current relay that connects power to the motor by joining the M+ terminal to inductor L1. If an overcurrent condition triggers the relays, that will quickly cease as the motor will no longer be powered. RLY2’s contacts will close again, so RLY3 can be powered once more, and the motor can be restarted. However, power for RLY3’s coil comes via RLY1’s contacts, and RLY1’s contacts are open unless the speed potentiometer is fully anti-clockwise. So, the speed potentiometer must be returned to the fully-off position before RLY1’s contacts close. RLY3 is then powered to provide voltage to the motor once the speed potentiometer is rotated clockwise. Parts List – 180-230V DC Motor Speed Controller We described earlier how IC1a and RLY1 provide the ‘switched potentiometer’ action we need from a regular potentiometer, but here are more details on how that section works. IC1a acts as a Schmitt-trigger comparator, monitoring the speed potentiometer voltage after buffer IC2a. It compares that voltage to a 119mV reference from a 100kW/1kW voltage divider across the 12V supply. When IC2a’s output is below this 119mV reference, the output of IC1a is low, so RLY1 is not powered. When IC2a’s output is above 119mV, IC1a’s output goes high and drives transistor Q2 via its 1kW base resistor. IC1a includes hysteresis so the output does not oscillate at the 119mV threshold. IC1a is powered from the 15V supply, with a 1MW feedback resistor, so this hysteresis is around 15mV. In more detail, when IC1a’s output is low, its pin 3 input is pulled lower than IC2a’s output due to the 1MW/1kW voltage divider. When IC1a’s output goes, pin 3 is pulled about 15mV higher, so the output from IC2a needs to drop a further 15mV before IC1a’s output will go low again. When Q2 is on and RLY1 is powered, its normally closed contacts open, disconnecting RLY3’s 12V coil 1 double-sided plated-through PCB coded 11104241, 201 × 134mm 1 diecast aluminium enclosure measuring 222 × 146 × 55mm [Altronics H0429, Jaycar HB5050] – the Altronics case requires additional parts for PCB mounting: 4 M3 × 6mm tapped standoffs and 8 M3 × 6mm panhead machine screws 2 10A, 12V DC coil SPDT PCB-mounting relays (RLY1, RLY2) [Altronics S4160C, Jaycar SY4066] 1 30A, 24V DC coil DPDT panel-mount relay (RLY3) [Jaycar SY4041, Hongfa HF92F-024D-2C21S or unbranded FRA8PC-S2] 1 PCB-mounting 15V + 15V 7VA mains transformer (T1) [Altronics M7164 or M7124A] 2 33 × 19.8 × 11.1mm powdered iron toroidal cores (L1) [Altronics L4534A] 1 8-way 300V 15A PCB-mount barrier terminals (CON1) [Altronics P2108] 1 vertical-mount 300V 15A 3-way pluggable header with screw terminals, 5.08mm spacing (CON2) [Altronics P2573 + P2513, Jaycar HM3113 + HM3123] 1 vertical-mount 300V 15A 2-way pluggable header with screw terminals, 5.08mm spacing (CON3) [Altronics P2572 + P2512, Jaycar HM3112 + HM3122] 3 PCB-mount 5mm pitch 6.3mm male spade connectors (CON5-CON7) [Altronics H2094, Jaycar PT4914] 3 6.3mm fully-insulated female crimp spade connectors [Altronics H1842, Jaycar PT4625] 1 IEC panel-mount mains connector with integral fuse (CON10) [Altronics P8324, Jaycar PP4004] 1 M205 230VAC fast-blow fuse (F1) (with a current rating to suit the motor) 1 10A mains IEC lead 1 10A side-entry chassis-mount GPO socket [Altronics P8241, Jaycar PS4094] 1 ALPHA 24mm 5kW single gang linear potentiometer, 500V DC rating (VR1) [Altronics R2203] 3 5kW top adjust trimpots (VR2-VR4) [Jaycar RT4648, Altronics R2380A] 3 50kW top adjust trimpots (VR5-VR7) [Jaycar RT4654, Altronics R2386A] 1 knob to suit VR1 2 14-pin DIL IC sockets (optional) 2 8-pin DIL IC sockets (optional) 3 100mm-long 3mm LED fibre-optic light transporters (optional) [Jaycar HP1193 (pack of three)] 4 yellow 5mm inner diameter crimp eyelets for 4-6mm diameter wire [Altronics H2061B, Jaycar PT4714] Hardware & cables 2 M4 × 10 panhead machine screws (for Earth-to-chassis connections) 2 4mm inner diameter star washers 2 M4 hex nuts 2 M3.5 × 6mm panhead machine screws (PCB to Altronics enclosure) 1 M3 × 12mm panhead machine screw (for Q1) 4 M3 × 10mm panhead machine screws (for BR1, D1 & RLY3) 2 M3 × 10mm countersunk head machine screws (for IEC connector) 3 M3 × 6mm panhead machine screws (for REG1-REG3) 3 3mm inner diameter washers (for D1 and RLY3) 8 M3 hex nuts 1 TOP3 insulating washer 1 500mm length of 1.25mm diameter enamelled copper wire 1 500mm length of 10A green/yellow striped (for Earth) mains-rated wire 1 500mm length of 10A brown (for Active) mains-rated wire 1 500mm length of 10A blue (for Neutral) mains-rated wire 1 450mm x 8mm plastic cable tie (for T1) 1 250mm x 4.8mm plastic cable tie (for L1) 12 100mm x 3.6mm plastic cable ties 1 120mm length of black 5mm diameter heatshrink tubing 1 60mm length of red 5mm diameter heatshrink tubing 52 Australia's electronics magazine Restart switch Silicon Chip siliconchip.com.au 1 15mm length of blue 5mm diameter heatshrink tubing 1 15mm length of yellow 5mm diameter heatshrink tubing Semiconductors 1 LMC6482AIN dual CMOS op amp, DIP-8 (IC1) [Jaycar ZL3482] 2 LM324AN quad op amps, DIP-14 (IC2, IC3) [Altronics Z2524, Jaycar ZL3324] 1 LM833 dual op amp, DIP-8 (IC4) [Altronics Z2598, Jaycar ZL3833] 1 TLP5701 optically-isolated Mosfet driver, SMD-6 (IC5) [element14 3872508 or 2768341] 1 7812 +12V 1A linear regulator, TO-220 (REG1) 1 7815 +15V 1A linear regulator, TO-220 (REG2) 1 7912 -12V 1A linear regulator, TO-220 (REG3) 1 STGW40M-120DF3 1.2kV 80A IGBT, TO-247 (Q1) [element14 2470028] 2 BC337 NPN transistors, TO-92 (Q2, Q3) 4 3mm or 5mm high brightness red LEDs (LED1, LED3-LED5) 1 3mm or 5mm high-brightness green LED (LED2) 1 PB5006 600V 45A SIL bridge rectifier (BR1) [element14 3774973] 1 W04 1A 400V bridge rectifier (BR2) 1 RURG3060 600V 30A fast diode (D1) [element14 2495903] 4 1N4004 400V 1A diodes (D2, D6-D8) 5 1N4148 75V 200mA signal diodes (D3-D5, D9, D10) 2 15V 1W zener diodes (ZD1, ZD2) [1N4744A] 1 8.2V 1W zener diode (ZD3) [1N4738A] 1 P4KE400CA bi-directional TVS diode (TVS1) [Jaycar ZR1164] 3mm diameter required if light transporters are used Capacitors 2 470μF 25V PC electrolytic 1 100μF 25V PC electrolytic 4 100μF 16V PC electrolytic 4 10μF 25V PC electrolytic 1 1μF 63V or 100V MKT polyester 1 1μF 50V multi-layer or monolithic ceramic 1 220nF 63V or 100V MKT polyester 7 100nF 63V or 100V MKT polyester 1 100nF X7R multi-layer or monolithic ceramic 2 47nF 630V pulse double-metallised polypropylene (Kemet R76PI24705050J) [element14 3649826] 1 10nF 63V or 100V MKT polyester Resistors (all axial ¼W 1% unless noted) 2 1MW 2 20kW 4 1kW 1 220kW 1 12kW 2 620W 1 220kW 1W (5% OK) 8 10kW 2 470W 5W (5% OK) 8 100kW 1 10kW (SMD 1206-size) 1 430W 1 91kW 2 8.2kW 1 220W 1 68kW 2 6.8kW 4 100W 2 47kW 4 4.7kW 1 75W 3 33kW 1 4.3kW 1 10W 1 24kW 1 3.3kW 4 22kW 1W (5% OK) 2 2.2kW 2-4 0.022W 3W 1% SMD M6332/2512-size (TE Connectivity TLRP3A30CR022FTE) [element14 3828731] ● 0-2 0.05W 3W 1% SMD M6332/2512-size (TE Connectivity TLRP3A30CR050FTE) [element14 3828740] ● ● see Table 1 next month for quantities (4 × 0.22W is sufficient for all motors) 🔹 🔹 🔹 power unless RLY3 is already on and its contacts are closed. This is because a set of RLY3’s contacts are in parallel with RLY1’s contacts (the points labelled ‘a’ and ‘b’ in Fig.2). The only way to restore power to the motor via the RLY3 contacts is to return speed potentiometer VR1 to its fully anti-clockwise position. In this case, RLY1’s contacts close and +12V is reconnected to RLY3’s coil. The safety switch connection between pins 7 and 8 of CON1 can also stop the motor and prevent it from restarting until the speed pot is returned to the anti-clockwise position. An open safety switch disconnects power to RLY3’s coil, immediately removing power to the motor. Setting it up safely You might be wondering about the purpose of the CON5 & CON7 terminals near CON1 on the circuit diagram, shown joined by a wire bridge. This allows you to disconnect the +12V supply from the positive terminal of the bridge rectifier when making adjustments. Also, because the mains supply to the active side of the bridge rectifier (BR1) and transformer T1 are via separate terminals on CON1, BR1 can be left disconnected during initial setup and testing. With BR1 disconnected, the motor can’t run, and much of the circuit is essentially isolated from the mains Active. This allows you to adjust some of the trimpots and monitor the voltages in the circuit more safely. The circuit is still connected to mains Neutral via the bridge rectifier, though. So, during setup, it is essential to check that the mains Neutral is close to the Earth voltage. Even though some adjustments can be made with the mains Active isolated, some trimpots must be adjusted while the circuit is at mains potential. We will describe how to do this safely in the setup and testing section of the article next month. It involves using a high-voltage-insulated screwdriver with a multimeter and probes rated for use at mains voltages. Next month Construction, testing and setup details for the 180-230V DC Motor Speed Controller will be in a follow-up article next month. SC siliconchip.com.au Australia's electronics magazine July 2024  53