The making of a spindle encoder for a Janome MB4

While I am not a full time embroiderer, I am a full time nerd.  So, this project incorporated all of my hobbies.  It might be overly niche, but I found it useful.  Here is goes:

“I have become an embroidery technician, not by choice, but out of necessity.”

I purchased a “basket case” Janome MB4S parts machine, because I had bricked my Janome MB4 by performing a firmware update that had failed.  I pulled the ROM chips off the failed MB4S, made a copy of them and then resolder them back to the MB4S main board.  I was able to get my original MB4 working again and “Tune it up” so it sewed better than when I had purchased it (it was used).

So, now I had to figure out what to do with this parts machine.  It powered on, but the pantograph failed to move.  I was able to repair the damaged chips (I now repair broken Janome B-Boards, Happy Voyager and some others that have failed stepper driver chips).  Long story short, I was able to successfully repair the electronics, but the machine was a different story.  Apparently, the previous owner had tried to fix the machine, but seemed to make it worse.  So, when the needle head moved, it ground, was out of balance and the timing was totally off.  I had to go back and “blue print” the machine.

Now, the Janome MB4 and MB4S machines are old school and have a degree indicator on the back of the spindle.  Great, except that you can only read it when the covers of the machine are off.  That involves about 10 screws AND it is on the back of the machine.  So while you are trying to watch the low point of needle travel and it is suppose to be at a certain degree, you are forced to get up and go behind the machine to read the degree.  This is what Janome intended.  Unfortunately, someone in the past (previous owner) broke off the degree pointer.  I had to basically guess.  I worked up a crude degree indicator, but I figured there had to be a better way…

So I made a clip on degree display that will tell you EXACTLY (more precisely than the pointer/dial) the degree your spindle is at, to a quarter of a degree (0.25).

Alpha version of Spindle Rotary Encoder

Before I got to the Alpha phase, I had to start somewhere.  Figuring out how I was going to mount an encoder to the machine was my first step.  Since the space behind the machine is not flat, nor is there a lot of space around the handle/flywheel, I desired that I would 3D scan the back of the machine.

3D scan of the back of a Janome MB4 machine]

I was able to come up with a plan of how to attach an encoder to the machine by clamping part of the encoder to the flywheel.

From there I need to figure out a way to prevent the whole contraption from spinning, but also allow it to clamp to the flywheel.  In 3d CAD, I made some reference points (geometry) that would let me design a clamp and a mount to keep the encoder body from spinning.

With these anchor points I was able to model an encoder mount and a clamp that would fit but not hit the machine.

It took me a few revisions to get what I wanted.  At first it was 3 individual pieces because I was trying to keep the encoder concentric to the spindle but still allow for a little run-out.  Also I still needed to be able to turn the flywheel to advance the spindle/needle/rotary hook.

The finished parts ready to be 3D Printed

With the parts printed and appear to fit and work as I had designed, I decided it was time to focus on the electrics of the project.  I decided to go with an Arduino Uno.  They are cheap and I happen to have a few on hand.  Next, I chose a LCD screen that I also had on hand.  A 360 degree count encoder was chosen to make the math easy and to keep from overwhelming the Arduino.

With all the parts in hand, now came the programming.  Since I was not treading new ground here, most encoder code for the Arduino has been fully vetted.  All I had to do was generate some “glue” routines and add some functions to display the degree count and to handle roll over (complete revolution) along with a “known position” function.

With the code written and uploaded to the Arduino, it was time to test.  As you can see from the first photo, it worked better than I had anticipated.

I decided to whittle down the 3d printed parts to the bare necessity and was able to consolidate all the function into 2 plastic parts that act as the flywheel clamp and the encoder mount/stop.

I decided that scallops would make the encoder wheel easier to grab with oily/greasy fingers.  Also realized that there needed to be some adjustable clamping pressure on the flywheel.  So I added a captive M3 nut and screw.  While everything is “press fit”, I decided to also add a single screw to lock the encoder housing to the mount.

With the hard part done, I needed to put the electronics in a case.  I found an Arduino/LCD stack case on Thingiverse.com that would work perfect for this project and make it look finished.

So, was all this work worth it?  For me, yes.  I enjoyed doing this project and I am now able to service any Janome MB4 machine and perform analysis of the motor, check/adjust rotary timing of the machine and even change a rotary hook, all without removing the cover of the machine and do it more accurately than Janome’s built in timing marks on the machine.

If you’re looking to reproduce this project for your own use I’m going to put the source code on my public GitHub page. I’ll also have the models on Thingiverse.com.


This article was submitted by one of our EMBNerd members. We’d like to thank Bruce Clark for his efforts in supplying the Nerds with this incredible article.