This page is about my development of the speed controller to go between the R/C receiver and the motor to be controlled.

THEORY:

Initially when I bought by transmitter/receiver (ROBBE FUTABA FC-16 kit). I rushed home to view the signal coming out of the receiver (usually white wire going to servo) when I exercised the stick on the transmitter. This was done with my old oscilloscope. The Signal is a square pulse that approximately comes once every (25 ms), the pulse differs in width as the stick was exercised. When the stick is in the middle the pulse is about 1.5 ms wide and a minimum of 1 ms and a maximum of 2 ms. Whatever motor controller I would make, had to decode this PWM signal.

Figure of PWM signal coming out of the receiver

I knew that I would make the motor controller the H-bridge way, so the output of my processor had to decode the incoming PWM signal to 2 outgoing motor controlling PWM signals. One for forward and one for backward. These signals would look something like this:

Figure of one of the PWM signals coming from the PIC to the FETs

These two signals had to be PWM signals as well but with a difference. When the stick was in the middle, the corresponding outputs has to be without any signal, when the sticks was in their maximum, the pulse had to be at 100% length to give a constant output voltage. Stick movement would in between idle and max, would produce a corresponding percentage of the pulse.

HARDWARE:

The Reason why developing this speed controller, is for its use in my Submarines and my flying wing. The requirements for the speed controller was that is should be possible to use both the forward and backward stick, both with variable amounts.

When knowing the great device PIC16F84, it was clear that this was a part of the solution.

The first design worked fine, but since I was using both PNP and NPN in this design, it would be an expensive affair when changing the FETs with types that could pull higher currents and have a smaller R(on). This is due to the fact, that the high current FETs is more expensive to produce in (NPN). This lead to the second design - utilizing a small voltage doubler (ICL7660)

A neat feature that I know that ROBBEs Motor controllers also have - Is the adjustment button. The software I would write to the PIC, should use this button to configure the forward, mid and back positions of your R/C transmitter - so that it would always work, even when changing transmitters. (Future version might have some automatic configuration, based on the maximum and minimum received signal, and then calculate its "borders" itself).

View PCB

View the PCB in Black or White positive print, for easy print making - Made by Mark Kisogloo

Download PCB in Protel 2.0 format

View old SCH

View schematic made by Mark Kisogloo, This is realy a nice schematic.

Download SCH in PROTEL 2.0 format

Download .HEX file here  

Fuse Bits are not set in the code, and should be 

SOFTWARE:  

ADJUSTMENT INSTRUCTIONS:

If it is the first time you apply power to the chip, it will blink 4 times and be ready for ajustment.

IMPORTANT - Now press the button once more to exit the INIT rutine.

If the LED blinks 4 times again, try to do the adjustment in the other order Backwards, middle and forward.


The software was developed using the Microchip MPLAB 5.0 suite, free of download at www.microchip.com, This tool is ok, but very disappointing that it still runs in this hopeless 16 bit UI, that amongst others prevents the user from saving file named other that the doll 8.3 format             ) -:

I managed to come up with a theory that could become a workable piece of software.

At startup, I start by looking at the EEPROM, if the values of the EEPROM is all equal, I assume that the motor controller is powered up for the first time, and therefore needs to be configured. The status indicator blinks 4 times. The transmitters stick is placed in the full forward position, the adjustment button is pressed, and the value is stored in the EEPROM, this repeats for the middle position and full back. When the adjustment button is pressed for the last time, the values is verified (forward<middle<backward) if this is ok, the process is continues. Otherwise it restarts.

If the user wishes to reconfigure the motor controller, the user should hold down the adjustment button while the circuit is powered up.

Well I use the feature of the PIC16F84 that it generated an interrupt as soon an 0-1 or 1-0 transaction takes place. On a 0-1 transaction, the content of the RTC is cleared, an when a 1-0 transaction takes place, it stores the content of the RTC, leaving the length of the PWM signal as a value for further processing.

In the meantime, the processor runs in an endless loop, reading the value (read from the RTC in the interrupt), and acts upon it. It reads its actions from the value, Forwards - halt - Backwards. If for instance the signal indicates forward, it then determine the amount, to be able to generate the PWM signal out to the FETs.

The outgoing PWM loop is timed, to repeat itself every 1ms, resulting in this 1KHz humming tone of the motor, when its not working at full power.

One of my friends has bought one of ROBBES motor controllers, that can pull 2 motors. But if I were to choose between the one I made myself, and the one ROBBE makes, I would choose my own. This choice is build on the functionality of ROBBES motor controller. When giving full power forward, at goes directly to full backwards, ROBBE has some kind of delay, that lets the motors first go to full stop for a half a second, and then goes to full backwards... this is really annoying an unpractical, when you are trying to avoid some rocks when diving with my submarine.

 

Email me at - kimfmx@gmail.com