There are no pictures and circuit layouts in this as of now.  I am having problems with getting them to load.

Owner's Manual
MeccanIC DC Motor Controller
Model 100.
12 to 55 Volts DC,  3 amps continuous.

The MeccanIC system.  Electronics for MeccanoTM.






E V Corp
705 West Kirby Ave.,
Champaign IL 61820-6833. USA
Sold by sales@encodergeek.com
Internet support is at Encodergeek.com


Owner's Manual.
"MeccanIC" Motor Controller
Model 100.  Version 1.00
For all DC motors up to 55 VDC at up to 3 Amps continuous.


Historical note:

MeccanoTM is the British precursor of the American Erector Set System

In March of 2004, I put in the public domain, a fairly detailed description of what would have to be done to add a reasonable amount of electronics to the Meccano system to allow us Meccano fans to make all sorts of automatic machines with standard Meccano components.  I imagined that electronic engineers would take up the challenge and provide the components I had described in some detail.  It did not happen, though many individuals contacted me on the internet to express a strong interest.  Last year I retired and now have the time to take up my own challenge.  This controller is the first in a series that allow the intelligent control of motors in the Meccano and other similar systems.  Other related components like motors, encoders, switches, relays and cams that fit to the Meccano system are available from the encodergeek web site.

The MeccanIC standards mentioned above can be accessed at:

http://www.pinecreekbay.com/harpritsan/MeccanICindex.html

The encodergeek website can be accessed at:

http://www.encodergeek.com

"MeccanIC" is the word I coined to describe a system of Electronic components for Meccano.   You use MeccanIC electronic components with standard Meccano components to create electro-mechanical devices and automatic machines.


Features:

The Model 100 controller is designed to give you complete control over a small DC motor (at from 12 to 55 volts at up to 3 amps continuous) either from a simple potentiometer or an electronically generated signal.  A signal suitable for a R/C servo, a frequency or a PWM signal can be used.  The most powerful feature of the controller is that it is completely programmable by the user.  You have complete access to the entire PIC and every I/O point under control of an 8 bit computer.

How the controller responds to the control signals is programmable at the controller.  No computer is required for local programming but a potentiometer needs to be connected to the controller.  (The controller can also be programmed using a computer but most users will find that using a potentiometer is the most convenient way.

The controller supports the following features and functions:

On-Off switch on board
Control choices are
Speed control
Forward and reverse control
2 Limit switches
Remote ON-OFF control with E-stop switch.
Complete unrestricted programmability
2 lines by 16 character display for status, programming and feedback
4 selector switches for 16 possible separate modes of operation
2 Interactive push buttons switches for programming.
Mounts to standard 5/32 inches holes, ½ inch on center (Meccano standard) or can be mounted remotely if desired.
Two LEDs for status indication
One LED for power indication
Controlled by 40 pin PIC 16F877A 8 bit microprocessor.  Many other PICs can be used.
Amplifier: 3 amps at from 12 to 55 volts DC.  6 amps for very short bursts.
2.1 mm wall transformer connections for motor power and logic assure safe operation with no high voltages present at the controller.  The motor power transformer must provide a minimum of 12 volts DC.  Motors needing less voltage can be used by lowering the controller power output to an appropriate level.


The basic set up decisions

There are two basic aspects of the set up so you have to make two basic set up decisions.  They are

1.What type of signal is being used to control the device
Potentiometer  or 0 to 5 voltage
R/C servo signal
PWM signal
Frequency

2.How will the signal be used to control the motor
Forward and reverse operation
One direction operation
High sensitivity operation forward and reverse
High sensitivity operation in one direction

These will be covered in detail in the later sections.  If you program the controller then you decide what the operations will be and none of the above applies.


Description of the connectors.

The connectors on the controller are used as follows.

Connector 1:  This 10 pin connector is used to program the controller and is not to be used for any other purpose.  You would use this connector only if you want to write your own software for this controller.  Advanced user can get more information on programming from sales@encodergeek.com.  Programmers and all the necessary ProBasic compiler software are available from microEngineering Labs Inc. and a number of other vendors.

Connector 2:  The potentiometer for controlling the operation of the motor connects to this connector when the controller is being used in potentiometer mode.  Use the potentiometer provided with the controller for best results.  If you want to use your own potentiometer, a 5K to 50K linear potentiometer with a center wiper is appropriate.  The 4th pin on this connector is a common ground for use as needed to share a ground with another device.

Connector 3:  This connector is used for controlling the controller in R/C servo, frequency input and PWM mode.  The two wire control must use the correct wire for ground.  The appropriate control mode is selected with the controller set up procedures.

Connector 4:  Emergency stop.  If these two terminal are shorted together, the operation of the motor will be inhibited immediately in every mode of operation as long as the short is maintained.  The motor will be controllable again when the short is removed.  This contact can also be programmed to reverse the motor immediately at ever contact.  A delay is provided to inhibit double reversal.

Connectors 5 and 6:  These connectors connect to limit switches for the operation of the motor.  Each limit switch inhibits the motor in one direction.  When a limit switch stops the operation of the motor in one direction, the motor can still be moved in the opposite direction. 

Connector 7:  This connector is wired to connector 3 and provides an alternative way to connect the RC or PWM connection to the controller using pins that are 0.1 inches on center.  The middle pin on this connector is not used.  Pin placement matches R/C hobby servo connectors.

Connector 8:  Power input for the LOGIC.  Any voltage from 9 to 16 volts DC is acceptable.  Power is converted to 5 volts DC on board the controller.  The connector accepts a standard, positive center, male 2.1 mm wall transformer power supply connector. 

Connector 9.:  Power input for motor.  2.1 mm positive center wall transformer power supply between 12 and 55 volts at 3 amps maximum.  24 volts and 1.0 amps will be adequate for most operations.  Many laptop power supplies meet this requirement.

Connector 10:  Power out to the motor.  Connect the motor here.  If you want to reverse the motor. Reverse the connections at this point.  The connection is not polarity sensitive.





Figure 01
Controller Connections.  Top view.


Connector 11:  Encoder connector.  For future use.  Has minimal use at this time.  Encoder pulses can be used as a tachometer input to control the speed of a motor.  Other processors that can be used on this board are more suitable for the operation and control of motors with optical encoders (18F4331).  Encodergeek.com provides suitable inexpensive motors for serious experimenters.


Selector switches

The source of the control signal is a programmed function that is not affected by the selector switches.  Once programmed, the system stays in the programmed mode. If the source is not changed, the default input device is the 5K linear potentiometer.

The four selector switches allow the operation of the controller in 16 modes.  Not all modes are used at this time.  These are assigned as follows:

The four switch positions are read as follows:
Zero is switch closed.
One is switch open.


Modes of operation

Switch#Description of usage

000000Motors off.  Status of potentiometer and switches shown on display.  This mode lets you check the operation of all the switches and inputs without running the motor.

000101Reverse and forward operation.  Center position of the potentiometer stops the motor.

001002Zero to full speed operation in one direction.  To reverse the motor, reverse the leads.

001103High gain operation.  Same as 00 but the system is much more sensitive to the signal provided.


010004Set the minimum and maximum power levels for the motor.  The minimum power is the power at which the motor starts to rotate.  The maximum power is the power that you do not want to exceed.

andsets the lower and upper deadbands for the operation of the motor.  These dead bands are defined at the extreme CCW and CW positions of the potentiometer.  They do no include the small, inherent deadbands at each extreme of operation that each potentiometer comes with (as manufactured).

andselects whether the emergency stop contacts will stop or reverse the motor with each closure.  If the reversing option is selected, the motor will reverse every time the switch is actuated but will revert to normal operation if the potentiometer crosses the zero switch point.  The operation is not affected if the motor is in single direction mode.

andselects the mode for control.  The following input modes are supported

0Radio Control.  Motor is controlled by signals from a standard hobby R/C receiver as used to position an R/C servo.  Speed (not position) and direction are controlled.
1Local Potentiometer.  Wiper position of potentiometer controls the speed and direction of the motor.
Computer control.  A TTL level PWM signal controls the speed and direction of the motor.


Programming modes

010105Used to program the five settings for five speed operation.  The five settings will be interpreted the same no matter what form of control is used.  Keep in mind that these settings will be interpreted according to the mode that the motor is in.  Since the controller is usually used in the FWD-REV mode, the readings should be set from
0 for max reverse speed
an intermediate  reverse speed
127 for stopped
an intermediate forward speed and
255 for max forward speed. 

011006Displays the 5 selected input speeds on the display.  Motor control is active so you can try out the operation under the selected inputs.  Control is bi-directional but can be made uni-directional by selecting appropriate values.

011107Programming all other variables and resetting to User and Factory defaults.  The following values are programmable:
1.Use or ignore limit switches
2.Save current User settings as user defaults
3.Read last saved User settings
4.Reset to Factory settings.  You cannot modify the factory settings.
5.Use or ignore Emergency Stop

Next, setting sets the 5 speeds for the 5 speed control mode. 

First speedof five speed operations
Second speedof five speed operations
Third speedof five speed operations
Fourth speedof five speed operations
Fifth speedof five speed operations













Figure 02
Components identification on Controller




Figure 03
Potentiometer segments explanation.


Learning by doing.

This is a sophisticated controller with a control interface unlike any you may have used before and the easiest way to learn to use the controller is to undertake some "hands on" exercises.  Please take the time to do so as I guide you through them.  We will cover each of the modes of operation described above, one at a time.

You need two wall transformer power supplies and a small DC motor (the motor is provided) to learn about the controller.  The logic power supply needs to be between 9 and 14 volts DC at 0.5 amps.  The motor power supply needs to be between 12 and 55 volts DC and can be between 0.5 and 3 amps depending on the needs of your motor.  Neither power supply needs to be closely regulated.  Both need to have standard 2.1 mm connectors with positive centers.

Undertaking the these exercises will acquaint you with the operation of the controller with a potentiometer.  Operation from a computer is similar except that the controller first converts the computer signals to potentiometer equivalents and then responds as commanded.  Note that the motor will not run when the controller is first turned ON no matter what the settings.  The system is designed to force you to go through a 0 speed condition before the motor will respond.  This prevents runaway operation and related accidents.

Exercise 0.  Motor is dormant.  Setting up the controller and using it as it comes out of the box.  Connect up the controller as shown in Figure 4 below  The controller is provided pre-programmed for this exercise with the small motor provided.  The meaning of the information in the 2 line by 16 character display is shown in the following diagrams.

The four selector switches should be in the "0000" position for this mode (All closed).  The motor and the LEDs are turned off in this mode.  Potentiometer is read but does not affect the motor.  The setup lets you look at the operation of the potentiometer and the various switches to make sure that all the components are working as you had intended.  Actuate the two push buttons on the bottom right of the controller to confirm their proper operation.  Each will make one of the LEDs come on.  If you have any switches connected to the connectors along the top of the controller, their operation will be annunciated on the first line of the display.






Figure 04
Basic set up for introductory session with controller



Turing the potentiometer back and forth through its entire range should display a reading between 0 and 255 on the bottom line.  Depending on the potentiometer there may be dead areas at the extreme ends of the rotation.  This is normal.  Potentiometers with linear center wipers and a resistance of between 5K and 50K ohms are suitable for use as control potentiometers.  (Since the center wiper provides a voltage of between 0 and 5 volts to the controller, a similar voltage generated by some other source could be used by sophisticated users).

+  +  +  +  +

Exercise 1.  Forward/Reverse operation.  Set the selector switches to "0001" for this mode of operation.  The potentiometer will now run the motor between full reverse and forward speeds at the selected max power.  If the potentiometer is not at the CCW position (which is the 0 power position for this mode) when this mode is selected, the motor will remain OFF till you move the potentiometer through this position.  This safety feature keeps the motor from running away on startup.  Move the potentiometer through its entire range and notice how the display changes.  Also note that there are deadbands on either end of the potentiometer travel and make a note of how large they are.  (They are programmable and allow you to select the useful range of potentiometer movement for each particular application).

Note that the LEDs annunciate the direction of rotation of the motor and that an "F" and "R" on the lower right corner of the LCD also change with the motor direction (Forward and Reverse).





+  +  +  +  +



Exercise 2  Operation in one direction.  Set the selector switches to "0010"" for this mode of operation.  The potentiometer will run the motor between zero and full forward speed at the selected max power.  (Reverse the motor by reversing its leads).  If the potentiometer is not at the minimum position (which is the 0 power position for this mode) the motor will remain off till you move the potentiometer through this position.  This safety feature keeps the motor from running away on startup.





+  +  +  +  +


Exercise 3  Five speeds mode.  Set the selector switches to "0011" for this mode of operation.  In this mode the motor will run in one direction if the pot value is below 127 and in the other direction if it is above 127.  Same as in exercise in 1.  The potentiometer will run the motor at five different distinct speed settings (one of which should be zero).  If the potentiometer is not at the zero position (or the 0 power position for this mode) the motor will remain off till you move the potentiometer through this position.  The controller is in forward/reverse mode at this setting so that reverse moves can be undertaken.  Reverse moves can of course also be omitted.  The selections are usually selected as a slow and a fast speed in either direction and the zero "stopped" position in between.  The deadband settings at either side of the potentiometer are programmable and active in this mode.





+  +  +  +  +


Exercise 4  Setting the minimum and maximum power levels.  Set the selector switches as "0100" for this mode of operation.  This is a programming function that lets us set the limits within which the motor will operate.  The display shows the minimum and maximum values for the PWM function.  The programming switches S1 and S2 are used to set the respective values.  The potentiometer is used as the input values selection device. 



+  +  +  +  +


Exercise 5  Setting the lower and upper dead band widths  Set the selector switches as "0101" for this mode of operation.



+  +  +  +  +


Exercise 6  Shows what mode of input has been selected and displays the version of the software in the controller.  Set the selector switches as "0110" for this mode of operation.  No inputs are possible or necessary in this mode.





+  +  +  +  +


Exercise 7   Set the selector switches as "0111" for this mode of operation.  This exercise in has to do with reading and setting the various operating parameters in the EEPROM.  Each of the selections is shown on the first line of the display.  Switch S1 cycles through the choices one at a time.  When you get to the choice you want, press S2 to select the choice and move onto the next selection.  If you miss a selection you can cycle through the entire selection process again till you get what you want.

The displays for the various selections are shown along with the choices for each one.


The choices are
LIMIT SWITCHES USED
LIMIT SWITCHES IGNORED


The choices are
SAVE
NEXT


The choices are
READ
NEXT


The choices are
E-STOP NORMAL
E-STOP IGNORE


The choices are
YES
NEXT


All other settings will give this message.


There are no choices





The system is shipped with the user settings suitable for the small motor provided.  It reads the user settings on startup so whatever you change them to will be read on startup.  If you reset them to the factory defaults, the defaults will be read till the next change is made.  To reset to the factory defaults you have to first read the factory defaults from memory and then set them as the defaults.  You cannot change the factory settings themselves, they are fixed.

The following variables are stored in EEPROM
Maximum power value to motor
Minimum power value to motor
Low end deadband value, CCW side
High end deadband value, CW side
Motor brake status on startup (ON)
Motor direction at startup.
Emergency stop function.
Other functions used by the system by not accessible to the user.

The following menus appear in this mode
Setting to read/ignore the limit micro switches
Saving the current user settings to the EEPROM
Reading the saved user settings from the EEPROM
Reading the factory defaults from the EEPROM to current settings


Notes on motor use and selection.

The small motor provided with the controller is intended for use as an experimental motor only.  It allows you to start playing with the controller if you do not have a suitable motor on hand.  The user motor control parameters that are in the controller are set for this motor when run at 24 volts and may not be appropriate (small or large enough) for a larger more powerful motor.  Running this small motor at high voltages and high currents settings could destroy this motor.  (Replacements are not provided under warranty).

It is the user's responsibility to provide a suitable motor and to set the controller setting to match its properties.  The controller motor power provided from the wall transformer must be between 12 and 55 volts DC and between 0.25 and 3 amps. .(It should be matched to the motor you plan to use). 

Modes of  operation

The response of the system to the various inputs is not affected by the source of the input.  The response to all forms of input is identical. 

The motor controller can be operated in the following input modes

1.From a potentiometer.  In this mode the input signal is a voltage between 0 and 5 volts provided by the wiper of the potentiometer.  This mode is suitable for manual operation at the machine.

2.From a hobby Radio Control receiver from a servo port.  In this mode the signal is the length of a positive pulse between 1.0 and 2.0 milliseconds long provided about 60 times a second by the radio receiver.  Normally this positions the servo.  This is converted to a number between 0 and 255 by the controller and used to control the speed of the motor (not the position).  This mode of operation is suitable for radio controlled machines.

3.From the duty cycle of a PWM signal.  In this mode this signal is the relative duty cycle of the PWM signal.  The frequency of the PWM signal is not important, only the relative length of the hi portion to the total wave length of the signal.  This is converted to a number between 0 and 255 by the controller and used it to control the speed of the motor.  This mode of operation is suitable for machines with an on board computer.

In each of the above cases the signal is converted into a value between 0 and 255 and that value is used to set the speed and direction of the motor just as is done when using a potentiometer.

The input device and the motor controller must share a common ground for the system to work properly. 


1.  Potentiometer mode, local mechanical control

In the potentiometer mode, the A to D instruction in the MCU converts the potentiometer reading into a value between 0 and 255.  No adjustments are needed.  All modes of operation respond to a number between 0 a 255.


2.  Radio Controlled Servo signal Mode

If the controller is in the servo mode, the pulse that it receives will be between 0.75 Ms and 2.25 Ms long with 1.5 Ms being the center position.  Normally the pulses are received about 60 times a second.  The controller measures the length of the pulse and converts this to a number between 0 and 255 which is then used the same as it would be if it was read from the potentiometer.  Adjustments needed to get the desired 0 to 255 reading are made in software and cannot be adjusted by the user.  (Occasionally the conversion is not perfect but this does not affect the operation of the controller).

The signal from the radio receiver is fed to the end connector and the ground connection when using the 3 pin connection.  The 5 volt center connector is not used.  When using the two screw connections, the grounding convention should be obeyed.  The seventh connector is ground and the eighth receives the signal (as counted from the right).


3.  Computer generated PWM mode

In the PWM mode the controller measures the high portion and the low portion of the incoming PWM signal and uses the following formula to convert the ratio of the two into a number between 0 and 255

Control value=255*(hi pulse)/(Lo pulse +Hi pulse)

It is necessary to make adjustments to the values to ensure that a value between 0 and 255 is obtained.  This is taken care of within the software in the controller and cannot be adjusted by the user.

It is desirable to have a relatively slow (5000 cps) PWM rate so that the controller has enough time to make usable pulse width measurements.  A slow PWM rate that you can generate and are comfortable with should be used.


4.  Computer generated frequency
















+ + + + + + + + + + + + + + +



You need two wall transformer power supplies to power the motor-controller system.  Each of them needs to have a positive center and a standard 2.1 mm male connector.  The voltages do not need to be closely regulated.

You also need a small DC motor and a potentiometer and these two are provided with the controller.

microEngineering Labs

meLabs provides two compilers and three programmers that can be used to completely program this controller in a BASIC like language.  Their Pro Compiler is recommended.

The web site for microEngineering labs is at

melabs.com

And the support address is

support@ melabs.com







Figure 00
PCB Schematic.  Controller wiring.
Schematic may not reflect latest changes and improvements to controller



Warranty statement for
Model 100 MeccanIC controller.

Electric Vehicle Corporation will repair or replace (with a new or repaired unit) your controller for a period of 30 days after date of shipment to the original customer at no charge.  Abuse is not covered by the warranty.  Any physically damaged, customer repaired or replaced components, or blown out or burned components constitute abuse. 

All non warranty repairs are done at cost for materials and labor.  Please e-mail us for a return authorization number before sending in the parts to be repaired.  If you can describe the symptoms accurately we can usually e-mail back an estimate to repair.  Payments can be made via PayPal only and must be made before parts are returned to you.

We can currently keep a record of all sales so a warranty card is not needed. 

Customer is responsible for shipping of all warranty and repair parts to E. V. Corp.

Software reloads are provided as follows:
If you return your MCU for reprogramming  $25.00
If a new programmed MCU has to be provided  $40.00
Repair of a very BADLY DAMAGED UNIT $82.00 exchange.
Includes shipping and handling via USPO

The latest developments are posted on the Encodergeek.com website.

End
Page is in process of being created