|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Well, you can see by that I have jumped ahed a couple of pages without telling you. I intend to control the speed with Pulse Width Modulation, what this is, is a square wave that increases in duty cycle the faster you want to go. In English, when going slow a series of short pulses at supply voltage are sent to the motor and when you want the motor to go fast then a series of long pulses at supply voltage are sent to the motor. When using this method the motor will see an average voltage proportional to the length of the pulses it is receiving rather than us actually reducing the voltage with resistors and stuff. The advantage of this is that no energy is wasted (well not much anyway). There are many ways of producing a PWM wave form, it can be done with PIC’s, 555 timers, Nand gates and schmitt triggers, but I’ve taken the easy way out by using a custom made PWM motor controller (in kit form) and modifying it (slightly). The kit in question is from Maplin part no (VF59P). Below is the schematic of what it looks like now. The frequency that it runs at has been modified from its original 5k up to 25k, at this frequency the motor can no longer be heard buzzing. To set the frequency measure from pin 6 to GND (with the power off), adjust the frequency pot to read 56.7k (ohm’s) this will give an approximate frequency of 25k. If you wish to be more accurate then you can use a frequency counter. |
|
|
|||||||||||||
Basically what this module does is to take a DC voltage from the DCI111 and convert it into PWM, So what we have now will work something like this. Moving the stick forward on the R/C transmitter, this turns a servo, the servo turns a 10K pot (connected to the DCI111) the DCI111 gives out a voltage (proportional to the amount of travel on the R/C stick) to the PWM circuit and we then have a PWM wave form proportional to the said stick travel. In short, move the speed stick and go faster! Right then, that’s speed done with, what about direction. This works by slowing down either both the left hand wheels for a left hand turn or slowing the right hand wheels for a right hand turn also if one set goes in one direction and the other set in the other direction then we can spin on the spot. All of this clever stuff is done by the DCI111 so all we have to concentrate on is a circuit that will turn the motor in both directions. There are various ways of reversing the direction of an electric motor (all of which reverse its polarity) but we also want to implement a PWM wave form to control the speed, have a look here at various output stages I chose the Full bridge design. As you can see the Full Bridge requires its transistors to be switched in a certain order so I devised this logic circuit. What this does is take the direction voltage that is either high or low and convert it into 4 outputs for the FET driver. |
|
|
|||||||||||||
As you can see, the inputs that we have are PWM (from the PWM circuit) this is routed to the low side FET’s only, the direction input (from the DCI111) this is either high or low, and the enable input (from the fail safe or IGN switch) again is either high or low. The outputs are AH (A side High), AL (A side Low), BH (B side High) and BL (B side Low), the I on each output signifies that it is an input to the driver IC (see next circuit). The Enable input is also converted into a Disable output also for the driver IC. Have a go working out the logic your self! you will see that all outputs are switched correctly. The next stage is to convert all of those 5V outputs into the correct voltages to drive the FET’s, this can be done with loads of discreet components or again take the easy route and use a dedicated FET driver IC. The one that I settled on was the HIP4081AIP from RS, the only reason that I chose this one was because it is about the only one that I can get my hands on! There are allot of things to consider when driving a full bridge, the main one is the High Side FET issue, basically to turn a FET fully on (as we require) you must supply the Gate with 10V above Source. Now this is easy when the Source is connected to GND (like in the low side FET’s) all it needs is 10V! But the Source on the High Side FET’s is not connected to GND but connected to one of the Motor connections and a Low side Drain. What this means is that the Source on the High Side FET’s is at Supply Potential so to turn it on it will require Supply Potential (24V) plus 10V this is obviously 34V (higher than our battery voltage!). The IC that I have chosen is designed to get around this problem by having a built in voltage inverter, this will basically generate 10V higher than the supply voltage up to 95V! and it only needs 4 extra components to do this. The next issue is Shoot-through, what this means is that if both High Side and Low Side FET’s are turned on at the same time then you will have shorted out the Battery terminals therefore blowing your FET’s. Again the IC is designed to overcome this issue by introducing a short delay between switching from high side to low and vice versa, this delay is even user adjustable! |
|
|
|||||||||||||
On the left hand side we have AHI, BLI, ALI, BHI and DIS all from the previous stage, R1 and R2 are the dead time resistors to increase the shoot-through delay period, D1, D2, C1 and C2 are used in the Charge pumps and bootstrap supply’s (voltage inverters) and on the right hand side are the outputs that connect directly to the FET’s. NOTE AHS, BHS need to be connected to the relevant Source terminals on the High Side FET’s as they are used to determine the correct Gate voltage. And the Full Bridge Output stage as described earlier. |
|
|
|||||||||||||
The next issue we need to look at is the current limiter. This is needed to stop us from blowing up our expensive FET’s when creatures like Sir K and others decide to sit on top of us and we then decide to take them for an (attempted) run around the arena. The way that this limiter works is to use a Sense resistor. What you will find is that if you have a fixed resistance (the sense resistor) then the current flowing through it will be proportional to the voltage drop across it. So all we need to do is measure the voltage drop across it and this will give us an indication of the current flow. We need to make this resistor as low in value as possible, for test purposed am using 10 0R1 @8W in parallel, this gives a total resistance of 0.01R, this is because it is purely a sensor and we need it to make as little impact on the circuit as possible, if it is too high in value then it will eat up valuable power that the motor could otherwise be using. The sense resistor is shown in the Main Bridge circuit and the current limiter is shown below. |
![]() |
This circuit comprises of 2 op-amps U1 and U2 these are the industry standard 741 and are available in a variety of packages. U1 is connected as a Difference amplifier, its job bieing to amplify the voltage drop across R9. R3 and R4 set the gain of the device the output of this stage can be adjusted to suit individual preference the output voltage at Pin 6 =Voltage drop across R9 * (R3+R2)/R3 keep in mind that the max voltage is +10. With this current setup a voltage drop of 1V will give an output of 4v or can be said to have a gain of 4. R5 and C1 form an R C network and are intended to filter out the PWM frequency to allow stable operation of the next stage. R6 isolates the second stage from the first and alows D1 to rmove the negative component of the current sense signal. Moving on to the next stage U2 this time is used as a comparitor, the way this works is a fixed voltage is applied to one input (pin 2) and a variable voltage (from the previous stage) is applied to the other input (pin 3), when the voltage on pin 3 is equal to or exceeds the fixed voltage then the output will change from LOW to HIGH. RV1 supplies the fixed reference voltage , R7 supplies the require feedback to ensure stable operation the output has it’s negative component removed by D2 and we now have an output that can be fed to the PWM stage.D3 will illuminate when an overcurrent condition occurs (NOTE, D3, the LED is drawn backwards, this is an error please turn it round if you want it to work) The PWM circuit has also been modified to accept current control. The voltage across C4 (PWM cct) determines the maximum possible PWM duty cycle allowed, so if we limit this voltage we can limit the duty cycle, therefore limiting the current. What happens in the over current condition is that 5v is applied to the R30/R31 potential divider (from the current limiter), this in turn supplies 0.9v to the base of Q1 turning it on. With Q1 on then the soft start capacitor (C4) begins to discharge via RV2 therefore reducing the voltage across it and limiting the PWM duty cycle. This then reduces the current flow, which reduces the voltage drop across Vsense turning the current limiter off. The cycle will repeat until the excessive load is removed. RV2 can be adjusted to control the speed of the discharge therefore adjusting the sensitivity of the system. What you will actually see during an over current condition is the over current LED glowing dimley, this is because it is being switched on and off very rapidly. Also I am now looking at the possibility of connecting the current output to some kind of bar graph display so that we will have a visual indication of the current draw in the controller, this will be useful when we get to the stage of running up the motors in the bot as it will tell us if we have a sticky gear box or an in efficient motor! Keep an eye on this space as this and more issues get resolved. |
Most of the circuits here work from a +12v supply that presumably will be derived from a battery but also a +5v is required to supply the logic IC’s (7404 & 7408) and a -12v for the Op Amps. I have included a simple PSU using voltage regulator IC’s that will take a +24v and convert it to +5v and +12v and -12 suitable to drive these circuits. If you intend to run from +12v then it is a simple case of replacing pin 1 & 3 on U2 (7805) with a link and removing C1 and C2. NOTE it is not a good idea to run these circuits from the same battery that supplies your motors even with this PSU. |
|
|
|||||||||||||
All parts that I have used in these circuits are readily available, Most of which I obtained from Maplin with the exception of the HIP4081AIP which was from RS. Keep an eye on the What’s New page as I do intend to include a complete parts list. |
I currently have 2 complete sets of these circuits built on one veroboard and early tests using car cooling fan motors seem good. The H bridge config I am using is as shown on this page with 1 FET per LEG so I have a total of 8 FET’s. When moving onto larger motors and higher currents the PWM stage is affected by induced interference from the motors which results in a poor PWM signal causing the FET’s to blow. Try increasing the Gate resistrs from 10R to 100R also a 10uF and a 10nF are required across the supply rails of the HIP4081. This is still a work in progress and any suggestions are welcome, new or modified circuits will be posted here when available check the Whats New section to see the latest additions. I have now designed the next version of this project (in schematic form anyway). Revisions include an updated PWM circuit, the addition of opto isolators between the logic and output driver IC and I am currently working on some EMC reduction measure within the bridge. All of these circuits are an attempt at removing the induced interference when using larger motors. None have been built, and need to be tested by me before I give them any serious webspace but here is a taster of what it will look like. This file is 80K Also if you are interested in building a speed controller the check out Clive Sinclair’s site (not the ZX Spectrum man). This controller uses the same PWM kit and Logic stage as designed by me but uses a Relay/Fet Bridge similar to this. Check it out, its well worth a look. |
| [Home] [Whats New] [Battery Charger] [Basic Knowledge] [Speed Controller] [Motor Mods] [Contact] [FAQ] | ||