MC-2100 Control Algorithms – What I’ve learned so far…
I was helped out immensely by receiving a reverse engineered schematic of the MC-2100. That enabled me to examine and begin to understand how the hardware of the controller worked together to control the motor. However, it didn’t have much to say about the algorithms contained in the Cypress PSoC serving as the controller’s brain.
Throughout the process of developing a control circuit to drive the controller, I’ve learned quite a bit about the software in the PSoC, and I’d like to share the information. The best way I can think to accomplish that is to document the timeline of my testing, and comment on the results. There’s a lot to read here, but if you’re trying to figure this thing out, I think it will be helpful. Here goes!
Test conditions and results in roughly chronological order:
1. Running a motor (in the lathe) without speed feedback
Operated normally as best I could tell. This was using an early version of the standalone PWM circuit.
I’ll find out later that the tach input is used for speed feedback by the controller. The MC-60 I’ve used before doesn’t use the tach at all, so I didn’t think to hook it up.
2. Testing the MC-2100 on the bench with no motor or tach connected
No function. Status LED remained solid indicating AC power but no control signal from dash. 0% duty cycle (no voltage) at the motor terminals. After troubleshooting everything I could think of, replacing components on the MC-2100, etc., I eventually plugged a motor in and it fired right up.
Apparently the MC-2100 won’t do anything unless it senses current through the motor. That made sense I guess, which lead me to my next bright idea…
3. Bench testing with a large value resistor (10k?) across the motor terminals, no tach
The status LED blinked rapidly indicating control signal received. The duty cycle of voltage across the motor terminals varied with control signal duty cycle.
Apparently functioning normally. I figured this way I could test the controller without a big spinning flywheel on my desk. I tested in this way for a while, working the bugs out of my standalone circuit.
4. Bench testing with a motor connected (after above resistor testing), no tach
Once I got the bugs worked out of my circuit, it was time to test with the motor connected to make sure everything was working. The LED would begin to blink quickly indicating signal received, but shortly after the motor started, the LED would blink slowly indicating operation at or near current limit, and duty cycle of the motor voltage would be reduced, stopping the motor. Resetting the control signal to zero was necessary before the motor voltage would increase again. At very low control signal duty cycle (low motor target speed), the motor would turn without tripping the over current, but at erratic (slow) speed.
At this point, I theorized that the MC-2100 has closed loop speed control with an adaptive algorithm to tune the control constants. I must have messed up the control constants by running with the resistor in place of the motor. Basically, the controller changed it’s definition of current overload to be much lower, because “normal” current for a given voltage through the resistor was very low. Connecting the motor resulted in much higher currents, tripping the alarm. There was also no speed feedback to inform the controller that the motor was actually functioning correctly, not stalled and overheating. I assume condition 1 worked OK because the current limit hadn’t been messed up yet, so the MC-2100 just assumed the reed switch had gone bad.
5. Bench testing with motor and tach directly reading motor RPM
Better performance than above test. Sensitivity to current limit seemed to reduce with time. Response to step change in control signal still had significant overshoot, with high settling time.
Testing with the tach connected seemed to desensitize the current limit, but not remove it. My theory was that the controller would eventually adapt to the new current demand of the motor once it had feedback that the motor was spinning. This seemed true to an extent, maybe it just needs more time?
6. Programmed ramp testing with motor and direct tach (Arduino based ramped cycle testing)
Speed ramped from 0 to ~20% for 10sec, held for 15, then ramped back down and held at 0 for 15sec.
I let the controller run this cycle off and on for several days. Step response characteristics improved, but were still unsatisfactory. I was able to command higher steady state speeds without tripping the current limit as well. At this point, I became impatient and just wanted to finish the project, so I bought a replacement MC-2100 on ebay 🙂
7. New (used) MC-2100 testing with motor and direct tach
First test with new controller resulted in shutdowns shortly after motor start. Similar to case 4 above, but not identical.
My assumption here is that the default control constants expect a ~2:1 speed reduction through the treadmill drive belt. Directly reading the motor speed made the MC-2100 think the motor was running away. I decided to more directly replicate the treadmill environment to see if it would help.
8. New (used) MC-2100 testing with motor and half speed tach
I used Arduino to output a tach pulse to the MC-2100 at half motor speed (comparable to actual treadmill installation). Normal motor function resulted. Good step response, little to no speed fluctuation. Response to torque disturbances untested at this point.
This is the current state of development. I’m working on finalizing the arduino compatible control and speed readout circuit and enclosure, as well as mounting reed switches to my lathe. I’m curious to see if the controller responds well to the motor I’m using in the lathe, as it’s larger than the motor I’ve been testing with up till now.
Stuart 9:39 pm on May 5, 2013 Permalink |
My treadmill quit working and I noticed something from your article. My red LED is solid which you say means no speed voltage. When I try to start the machine it powers the motors for about a second then shuts down. Where does the voltage come from? Any idea which component went bad? How far from the magnet or whatever is on the roller for the sensor should the sensor be? I hope you can answer any of these questions. Thanks for reading.
schoolie 10:24 am on May 14, 2013 Permalink |
Stuart, does the indicator LED blink at all when the motor turns? If not, I’m not sure what’s going on.
The speed command signal comes from the console over the blue wire on the MC-2100 connector. The speed sensor signal comes into the MC-2100 through the two pin connector labeled HD7.
You can confirm that the speed sensor is working by disconnecting it from the board, and measuring the resistance across the sensor (you’ll have to stick a small pin or wire into each hole in the connector, and measure across them). The resistance should be very high most of the time, and drop to near zero for a bit each time the magnet on the roller passes by the sensor.
daniel 4:17 pm on October 12, 2013 Permalink |
how did you fix this problem?
schoolie 9:20 am on October 14, 2013 Permalink |
Unfortunately, I haven’t done much more work on the board that has the software messed up. What problems are you experiencing?
Reinhardt 4:12 am on February 17, 2014 Permalink |
Hi,
Having the exact same problem. The main supply transformer fuse blew while someone was using it (required to convert line input to 110-120V AC). I replaced it, selected a program, and noticed the Drive Motor turning for a while, then shuts down (if I remember correctly the LED was permanently on afterwards). Tried to have a look at the LED a second time around, but the fuse blew again… I guess I’ll get a few hundred more fuses to try and figure it out. It’s a shame about the LED not “working” if the motor’s disconnected.
Any advice on how to proceed? Like most people….I only have a multimeter…lol, what a pain.
Reinhardt 6:58 am on February 17, 2014 Permalink |
Forgot to mention, I already tested the speed sensor, and it functioned as you described.
More tests I’ve done/ things encountered:
1) When I plugged in the power, the dash lit up (without the magnet (key) connected), and the motor started, blowing the fuse. This only happened the “first” time I connected the power.
2) Replaced the fuse again: The dash lit up again, then turned off. Connected the magnet, and everything displayed correctly. Tried to set a slow speed….motor started, blowing the fuse.
3) So….disconnected the motor…repeat, fuse didn’t pop.
Figuring the problem lies with the Dash Controller…which will be a pain to fix….
Whats the best way to test the motor? Can I leave it connected to the belt, and use a 12V battery? Assume I should add a fuse in there too
Thx
Reinhardt 2:34 pm on July 23, 2014 Permalink |
Hi. I actually forgot about this post, and thought I’d share some info just in case someone else experienced the same problem.
The fuse being blown was caused by a blown MOSFET (Q2). I replaced it, but Q2 blew again (once the treadmill sped up), causing a short circuit, blowing the main fuse. I then replaced Q2 as well as the MOSFET driver (U5), and the bus capacitor (C5) (because it was a bit swollen, which usually means it’s reached it’s EOL). The treadmill is running now 🙂
Hope this helps someone.
Chz
Steven 4:46 am on April 14, 2015 Permalink |
may I please check what is the part number of U5? I have interesting in this application.thanks
Daniel Kaspo 8:11 pm on August 14, 2018 Permalink |
Hey Stuart, I’m in the exact same boat. If anyone else ends up in this predicament, I found a YouTube video of a user who had the exact same issue and at the end showed some resistors he replaced to fix it. I can’t confirm this works, but it seems like it did for him.
John- 1:49 pm on December 3, 2014 Permalink |
Hi,
I have a MC-2100 and treadmill motor that I’d like to use on my milling machine.
Schoolie or Terry, are either of you willing to sell one of these or do you know where I could purchase one ready to use?
Kyle B 3:09 am on January 6, 2019 Permalink |
Thanks for all the information Schoolie! I’m diving into the deepend as this is my first Arduino project, first coding project, and first motor retrofit. I hypothesized what you proved out – that the tachometer could be used by the MCB to compare expected speed vs actual speed and adjust load to the motor accordingly. How did you implement your digital1:2 pulley ratio? I couldn’t figure out how you sent that signal back to the MC-2100 from the available information. Any help would be appreciated. I know I could always setup my reeves spindle pulley to match the drive roller pulley and set up the tachometer that way, but was hoping to keep it at its largest diameter, which is about an inch larger in diameter. Thanks again!