[4]

Another Treadmill Conversion

[3]
[10] Like what you see?
Click here to donate to this forum and upgrade your account!

FanMan

Mechanical Hacker
Active Member
Joined
Mar 14, 2013
Messages
345
Likes
210
#1
<div class="bbWrapper">There are a few &quot;treadmill conversion&quot; threads here with varying amounts of information, but I thought I'd summarize my own experiences here in one single thread as I progress. As of this writing, it's still a work in progress:<br /> <br /> I've wanted for awhile to convert my Jet 15 mill/drill to a variable speed drive to avoid the hassle of moving the belts around. My shop is so cluttered it's hard to get around to the back of the mill to move the belts. Anyway, a few weeks ago I found a free treadmill... free because the particle board slider bed had cracked but electrically it was in perfect condition.<br /> <br /> After getting it home and verifying everything worked, I ripped it apart. The motor nameplate says &quot;2.80HP treadmill duty @ 130VDC, 2.60HP cont. duty @ 110VDC/1940 Watts&quot;. As my mill has a 1HP AC motor that should work fine. The motor control board, however, is a MC-2100, which is a little trickier to interface than the older MC-60 that only requires a speed control pot. The MC-2100 is expecting a PWM (pulse width modulated) signal from the treadmil control board to set the speed. Fortunately, there are a number of websites with information on how to do this. Warning if you're not reasonably electronics savvy, you'd be better off with the MC-60 or a commercial DC motor controller.<br /> <br /> I decided to use the <a href="https://sonsofinvention.wordpress.com/2013/05/21/an-alternative-mc-2100-dashboard-replacement-circuit/" target="_blank" class="link link--external" data-proxy-href="/proxy.php?link=https%3A%2F%2Fsonsofinvention.wordpress.com%2F2013%2F05%2F21%2Fan-alternative-mc-2100-dashboard-replacement-circuit%2F&amp;hash=0fbe7124c33361a6688a9ff1c290d5e0" rel="nofollow noopener">&quot;Sons of Invention&quot; dual 555 timer circuit</a>: <br /> <br /> <a href="https://www.hobby-machinist.com/attachments/terry-27s-20circuit-20schematic-png.187505/" target="_blank"><img src="/data/attachments/144/144741-6c1693e0c3f33f0278669d5d651a63da.jpg" class="bbImage" alt="Terry%27s%20Circuit%20Schematic.PNG" /></a> <br /> After taking inventory of my electronics junk box, I placed an order from Digikey for everything I didn't already have. Once the order arrived and I had time to play, I put it all together on an old Radio Shack breadboard... and spent most of a day trying to get it to work. Part of my troubles were simple wiring errors, but in the end I had to change a few components. The 27K resistor going to the trim pot didn't do it for me, but a 33K did. I also added an led (with dropping resistor) to the pin 3 output from the first timer. Pointing my old Heathkit &quot;Thumb&quot; Tach (an optical tachometer for model airplanes) at the LED let me check the frequency. I also hooked the 16Hz output (that goes to the blue wire) to a small speaker at one point to verify it was working.<br /> <br /> <a href="https://www.hobby-machinist.com/attachments/breadboard_092727439-jpg.142893/" target="_blank"><img src="/data/attachments/100/100129-3e009696fac98e43de12297900a8cd50.jpg" class="bbImage" alt="breadboard_092727439.jpg" /></a> <br /> <br /> Anyway, I finally got it working, then made a permanent board on a Sparkfun breadboard that was in my Digikey order. Once it was all together, I tested it all... the motor goes from some speed too low for the Heathkit tach to measure up to around 6000 rpm. <br /> <br /> <a href="https://www.hobby-machinist.com/attachments/motor_test_172033273-jpg.142894/" target="_blank"><img src="/data/attachments/100/100130-ff0e7902543f2823432d3cb504f2adc3.jpg" class="bbImage" alt="motor_test_172033273.jpg" /></a> <br /> <br /> Along the way, I neglected to secure the motor properly so it fell on the floor, shattering the cooling fan... I'll have to work out a replacement.<br /> <br /> The flywheel / pulley attaches to the motor shaft with a left hand thread. Everything I've seen online makes it sound like it should be a piece of cake to unscrew it. Yeah right. Even with the broken fan removed and the back of the shaft clamped in a vise, it's not coming loose. Although I wanted to remove the flywheel entirely, I don't want to damage the motor trying to remove it, so I'm going to try to use it as it is. The poly-v bent pulley on the motor is roughly 1 1/8&quot; diameter and straight sided, so the plan is to bore out a v-belt pulley to fit over the poly-v pulley.<br /> <br /> It's said some of these motors have angled brushes so they'll work better in one direction than the other, but mine appear straight and the motor turns the same speed in either direction.<br /> <br /> Part of today was spent hacking up a Tripp Lite UPS case to hold the motor control board and some associated wiring.</div>
 

QCaudill

Swarf
Registered Member
Joined
Dec 14, 2016
Messages
17
Likes
6
#2
<div class="bbWrapper">So if the motor happens to be a CCW rotation instead of CW the threads on the flywheel would be R handed instead of L handed wouldn't they? Just a thought.<br /> <br /> Sent from my SM-N920P using Tapatalk</div>
 

FanMan

Mechanical Hacker
Active Member
Joined
Mar 14, 2013
Messages
345
Likes
210
#3
<div class="bbWrapper">I guess so, but I've never seen any mention of one with RH threads.</div>
 

FOMOGO

Active User
H-M Supporter-Premium Member
Joined
Sep 2, 2013
Messages
1,749
Likes
1,645
#4
<div class="bbWrapper">That's a pretty stout motor, must be from a commercial treadmill. I found one used for my wife a few years back and I think she would be a little upset if I commandeered it.<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" /> I'm betting your really going to like that kind of rpm range and torque, but you may have to upgrade the spindle bearings to take full advantage of the top end potential. Let us know when you have it up and running. Mike</div>
 

MozamPete

Non-Supporting Member
Non-Donating Member
Joined
Jun 26, 2014
Messages
555
Likes
1,045
#5
<div class="bbWrapper">Will be watching with interest - I brought a non functioning treadmill to use for a mill conversion a while ago, but I had to try and fix it and then the family wanted to use it. <br /> They seem to have lost interest now so when it had to be moved to put up the Christmas tree I took the opportunity to tear it apart. Have bench tested the motor but similar to yours it need an 'electronic' signal from the controller board on the handles to set the speed - haven't look in detail what this signal is but it is about a 20 core ribbon cable. Also has a very slow speed ramp up rate which could get frustrating. I was just planning to buy a generic controller, but you may inspire me to try and use the existing controller and build a new interface.</div>
 
Last edited:

hman

Active User
H-M Supporter - Sustaining Member
Joined
Feb 17, 2013
Messages
1,667
Likes
1,278
#6
<div class="bbWrapper">Fan Man -<br /> Thanks so much for the schematic! Now I'll know how I can make use of an MC-2100 controller if I run across one. I've kinda avoided used treadmills in the last few years, because I'd been afraid they no longer had the MC-60, which is all I knew how to wire up. <br /> <br /> PS - Your post inspired me to do some more looking, and indeed the dual 555 circuit is &quot;out there.&quot; One interesting site I found suggested adding a capacitor across the + and - rails, also adding an NC momentary switch between +12 and the end of the speed pot.<br /> <br /> <a href="https://www.hobby-machinist.com/attachments/mc-2100-555-spd-ctl-rev2-jpg.142958/" target="_blank"><img src="/data/attachments/100/100194-6511171c5f9618e26b1a475f2eebdd43.jpg" class="bbImage" alt="MC-2100 555 spd ctl rev2.jpg" /></a> <a href="https://www.hobby-machinist.com/attachments/mc-2100-555-spd-ctl-rev2-text-jpg.142959/" target="_blank"><img src="/data/attachments/100/100195-6fe46a7d59f33248cfe4ad2c38163626.jpg" class="bbImage" alt="MC-2100 555 spd ctl rev2 text.jpg" /></a></div>
 

FanMan

Mechanical Hacker
Active Member
Joined
Mar 14, 2013
Messages
345
Likes
210
#7
<div class="bbWrapper"><div class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote"> <div class="bbCodeBlock-title"> <a href="/goto/post?id=448283" class="bbCodeBlock-sourceJump" data-xf-click="attribution" data-content-selector="#post-448283">hman said:</a> </div> <div class="bbCodeBlock-content"> <div class="bbCodeBlock-expandContent"> Fan Man -<br /> Thanks so much for the schematic! Now I'll know how I can make use of an MC-2100 controller if I run across one. I've kinda avoided used treadmills in the last few years, because I'd been afraid they no longer had the MC-60, which is all I knew how to wire up. <br /> <br /> PS - Your post inspired me to do some more looking, and indeed the dual 555 circuit is &quot;out there.&quot; One interesting site I found suggested adding a capacitor across the + and - rails, also adding an NC momentary switch between +12 and the end of the speed pot. </div> <div class="bbCodeBlock-expandLink"><a>Click to expand...</a></div> </div> </div>Yeah, I saw that schematic, too. Mine worked without the extra capacitor, and I found putting the momentary switch where they show it (adjacent to the trim pot) did nothing... maybe it really should have been the speed pot. However, putting the NC momentary switch on the red wire (main power to the timer board) does the trick. Seems the motor controller won't start unless the timer signal comes on <i>after</i> the controller has started up.<br /> <br /> But get some extra resistors if you do... as I said the 27K didn't do it; it took about 42K total (the 33K resistor instead of the 27K plus most of the 10K trim pot) to dial in the right frequency.<br /> <br /> You can get MC-60's on ebay for $40-60. Just before I got the 2100 working I was getting so frustrated I was tempted to chuck it and just buy a -60.<br /> <br /> With all the frustration, if I was doing it again I think I'd go for the Arduino version. I've never worked with Arduinos before, but it's probably about time I did.<br /> <br /> Tonight I cut the hole in the switch box for the tach, and wired the reversing switch. Still debating on some of the wiring... the plan, as of the moment, is to keep the mill's existing start/stop to switch everything on and off, with the NC button to start the motor. The motor controller will provide 12VDC to the timer board, and I already have a separate 12VDC power supply that powers the lights that illuminate the DRO displays... I figure to use that power supply now for the tach and motor fan. As I said above I broke the original motor fan, so I'm going to use a 12V fan instead of putting it on the motor shaft, which has the advantage of blowing in the right direction even if the motor is running in reverse. I'm just debating if I really want the display lights to switch off when the mill's motor stops... but it will simplify the wiring, and I can always switch the power back on as the motor won't start again until I push the start button.</div>
 

FanMan

Mechanical Hacker
Active Member
Joined
Mar 14, 2013
Messages
345
Likes
210
#8
<div class="bbWrapper">Slow progress... last night I finished wiring the lower box that holds the motor controller; the upper box is done except for the 12V accessory wiring:<br /> <br /> <a href="https://www.hobby-machinist.com/attachments/box_wiring_221059348-jpg.143133/" target="_blank"><img src="/data/attachments/100/100369-b9945c8795c6da3951c642b996ae981e.jpg" class="bbImage" alt="box_wiring_221059348.jpg" /></a> <br /> <br /> It's made more complicated by the way I'm doing it... I'm using the enclosure from a dead Tripp Lite battery UPS, which was just the right size to hold the control board. Because the UPS had six power outlets, I decided to use them, and reduce the extension cord clutter around the machine. Three of the outlets will be unswitched, and the other three will be switched by the mil power. At the same time, I want to continue to use the mill's original power switch on the front of the head. As such, the power cord comes into the box and is directly connected to one set of outlets and a power cable going to the head. Another cable returns the switched power back to the box, with a tap along the way for a 12V power supply that will power the tachometer, the DRO lights, and the replacement motor fan (I wasn't sure the motor controller 12V supply was sufficient for all that). The motor wires (0-130VDCDC power from the controller and the thermal switch) go out a separate conduit to the motor, and finally the signal wires from the controller to the timer board, which is in the upper box with the speed control pot, reset/start button, and tach. After getting everything hooked up, I plugged it in (without the motor) and verified that the light on the control board was still blinking as it's supposed to.<br /> <br /> Next is to make the motor mount. A friend is boring the new pulley for me, since I don't have a lathe and he can do it far easier than I could with the rotary table on the mill.</div>
 

FanMan

Mechanical Hacker
Active Member
Joined
Mar 14, 2013
Messages
345
Likes
210
#9
<div class="bbWrapper">Progress tonight... my buddy bored out the pulley to 1.107&quot; (the OD of the poly-v belt on the flywheel) for me. He also turned down the OD to 3&quot; since it was an A/B belt pulley and the A section belt on my mill was considerably inside the OD. It wouldn't <i>quite</i> go onto the motor, which I expected, so I powered up the motor and hit it with a file. Took about a thou off and it slipped right on, filed a flat for the set screw and that part is done:<br /> <a href="https://www.hobby-machinist.com/attachments/motor_and_flywheel-jpg.143483/" target="_blank"><img src="/data/attachments/100/100719-3bd16f11c2effe812d4bfb9dad99f8af.jpg" class="bbImage" alt="motor_and_flywheel.jpg" /></a> <br /> <a href="https://www.hobby-machinist.com/attachments/motor_and_pulley-jpg.143484/" target="_blank"><img src="/data/attachments/100/100720-763d3eedfb5fb4cda52abc2faad356ed.jpg" class="bbImage" alt="motor_and_pulley.jpg" /></a> <br /> <br /> Once that was done, time to mount the motor, so I removed the original motor and slipped the new motor down through the hole in the belt guard... it <i>barely</i> fit, and there's just enough room to move the motor between loose enough to remove the belt and tight enough to run. Unfortunately, though, the lip around the hole is a bit too high to get the flywheel down enough to put the pulley in the right place, which I expected (or feared), so I removed the guard. Took a bit to figure out how to get the spindle pulley off, I didn't want to crank on it with a puller and risk damaging it, but it turned out with a puller hand tightened I was able to break it loose by moving the spindle... it was a taper fit and not that tight. Once the pulley was off the lower guard came off easily.<br /> <br /> I'm going to use the original spindle and intermediate step pulleys and belts. With the belt on the new motor pulley in the second-from-the-bottom location and assuming 200-5700 motor rpm, I'll have 143-4042 or 103-3031 rpm at the spindle with the front belt in the upper grooves, or 43-1192 if I move the front belt below the motor belt.<br /> <br /> I epoxied a magnet (for the tachometer) to the underside of the spindle pulley with JB weld, then drilled a hole in the lower guardp for the proximity sensor for the tach. Not sure yet how I'm going to machine down the lip on the hole... it's about 1/2&quot; high and I need to remove about half of that. I could just cut it out with a Sawzall, but I'd like to retain at least part of the lip for the stiffness it provides. Can't mill it out, unless I put the old motor back on the mill, which I'd rather not do at this point. But I'd had enough for one night, so I'll think about it overnight.</div>
 

markba633csi

H-M Supporter - Premium Member
H-M Supporter-Premium Member
Joined
Apr 30, 2015
Messages
2,566
Likes
1,332
#10
<div class="bbWrapper">I'm not surprised no power supply decoupling (filter) cap was shown in the original circuit- It's assumed if you have worked with 555s before you would know to add one.<br /> If it seems to work without one you should add it anyway because the circuit may be unstable without it. I would actually add more, say, 10uf/25volt.<br /> MS</div>
 

FOMOGO

Active User
H-M Supporter-Premium Member
Joined
Sep 2, 2013
Messages
1,749
Likes
1,645
#11
<div class="bbWrapper"><div class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote"> <div class="bbCodeBlock-title"> <a href="/goto/post?id=450222" class="bbCodeBlock-sourceJump" data-xf-click="attribution" data-content-selector="#post-450222">FanMan said:</a> </div> <div class="bbCodeBlock-content"> <div class="bbCodeBlock-expandContent"> Not sure yet how I'm going to machine down the lip on the hole... it's about 1/2&quot; high and I need to remove about half of that. I could just cut it out with a Sawzall, but I'd like to retain at least part of the lip for the stiffness it provides. </div> <div class="bbCodeBlock-expandLink"><a>Click to expand...</a></div> </div> </div> If you have a Dremel or a die grinder with HSS or carbide burr, I think that would do a nicer job than the Sawzall. Mike</div>
 

FanMan

Mechanical Hacker
Active Member
Joined
Mar 14, 2013
Messages
345
Likes
210
#12
<div class="bbWrapper">It spins!<br /> <br /> Tonight I got the motor mounted and [temporarily] wired. I ended up having to cut the entire lip out of the belt guard as there was less clearance than I thought, but the sawzall made short work of that, and the enlarged hole gave more room for motor adjustment. Then a couple of evenings fiddling with the motor mount to get the center of adjustment in the right place. Before that I got all the wiring to the head and hooked up to the switch and the 12VDC power supply. Of course I decided there was a better way to wire it after it was half done, which required redoing some of it, but that's done now.<br /> <br /> With the belts as you see them below, it goes from too slow to measure (with the Heathkit tachometer) but estimated around 100 rpm up to 4000 rpm, and is smooth as silk.<br /> <br /> <a href="https://www.hobby-machinist.com/attachments/motor_mount_200646257-jpg.143643/" target="_blank"><img src="/data/attachments/100/100879-e921034ce600beb2a725a0778b3b2af9.jpg" class="bbImage" alt="motor_mount_200646257.jpg" /></a> <br /> <a href="https://www.hobby-machinist.com/attachments/motor_installed_200638039-jpg.143644/" target="_blank"><img src="/data/attachments/100/100880-a7ff5220fd5a0585c196cadeb8764c8a.jpg" class="bbImage" alt="motor_installed_200638039.jpg" /></a> <br /> Still to do is finish the permanent motor wiring, and wiring for the tachometer and fan.</div>
 

FanMan

Mechanical Hacker
Active Member
Joined
Mar 14, 2013
Messages
345
Likes
210
#13
<div class="bbWrapper"><div class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote"> <div class="bbCodeBlock-title"> <a href="/goto/post?id=450332" class="bbCodeBlock-sourceJump" data-xf-click="attribution" data-content-selector="#post-450332">markba633csi said:</a> </div> <div class="bbCodeBlock-content"> <div class="bbCodeBlock-expandContent"> I'm not surprised no power supply decoupling (filter) cap was shown in the original circuit- It's assumed if you have worked with 555s before you would know to add one.<br /> If it seems to work without one you should add it anyway because the circuit may be unstable without it. I would actually add more, say, 10uf/25volt.<br /> MS </div> <div class="bbCodeBlock-expandLink"><a>Click to expand...</a></div> </div> </div>What do you mean by &quot;unstable&quot;? Though I think I know. It's been working, most of the time, but then it'll just stop working, apparently it drifts off the frequency the motor control board expects. Sometimes I can tweak the trim pot one way or another and it'll start working again, but this evening was frustrating.... I had everything working, all the final wiring done, and then it started working intermittently, now it doesn't work at all. I do think the trim pot is the issue at the moment as the nose where the adjustment screw is came loose at one point, though it still worked when I pushed it back together and held it with some hot melt glue.</div>
 

brino

Active User
H-M Supporter - Sustaining Member
Joined
Jan 2, 2014
Messages
3,394
Likes
3,408
#14
<div class="bbWrapper"><div class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote"> <div class="bbCodeBlock-title"> <a href="/goto/post?id=451100" class="bbCodeBlock-sourceJump" data-xf-click="attribution" data-content-selector="#post-451100">FanMan said:</a> </div> <div class="bbCodeBlock-content"> <div class="bbCodeBlock-expandContent"> What do you mean by &quot;unstable&quot;? </div> <div class="bbCodeBlock-expandLink"><a>Click to expand...</a></div> </div> </div>Capacitors are used with digital logic devices to help provide stable power. When a digital logic circuit switches, it can draw hundreds of milli-amps of current from the local power rail. The power supply will try to supply the current, but it might be electrically far away. Any long wires provide both resistance and inductance, and both limit current flow. The voltage rail can &quot;droop&quot; or dip.<br /> <br /> Decoupling or filter capacitors act like small local batteries. They are placed as close as possible to digital devices. Most of the time, they just sit there charging/charged up to the the supply voltage (Vcc, Vdd, rail voltage, etc.). However, when some digital logic switches and suddenly draws more current, the capacitors help supply it. Therefore they help maintain a stable local supply voltage to the digital device.<br /> <br /> Many digital device can do very goofy things when they lose stable power.<br /> <br /> The decoupling capacitor value is normally chosen to help at the switching frequency of the circuit. The value is normally some tiny part of a Farad (like micro-Farad, or uF). For this circuit (where the frequency varies based on the position of the potentiometer) I'd likely add three decoupling capacitors; two of 0.1uF (one across each 555 power pins) and one of 50-100uF somewhere on the board.<br /> <br /> Be sure the capacitors are rated for at least the 12V supply you are using, and that they get connected properly if they care (some are polarized, some not).<br /> <br /> -brino</div>
 
Last edited:

markba633csi

H-M Supporter - Premium Member
H-M Supporter-Premium Member
Joined
Apr 30, 2015
Messages
2,566
Likes
1,332
#15
<div class="bbWrapper">Oscillation is what I meant. The circuit could suddenly break into oscillation and give all sorts of goofy behavior. Without a scope it can be hard to figure out what's going on.<br /> Just add plenty of decoupling cap and it shouldn't be a problem. <br /> MS<br /> ps what Brino said too.</div>
 

FanMan

Mechanical Hacker
Active Member
Joined
Mar 14, 2013
Messages
345
Likes
210
#16
<div class="bbWrapper">Thanks, about what I figured. The PWM frequency in this case is somewhere between 17-20 hz. I'll have to see what's laying around in my electronics box. Funny how it works, then doesn't, then works again... but when it <i>did</i> work, it was at the hairy end of the trimmer's adjustment, so I may have to increase R1 a bit more, too.<br /> <br /> Or I could just bypass all this fiddling and buy a MC-60 controller which only needs a pot to control the speed...</div>
 

FanMan

Mechanical Hacker
Active Member
Joined
Mar 14, 2013
Messages
345
Likes
210
#17
<div class="bbWrapper">I finally have everything working.<br /> <br /> I think there were multiple problems with my 555 based circuit. Last week I borrowed an oscilloscope from a friend to look at things before replacing the trim pot and adding the decoupling caps. It looks like something fried the second stage 555 as I was getting a 21-23hz signal from the first stage, but nothing from the second. And something was wrong with the first stage too, as the frequency wasn't what it should have been based on the R-C values I used. Then when I was poking around further I must have missed with the probe, I heard a little &quot;pop&quot; and that was the end.<br /> <br /> But I had already bought an Arduino to play with &quot;just in case&quot;, which I should have done in the first place (and which I recommend to anybody trying to use an MC-2100). The $10 for an clone Arduino Uno board is less than I spent on all the other stuff. I've never used one before, but it's stupid easy to use if you know anything at all about programming. I started with another page at <a href="https://sonsofinvention.wordpress.com/2013/05/22/arduino-compatible-mc-2100-controller-and-lathe-tachometer/" target="_blank" class="link link--external" data-proxy-href="/proxy.php?link=https%3A%2F%2Fsonsofinvention.wordpress.com%2F2013%2F05%2F22%2Farduino-compatible-mc-2100-controller-and-lathe-tachometer%2F&amp;hash=e16673adadfcbf195fb725dc3327c7ef" rel="nofollow noopener">Sons of Invention,</a> which shows one setup much more complicated than I wanted (since I already had a separate tach) and another simplified one that didn't work as presented. I started with the simple one, tweaked it a bit with bits of the more complex code, and had it working in short order.<br /> <br /> As you can see the wiring is a <i>lot</i> simpler than the 555 based circuit (below circuit modified from the one on the SOI page):<br /> <br /> <a href="https://www.hobby-machinist.com/attachments/simple-mc2100-arduino-circuit_fixed-jpg.224810/" target="_blank"><img src="/data/attachments/182/182047-ba06d9505aff8365c45dbd7343ad1a7c.jpg" class="bbImage" alt="Simple MC2100 Arduino Circuit_fixed.jpg" /></a> <br /> <br /> Wires going to the board were soldered to header pin connectors and strain relieved (sort of) with hot melt glue. The red connector in the lower left corner was an extra that I cut out of the treadmill so I could do all my soldering on the bench instead of the side of the machine:<br /> <br /> <a href="https://www.hobby-machinist.com/attachments/arduino-wired_130324707-jpg.224811/" target="_blank"><img src="/data/attachments/182/182048-e8633b401357025e07d9eb3659de0186.jpg" class="bbImage" alt="arduino-wired_130324707.jpg" /></a> <br /> I spent some more time today getting the tach (ebay, about $10) working once I figured out the wiring of the Chinese labeled components, and got everything mounted in a box. That's the sensor for the tach just to the right of the tach display.<br /> <br /> <a href="https://www.hobby-machinist.com/attachments/controls_133611693-jpg.224812/" target="_blank"><img src="/data/attachments/182/182049-136c9be82fd41464c5c2d950d572b020.jpg" class="bbImage" alt="controls_133611693.jpg" /></a> <br /> Here's the box on the back of the mill with the MC-2100 controller and the auxiliary power outlets. The toggle switch is the motor reversing switch, safely out of the way (by all accounts reversing the motor while it's running will fry the controller). All the air vents in the box are covered on the inside with window screen to keep chips out.<br /> <br /> <a href="https://www.hobby-machinist.com/attachments/mc-enclosure_133722581-jpg.224813/" target="_blank"><img src="/data/attachments/182/182050-d0d494350a8ad294cbf23cca3fd2995e.jpg" class="bbImage" alt="MC-enclosure_133722581.jpg" /></a> <br /> And here's the wiring to the motor, and the new fan (salvaged from an old computer):<br /> <br /> <a href="https://www.hobby-machinist.com/attachments/motor_135218529-jpg.224814/" target="_blank"><img src="/data/attachments/182/182051-88a165972d4e26b7107ebd651c19d498.jpg" class="bbImage" alt="motor_135218529.jpg" /></a> <br /> <br /> The mill's original power switch now switches power to the motor controller, which in turn also provides the 12VDC power for the Arduino. I added another power switch next to it which turns on a separate 12V power supply which runs the fan, display lights, and tachometer (since I don't know how much power the MC-2100 can supply). The smaller switch below the tach is the one that actually starts and stops the motor in normal use.<br /> <br /> Everything seems to be working quite well. RPM range is from a little over 4000 max to something too low for the tach to measure reliably but something under 200 rpm. I currently have the belts at a 1.4:1 ratio which seems good for normal use but if I want to go really slow I can use the 1.9:1 or the 4.8:1 ratios. The motor rpm does seem to drift up and down a bit, but I don't think it'll be a big issue. If it becomes a problem I may try hooking up the tachometer input to the MC-2100... there was a reed switch on the treadmill's driven pulley reporting rpm back to the board but I don't know if it actually was for motor control feedback or just for the walking speed display. At any rate, it runs without it.<br /> <br /> Sigh, this was one project that took <b>far</b> longer than it should have...</div>
 
Last edited:

FanMan

Mechanical Hacker
Active Member
Joined
Mar 14, 2013
Messages
345
Likes
210
#18
<div class="bbWrapper">By request, here is the Arduino code. Save as an .ino file or cut and paste it into the development environment:<br /> <br /> <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"> <div class="bbCodeBlock-title"> Code: </div> <div class="bbCodeBlock-content" dir="ltr"> <pre class="bbCodeCode" dir="ltr" data-xf-init="code-block" data-lang=""><code>#include &lt;TimerOne.h&gt; /* MC-2100 Treadmill Motor Controller Interface Lathe Motor Controller via PWM ON/OFF Toggle Original from Joe Schoolcraft Brian Schoolcraft May 2013 https://sonsofinvention.wordpress.com/2013/05/22/arduino-compatible-mc-2100-controller-and-lathe-tachometer Updates to make it work and add debounce FanMan 170122 */ #define POT_READ A0 //Wiper of pot connected as voltage divider (Speed Command) #define PWM_OUT 9 //Connected to blue wire of MC2100 (50ms period PWM out) #define ON_OFF 12 //On/Off Switch Input #define TO_LOW_DELAY 50 //Debounce time for HI to LO switch transition #define TO_HIGH_DELAY 50 //Debounce time for LO to HI switch transition #define PWM_CYCLE 50.0 //Output Signal PWM Period (50ms) #define POT_DIF 4 //Change detection threshold on pot #define MAX_DUTY 869 //Max Duty Cycle expected by MC-2100 (85% of 1023) #define MIN_DUTY 0 //Min Duty Cycle expected by MC-2100 (0% of 1023) int potTemp; int potValue; int lastPotValue; int potCheck; int speedLevel; byte onOffState = 0; byte lastonOffState = 0; unsigned long lastOnOffTime = 0; void setup() { pinMode(POT_READ, INPUT); pinMode(PWM_OUT, OUTPUT); pinMode(ON_OFF, INPUT_PULLUP); //Enable internal pullup resistor to simplify external circuit Timer1.initialize(PWM_CYCLE * 1000); //Set pin 9 and 10 period to 50 ms Timer1.pwm(PWM_OUT, 25); //Start PWM at 0% duty cycle } void loop() { //Read and condition pot value potTemp = analogRead(POT_READ); potCheck = abs(potTemp - potValue); if (potCheck &gt;= POT_DIF) { //Only accept new value if it’s far enough from the current accepted value potValue = potTemp; } speedLevel = map(potValue, 0, 1023, 0, MAX_DUTY); //Convert Pot input to pwm level to send to MC-2100 onOffState = debounce(ON_OFF, &amp;lastonOffState, &amp;lastOnOffTime, TO_LOW_DELAY, TO_HIGH_DELAY); if (onOffState == LOW) { //Off switch to ground is closed Timer1.setPwmDuty(PWM_OUT, 0); //Shut down MC-2100 } if (onOffState == HIGH) { //ON switch to ground is open Timer1.setPwmDuty(PWM_OUT, speedLevel); //Send speed command to MC-2100 } } //////////////////////////////////////////////////////////////////////////////////////////// /* Function for debouncing digital inputs Arguments: _debouncePin - ID of pin to be read/debounced lastReading - pointer to variable storing the previous reading (HIGH/LOW) of the input pin lastDebounceTime - pointer to variable storing the last time (ms) the input changed (not debounced) _toLowDelay - debounce time for HIGH to LOW transition _toHighDelay - debounce time for LOW to HIGH transition Returns: _state - debounced state (HIGH/LOW) of _debouncePin */ //////////////////////////////////////////////////////////////////////////////////////////// byte debounce(byte _debouncePin, byte * lastReading, unsigned long * lastDebounceTime, int _toLowDelay, int _toHighDelay) { byte _reading = digitalRead(_debouncePin); byte _state = *lastReading; if (_reading != *lastReading) { // pin state just changed *lastDebounceTime = millis(); // reset the debouncing timer } if ((millis() - *lastDebounceTime) &gt;= _toLowDelay &amp;&amp; _reading == LOW) { // whatever the reading is at, it's been there for longer // than the hold delay, so take it as the actual current state for use in the rest of the script _state = _reading; *lastReading = _reading; return _state; } if ((millis() - *lastDebounceTime) &gt;= _toHighDelay &amp;&amp; _reading == HIGH) { // whatever the reading is at, it's been there for longer // than the hold delay, so take it as the actual current state for use in the rest of the script _state = _reading; *lastReading = _reading; return _state; } *lastReading = _reading; return _state; } ///////////////////////////////////////////////////////////////</code></pre> </div> </div></div>
 

hman

Active User
H-M Supporter - Sustaining Member
Joined
Feb 17, 2013
Messages
1,667
Likes
1,278
#19
<div class="bbWrapper">Thank you!</div>
 

HattyDamp

Swarf
Registered Member
Joined
Feb 6, 2017
Messages
2
Likes
0
#20
<div class="bbWrapper">Hi everyone...i am a new user here. It is a stout motor, must be from a commercial treadmill. I found one used for my wife a few years back and I think she would be a little upset if I commandeered it. I am betting your really going to like that kind of rpm range and torque, but you may have to upgrade the spindle bearings to take full advantage of the top end potential.<br /> <br /> <a href="http://www.7pcb.com/PCB-Assembly-Service.php" target="_blank" class="link link--external" data-proxy-href="/proxy.php?link=http%3A%2F%2Fwww.7pcb.com%2FPCB-Assembly-Service.php&amp;hash=7db42ad0f0548507987989dfde51163b" rel="nofollow noopener">printed circuit assembly</a></div>
 
Last edited:

FanMan

Mechanical Hacker
Active Member
Joined
Mar 14, 2013
Messages
345
Likes
210
#21
<div class="bbWrapper">A late update: As of today the mill and motor drive is still working, no problems. But... looks like there's a much easier way to control the MC-2100. I needed a speed control for some old computer fans (they also take a PWM signal). I was ready to do the Arduino thing again, but then I got to thinking, &quot;with all the cheap Chinese electronics around somebody must make a simple adjustable PWM generator.&quot; Didn't take long to find this <a href="https://www.amazon.com/gp/product/B01MA1M7Y9" target="_blank" class="link link--external" data-proxy-href="/proxy.php?link=https%3A%2F%2Fwww.amazon.com%2Fgp%2Fproduct%2FB01MA1M7Y9&amp;hash=dfd1c7dc770dc5a4b360ed4b098404c8" rel="nofollow noopener">cheap PWM signal generator</a> that should do the same thing as the Ardudino circuit... for under $10 with no additional components required. I didn't try it with my mill but it worked perfectly with the fans so it should work just as well with a MC-2100.</div>
 

Z2V

H-M Supporter - Premium Member
H-M Supporter-Premium Member
Joined
May 10, 2017
Messages
597
Likes
555
#22
<div class="bbWrapper">FanMan, thanks for the link. I just ordered one for myself.</div>
 
[6]
[5] [7]
Top