Mk2 Speed Controller

By Ken Hewitt

 

RCM&E Issue Sept 1995


Download mk2.zip, Zip file containing images and txt file.

Ordering parts


Introduction

It is one year since the Mk1 speed controller design was published in the Sept 94 issue of RCM&E, and the response to that article was very good, but some people did ask if certain features could be added to the basic design. Well I had already started the design for the Mk2 which is to be described in this article, and it included all of the additions that people had wanted for the Mk1 and quite a lot of new features at the time, which have now appeared on commercial designs. The Mk2 contains all of the elements that I hope the average modeller requires without the more gimmicky features that you can see on some units, so it does not use any "fuzzy logic" to track the input or "intelligent learning routines" or "anti glitch profiling". It was decided at the outset that it would work over a fixed input signal range, and this range was decided after testing as wide a range of RC equipment as I could get access to, and to this end I would like to thank all of the members of the Bedfordshire Silent Flight Association for their help in this research.


Specification

6 - 12 Cells

40+ Amps

Input signal range 1.2 - 1.8mS

35x59x15mm

Weight 40grams (without leads)

Microprocessor Controlled

High Frequency Switching (1khz)

BEC

Switch selectable BEC cut off voltage

In flight re-settable BEC cut off

BEC disable jumper

Fail Safe Motor cut off

Two throttle response curves

Max power LED

Motor off / Brake on LED

Timed Motor EMF braking

EMF brake disable

Transmitter motor arming

On board arming button

Soft start/stop switch option


Description of Features

Soft start/stop switch option

The Mk2 can be configured to operate as a speed controller or a soft start switch with soft stop braking. In the soft start mode when the motor is switched off it will slow down to minimum before the brake is applied.

BEC

The Mk2 can be used with BEC over the range 6 - 10 cells, this upper limit of 10 cells is very common and is caused by the fact that the linear voltage regulator used in the circuit has to dissipate more heat the more cells you are using. As the regulator has an in built over temperature cut out we need to make sure the device never reaches this temperature or we would lose our receiver and servo supply voltage.

BEC disable jumper

If it is wished to used the speed controller in some models without using BEC then it may be disabled by opening this on board link.

Switch selectable BEC low voltage cut off

The voltage that the motor will be cut off at is pre-set on a bank of switches, the setting for this can be seen in the configuration table. The value is set at 1volt per cell, but if you wish to discharge your cells to a lower value then this can be accomplished by setting the switches for a lower number of cells, ie if you are using a 7 cell pack and set the switches for 6 cells then the low voltage cut off will be 0.86v per cell.

In flight re-settable BEC cut off

Once the motor has been cut off by the low voltage cut off system it can be restarted in flight by closing the throttle and then opening it up again. This is a feature which will enable you to stretch out the landing if you are about to under shoot the landing strip. The motor will cut out again as soon as the batteries reach the low voltage cut off point.

Two throttle response curves

A linear or non-linear throttle response may be selected to give the best throttle response to suit your needs. This selection works for the speed control or soft start switch options.

Max power LED

To confirm that the controller is giving full power and no longer switching the output on and off, an LED is included to indicate full power. This LED is also used in the power up stage of the controller to indicate what is happening.

Timed Motor EMF braking

There is a timed delay after switching the motor off before applying the brake, this is to reduce the amount of stress applied to the motor brushes and the braking system that would happen if the brake was applied straight away.

EMF brake disable

If required the braking function can be disabled by the on board link. This option is available for the speed control or soft start switch options.

Brake on LED

To confirm that the brake is being applied an LED is fitted to indicate its operation.

On board arming button

An on board arming button can be fitted to the speed controller if required, this will stop the speed controller performing any operations until the button has been pressed. This option may be omitted if required and a link fitted to the board.

Transmitter motor arming

The speed controller will not start until the throttle has been set to minimum, even if the arm button if fitted has been pressed.


Configuration for Different Options

This design can be built in different ways depending on what you require from the finished speed controller, you can leave out some options if you wish to save on weight or cost, or if you just want a unit of a lower spec and lower overall cost.

To BEC or Not to BEC

You may construct the unit we BEC and then have the option to disable it at a later date by removing link 4 from the board. Or if you do not wish to use BEC at all then you may omit IC3 and C1 but you must install link 4.

Brake or No Brake

The braking function can be enabled and disabled by the use of link 2. But if you do not require the braking function you can omit Q6, Q7, R3, R5, R6, D2 and D3.

Output MOS FET's

This is the area where most cost can be saved if you only want to use the controller at low output currents, you can use five lower cost devices or just two of the higher cost ones. But I would recommend using five devices as the overall power dissipation will be lower and just vary the quality of the devices you use. I have included a table showing the three devices I recommend, but new ones are coming out all the time so you could use any similar devices.


Design Issues

One of the main areas of the design that took a long time to be finalised was the output stage. This is made up of the power MOS FET's and the circuit that drives them. The first decision to be made was to use logic level MOS-FET's since this would remove the need to drive them with the required 7+ volts need to turn them on fully, logic level devices only need 4.5v.

The next decision was how to drive the gates, some designs just drive the gates of the FET's via a resistor from an output pin of the micro processor, but this can cause the output devices to be in a partially turned 'ON' state for a short period of time due to waveform rounding, which can lead to very large amounts of power being dissipated as heat. One of my first prototypes suffered this problem and the output devices unsoldered themselves from the board at only 28 amps load. For this reason it was decided to drive the MOS FET's with the correct driver IC which is designed for the job and can switch the MOS FET's on in fractions of a micro second.

The last decision to be made was how many devices to use. The reason for using multiple output devices is to reduce the effective 'ON' resistance of the controller, but there is also an extra plus to this option. If we had one MOS FET carrying 10amps and it had an 'ON' resistance of 0.1 ohms then it would be dissipating 10 watts, now if we used two MOS FET's in parallel then you may think that the dissipation in each would be half or 5watts, but this is not the case, as we have two devices in parallel the effective 'ON' resistance is now only 0.05 and as we are still carrying 10 amps the total power dissipation is 5 watts or 2.5 watts per MOS FET. As you can see the power dissipated by each device is only 1/4 of the dissipation of one device, if we use five output devices we reduce the effective 'ON' resistance by a factor of five but the power dissipation in each device to 1/25. The whole design aims for the output stage have been to get the power dissipation to a minimum and hence have the coolest running speed controller possible. If you use the best MOS FET's listed in the table you should be able to produce a speed controller which only dissipates 3.84 watts at 40 amps, some commercial controllers have a figure of 80 watts at the same current.


Description of Operation

Hardware

The circuit for the speed controller as shown is very simple as most of the difficult parts are all handled by the software programmed into IC1, which is a PIC16C71 micro-controller from the Arizona Microchip range. This microcomputer controls the motor with the 5 power MOS-FET's Q1 - Q5 via IC2 which is a MOS-FET driver IC which makes sure we do not get any waveform rounding due to the gate capacitance of the MOS-FET's. The braking MOS-FET Q6 is driven by Q7, and the zener diode D2 is to make sure that we do not apply to many volts to the gate of Q6. Diode D1 is a 3 amp schottky diode and is needed to protect the main MOS-FET's from the back EMF generated by the motor when the speed controller is operating at less than full power, the back EMF pulse can be over 100 volts and this diode clamps it to about 1 volt above the battery supply. R1 and R2 form a potential voltage divider to reduce the battery supply down to a level which can be measured by IC1, C2 smoothes this voltage to reduce the chances of the low voltage cut off being tripped by noise on the supply from the motor. IC3 is the linear voltage regulator used for the BEC supply.

Software

The PIC16C71 micro-controller used in this design was chosen for two reasons, first of all it had the ability to handle interrupts generated by a change of state of one of its inputs, and this would be very useful in measuring the input pulse width from the receiver, and secondly it had an on board analogue to digital converter which could be used to measure the battery volts for the low voltage cut off. The PIC16C71 also has 13 input/output pins, 1k of program memory, 35 bytes of data storage and a real time clock/timer.

The program is made up of two main parts, the interrupt service routine and the main program loop. As inferred from its description the program spends most of its time going around the main program loop, but this looping can be interrupted by a change in logic level on one of the input pins which is connected to the receiver, the program then passes control to the interrupt service routine to measure the input pulse width, after which control passes back to the main loop.

When power is first applied the system does a power up reset, the program initialises things like input and output pins and enables the interrupt system. Then the switch (SW1) is read to find out what low voltage cut off point is required, and the program waits for the arm button (if fitted) to be pressed, it indicates this waiting state by flashing the green max power LED about once per second. When this state is exited the program looks for pulses from the receiver and will say looking until it has seen 25 pulses between 0.8mS and 2.0mS, this waiting state is indicated by the green LED being ON continuously. The next stage will now wait for the throttle to be closed and this is indicated by the green LED flashing at a fast rate of two per second. Once all these conditions have been passed then the status of link 2 is tested to see if the unit is to be a speed controller or a softstart switch. Then the main program loop is entered.

In the main program loop the input pulse width value is checked and the decision made as to whether the motor is OFF, pulsed or fully ON. Each time around the loop the battery voltage is checked and if it drops to the low voltage cut off value then the motor is shut down. Also the input pulse is checked to make sure that the signal has not been lost and that the pulse is of a valid width, if not the motor is shut down. Once the motor has been shut down for either of the two reason given it may be switched on again by closing the throttle and then opening it again.

The softstart switch performs the same checks as the speed controller except that the motor will switch ON and advance to full power in about 1.2 seconds and then when you want to shut it down it will slow down to minimum in about 1.2 seconds and the brake will be applied (if enabled).


Purchase of the Parts

It has not been able to produce a design that would enable the constructor to purchase all of the parts from one supplier, so some shopping around will be necessary. Also some of the suppliers listed now only supply the small items in packs so please check this first. The power MOS-FET's are the most expensive items but savings can usually be made if you buy 10+ so see if someone else you know wants to build one and purchase the MOS-FET's together to get the saving. Some of the items are not stocked by the suppliers listed, but they have an equivalent and so this is the stock number I have given in the parts list.

Identification of Parts

There are quite a few parts that you need to insert the correct way round, these are C1, C2, C4, D1, D2, D3, D4, RP1, Q7, IC1 and IC2. On C1,2,4 the negative lead is the one with the black stripe nearest to it. Pin 1 of RP1 is the pin with the dot by it. The positive ends of D1 and D2 will have a line at that end. The positive lead of the LED's, D3 and D4 will be the longer of the two leads. The two IC's have the end which is pin one indicated by a notch in the plastic case.

Construction

Some of the components (IC1,2, Q1 - Q6) used in this design are CMOS devices and can be damaged by static electricity. When handling these items it is advisable to take some basic precautions, do not wear clothing which builds up a static charge, do not handle the items until needed and before you touch them try to touch a water pipe which should earth any static charge you have built up.DO NOT connect yourself directly to the mains earth.

The speed controller is made up of two modules, the main PCB and the heatsink with the five power MOS-FET's fitted to it. The heatsink can be made of any suitable off cut of material. Mount the 5 power MOS-FET's on it using M3x6mm counter sunk screws and M3 nuts, and then bend their leads up at right angels as close to the body of the MOS-FET as you can. Then Attach a strip of mylar hinge material as shown so that the mounting nuts do not short out on the bottom of the PCB.

The PCB can be assembled taking care to insert the parts the correct way around, and cutting off the component leads as close to the board as possible. As the PCB has plated through holes you do do need to have a soldered joint were the solder is built up around the components lead. D1 should be fitted before Q6 as it is under it, D1 is a surface mount type device and needs to be soldered to the two square pads on the top side of the PCB. Also notice that Q6 is fitted upside down, with the back of the device pointing upwards. Most of the capacitors actually lay flat on the PCB and do not sit up right, this is to keep the profile of the unit as low as possible. If the speed controller is to be used at high motor currents then it would be advisable to build up the wide tracks on the top and bottom of the board that join the MOS-FET's together, with a bead of solder.

Once the PCB has had all of the components fitted the servo lead can be soldered to the pads on the back of the board, the pads have +, -, s by them to indicate which is +5v , -v or 0v and Signal, once soldered the lead should be secured to the board with a dab of epoxy. The power leads will need to be attached to the PCB before it is mounted onto the MOS-FET assemble. The battery negative lead is soldered to the pad on the top of the PCB nearest IC3. The Motor negative lead is soldered to the pad on the bottom of the PCB nearest to Q6. The positive battery lead does not need to be broken as it goes to the motor, but we need to tap off it to measure the battery voltage and also obtain our BEC supply, so about 3mm of the insulation is removed and an off cut of one the resistor leads wrapped around the inner conductors and soldered, the ends of this lead are then soldered to the pad on the bottom of the PCB nearest to IC3.

When the PCB is finished it can be tested before fitting it on to the MOS-FET assembly as stated in the section 'Testing'. If the unit seems to function correctly then it can be fitted on to the MOS-FET's. Slide the PCB down over the leads of the MOS-FET's until the bottom of the PCB is touching the body of the MOS-FET's and the PCB is parallel to the heatsink, then soldered the leads of the MOS-FET's from the top side of the PCB. You can now test the complete unit driving a motor.

If all is OK then the completed unit can be wrapped in some heatshrink tubing as used for making up battery packs, it is important that the heatsink is not able to short to any wiring in the installation as it is not at 0 volts. The heatshrink tubing should be cut away around the switch SW1 to enable the settings to be changed.


Testing

The completed PCB assembly can be tested before fitting to the MOS-FET's by connecting a battery to the power leads, if all is OK the green LED should flash about once per second, if the arm button is then pressed the green LED should the light permanently, if the servo lead is then plugged into a receiver and the transmitter is turned on the green LED should start to flash at a high rate, close the throttle on the transmitter and the red LED should come on, open the throttle and the red LED should go out, advance the stick to full power and the green LED should come on to indicate full power.

Once the PCB is fitted onto the MOS-FET assembly the above tests can be repeated this time with a motor connected to the output leads from the unit. Once the red LED comes on then the motor should start when the stick is moved towards full power.


And Finally

I hope that this design fulfils all of the shortcomings of the Mk1 and that it meets the needs of the electric flight enthusiast, without being too complicated or expensive. The software is in revision 1.0 at the moment and if anyone has a feature that they would like to see in a speed controller then I will look into the feasibility of including it in a future version of the software.


Return to main page...